const-fy regcache::m_aspace
[external/binutils.git] / gdb / ChangeLog
1 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2
3         * breakpoint.c (insert_single_step_breakpoints): Update.
4         * frame.c (struct frame_info) <aspace>: Add const.
5         (frame_save_as_regcache): Add const.
6         (get_frame_address_space): Return const address_space *.
7         * frame.h (get_frame_address_space): Update declaration.
8         * infrun.c (struct step_over_info) <aspace>: Add const.
9         (set_step_over_info): Make aspace const.
10         (displaced_step_prepare_throw): Change variable const.
11         (resume): Likewise.
12         (proceed): Likewise.
13         (adjust_pc_after_break): Likewise.
14         (save_waitstatus): Likewise.
15         (handle_signal_stop): Likewise.
16         (keep_going_pass_signal): Likewise.
17         * jit.c (jit_frame_sniffer): Add const.
18         * mips-tdep.c (mips_single_step_through_delay): Likewise.
19         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
20         * record-full.c (record_full_wait_1): Likewise.
21         * regcache.c (regcache::regcache): Change parameter to const.
22         * regcache.h (regcache::regcache): Likewise.
23         (regcache::aspace): Return const address_space *.
24         (regcache) <m_aspace>: Add const.
25
26 2017-11-02  Yao Qi  <yao.qi@linaro.org>
27
28         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
29         * frame.c (create_sentinel_frame): Likewise.
30         * infrun.c (displaced_step_prepare_throw): Likewise.
31         (resume): Likewise.
32         (thread_still_needs_step_over_bp): Likewise.
33         (proceed): Likewise.
34         (do_target_wait): Likewise.
35         (adjust_pc_after_break): Likewise.
36         (handle_syscall_event): Likewise.
37         (save_waitstatus): Likewise.
38         (handle_inferior_event_1): Likewise.
39         (handle_signal_stop): Likewise.
40         (keep_going_pass_signal): Likewise.
41         * linux-nat.c (status_callback): Likewise.
42         (save_stop_reason): Likewise.
43         (resume_stopped_resumed_lwps): Likewise.
44         * record-full.c (record_full_exec_insn): Likewise.
45         (record_full_wait_1): Likewise.
46         * regcache.c (get_regcache_aspace): Remove.
47         * regcache.h (get_regcache_aspace): Remove.
48
49 2017-11-02  Yao Qi  <yao.qi@linaro.org>
50
51         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
52         (init_regcache_descr): Use gdbarch_num_regs.
53         (regcache::regcache): Likewise.
54         (regcache::get_register_status): Likewise.
55         (regcache::assert_raw_regnum): Likewise.
56         (regcache::cooked_read): Likewise.
57         (regcache::cooked_read_value): Likewise.
58         (regcache::cooked_write): Likewise.
59         (regcache::dump): Likewise.
60         (regcache::num_raw_registers): New method.
61         * regcache.h (class regcache) <num_raw_registers>: New.
62
63 2017-11-02  Yao Qi  <yao.qi@linaro.org>
64
65         * regcache.c (regcache::assert_regnum): New method.
66         (regcache::invalidate): Call assert_regnum.
67         (regcache::raw_update): Likewise.
68         (regcache::raw_write): Likewise.
69         (regcache::raw_read_part): Likewise.
70         (regcache::raw_write_part): Likewise.
71         (regcache::raw_supply): Likewise.
72         (regcache::raw_supply_integer): Likewise.
73         (regcache::raw_supply_zeroed): Likewise.
74         (regcache::raw_collect): Likewise.
75         (regcache::raw_collect_integer): Likewise.
76         * regcache.h (regcache::assert_regnum): Declare.
77
78 2017-11-02  Yao Qi  <yao.qi@linaro.org>
79
80         * regcache.c (regcache::dump): Remove code.
81
82 2017-11-02  Yao Qi  <yao.qi@linaro.org>
83
84         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
85         Remove.
86         <sizeof_cooked_register_status>: Remove.
87         (init_regcache_descr): Update.
88         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
89         (regcache::save): Likewise.
90         (regcache::dump): Likewise.
91
92 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
93
94         * ft32-tdep.c (ft32_fetch_instruction): New function.
95         (ft32_analyze_prologue): Use ft32_fetch_instruction().
96
97 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
98
99         * cli/cli-script.c (execute_control_command): Rename to ...
100         (execute_control_command_1): ... this.
101         (execute_control_command): New function.
102
103 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
104
105         * tracepoint.c (tfind_command): Remove const_cast.
106
107 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
108
109         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
110
111 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
112
113         * common/common-utils.h (in_inclusive_range): New function.
114         * arm-tdep.c (arm_record_extension_space): Use
115         in_inclusive_range.
116         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
117         * cris-tdep.c (cris_spec_reg_applicable): Use
118         in_inclusive_range.
119
120 2017-10-30  Pedro Alves  <palves@redhat.com>
121             Simon Marchi <simon.marchi@ericsson.com>
122
123         * remote.c (remote_set_syscall_catchpoint): Build a std::string
124         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
125
126 2017-10-30  Pedro Alves  <palves@redhat.com>
127
128         * common/common-utils.c (string_appendf, string_vappendf): New
129         functions.
130         * common/common-utils.h (string_appendf, string_vappendf): New
131         declarations.
132         * unittests/common-utils-selftests.c (string_appendf_func)
133         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
134         (string_vappendf_tests): New functions.
135         (_initialize_common_utils_selftests): Register "string_appendf" and
136         "string_vappendf tests".
137
138 2017-10-30  Pedro Alves  <palves@redhat.com>
139
140         * unittests/common-utils-selftests.c (format_func): New typedef.
141         (string_printf_tests, string_vprintf_tests): Tests factored out
142         and merged to ...
143         (test_format_func): ... this new function.
144         (string_printf_tests, string_vprintf_tests): Reimplement on top of
145         test_format_func.
146
147 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
148
149         * darwin-nat.c: Remove include of gdb.h.
150
151 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
152
153         * xtensa-xtregs.c: Fix formatting issues.
154
155 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
156
157         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
158
159 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
160
161         PR python/21213
162         * python/py-infthread.c (thpy_get_inferior): Increment reference
163         of inferior before returning it.
164
165 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
166
167         * unittests/common-utils-selftests.c (format): Add
168         ATTRIBUTE_PRINTF.
169
170 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
171
172         * xml-syscall.c (struct syscall_desc): Add constructor.
173         <name>: Change type to std::string.
174         (syscall_desc_up): New typedef.
175         (syscall_desc_p): Remove typeder.
176         (DEF_VEC_P(syscall_desc_p)): Remove.
177         (struct syscall_group_desc): Add constructor.
178         <name>: Change type to std::string.
179         <syscalls>: Change type to std::vector.
180         (syscall_group_desc_up): New typedef.
181         (syscall_group_desc_p): Remove typedef.
182         (DEF_VEC_P(syscall_group_desc_p)): Remove.
183         (struct syscalls_info) <syscalls>: Change type to std::vector of
184         unique_ptr.
185         <groups>: Likewise.
186         <my_gdb_datadir>: Change type to std::string.
187         (syscalls_info_up): New typedef.
188         (allocate_syscalls_info): Remove.
189         (syscalls_info_free_syscalls_desc): Remove.
190         (syscalls_info_free_syscall_group_desc): Remove.
191         (free_syscalls_info): Remove.
192         (make_cleanup_free_syscalls_info): Remove.
193         (syscall_group_create_syscall_group_desc): Adjust.
194         (syscall_group_add_syscall): Adjust.
195         (syscall_create_syscall_desc): Adjust.
196         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
197         (init_syscalls_info): Adjust.
198         (syscall_group_get_group_by_name): Adjust.
199         (xml_get_syscall_number): Adjust.
200         (xml_get_syscall_name): Adjust.
201         (xml_list_of_syscalls): Adjust.
202         (xml_list_syscalls_by_group): Adjust.
203         (xml_list_of_groups): Adjust.
204
205 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
206
207         * probe.h: Don't include gdb_vecs.h.
208         (DEF_VEC_P (probe_p)): Remove.
209         (find_probes_in_objfile): Return an std::vector.
210         * probe.c (find_probes_in_objfile): Likewise.
211         * breakpoint.c (breakpoint_objfile_data)
212         <longjmp_probes>: Change type to std::vector.
213         <exception_probes>: Likewise.
214         (free_breakpoint_probes): Don't manually free vectors.
215         (create_longjmp_master_breakpoint): Adjust.
216         (create_exception_master_breakpoint): Adjust.
217         * solib-svr4.c (svr4_create_probe_breakpoints): Change
218         parameter type, adjust.
219         (svr4_create_solib_event_breakpoints): Adjust.
220
221 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
222
223         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
224         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
225         with new.
226         (free_breakpoint_probes): Rename to ...
227         (free_breakpoint_objfile_data): ... this, and call delete on
228         bp_objfile_data..
229
230 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
231
232         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
233         (loaded_script_ptr): Remove typedef.
234         (DEF_VEC_P (loaded_script_ptr)): Remove.
235         (struct collect_matching_scripts_data): Add constructor.
236         <scripts_p>: Change type to (pointer to) std::vector.
237         (collect_matching_scripts_data): Adjust.
238         (sort_scripts_by_name): Make suitable for std::sort.
239         (print_scripts): Don't sort vector, adjust to std::vector.
240         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
241
242 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
243
244         * symfile.c (filename_language): Make struct, not typedef.  Add
245         constructor.
246         <ext>: Change type to std::string.
247         (DEF_VEC_O (filename_language)): Remove.
248         (filename_language_table): Change type to std::vector.
249         (add_filename_language): Adjust.
250         (set_ext_lang_command): Adjust.
251         (info_ext_lang_command): Adjust.
252         (deduce_language_from_filename): Adjust.
253         (class scoped_restore_filename_language_table): Remove.
254         (test_filename_language): Use scoped_restore.
255         (test_set_ext_lang_command): Use scoped_restore, adjust to
256         std::vector change.
257
258 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
259
260         * symfile.c: Include selftest.h.
261         (class scoped_restore_filename_language_table): New.
262         (test_filename_language): New test.
263         (test_set_ext_lang_command): New test.
264         (_initialize_symfile): Register tests.
265
266 2017-10-27  Keith Seitz  <keiths@redhat.com>
267
268         * breakpoint.c (print_breakpoint_location): Use the symbol saved
269         in the bp_location, falling back to find_pc_sect_function when
270         needed.
271         (add_location_to_breakpoint): Save sal->symbol.
272         * breakpoint.h (struct bp_location) <symbol>: New field.
273         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
274         * symtab.h (struct symtab_and_line) <symbol>: New field.
275
276 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
277
278         PR gdb/13669
279         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
280         to rewind obstack.
281
282 2017-10-26  Pedro Alves  <palves@redhat.com>
283
284         * remote.c (remote_async_terminal_ours_p): Delete.
285         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
286         Remove references to 'remote_async_terminal_ours_p'.
287
288 2017-10-26  Yao Qi  <yao.qi@linaro.org>
289
290         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
291
292 2017-10-26  Yao Qi  <yao.qi@linaro.org>
293
294         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
295         aspace const.
296         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
297         Likewise.
298         * breakpoint.c (bpstat_check_location): Remove cast.
299         (breakpoint_hit_catch_fork): Make aspce const.
300         (breakpoint_hit_catch_solib): Likewise.
301         (breakpoint_hit_catch_exec): Likewise.
302         (breakpoint_hit_ranged_breakpoint): Likewise.
303         (breakpoint_hit_watchpoint): Likewise.
304         (base_breakpoint_breakpoint_hit): Likewise.
305         (bkpt_breakpoint_hit): Likewise.
306         (dprintf_breakpoint_hit): Likewise.
307         (tracepoint_breakpoint_hit): Likewise.
308         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
309
310 2017-10-26  Yao Qi  <yao.qi@linaro.org>
311
312         * breakpoint.c (breakpoint_location_address_match): Change
313         "struct address_space *" to "const address_space".
314         (breakpoint_location_address_range_overlap): Likewise.
315         (breakpoint_here_p): Likewise.
316         (breakpoint_in_range_p): Likewise.
317         (moribund_breakpoint_here_p): Likewise.
318         (bp_location_inserted_here_p): Likewise.
319         (software_breakpoint_inserted_here_p): Likewise.
320         (hardware_breakpoint_inserted_here_p): Likewise.
321         (hardware_watchpoint_inserted_in_range): Likewise.
322         (bpstat_check_location): Likewise.
323         (bpstat_stop_status): Likewise.
324         (breakpoint_address_match): Likewise.
325         (breakpoint_address_match_range): Likewise.
326         (breakpoint_location_address_match): Likewise.
327         (breakpoint_location_address_range_overlap): Likewise.
328         (insert_single_step_breakpoint): Likewise.
329         (breakpoint_has_location_inserted_here): Likewise.
330         (single_step_breakpoint_inserted_here_p): Likewise.
331         (pc_at_non_inline_function): Likewise.
332         * breakpoint.h (bpstat_stop_status): Update declaration.
333         (breakpoint_here_p): Likewise.
334         (breakpoint_in_range_p): Likewise.
335         (moribund_breakpoint_here_p): Likewise.
336         (breakpoint_inserted_here_p): Likewise.
337         (software_breakpoint_inserted_here_p): Likewise.
338         (hardware_breakpoint_inserted_here_p): Likewise.
339         (breakpoint_has_location_inserted_here): Likewise.
340         (single_step_breakpoint_inserted_here_p): Likewise.
341         (hardware_watchpoint_inserted_in_range): Likewise.
342         (breakpoint_address_match): Likewise.
343         (insert_single_step_breakpoint): Likewise.
344         (pc_at_non_inline_function): Likewise.
345         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
346         * record.c (record_check_stopped_by_breakpoint): Likewise.
347         * record.h (record_check_stopped_by_breakpoint): Likewise.
348         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
349
350 2017-10-25  Yao Qi  <yao.qi@linaro.org>
351
352         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
353         regcache->arch () instead get_regcache_arch.
354         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
355         Likewise.
356         (aarch64_fbsd_store_inferior_registers): Likewise.
357         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
358         (store_gregs_to_thread): Likewise.
359         (fetch_fpregs_from_thread): Likewise.
360         (store_fpregs_to_thread): Likewise.
361         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
362         (aarch64_store_return_value): Likewise.
363         (aarch64_software_single_step): Likewise.
364         * aix-thread.c (aix_thread_wait): Likewise.
365         (supply_reg32): Likewise.
366         (supply_sprs64): Likewise.
367         (supply_sprs32): Likewise.
368         (fill_gprs64): Likewise.
369         (fill_gprs32): Likewise.
370         (fill_sprs64): Likewise.
371         (fill_sprs32): Likewise.
372         (store_regs_user_thread): Likewise.
373         (store_regs_kernel_thread): Likewise.
374         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
375         (alphabsd_store_inferior_registers): Likewise.
376         * alpha-tdep.c (alpha_extract_return_value): Likewise.
377         (alpha_store_return_value): Likewise.
378         (alpha_deal_with_atomic_sequence): Likewise.
379         (alpha_next_pc): Likewise.
380         (alpha_software_single_step): Likewise.
381         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
382         (amd64bsd_store_inferior_registers): Likewise.
383         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
384         Likewise.
385         (amd64_linux_store_inferior_registers): Likewise.
386         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
387         (amd64_collect_native_gregset): Likewise.
388         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
389         (amd64obsd_collect_uthread): Likewise.
390         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
391         (amd64_collect_fpregset): Likewise.
392         (amd64_supply_fxsave): Likewise.
393         (amd64_supply_xsave): Likewise.
394         (amd64_collect_fxsave): Likewise.
395         (amd64_collect_xsave): Likewise.
396         * arc-tdep.c (arc_write_pc): Likewise.
397         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
398         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
399         (arm_fbsd_store_inferior_registers): Likewise.
400         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
401         (store_vfp_regs): Likewise.
402         (arm_linux_fetch_inferior_registers): Likewise.
403         (arm_linux_store_inferior_registers): Likewise.
404         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
405         (arm_linux_sigreturn_next_pc): Likewise.
406         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
407         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
408         (fetch_register): Likewise.
409         (store_register): Likewise.
410         * arm-tdep.c (arm_is_thumb): Likewise.
411         (displaced_in_arm_mode): Likewise.
412         (bx_write_pc): Likewise.
413         (arm_get_next_pcs_addr_bits_remove): Likewise.
414         (arm_software_single_step): Likewise.
415         (arm_extract_return_value): Likewise.
416         (arm_store_return_value): Likewise.
417         (arm_write_pc): Likewise.
418         * bfin-tdep.c (bfin_extract_return_value): Likewise.
419         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
420         (bsd_uthread_store_registers): Likewise.
421         * core-regset.c (fetch_core_registers): Likewise.
422         * corelow.c (get_core_registers): Likewise.
423         * cris-tdep.c (cris_store_return_value): Likewise.
424         (cris_extract_return_value): Likewise.
425         (find_step_target): Likewise.
426         (find_step_target): Likewise.
427         (cris_software_single_step): Likewise.
428         * ctf.c (ctf_fetch_registers): Likewise.
429         * darwin-nat.c (cancel_breakpoint): Likewise.
430         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
431         * frv-tdep.c (frv_extract_return_value): Likewise.
432         * ft32-tdep.c (ft32_store_return_value): Likewise.
433         (ft32_extract_return_value): Likewise.
434         * go32-nat.c (fetch_register): Likewise.
435         (go32_fetch_registers): Likewise.
436         (go32_store_registers): Likewise.
437         (store_register): Likewise.
438         * h8300-tdep.c (h8300_extract_return_value): Likewise.
439         (h8300_store_return_value): Likewise.
440         * hppa-linux-nat.c (fetch_register): Likewise.
441         (store_register): Likewise.
442         (hppa_linux_fetch_inferior_registers): Likewise.
443         (hppa_linux_store_inferior_registers): Likewise.
444         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
445         (i386_darwin_store_inferior_registers): Likewise.
446         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
447         (gnu_store_registers): Likewise.
448         * i386-linux-nat.c (fetch_register): Likewise.
449         (store_register): Likewise.
450         (supply_gregset): Likewise.
451         (fill_gregset): Likewise.
452         (i386_linux_fetch_inferior_registers): Likewise.
453         (i386_linux_store_inferior_registers): Likewise.
454         (i386_linux_resume): Likewise.
455         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
456         Likewise.
457         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
458         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
459         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
460         (i386obsd_collect_uthread): Likewise.
461         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
462         (i386_supply_gregset): Likewise.
463         (i386_collect_gregset): Likewise.
464         (i386_supply_fpregset): Likewise.
465         (i386_collect_fpregset): Likewise.
466         (i386_mpx_bd_base): Likewise.
467         * i386-v4-nat.c (supply_fpregset): Likewise.
468         (fill_fpregset): Likewise.
469         * i387-tdep.c (i387_supply_fsave): Likewise.
470         (i387_collect_fsave): Likewise.
471         (i387_supply_fxsave): Likewise.
472         (i387_collect_fxsave): Likewise.
473         (i387_supply_xsave): Likewise.
474         (i387_collect_xsave): Likewise.
475         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
476         (ia64_linux_store_registers): Likewise.
477         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
478         (ia64_extract_return_value): Likewise.
479         (ia64_store_return_value): Likewise.
480         (find_func_descr): Likewise.
481         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
482         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
483         (inf_ptrace_store_registers): Likewise.
484         * infrun.c (use_displaced_stepping): Likewise.
485         (displaced_step_prepare_throw): Likewise.
486         (resume): Likewise.
487         (proceed): Likewise.
488         (do_target_wait): Likewise.
489         (adjust_pc_after_break): Likewise.
490         (handle_inferior_event_1): Likewise.
491         (handle_signal_stop): Likewise.
492         (save_infcall_suspend_state): Likewise.
493         (restore_infcall_suspend_state): Likewise.
494         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
495         * jit.c (jit_frame_prev_register): Likewise.
496         * linux-nat.c (save_stop_reason): Likewise.
497         (linux_nat_wait_1): Likewise.
498         (resume_stopped_resumed_lwps): Likewise.
499         * linux-record.c (record_linux_sockaddr): Likewise.
500         (record_linux_msghdr): Likewise.
501         (record_linux_system_call): Likewise.
502         * linux-tdep.c (linux_collect_thread_registers): Likewise.
503         * lm32-tdep.c (lm32_extract_return_value): Likewise.
504         (lm32_store_return_value): Likewise.
505         * m32c-tdep.c (m32c_read_flg): Likewise.
506         (m32c_pseudo_register_read): Likewise.
507         (m32c_pseudo_register_write): Likewise.
508         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
509         (m32r_linux_collect_gregset): Likewise.
510         * m32r-tdep.c (m32r_store_return_value): Likewise.
511         (m32r_extract_return_value): Likewise.
512         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
513         (m68kbsd_collect_fpregset): Likewise.
514         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
515         * m68k-linux-nat.c (fetch_register): Likewise.
516         (old_fetch_inferior_registers): Likewise.
517         (old_store_inferior_registers): Likewise.
518         (store_regs): Likewise.
519         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
520         (m68k_svr4_store_return_value): Likewise.
521         * m88k-tdep.c (m88k_store_arguments): Likewise.
522         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
523         (mi_cmd_data_write_register_values): Likewise.
524         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
525         (mips_fbsd_store_inferior_registers): Likewise.
526         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
527         (mips_fbsd_supply_gregs): Likewise.
528         (mips_fbsd_collect_fpregs): Likewise.
529         (mips_fbsd_collect_gregs): Likewise.
530         (mips_fbsd_supply_fpregset): Likewise.
531         (mips_fbsd_collect_fpregset): Likewise.
532         (mips_fbsd_supply_gregset): Likewise.
533         (mips_fbsd_collect_gregset): Likewise.
534         * mips-linux-nat.c (supply_gregset): Likewise.
535         (fill_gregset): Likewise.
536         (supply_fpregset): Likewise.
537         (fill_fpregset): Likewise.
538         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
539         (mips_fill_gregset): Likewise.
540         (mips_supply_fpregset): Likewise.
541         (mips_fill_fpregset): Likewise.
542         (mips64_supply_gregset): Likewise.
543         (micromips_linux_sigframe_validate): Likewise.
544         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
545         (mipsnbsd_fetch_inferior_registers): Likewise.
546         (mipsnbsd_store_inferior_registers): Likewise.
547         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
548         (mipsnbsd_supply_gregset): Likewise.
549         (mipsnbsd_iterate_over_regset_sections): Likewise.
550         (mipsnbsd_supply_reg): Likewise.
551         (mipsnbsd_supply_fpreg): Likewise.
552         * mips-tdep.c (mips_in_frame_stub): Likewise.
553         (mips_dummy_id): Likewise.
554         (is_octeon_bbit_op): Likewise.
555         (micromips_bc1_pc): Likewise.
556         (extended_mips16_next_pc): Likewise.
557         (mips16_next_pc): Likewise.
558         (deal_with_atomic_sequence): Likewise.
559         * moxie-tdep.c (moxie_process_readu): Likewise.
560         * nios2-tdep.c (nios2_get_next_pc): Likewise.
561         * nto-procfs.c (procfs_store_registers): Likewise.
562         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
563         (ppcfbsd_store_inferior_registers): Likewise.
564         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
565         (fetch_altivec_register): Likewise.
566         (get_spe_registers): Likewise.
567         (fetch_spe_register): Likewise.
568         (fetch_altivec_registers): Likewise.
569         (fetch_all_gp_regs): Likewise.
570         (fetch_all_fp_regs): Likewise.
571         (store_vsx_register): Likewise.
572         (store_altivec_register): Likewise.
573         (set_spe_registers): Likewise.
574         (store_spe_register): Likewise.
575         (store_altivec_registers): Likewise.
576         (store_all_gp_regs): Likewise.
577         (store_all_fp_regs): Likewise.
578         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
579         (ppc_linux_collect_gregset): Likewise.
580         (ppc_canonicalize_syscall): Likewise.
581         (ppc_linux_record_signal): Likewise.
582         (ppu2spu_prev_register): Likewise.
583         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
584         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
585         (ppcobsd_store_registers): Likewise.
586         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
587         Likewise.
588         (ppc_ravenscar_generic_store_registers): Likewise.
589         * procfs.c (procfs_fetch_registers): Likewise.
590         (procfs_store_registers): Likewise.
591         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
592         (ravenscar_store_registers): Likewise.
593         (ravenscar_prepare_to_store): Likewise.
594         * record-btrace.c (record_btrace_fetch_registers): Likewise.
595         * record-full.c (record_full_wait_1): Likewise.
596         (record_full_registers_change): Likewise.
597         (record_full_store_registers): Likewise.
598         (record_full_core_fetch_registers): Likewise.
599         (record_full_save): Likewise.
600         (record_full_goto_insn): Likewise.
601         * regcache.c (regcache_register_size): Likewise.
602         (get_regcache_arch): Remove.
603         (regcache_read_pc): Likewise.
604         * regcache.h (get_regcache_arch): Remove.
605         * remote-sim.c (gdbsim_fetch_register): Likewise.
606         (gdbsim_store_register): Likewise.
607         * remote.c (fetch_register_using_p): Likewise.
608         (send_g_packet): Likewise.
609         (remote_prepare_to_store): Likewise.
610         (store_registers_using_G): Likewise.
611         * reverse.c (save_bookmark_command): Likewise.
612         (goto_bookmark_command): Likewise.
613         * rs6000-aix-tdep.c (branch_dest): Likewise.
614         * rs6000-nat.c (rs6000_ptrace64): Likewise.
615         (fetch_register): Likewise.
616         * rs6000-tdep.c (ppc_supply_reg): Likewise.
617         (ppc_collect_reg): Likewise.
618         (ppc_collect_gregset): Likewise.
619         (ppc_collect_fpregset): Likewise.
620         (ppc_collect_vsxregset): Likewise.
621         (ppc_collect_vrregset): Likewise.
622         (ppc_displaced_step_hw_singlestep): Likewise.
623         (rs6000_pseudo_register_read): Likewise.
624         (rs6000_pseudo_register_write): Likewise.
625         * s390-linux-nat.c (supply_gregset): Likewise.
626         (fill_gregset): Likewise.
627         (s390_linux_fetch_inferior_registers): Likewise.
628         * s390-linux-tdep.c (s390_write_pc): Likewise.
629         (s390_software_single_step): Likewise.
630         (s390_all_but_pc_registers_record): Likewise.
631         (s390_linux_syscall_record): Likewise.
632         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
633         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
634         (shnbsd_store_inferior_registers): Likewise.
635         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
636         (sh_extract_return_value_fpu): Likewise.
637         (sh_store_return_value_nofpu): Likewise.
638         (sh_corefile_supply_regset): Likewise.
639         (sh_corefile_collect_regset): Likewise.
640         * sh64-tdep.c (sh64_extract_return_value): Likewise.
641         (sh64_store_return_value): Likewise.
642         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
643         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
644         (sparc_store_inferior_registers): Likewise.
645         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
646         (sparc_ravenscar_prepare_to_store): Likewise.
647         * sparc-tdep.c (sparc32_store_arguments): Likewise.
648         (sparc_analyze_control_transfer): Likewise.
649         (sparc_step_trap): Likewise.
650         (sparc_software_single_step): Likewise.
651         (sparc32_gdbarch_init): Likewise.
652         (sparc_supply_rwindow): Likewise.
653         (sparc_collect_rwindow): Likewise.
654         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
655         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
656         (sparc64nbsd_collect_gregset): Likewise.
657         (sparc64nbsd_supply_fpregset): Likewise.
658         (sparc64nbsd_collect_fpregset): Likewise.
659         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
660         (sparc64_supply_gregset): Likewise.
661         (sparc64_collect_gregset): Likewise.
662         (sparc64_supply_fpregset): Likewise.
663         (sparc64_collect_fpregset): Likewise.
664         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
665         * spu-tdep.c (spu_unwind_sp): Likewise.
666         (spu2ppu_prev_register): Likewise.
667         (spu_memory_remove_breakpoint): Likewise.
668         * stack.c (return_command): Likewise.
669         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
670         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
671         * tracefile.c (trace_save_ctf): Likewise.
672         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
673         (do_windows_store_inferior_registers): Likewise.
674         (windows_resume): Likewise.
675         * xtensa-linux-nat.c (fill_gregset): Likewise.
676         (supply_gregset_reg): Likewise.
677         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
678         (xtensa_register_read_masked): Likewise.
679         (xtensa_supply_gregset): Likewise.
680         (xtensa_extract_return_value): Likewise.
681         (xtensa_store_return_value): Likewise.
682
683 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
684
685         * doublest.c (floatformat_from_string): New function.
686         * doublest.h (floatformat_from_string): Add prototype.
687
688         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
689         (OP_FLOAT): ... this.
690         * expression.h: Do not include "doublest.h".
691         (union exp_element): Replace doubleconst and decfloatconst by
692         new element floatconst.
693         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
694         (ada_evaluate_subexp): Likewise.
695         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
696         OP_DOUBLE and OP_DECFLOAT.
697         * expprint.c (print_subexp_standard): Likewise.
698         (dump_subexp_body_standard): Likewise.
699         * breakpoint.c (watchpoint_exp_is_const): Likewise.
700
701         * parse.c: Include "dfp.h".
702         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
703         (write_exp_elt_floatcst): New function.
704         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
705         and OP_DECFLOAT.
706         (operator_check_standard): Likewise.
707         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
708         Return target format buffer instead of host DOUBLEST.
709         Use floatformat_from_string and decimal_from_string to parse
710         either binary or decimal floating-point types.
711         (parse_c_float): Remove.
712         * parser-defs.h: Do not include "doublest.h".
713         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
714         (write_exp_elt_floatcst): Add prototype.
715         (parse_float): Update prototype.
716         (parse_c_float): Remove.
717
718         * c-exp.y: Do not include "dfp.h".
719         (typed_val_float): Use byte buffer instead of DOUBLEST.
720         (typed_val_decfloat): Remove.
721         (DECFLOAT): Remove.
722         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
723         (parse_number): Update to new parse_float interface.
724         Parse suffixes and determine type before calling parse_float.
725         Handle decimal and binary FP types the same way.
726
727         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
728         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
729         (parse_number): Update to new parse_float interface.
730         Parse suffixes and determine type before calling parse_float.
731
732         * f-exp.y: Replace dval by typed_val_float.
733         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
734         (parse_number): Use parse_float instead of atof.
735
736         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
737         (parse_go_float): Remove.
738         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
739         (parse_number): Call parse_float instead of parse_go_float.
740         Parse suffixes and determine type before calling parse_float.
741
742         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
743         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
744         (parse_number): Update to new parse_float interface.
745         Parse suffixes and determine type before calling parse_float.
746
747         * m2-exp.y: Replace dval by byte buffer val.
748         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
749         (parse_number): Call parse_float instead of atof.
750
751         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
752         (lex_number): Call parse_float instead of strtod.
753         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
754         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
755         Use write_exp_elt_floatcst.
756         (unit_testing): Remove static variable.
757         (rust_type): Do not check unit_testing.
758         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
759
760         * ada-exp.y (type_float, type_double): Remove.
761         (typed_val_float): Use byte buffer instead of DOUBLEST.
762         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
763         * ada-lex.l (processReal): Use parse_float instead of sscanf.
764
765 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
766
767         * aarch64-tdep.h (enum aarch64_regnum): Remove.
768         * arch/aarch64.h: New file.
769
770 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
771
772         * dfp.h (decimal_from_string): Use const reference for argument.
773         * dfp.c (decimal_from_string): Likewise.
774
775 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
776
777         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
778         * sh64-tdep.c (sh64_do_fp_register): Likewise.
779         * mips-tdep.c (mips_print_fp_register): Likewise.
780
781 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
782
783         * common/format.h (enum argclass): Replace decfloat_arg by
784         dec32float_arg, dec64float_arg, and dec128float_arg.
785         * common/format.c (parse_format_string): Update to return
786         new decimal float argument classes.
787
788         * printcmd.c (printf_decfloat): Rename to ...
789         (printf_floating): ... this.  Add argclass argument, and use it
790         instead of parsing the format string again.  Add support for
791         binary floating-point values, using floatformat_to_string.
792         Convert value to the target format if it doesn't already match.
793         (ui_printf): Call printf_floating instead of printf_decfloat,
794         also for double_arg / long_double_arg.  Pass argclass.
795
796         * dfp.c (decimal_to_string): Add format string argument.
797         * dfp.h (decimal_to_string): Likewise.
798
799         * doublest.c (floatformat_to_string): Add format string argument.
800         * doublest.h (floatformat_to_string): Likewise.
801
802 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
803
804         * doublest.c (floatformat_precision): New routine.
805         (floatformat_to_string): Likewise.
806         * doublest.c (floatformat_to_string): Add prototype.
807
808         * printcmd.c (print_scalar_formatted): Only call print_floating
809         on floating-point types.
810         * valprint.c: Do not include "floatformat.h".
811         (generic_val_print_decfloat): Remove.
812         (generic_val_print): Call generic_val_print_float for both
813         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
814         (print_floating): Use floatformat_to_string.  Handle decimal float.
815         (print_decimal_floating): Remove, merge into floatformat_to_string.
816         * value.h (print_decimal_floating): Remove.
817
818         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
819
820 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
821
822         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
823
824 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
825
826         * memattr.h: Don't include vec.h.
827         (struct mem_attrib): Initialize fields.
828         <unknown>: New static method.
829         (struct mem_region): Add constructors, operator<, initialize
830         fields.
831         * memattr.c: Include algorithm.
832         (default_mem_attrib, unknown_mem_attrib): Remove.
833         (user_mem_region_list): New global.
834         (target_mem_region_list, mem_region_list): Change type to
835         std::vector<mem_region>.
836         (mem_use_target): Now a function.
837         (target_mem_regions_valid): Change type to bool.
838         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
839         (require_user_regions): Adjust.
840         (require_target_regions): Adjust.
841         (create_mem_region): Adjust.
842         (lookup_mem_region): Adjust.
843         (invalidate_target_mem_regions): Adjust.
844         (mem_clear): Rename to...
845         (user_mem_clear): ... this, and adjust.
846         (mem_command): Adjust.
847         (info_mem_command): Adjust.
848         (mem_enable, enable_mem_command, mem_disable,
849         disable_mem_command): Adjust.
850         (mem_delete): Adjust.
851         (delete_mem_command): Adjust.
852         * memory-map.h (parse_memory_map): Return an std::vector.
853         * memory-map.c (parse_memory_map): Likewise.
854         (struct memory_map_parsing_data): Add constructor.
855         <memory_map>: Point to std::vector.
856         (memory_map_start_memory): Adjust.
857         (memory_map_end_memory): Adjust.
858         (memory_map_end_property): Adjust.
859         (clear_result): Remove.
860         * remote.c (remote_memory_map): Return an std::vector.
861         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
862         Remove.
863         (target_debug_print_mem_region_vector): New.
864         * target-delegates.c: Regenerate.
865         * target.h (mem_region_vector): New typedef.
866         (to_memory_map): Return mem_region_vector.
867         (target_memory_map): Return an std::vector.
868         * target.c (target_memory_map): Return an std::vector.
869         (flash_erase_command): Adjust.
870
871 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
872
873         * memory-map.c (struct memory_map_parsing_data) <property_name>:
874         Change type to std::string.
875         (memory_map_start_property): Adjust.
876         (memory_map_end_property): Adjust.
877
878 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
879
880         * infrun.h: Include common/byte-vector.h.
881         (struct displaced_step_closure): New struct.
882         (struct buf_displaced_step_closure): New struct.
883         * infrun.c (displaced_step_closure::~displaced_step_closure):
884         Provide default implementation.
885         (displaced_step_clear): Deallocate step closure with delete.
886         * aarch64-tdep.c (displaced_step_closure): Rename to ...
887         (aarch64_displaced_step_closure): ... this, extend
888         displaced_step_closure.
889         (aarch64_displaced_step_data) <dsc>: Change type to
890         aarch64_displaced_step_closure.
891         (aarch64_displaced_step_copy_insn): Adjust to type change, use
892         unique_ptr.
893         (aarch64_displaced_step_fixup): Add cast for displaced step
894         closure.
895         * amd64-tdep.c (displaced_step_closure): Rename to ...
896         (amd64_displaced_step_closure): ... this, extend
897         displaced_step_closure.
898         <insn_buf>: Change type to std::vector<gdb_byte>.
899         <max_len>: Remove.
900         (fixup_riprel): Change type of DSC parameter, adjust to type
901         change of insn_buf.
902         (fixup_displaced_copy): Change type of DSC parameter.
903         (amd64_displaced_step_copy_insn): Instantiate
904         amd64_displaced_step_closure.
905         (amd64_displaced_step_fixup): Add cast for closure type, adjust
906         to type change of insn_buf.
907         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
908         parameter DSC.
909         (arm_linux_copy_svc): Likewise.
910         (cleanup_kernel_helper_return): Likewise.
911         (arm_catch_kernel_helper_return): Likewise.
912         (arm_linux_displaced_step_copy_insn): Instantiate
913         arm_displaced_step_closure.
914         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
915         (displaced_read_reg): Change type of parameter DSC.
916         (branch_write_pc): Likewise.
917         (load_write_pc): Likewise.
918         (alu_write_pc): Likewise.
919         (displaced_write_reg): Likewise.
920         (arm_copy_unmodified): Likewise.
921         (thumb_copy_unmodified_32bit): Likewise.
922         (thumb_copy_unmodified_16bit): Likewise.
923         (cleanup_preload): Likewise.
924         (install_preload): Likewise.
925         (arm_copy_preload): Likewise.
926         (thumb2_copy_preload): Likewise.
927         (install_preload_reg): Likewise.
928         (arm_copy_preload_reg): Likewise.
929         (cleanup_copro_load_store): Likewise.
930         (install_copro_load_store): Likewise.
931         (arm_copy_copro_load_store) Likewise.
932         (thumb2_copy_copro_load_store): Likewise.
933         (cleanup_branch): Likewise.
934         (install_b_bl_blx): Likewise.
935         (arm_copy_b_bl_blx): Likewise.
936         (thumb2_copy_b_bl_blx): Likewise.
937         (thumb_copy_b): Likewise.
938         (install_bx_blx_reg): Likewise.
939         (arm_copy_bx_blx_reg): Likewise.
940         (thumb_copy_bx_blx_reg): Likewise.
941         (cleanup_alu_imm): Likewise.
942         (arm_copy_alu_imm): Likewise.
943         (thumb2_copy_alu_imm): Likewise.
944         (cleanup_alu_reg): Likewise.
945         (install_alu_reg): Likewise.
946         (arm_copy_alu_reg): Likewise.
947         (thumb_copy_alu_reg): Likewise.
948         (cleanup_alu_shifted_reg): Likewise.
949         (install_alu_shifted_reg): Likewise.
950         (arm_copy_alu_shifted_reg): Likewise.
951         (cleanup_load): Likewise.
952         (cleanup_store): Likewise.
953         (arm_copy_extra_ld_st): Likewise.
954         (install_load_store): Likewise.
955         (thumb2_copy_load_literal): Likewise.
956         (thumb2_copy_load_reg_imm): Likewise.
957         (arm_copy_ldr_str_ldrb_strb): Likewise.
958         (cleanup_block_load_all): Likewise.
959         (cleanup_block_store_pc): Likewise.
960         (cleanup_block_load_pc): Likewise.
961         (arm_copy_block_xfer): Likewise.
962         (thumb2_copy_block_xfer): Likewise.
963         (cleanup_svc): Likewise.
964         (install_svc): Likewise.
965         (arm_copy_svc): Likewise.
966         (thumb_copy_svc): Likewise.
967         (arm_copy_undef): Likewise.
968         (thumb_32bit_copy_undef): Likewise.
969         (arm_copy_unpred): Likewise.
970         (arm_decode_misc_memhint_neon): Likewise.
971         (arm_decode_unconditional): Likewise.
972         (arm_decode_miscellaneous): Likewise.
973         (arm_decode_dp_misc): Likewise.
974         (arm_decode_ld_st_word_ubyte): Likewise.
975         (arm_decode_media): Likewise.
976         (arm_decode_b_bl_ldmstm): Likewise.
977         (arm_decode_ext_reg_ld_st): Likewise.
978         (thumb2_decode_dp_shift_reg): Likewise.
979         (thumb2_decode_ext_reg_ld_st): Likewise.
980         (arm_decode_svc_copro): Likewise.
981         (thumb2_decode_svc_copro): Likewise.
982         (install_pc_relative): Likewise.
983         (thumb_copy_pc_relative_16bit): Likewise.
984         (thumb_decode_pc_relative_16bit): Likewise.
985         (thumb_copy_pc_relative_32bit): Likewise.
986         (thumb_copy_16bit_ldr_literal): Likewise.
987         (thumb_copy_cbnz_cbz): Likewise.
988         (thumb2_copy_table_branch): Likewise.
989         (cleanup_pop_pc_16bit_all): Likewise.
990         (thumb_copy_pop_pc_16bit): Likewise.
991         (thumb_process_displaced_16bit_insn): Likewise.
992         (decode_thumb_32bit_ld_mem_hints): Likewise.
993         (thumb_process_displaced_32bit_insn): Likewise.
994         (thumb_process_displaced_insn): Likewise.
995         (arm_process_displaced_insn): Likewise.
996         (arm_displaced_init_closure): Likewise.
997         (arm_displaced_step_fixup): Add cast for closure.
998         * arm-tdep.h: Include infrun.h.
999         (displaced_step_closure): Rename to ...
1000         (arm_displaced_step_closure): ... this, extend
1001         displaced_step_closure.
1002         <u::svc::copy_svc_os>: Change type of parameter DSC.
1003         <cleanup>: Likewise.
1004         (arm_process_displaced_insn): Likewise.
1005         (arm_displaced_init_closure): Likewise.
1006         (displaced_read_reg): Likewise.
1007         (displaced_write_reg): Likewise.
1008         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1009         Adjust.
1010         * i386-tdep.h: Include infrun.h.
1011         (i386_displaced_step_closure): New typedef.
1012         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1013         i386_displaced_step_closure.
1014         (i386_displaced_step_fixup): Adjust.
1015         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1016         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1017         and unique_ptr.
1018         (ppc_displaced_step_fixup): Adjust.
1019         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1020         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1021         and unique_ptr.
1022         (s390_displaced_step_fixup): Adjust.
1023
1024 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1025
1026         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1027         Remove declarations.
1028
1029 2017-10-20  Tom Tromey  <tom@tromey.com>
1030
1031         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1032         std::vector.
1033         (gdb_bfd_record_inclusion): Update.
1034         (bfdp): Remove typedef.
1035
1036 2017-10-20  Tom Tromey  <tom@tromey.com>
1037
1038         * gdb_bfd.c (gdb_bfd_ref): Use new.
1039         (struct gdb_bfd_data): Add constructor, destructor, and member
1040         initializers.
1041         (gdb_bfd_unref): Use delete.
1042
1043 2017-10-20  Tom Tromey  <tom@tromey.com>
1044
1045         * exec.c (exec_file_attach): Use new_bfd_ref.
1046         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1047         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1048         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1049         new_bfd_ref.
1050         * gdb_bfd.h (new_bfd_ref): New function.
1051
1052 2017-10-20  Pedro Alves  <palves@redhat.com>
1053
1054         * main.c (captured_command_loop): Add attribute noinline.
1055
1056 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1057
1058         * interps.c (struct interp_factory): Add constructor.
1059         (interp_factory_p): Remove typedef.
1060         (DEF_VEC_P(interp_factory_p)): Remove.
1061         (interpreter_factories): Change type to std::vector.
1062         (interp_factory_register): Adjust.
1063         (interp_lookup): Adjust.
1064         (interpreter_completer): Adjust.
1065
1066 2017-10-19  Tom Tromey  <tom@tromey.com>
1067
1068         * break-catch-syscall.c (catch_syscall_completer): Use
1069         std::string, gdb::unique_xmalloc_ptr.
1070
1071 2017-10-19  Tom Tromey  <tom@tromey.com>
1072
1073         * infcall.c (call_function_by_hand_dummy): Use std::string.
1074
1075 2017-10-19  Tom Tromey  <tom@tromey.com>
1076
1077         * mi/mi-main.c (mi_cmd_execute): Update.
1078         * top.h (prepare_execute_command): Return scoped_value_mark.
1079         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1080         Add move constructor.
1081         * top.c (prepare_execute_command): Return scoped_value_mark.
1082         (execute_command): Update.
1083
1084 2017-10-19  Pedro Alves  <palves@redhat.com>
1085
1086         * xml-support.c (xml_fetch_content_from_file): Check fread's
1087         return.
1088
1089 2017-10-19  Pedro Alves  <palves@redhat.com>
1090
1091         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1092         async.
1093         (handle_error_fd): New function.
1094         (ser_base_async): Add/delete an event loop file handler for
1095         error_fd.
1096
1097 2017-10-19  Pedro Alves  <palves@redhat.com>
1098
1099         * xml-support.c (xml_fetch_content_from_file): Don't read in
1100         chunks.  Instead use fseek to determine the file's size, and read
1101         it in one go.
1102
1103 2017-11-18  Keith Seitz  <keiths@redhat.com>
1104
1105         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1106         types.
1107         Add whitespace to front of type name.
1108
1109 2017-10-18  Keith Seitz  <keiths@redhat.com>
1110
1111         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1112         DW_AT_accessibility.
1113
1114 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1115
1116         * features/tic6x-c62x-linux.c: Remove.
1117
1118 2017-10-17  Tom Tromey  <tom@tromey.com>
1119
1120         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1121         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1122         (do_mixed_source_and_assembly): Likewise.
1123
1124 2017-10-17  Tom Tromey  <tom@tromey.com>
1125
1126         * regcache.c (regcache::xfer_part): Remove assertion.
1127
1128 2017-10-17  Pedro Alves  <palves@redhat.com>
1129
1130         * xml-support.c (xml_fetch_content_from_file): Call
1131         unique_ptr::release() instead unique_ptr::get() when passing
1132         through xrealloc.
1133
1134 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1135
1136         * regcache.c (regcache::xfer_part): Remove parameters read and
1137         write, add parameter is_raw.  All callers are updated.
1138
1139 2017-10-16  Keith Seitz  <keiths@redhat.com>
1140
1141         * c-typeprint.c (enum access_specifier): Moved here from
1142         c_type_print_base.
1143         (output_access_specifier): New function.
1144         (c_type_print_base): Consider typedefs when assessing
1145         whether access labels are needed.
1146         Use output_access_specifier as needed.
1147         Output access specifier for typedefs, if needed.
1148         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1149         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1150         fields.
1151         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1152         accessor macros.
1153
1154 2017-10-16  Tom Tromey  <tom@tromey.com>
1155
1156         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1157         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1158         * target.c (target_fileio_read_stralloc): Update.
1159         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1160         * target.h (target_fileio_read_stralloc): Return
1161         unique_xmalloc_ptr.
1162
1163 2017-10-16  Tom Tromey  <tom@tromey.com>
1164
1165         * xml-syscall.c (xml_init_syscalls_info): Update.
1166         * xml-support.c (xinclude_start_include): Update.
1167         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1168         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1169         (xml_fetch_content_from_file): Likewise.
1170         * osdata.c (get_osdata): Update.
1171         * target.h (target_read_stralloc, target_get_osdata): Return
1172         unique_xmalloc_ptr.
1173         * solib-aix.c (solib_aix_get_library_list): Update.
1174         * solib-target.c (solib_target_current_sos): Update.
1175         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1176         * xml-tdesc.c (fetch_available_features_from_target): Update.
1177         (target_fetch_description_xml): Update.
1178         (file_read_description_xml): Update.
1179         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1180         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1181         (remote_pid_to_exec_file): Update.
1182         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1183         (target_get_osdata): Likewise.
1184
1185 2017-10-16  Tom Tromey  <tom@tromey.com>
1186
1187         * remote.c (remote_register_number_and_offset): Use std::vector.
1188         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1189         (putpkt_binary): Use gdb::def_vector.
1190         (compare_sections_command): Use gdb::byte_vector.
1191
1192 2017-10-16  Tom Tromey  <tom@tromey.com>
1193
1194         * ppc-linux-nat.c (hwdebug_insert_point): Use
1195         gdb::unique_xmalloc_ptr, XDUP.
1196
1197 2017-10-16  Tom Tromey  <tom@tromey.com>
1198
1199         * probe.c (parse_probes): Use std::string.
1200         (info_probes_for_ops, enable_probes_command)
1201         (disable_probes_command): Remove cleanups.
1202
1203 2017-10-16  Tom Tromey  <tom@tromey.com>
1204
1205         * buildsym.c (block_compar): Remove.
1206         (end_symtab_get_static_block): Use std::vector.
1207
1208 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1209
1210         * memrange.h (struct mem_range): Define operator< and operator==.
1211         (mem_range_s): Remove.
1212         (DEF_VEC_O (mem_range_s)): Remove.
1213         (normalize_mem_ranges): Change parameter type to std::vector.
1214         * memrange.c (compare_mem_ranges): Remove.
1215         (normalize_mem_ranges): Change parameter type to std::vector,
1216         adjust to vector change.
1217         * exec.c (section_table_available_memory): Return vector, remove
1218         parameter.
1219         (section_table_read_available_memory): Adjust to std::vector
1220         change.
1221         * remote.c (remote_read_bytes): Adjust to std::vector
1222         change.
1223         * tracepoint.h (traceframe_available_memory): Change parameter
1224         type to std::vector.
1225         * tracepoint.c (traceframe_available_memory): Change parameter
1226         type to std::vector, adjust.
1227         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1228         std::vector change.
1229         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1230         unittests/memrange-selftests.c.
1231         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1232         * gdb/unittests/memrange-selftests.c: New file.
1233
1234 2017-10-16  Pedro Alves  <palves@redhat.com>
1235
1236         * elfread.c (probe_key_free): Rename range-for variable.
1237         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1238         (find_probe_by_pc, collect_probes): Rename range-for variable.
1239
1240 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1241
1242         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1243         * features/tic6x-c62x.c: Remove.
1244         * features/tic6x-c64x-linux.c: Remove.
1245         * features/tic6x-c64x.c: Remove.
1246         * features/tic6x-c64xp-linux.c: Remove.
1247         * features/tic6x-c64xp.c: Remove.
1248         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1249         initialize_tdesc_tic6x_*_linux functions.
1250         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1251         initialize_tdesc_tic6x_* functions.
1252
1253 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1254
1255         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1256         tic6x-c62x.
1257         * regformats/tic6x-c62x.dat: Remove.
1258         * regformats/tic6x-c64x.dat: Remove.
1259         * regformats/tic6x-c64xp.dat: Remove.
1260
1261 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1262
1263         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1264         (the !HAVE_LIBEXPAT version).
1265
1266 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1267
1268         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1269         const.
1270
1271 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1272
1273         * target.h: Include tracepoint.h.
1274         (enum trace_find_type): Move to tracepoint.h.
1275         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1276         * tracepoint.h: Don't include target.h
1277         (enum trace_find_type): Move from target.h.
1278         (parse_traceframe_info): Return a unique ptr.
1279         * tracepoint.c (current_traceframe_info): Change type to unique
1280         ptr.
1281         (free_traceframe_info): Remove.
1282         (clear_traceframe_info): Don't manually free
1283         current_traceframe_info.
1284         (free_result): Remove.
1285         (parse_traceframe_info): Return a unique ptr.
1286         (get_traceframe_info): Adjust to unique ptr.
1287         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1288         * remote.c (remote_traceframe_info): Return a unique ptr.
1289         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1290         ptr.
1291         * target-debug.h (target_debug_print_traceframe_info_up): New
1292         macro.
1293         * target-delegates.c: Regenerate.
1294
1295 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1296
1297         * memrange.h (struct mem_range): Add constructors.
1298         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1299         std::vector<mem_range>.
1300         * tracepoint.c (free_traceframe_info): Don't manually free
1301         vector.
1302         (traceframe_info_start_memory): Adjust to vector change.
1303         (traceframe_available_memory): Likewise.
1304         * tracefile-tfile.c (build_traceframe_info): Likewise.
1305         * ctf.c (ctf_traceframe_info): Likewise.
1306
1307 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1308
1309         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1310         std::vector<int>.
1311         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1312         (traceframe_info_start_tvar): Adjust to vector change.
1313         (parse_traceframe_info): Allocate with new.
1314         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1315         vector change.
1316         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1317         change.
1318         tfile_traceframe_info): Allocate with new.
1319         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1320         change.
1321
1322 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1323
1324         * tracepoint.c (traceframe_info): Rename to...
1325         (current_traceframe_info): ...this.
1326         (clear_traceframe_info): Adjust.
1327         (get_traceframe_info): Adjust.
1328
1329 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1330
1331         * nat/linux-osdata.c: Include algorithm.
1332         (compare_processes): Remove.
1333         (struct pid_pgid_entry): New struct.
1334         (linux_xfer_osdata_processgroups): Use std::vector instead of
1335         XNEWVEC.
1336
1337 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1338
1339         * objfiles.h: Don't include symfile.h.
1340         (struct partial_symbol): Remove forward-declaration.
1341         (struct objfile) <global_psymbols, static_psymbols>: Change type
1342         to std::vector<partial_symbol *>.
1343         * objfiles.c (objfile::objfile): Don't memset those fields.
1344         (objfile::~objfile): Don't free those fields.
1345         * psympriv.h (struct psymbol_allocation_list): Remove
1346         forward-declaration.
1347         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1348         to std::vector.
1349         (start_psymtab_common): Change parameters to std::vector.
1350         * psymtab.c: Include algorithm.
1351         (require_partial_symbols): Call shrink_to_fit.
1352         (find_pc_sect_psymbol): Adjust to vector change.
1353         (match_partial_symbol): Likewise.
1354         (lookup_partial_symbol): Likewise.
1355         (psym_relocate): Likewise.
1356         (dump_psymtab): Likewise.
1357         (recursively_search_psymtabs): Likewise.
1358         (compare_psymbols): Remove.
1359         (sort_pst_symbols): Adjust to vector change.
1360         (start_psymtab_common): Likewise.
1361         (end_psymtab_common): Likewise.
1362         (psymbol_bcache_full): De-constify return value.
1363         (add_psymbol_to_bcache): Likewise.
1364         (extend_psymbol_list): Remove.
1365         (append_psymbol_to_list): Adjust to vector change.
1366         (add_psymbol_to_list): Likewise.
1367         (init_psymbol_list): Likewise.
1368         (maintenance_info_psymtabs): Likewise.
1369         (maintenance_check_psymtabs): Likewise.
1370         * symfile.h (struct psymbol_allocation_list): Remove.
1371         * symfile.c (reread_symbols): Adjust to vector change.
1372         * dbxread.c (start_psymtab): Change type of parameters.
1373         (dbx_symfile_read): Adjust to vector change.
1374         (read_dbx_symtab): Likewise.
1375         (start_psymtab): Change type of parameters.
1376         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1377         (create_partial_symtab): Likewise.
1378         (add_partial_symbol): Likewise.
1379         (write_one_signatured_type): Likewise.
1380         (recursively_write_psymbols): Likewise.
1381         * mdebugread.c (parse_partial_symbols): Likewise.
1382         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1383         (scan_xcoff_symtab): Adjust to vector change.
1384         (xcoff_initial_scan): Likewise.
1385
1386 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1387
1388         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1389
1390 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1391
1392         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1393         Remove s390x-*-expedite, add s390x-expedite.
1394
1395 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1396
1397         * features/s390-gs-linux64.c: Regenerated.
1398         * features/s390x-gs-linux64.c: Regenerated.
1399
1400 2017-10-13  Tom Tromey  <tom@tromey.com>
1401
1402         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1403         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1404         delete.
1405         * symfile.c (symbol_file_add_with_addrs): Use new.
1406         (symbol_file_add_separate): Update comment.
1407         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1408         * jit.c (jit_object_close_impl): Use new.
1409         (jit_unregister_code): Use delete.
1410         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1411         (~objfile): Rename from free_objfile.
1412         (free_objfile_separate_debug, do_free_objfile_cleanup)
1413         (free_all_objfiles, objfile_purge_solibs): Use delete.
1414         * objfiles.h (struct objfile): Add constructor and destructor.
1415         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1416         (allocate_objfile, free_objfile): Don't declare.
1417         (struct objstats): Add initializers.
1418
1419 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1420
1421         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1422         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1423         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1424         * gdbarch.h: Regenerate.
1425         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1426         Adjust comment.
1427         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1428         (i386_displaced_step_fixup): Adjust comment.
1429         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1430
1431 2017-10-12  Tom Tromey  <tom@tromey.com>
1432
1433         * prologue-value.h (pv_area::store_would_trash): Return bool.
1434         (pv_area::find_reg): Likewise.
1435         * prologue-value.c (pv_area::store_would_trash): Return bool.
1436         (pv_area::find_reg): Likewise.
1437
1438 2017-10-12  Tom Tromey  <tom@tromey.com>
1439
1440         * s390-linux-tdep.c (s390_store, s390_load)
1441         (s390_check_for_saved, s390_analyze_prologue): Update.
1442         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1443         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1444         * prologue-value.h (class pv_area): Move from prologue-value.c.
1445         Change names of members.  Add constructor, destructor, member
1446         functions.
1447         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1448         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1449         (pv_area_fetch, pv_area_scan): Don't declare.
1450         * prologue-value.c (struct pv_area::area_entry): Now member of
1451         pv_area.
1452         (struct pv_area): Move to prologue-value.h.
1453         (pv_area::pv_area): Rename from make_pv_area.
1454         (pv_area::~pv_area): Rename from free_pv_area.
1455         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1456         (clear_entries, find_entry, overlaps, store_would_trash, store)
1457         (fetch, find_reg, scan): Now member of pv_area.
1458         Remove "area" argument.  Update.
1459         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1460         Update.
1461         * mn10300-tdep.c (push_reg, check_for_saved)
1462         (mn10300_analyze_prologue): Update.
1463         * mep-tdep.c (is_arg_spill, check_for_saved)
1464         (mep_analyze_prologue): Update.
1465         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1466         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1467         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1468         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1469         Update.
1470         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1471         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1472
1473 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1474
1475         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1476         * linux-nat.c (linux_nat_delete_thread): New variable.
1477         (lwp_free): Invoke linux_nat_delete_thread if set.
1478         (linux_nat_set_delete_thread): New function.
1479         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1480         thread delete callback.
1481         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1482         (_initialize_arm_linux_nat): Assign thread delete callback.
1483         * s390-linux-nat.c (s390_delete_thread): New function.
1484         (_initialize_s390_nat): Assign thread delete callback.
1485         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1486         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1487         function.
1488         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1489         declaration.
1490         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1491         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1492
1493 2017-10-09  Tom Tromey  <tom@tromey.com>
1494
1495         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1496         std::string.
1497         * tui/tui-layout.c (enum tui_status): Use std::string.
1498
1499 2017-10-11  Tom Tromey  <tom@tromey.com>
1500
1501         * gdbthread.h (thread_command): Constify.
1502         * inferior.h (detach_command): Constify.
1503         * top.h (set_history, show_history): Constify.
1504         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1505         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1506         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1507         * printcmd.c (set_command): Constify.
1508         (non_const_set_command): New function.
1509         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1510         * breakpoint.c (enable_command, disable_command, delete_command)
1511         (catch_command, tcatch_command, set_breakpoint_cmd)
1512         (show_breakpoint_cmd): Constify.
1513         * macrocmd.c (macro_command): Constify.
1514         * infcmd.c (unset_command, kill_command, detach_command)
1515         (info_proc_cmd): Constify.
1516         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1517         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1518         (info_auto_load_cmd): Constify.
1519         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1520         (unset_tdesc_cmd): Constify.
1521         * ada-lang.c (set_ada_command, show_ada_command)
1522         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1523         * guile/guile.c (set_guile_command, show_guile_command)
1524         (info_guile_command): Constify.
1525         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1526         Constify.
1527         * skip.c (skip_command): Constify.
1528         * compile/compile.c (_initialize_compile): Constify.
1529         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1530         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1531         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1532         (maint_btrace_pt_show_cmd): Constify.
1533         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1534         Constify.
1535         * python/python.c (user_show_python, user_set_python): Constify.
1536         * mips-tdep.c (set_mips_command, show_mips_command)
1537         (set_mipsfpu_command): Constify.
1538         * record-btrace.c (cmd_record_btrace_start)
1539         (cmd_set_record_btrace, cmd_show_record_btrace)
1540         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1541         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1542         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1543         Constify.
1544         * symfile.c (overlay_command): Constify.
1545         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1546         * cli/cli-logging.c (set_logging_command, show_logging_command):
1547         Constify.
1548         * cli/cli-dump.c (dump_command, append_command)
1549         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1550         (tekhex_dump_command, binary_dump_command)
1551         (binary_append_command): Constify.
1552         * cli/cli-decode.c (struct cmd_list_element): Change type of
1553         "fun".
1554         * cli/cli-cmds.c (info_command, show_command, set_debug)
1555         (show_debug): Constify.
1556         (show_command): Add non-const overload.
1557         * top.c (set_history, show_history): Constify.
1558         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1559         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1560         * target.c (target_command): Constify.
1561         * sparc64-tdep.c (info_adi_command): Constify.
1562         * record-full.c (cmd_record_full_start): Constify.
1563         (set_record_full_command): Constify.  Fix typo.
1564         (show_record_full_command): Constify.
1565         * thread.c (thread_command, thread_apply_command): Constify.
1566         * memattr.c (dummy_cmd): Constify.
1567         * value.c (function_command): Constify.
1568         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1569         * probe.c (info_probes_command): Constify.
1570         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1571         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1572         (show_thread_cmd, set_thread_default_cmd)
1573         (show_thread_default_cmd): Constify.
1574         (check_empty): Constify.
1575         * tracepoint.c (tfind_command): Constify.
1576         * cp-support.c (maint_cplus_command): Constify.
1577         * windows-tdep.c (info_w32_command): Constify.
1578         * record.c (cmd_record_start, set_record_command)
1579         (show_record_command, info_record_command, cmd_record_goto):
1580         Constify.
1581         * ravenscar-thread.c (set_ravenscar_command)
1582         (show_ravenscar_command): Constify.
1583         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1584         Constify.
1585         (add_internal_problem_command): Remove casts.
1586         * arc-tdep.c (maintenance_print_arc_command): Constify.
1587         * valprint.c (set_print, show_print, set_print_raw)
1588         (show_print_raw): Constify.
1589         * maint.c (maintenance_command, maintenance_info_command)
1590         (maintenance_print_command, maintenance_set_cmd)
1591         (maintenance_show_cmd, set_per_command_cmd)
1592         (show_per_command_cmd, maintenance_check_command): Constify.
1593         * language.c (set_check, show_check): Constify.
1594         * typeprint.c (show_print_type, set_print_type): Constify.
1595         * go32-nat.c (go32_info_dos_command): Constify.
1596
1597 2017-10-11  Tom Tromey  <tom@tromey.com>
1598
1599         * breakpoint.c (prepare_re_set_context): Remove.
1600         (breakpoint_re_set_one): Update.  Don't use cleanups.
1601         (breakpoint_re_set): Use scoped_restore, std::string, and
1602         scoped_restore_current_language.
1603
1604 2017-10-11  Tom Tromey  <tom@tromey.com>
1605
1606         * breakpoint.c (commands_command_1): Use std::string.
1607         (cleanup_executing_breakpoints): Remove.
1608         (bpstat_do_actions_1): Use scoped_restore.
1609         (bpstat_check_watchpoint): Use std::string.
1610         (decode_static_tracepoint_spec): Likewise.
1611         (break_range_command): Likewise.
1612         (watch_command_1): Likewise.
1613         (compare_breakpoints): Change argument types.
1614         (clear_command): Use std::vector.
1615         (cleanup_executing_breakpoints): Remove.
1616         (update_global_location_list): Use unique_xmalloc_ptr.
1617         (strace_command): Remove unused declaration.
1618
1619 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1620
1621         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1622         * NEWS: Mention new FreeBSD/arm native configuration.
1623         * configure.host: Add arm*-*-freebsd*.
1624         * configure.nat: Likewise.
1625         * arm-fbsd-nat.c: New file.
1626
1627 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1628
1629         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1630         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1631         * NEWS: Mention new FreeBSD/arm target.
1632         * configure.tgt: Add arm*-*-freebsd*.
1633         * arm-fbsd-tdep.c: New file.
1634         * arm-fbsd-tdep.h: New file.
1635
1636 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1637
1638         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1639         `gdbarch_elfcore_write_linux_prpsinfo'.
1640         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1641         method.
1642         (elf_internal_linux_prpsinfo): Remove declaration.
1643         * gdbarch.h: Regenerate.
1644         * gdbarch.c: Regenerate.
1645
1646 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1647
1648         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1649         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1650
1651 2017-10-11  Pedro Alves  <palves@redhat.com>
1652
1653         * breakpoint.c (reattach_breakpoints): Delete.
1654         * breakpoint.h (reattach_breakpoints): Delete.
1655
1656 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1657
1658         * symfile.c (registered_sym_fns): Make struct, not typedef.
1659         (DEF_VEC_O (registered_sym_fns)): Remove.
1660         (symtab_fns): Change type to std::vector.
1661         (add_symtab_fns): Adjust.
1662         (find_sym_fns): Adjust.
1663
1664 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1665
1666         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1667         * arc-tdep.h (arc_arch_is_em): New function.
1668         (arc_arch_is_hs): Likewise.
1669
1670 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1671
1672         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1673         parentheses in the declaration.
1674         (macro_lookup_inclusion): Likewise.
1675         (macro_lookup_definition): Likewise.
1676         * p-lang.h (pascal_builtin_types): Likewise.
1677         * tui/tui-data.c (tui_win_list): Likewise.
1678         * tui/tui-data.h (tui_win_list): Likewise.
1679         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1680
1681 2017-10-11  Mark Rages  <markrages@gmail.com>
1682
1683         * target-memory.c (block_boundaries): Fix for block address not
1684         aligned on block size.
1685
1686 2017-10-10  Pedro Alves <palves@redhat.com>
1687             Tom Tromey  <tom@tromey.com>
1688
1689         * breakpoint.c (struct captured_breakpoint_query_args)
1690         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1691         (print_breakpoint): New.
1692         * breakpoint.h (print_breakpoint): Declare.
1693         * common/common-exceptions.h (enum return_reason): Remove
1694         references to catch_exceptions.
1695         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1696         Delete.
1697         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1698         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1699         * gdb.h: Delete.
1700         * gdbthread.h (thread_select): Declare.
1701         * mi/mi-cmd-break.c: Don't include gdb.h.
1702         (breakpoint_notify): Use print_breakpoint.
1703         * mi/mi-cmd-catch.c: Don't include gdb.h.
1704         * mi/mi-interp.c: Don't include gdb.h.
1705         (mi_print_breakpoint_for_event): New.
1706         (mi_breakpoint_created, mi_breakpoint_modified): Use
1707         mi_print_breakpoint_for_event.
1708         * mi/mi-main.c: Don't include gdb.h.
1709         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1710         thread_select instead of gdb_thread_select.
1711         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1712         of using gdb_list_thread_ids.
1713         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1714         FILEIO_ENOSYS here.
1715         (remote_fileio_request): Use TRY/CATCH instead of
1716         catch_exceptions.
1717         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1718         (symbol_file_add_from_memory_wrapper): Delete.
1719         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1720         * thread.c: Don't include gdb.h.
1721         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1722         (thread_alive): Use thread_select.
1723         (do_captured_thread_select): Delete, parts salvaged as ...
1724         (thread_select): ... this new function.
1725         (gdb_thread_select): Delete.
1726
1727 2017-10-10  Pedro Alves  <palves@redhat.com>
1728             Tom Tromey  <tom@tromey.com>
1729
1730         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1731         and reverse logic.
1732         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1733         No longer macros.  Instead ...
1734         (enum wp_check_result): They're now values of this new
1735         enumeration.
1736         (watchpoint_check): Change return type to wp_check_result and
1737         parameter type to bpstat.
1738         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1739         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1740         catch_errors.  Reverse logic of watchpoint_check call.
1741         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1742         pointer as parameter.
1743         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1744         * common/common-exceptions.c (throw_exception_sjlj): Update
1745         comments to avoid mentioning catch_errors.
1746         * exceptions.c (catch_errors): Delete.
1747         * exceptions.h: Update comments to avoid mentioning catch_errors.
1748         (catch_errors_ftype, catch_errors): Delete.
1749         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1750         (hook_stop_stub): Delete.
1751         (restore_selected_frame): Change return type to void, and
1752         parameter type to const frame_id &.
1753         (restore_infcall_control_state): Use TRY/CATCH instead of
1754         catch_errors.
1755         * main.c (captured_command_loop): Return void and remove
1756         parameter.  Remove references to catch_errors.
1757         (captured_main): Use TRY/CATCH instead of catch_errors.
1758         * objc-lang.c (objc_submethod_helper_data)
1759         (find_objc_msgcall_submethod_helper): Delete.
1760         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1761         catch_errors.
1762         * record-full.c (record_full_message): Return void.
1763         (record_full_message_args, record_full_message_wrapper): Delete.
1764         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1765         instead of catch_errors.
1766         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1767         parameter type to int.
1768         * solib-darwin.c (open_symbol_file_object): Ditto.
1769         * solib-dsbt.c (open_symbol_file_object): Ditto.
1770         * solib-frv.c (open_symbol_file_object): Ditto.
1771         * solib-svr4.c (open_symbol_file_object): Ditto.
1772         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1773         * solib.c (update_solib_list): Use TRY/CATCH instead of
1774         catch_errors.
1775         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1776         Change type.
1777         * symmisc.c (struct print_symbol_args): Remove.
1778         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1779         (print_symbol): Change type.
1780         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1781         and remove parameters.
1782         (catch_errors): New.
1783         (get_windows_debug_event): Adjust.
1784
1785 2017-10-09  Tom Tromey  <tom@tromey.com>
1786
1787         * mi/mi-main.c (free_splay_tree): Remove.
1788         (list_available_thread_groups): Use splay_tree_up.
1789         * common/gdb_splay_tree.h: New file.
1790
1791 2017-10-09  Tom Tromey  <tom@tromey.com>
1792
1793         * mi/mi-main.c (do_nothing): Remove.
1794         (list_available_thread_groups): Update.
1795
1796 2017-10-09  Pedro Alves  <palves@redhat.com>
1797
1798         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1799         reading registers when switching context.
1800
1801 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1802
1803         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1804         (fbsd_convert_siginfo): Likewise.
1805         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1806
1807 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1808
1809         * configure.ac (try_guile_versions): Remove guile-2.2.
1810         * configure: Regenerate.
1811
1812 2017-10-09  Tom Tromey  <tom@tromey.com>
1813
1814         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1815         (COMPILE.pre): Use $(CXX).
1816
1817 2017-10-09  Pedro Alves  <palves@redhat.com>
1818
1819         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1820         Use bool.
1821         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1822         * cp-support.h (cp_remove_params): Now returns a
1823         gdb::unique_xmalloc_ptr.
1824         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1825         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1826         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1827         returning a gdb::unique_xmalloc_ptr.
1828         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1829         * stack.c (find_frame_funname): Adjust to cp_remove_params
1830         returning a gdb::unique_xmalloc_ptr.
1831
1832 2017-10-08  Tom Tromey  <tom@tromey.com>
1833
1834         * dwarf2read.c (dwarf2_get_dwz_file): Use
1835         gdb::unique_xmalloc_ptr.
1836         (find_slot_in_mapped_hash): Likewise.
1837         (dwarf2_physname): Likewise.
1838         (create_dwo_unit_in_dwp_v1): Use std::string.
1839         (create_dwo_unit_in_dwp_v2): Likewise.
1840         (lookup_dwo_cutu): Likewise.
1841         (inherit_abstract_dies): Use std::vector.
1842         (read_array_type): Likewise.
1843         (dwarf_decode_macros): Remove unused declaration.
1844         (unsigned_int_compar): Remove.
1845         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1846         (psymtabs_addrmap_cleanup): Remove.
1847
1848 2017-10-08  Tom Tromey  <tom@tromey.com>
1849
1850         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1851         * frame.h (frame_cleanup_after_sniffer): Declare.
1852         (frame_prepare_for_sniffer): Return void.
1853         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1854         type of argument.
1855         (frame_prepare_for_sniffer): Return void.
1856
1857 2017-10-08  Tom Tromey  <tom@tromey.com>
1858
1859         * utils.h (make_cleanup_value_free): Remove.
1860         * utils.c (do_value_free, struct cleanup): Remove.
1861         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1862         Use gdb_value_up.
1863         * value.h (struct value_deleter): New.
1864         (gdb_value_up): New typedef.
1865
1866 2017-10-08  Tom Tromey  <tom@tromey.com>
1867
1868         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1869         (make_cleanup_free_search_symbols): Remove.
1870         (search_symbols): Return std::vector.
1871         (symbol_search::compare_search_syms): Now member of
1872         symbol_search.  Change arguments.
1873         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1874         (symtab_symbol_info, rbreak_command): Update.
1875         * symtab.h (struct symbol_search) <next>: Remove.
1876         Add constructors.
1877         (symbol_search::operator<): New function.
1878         (symbol_search::operator==): New function.
1879         (search_symbols): Remove std::vector.
1880         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1881         (symbol_search::compare_search_syms): Declare.
1882
1883 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1884
1885         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1886         arch/aarch64-insn.o.
1887         Remove one rule.
1888         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1889
1890 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1891
1892         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1893         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1894         arch/arm-linux.o respectively.
1895         * configure.tgt: Likewise.
1896
1897 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1898
1899         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1900         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1901
1902 2017-10-06  Pedro Alves  <palves@redhat.com>
1903
1904         * windows-nat.c: Include <algorithm>.
1905
1906 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1907
1908         * configure.tgt (i386_tobjs): New variable.
1909         (amd64_tobjs): New variable.
1910         Set $cpu_obs and $os_obs.
1911
1912 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1913
1914         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1915         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1916         (clean): Remove object files and dependency files.
1917         (distclean): Remove the directory.
1918         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1919         * configure: Re-generated.
1920         * configure.tgt: Replace amd64.o with arch/amd64.o.
1921
1922 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1923
1924         PR build/22188
1925         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1926         and SETEND.
1927
1928 2017-10-05  Pedro Alves  <palves@redhat.com>
1929
1930         * linux-nat.c (linux_child_follow_fork): When following the parent
1931         and detaching the child, consult the parent thread's architecture
1932         instead of the child's.
1933
1934 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1935
1936         * ax.h: Do not include "doublest.h".
1937         (union agent_val): Remove.
1938
1939 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1940
1941         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1942         (decimal_to_string): Return std::string object.
1943         (decimal_from_string): Accept std::string object.  Return bool.
1944         (decimal_from_integral, decimal_from_doublest): Remove.
1945         (decimal_from_longest): Add prototype.
1946         (decimal_from_ulongest): Likewise.
1947         (decimal_to_longest): Likewise.
1948         (decimal_from_doublest): Likewise.
1949         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1950         (MAX_DECIMAL_STRING): Move here.
1951         (decimal_to_string): Return std::string object.
1952         (decimal_from_string): Accept std::string object.  Return bool.
1953         (decimal_from_integral): Remove, replace by ...
1954         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1955         (decimal_to_longest): New function.
1956         (decimal_from_floating): Remove, replace by ...
1957         (decimal_from_doublest): ... this new function.
1958         (decimal_to_doublest): Update to new decimal_to_string interface.
1959
1960         * value.c (unpack_long): Use decimal_to_longest.
1961         * valops.c (value_cast): Use decimal_from_doublest instead of
1962         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1963         decimal_from_integral.
1964         * valarith.c (value_args_as_decimal): Likewise.
1965         * valprint.c (print_decimal_floating): Update to new
1966         decimal_to_string interface.
1967         * printcmd.c (printf_decfloat): Likewise.
1968         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1969
1970 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1971
1972         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1973         * gdbtypes.c: Include "floatformat.h".
1974         * value.c: Likewise.
1975         * m68k-tdep.c: Likewise.
1976
1977         * findvar.c: Do not include "floatformat.h".
1978         * amd64-darwin-tdep.c: Likewise.
1979         * arm-linux-tdep.c: Likewise.
1980         * i386-darwin-tdep.c: Likewise.
1981         * i387-tdep.c: Likewise.
1982         * m68k-linux-tdep.c: Likewise.
1983         * mep-tdep.c: Likewise.
1984         * mips-tdep.c: Likewise.
1985         * nios2-tdep.c: Likewise.
1986         * s390-linux-tdep.c: Likewise.
1987         * sparc-obsd-tdep.c: Likewise.
1988         * sparc-tdep.c: Likewise.
1989         * sparc64-tdep.c: Likewise.
1990         * spu-tdep.c: Likewise.
1991         * tic6x-tdep.c: Likewise.
1992         * tilegx-tdep.c: Likewise.
1993         * vax-tdep.c: Likewise.
1994         * xstormy16-tdep.c: Likewise.
1995         * xtensa-tdep.c: Likewise.
1996
1997         * top.c: Do not include "doublest.h".
1998         * aarch64-tdep.c: Likewise.
1999         * alpha-tdep.c: Likewise.
2000         * arm-linux-tdep.c: Likewise.
2001         * m68k-linux-tdep.c: Likewise.
2002         * tilegx-tdep.c: Likewise.
2003         * xstormy16-tdep.c: Likewise.
2004
2005 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2006
2007         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2008         (mipsn32_fbsd_sigframe): Define.
2009         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2010         for FreeBSD/mipsn32.
2011
2012 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2013
2014         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2015         AT_HWCAP.
2016
2017 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2018
2019         * MAINTAINERS (Misc): Update my email address.
2020
2021 2017-10-04  Pedro Alves  <palves@redhat.com>
2022
2023         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2024         it instead of target_gdbarch.
2025         (get_remote_state, get_remote_packet_size): Adjust
2026         get_remote_arch_state calls, passing down target_gdbarch
2027         explicitly.
2028         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2029         'gdbarch' and use it instead of target_gdbarch.
2030         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2031         passing down target_gdbarch explicitly.
2032         (struct stop_reply) <arch>: New field.
2033         (remote_parse_stop_reply): Use the stopped thread's architecture,
2034         not the current inferior's.  Save the architecture in the
2035         stop_reply.
2036         (process_stop_reply): Use the stop reply's architecture.
2037         (process_g_packet, remote_fetch_registers)
2038         (remote_prepare_to_store, store_registers_using_G)
2039         (remote_store_registers): Adjust get_remote_arch_state calls,
2040         using the regcache's architecture.
2041         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2042         passing down target_gdbarch explicitly.
2043         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2044         beneath instead of calling target_gdbarch.
2045         * target.c (default_thread_architecture): Use the specified
2046         inferior's architecture, instead of the current inferior's
2047         architecture (via target_gdbarch).
2048
2049 2017-10-04  Pedro Alves  <palves@redhat.com>
2050
2051         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2052         case.
2053         (regcache_print): Handle !target_has_registers here instead.
2054
2055 2017-10-04  Pedro Alves  <palves@redhat.com>
2056
2057         * frame.c (create_test_frame): Delete.
2058         * frame.h (create_test_frame): Delete.
2059         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2060         (class regcache_test): Delete.
2061         (test_target_has_registers, test_target_has_stack)
2062         (test_target_has_memory, test_target_prepare_to_store)
2063         (test_target_store_registers): New functions.
2064         (test_target_ops): New class.
2065         (register_to_value_test): Error out if there's already a
2066         process_stratum (or higher) target pushed.  Create a fuller mock
2067         environment, with mock target_ops, inferior, address space, thread
2068         and inferior_ptid.
2069         * progspace.c (struct address_space): Move to ...
2070         * progspace.h (struct address_space): ... here.
2071         * regcache.h (regcache::~regcache, regcache::raw_write)
2072         [GDB_SELF_TEST]: No longer virtual.
2073
2074 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2075
2076         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2077
2078 2017-10-04  Pedro Alves  <palves@redhat.com>
2079
2080         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2081         out of 'between TRY and CATCH'.
2082
2083 2017-10-04  Pedro Alves  <palves@redhat.com>
2084
2085         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2086         * common/common-exceptions.h (TRY): Open an outermost scope.
2087         Expand intro comment.
2088         (CATCH): Reindent.
2089         (END_CATCH): Close the outermost scope.
2090         * completer.c (complete_line_internal): Add missing END_CATCH.
2091
2092 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2093
2094         * NEWS (Changes since GDB 8.0): Add entry about new
2095         'set-cwd-on-gdbserver' feature.
2096         (New remote packets): Add entry for QSetWorkingDir.
2097         * common/common-inferior.h (set_inferior_cwd): New prototype.
2098         * infcmd.c (set_inferior_cwd): Remove "static".
2099         (show_cwd_command): Expand text to include remote debugging.
2100         * remote.c: Add PACKET_QSetWorkingDir.
2101         (remote_protocol_features) <QSetWorkingDir>: New entry for
2102         PACKET_QSetWorkingDir.
2103         (extended_remote_set_inferior_cwd): New function.
2104         (extended_remote_create_inferior): Call
2105         "extended_remote_set_inferior_cwd".
2106         (_initialize_remote): Call "add_packet_config_cmd" for
2107         QSetWorkingDir.
2108
2109 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2110
2111         * NEWS (New commands): Mention "set/show cwd".
2112         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2113         "cd" command's help text.
2114         * common/common-inferior.h (get_inferior_cwd): New prototype.
2115         * infcmd.c (inferior_cwd_scratch): New global variable.
2116         (set_inferior_cwd): New function.
2117         (get_inferior_cwd): Likewise.
2118         (set_cwd_command): Likewise.
2119         (show_cwd_command): Likewise.
2120         (_initialize_infcmd): Add "set/show cwd" commands.
2121         * inferior.h (class inferior) <cwd>: New field.
2122         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2123         (fork_inferior): Change inferior's cwd before its execution.
2124         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2125         to CreateProcess.
2126
2127 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2128
2129         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2130         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2131         (COMMON_OBS): Add gdb_tilde_expand.o.
2132         * common/gdb_tilde_expand.c: New file.
2133         * common/gdb_tilde_expand.h: Likewise.
2134
2135 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2136
2137         * gdbarch.sh (objfile): Remove duplicate declaration.
2138         * gdbarch.h: Regenerate.
2139
2140 2017-10-03  Tom Tromey  <tom@tromey.com>
2141
2142         * utils.c (internal_vproblem): Use string_vprintf.
2143
2144 2017-10-03  Tom Tromey  <tom@tromey.com>
2145
2146         * printcmd.c (info_symbol_command): Use std::string.
2147
2148 2017-10-03  Tom Tromey  <tom@tromey.com>
2149
2150         * top.c (gdb_safe_append_history): Use std::string.
2151
2152 2017-10-03  Tom Tromey  <tom@tromey.com>
2153
2154         * event-top.c (stdin_event_handler): Update.
2155         * main.c (captured_main_1): Update.
2156         * top.h (make_delete_ui_cleanup): Remove.
2157         (struct ui): Add constructor and destructor.
2158         (new_ui, delete_ui): Remove.
2159         * top.c (make_delete_ui_cleanup): Remove.
2160         (new_ui_command): Use std::unique_ptr.
2161         (delete_ui_cleanup): Remove.
2162         (ui::ui): Rename from new_ui.  Update.
2163         (free_ui): Remove.
2164         (ui::~ui): Rename from delete_ui.  Update.
2165
2166 2017-10-03  Tom Tromey  <tom@tromey.com>
2167
2168         * symfile.c (load_progress): Use gdb::byte_vector.
2169
2170 2017-10-03  Tom Tromey  <tom@tromey.com>
2171
2172         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2173         declaration.
2174         * printcmd.c (x_command): Remove unused declaration.
2175         * symfile.c (symbol_file_command): Remove unused declaration.
2176
2177 2017-10-03  Tom Tromey  <tom@tromey.com>
2178
2179         * utils.c (internal_vproblem): Use std::string.
2180         (defaulted_query): Likewise.
2181
2182 2017-10-03  Tom Tromey  <tom@tromey.com>
2183
2184         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2185         * top.c (execute_command_to_string): Update.
2186         * utils.c (make_cleanup_restore_page_info): Remove.
2187         (do_restore_page_info_cleanup): Remove.
2188         (set_batch_flag_and_restore_page_info):
2189         New.
2190         (make_cleanup_restore_page_info): Remove.
2191         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2192         (~set_batch_flag_and_restore_page_info): New
2193         (make_cleanup_restore_uinteger): Remove.
2194         (make_cleanup_restore_integer): Remove.
2195         (struct restore_integer_closure): Remove.
2196         (restore_integer): Remove.
2197         * utils.h (struct set_batch_flag_and_restore_page_info): New
2198         class.
2199         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2200         (make_cleanup_restore_page_info): Remove.
2201         (make_cleanup_restore_uinteger) Remove.
2202         (make_cleanup_restore_integer) Remove.
2203
2204 2017-10-03  Tom Tromey  <tom@tromey.com>
2205
2206         * record-full.h (record_full_gdb_operation_disable_set): Return
2207         scoped_restore_tmpl<int>.
2208         * infrun.c (adjust_pc_after_break): Update.
2209         (handle_signal_stop): Update.
2210         * record-full.c (record_full_gdb_operation_disable_set): Return
2211         scoped_restore_tmpl<int>.
2212         (record_full_wait_1, record_full_insert_breakpoint)
2213         (record_full_remove_breakpoint, record_full_save)
2214         (record_full_goto_insn): Update.
2215
2216 2017-10-02  Tom Tromey  <tom@tromey.com>
2217
2218         PR rust/22236:
2219         * rust-lang.c (rust_val_print_str): New function.
2220         (val_print_struct): Call it.
2221         (rust_subscript): Preserve name of slice type.
2222
2223 2017-10-02  Tom Tromey  <tom@tromey.com>
2224
2225         * rust-lang.c (rust_subscript): Handle slices in
2226         EVAL_AVOID_SIDE_EFFECTS case.
2227
2228 2017-10-02  Tom Tromey  <tom@tromey.com>
2229
2230         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2231
2232 2017-10-02  Tom Tromey  <tom@tromey.com>
2233
2234         * rust-lang.h (rust_slice_type): Add "extern".
2235
2236 2017-10-02  Tom Tromey  <tom@tromey.com>
2237             Pedro Alves  <palves@redhat.com>
2238
2239         * ada-lang.h (ada_exc_info::operator<): Make const.
2240         (ada_exc_info::operator==): Make const.
2241         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2242         Make const.
2243
2244 2017-09-29  Tom Tromey  <tom@tromey.com>
2245
2246         * target.c (read_whatever_is_readable): Change type of "result".
2247         Update.
2248         (free_memory_read_result_vector): Remove.
2249         (read_memory_robust): Change return type.  Update.
2250         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2251         bin2hex, std::string.
2252         * target.h (memory_read_result_s): Remove typedef.
2253         (free_memory_read_result_vector): Remove.
2254         (read_memory_robust): Return std::vector.
2255
2256 2017-09-29  Tom Tromey  <tom@tromey.com>
2257
2258         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2259
2260 2017-09-29  Tom Tromey  <tom@tromey.com>
2261
2262         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2263         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2264         operator< and operator==.
2265         (ada_exceptions_list): Return a std::vector.
2266         * ada-lang.c (ada_exc_info::operator<): Rename from
2267         compare_ada_exception_info.
2268         (ada_exc_info::operator==): New.
2269         (sort_remove_dups_ada_exceptions_list): Change type of
2270         "exceptions".
2271         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2272         (ada_add_global_exceptions): Likewise.
2273         (ada_exceptions_list_1): Return a std::vector.
2274         (ada_exceptions_list): Likewise.
2275
2276 2017-09-29  Tom Tromey  <tom@tromey.com>
2277
2278         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2279         'std::set *'.
2280         (print_one_inferior): Update.
2281         (free_vector_of_ints): Remove.
2282         (list_available_thread_groups): Change "ids" to std::set.
2283         (mi_cmd_list_thread_groups): Update.
2284         (struct collect_cores_data) <core>: Now a std::set.
2285         (collect_cores): Update.
2286         (unique): Remove.
2287         (print_one_inferior): Update.
2288
2289 2017-09-29  Tom Tromey  <tom@tromey.com>
2290
2291         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2292         (mi_execute_async_cli_command): Likewise.
2293         (mi_cmd_trace_frame_collected): Use field_fmt.
2294
2295 2017-09-29  Tom Tromey  <tom@tromey.com>
2296
2297         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2298         gdb::byte_vector.
2299
2300 2017-09-29  Tom Tromey  <tom@tromey.com>
2301
2302         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2303
2304 2017-09-29  Tom Tromey  <tom@tromey.com>
2305
2306         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2307
2308 2017-09-29  Tom Tromey  <tom@tromey.com>
2309
2310         * varobj.h (varobj_gen_name): Return std::string.
2311         * varobj.c (varobj_gen_name): Return std::string.
2312         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2313         (mi_cmd_var_delete): Don't copy "name".
2314
2315 2017-09-29  Tom Tromey  <tom@tromey.com>
2316
2317         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2318         (mi_cmd_break_insert_1): Update.
2319
2320 2017-09-29  Tom Tromey  <tom@tromey.com>
2321
2322         * target.h (make_scoped_defer_target_commit_resume): Update.
2323         * target.c (make_scoped_defer_target_commit_resume): Rename from
2324         make_cleanup_defer_target_commit_resume.  Return a
2325         scoped_restore.
2326         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2327
2328 2017-09-29  Tom Tromey  <tom@tromey.com>
2329
2330         * main.c (captured_main_1): Remove unused declaration.
2331         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2332
2333 2017-09-29  Tom Tromey  <tom@tromey.com>
2334
2335         * symtab.c (search_symbols): Remove unused outer cleanup.
2336         (make_source_files_completion_list): Remove unused declaration.
2337
2338 2017-09-29  Tom Tromey  <tom@tromey.com>
2339
2340         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2341
2342 2017-09-29  Tom Tromey  <tom@tromey.com>
2343
2344         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2345         gdb::byte_vector.
2346
2347 2017-09-29  Tom Tromey  <tom@tromey.com>
2348
2349         * complaints.c (vcomplaint): Use std::string.
2350
2351 2017-09-29  Tom Tromey  <tom@tromey.com>
2352
2353         * tracepoint.c (trace_variable_command): Use std::string.
2354         (encode_actions_1): Remove unused declarations.
2355         (create_tsv_from_upload): Use std::string.
2356
2357 2017-09-29  Tom Tromey  <tom@tromey.com>
2358
2359         * cp-support.c (gdb_demangle): Use std::string.
2360
2361 2017-09-29  Tom Tromey  <tom@tromey.com>
2362
2363         * stack.c (parse_frame_specification): Use std::string
2364         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2365
2366 2017-09-29  Tom Tromey  <tom@tromey.com>
2367
2368         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2369
2370 2017-09-29  Tom Tromey  <tom@tromey.com>
2371
2372         * utils.c (vfprintf_maybe_filtered): Use std::string.
2373         (vfprintf_unfiltered): Likewise.
2374
2375 2017-09-29  Tom Tromey  <tom@tromey.com>
2376
2377         * event-top.c (top_level_prompt): Return std::string.
2378         (display_gdb_prompt): Update.
2379
2380 2017-09-29  Tom Tromey  <tom@tromey.com>
2381
2382         * unittests/common-utils-selftests.c (format): New function.
2383         (string_vprintf_tests): New function.
2384         (_initialize_common_utils_selftests): Register new tests.
2385         * common/common-utils.c (string_vprintf): New function.
2386         * common/common-utils.h (string_vprintf): Declare.
2387
2388 2017-09-29  Pedro Alves  <palves@redhat.com>
2389
2390         * common/rsp-low.c (unpack_varlen_hex): Constify.
2391         * common/rsp-low.h (unpack_varlen_hex): Constify.
2392         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2393         Constify.
2394         * remote.c (remote_set_permissions, read_ptid)
2395         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2396         (remote_static_tracepoint_marker_at)
2397         (remote_static_tracepoint_markers_by_strid)
2398         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2399         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2400         (parse_tracepoint_definition, parse_tsv_definition)
2401         (parse_static_tracepoint_marker_definition): Constify.
2402         * tracepoint.h (parse_static_tracepoint_marker_definition)
2403         (parse_trace_status, parse_tracepoint_status)
2404         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2405
2406 2017-09-29  Pedro Alves  <palves@redhat.com>
2407
2408         * remote.c (target_buf, target_buf_size): Delete.
2409         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2410         Use the connection's packet buffer instead.
2411         All callers adjusted.
2412         (_initialize_remote): Remove references to target_buf and
2413         target_buf_size.
2414
2415 2017-09-28  Pedro Alves  <palves@redhat.com>
2416
2417         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2418         unittests/common-utils-selftests.c.
2419         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2420         (COMMON_OBS): Remove utils-selftests.o.
2421         * utils-selftests.c: Move to ...
2422         * unittests/common-utils-selftests.c: ... here and rename self
2423         test to "string_printf".
2424
2425 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2426
2427         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2428         having NULL cus or tus.
2429
2430 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2431
2432         * arm-tdep.c: (convert_from_extended): Remove.
2433         (convert_to_extended): Likewise.
2434         (arm_extract_return_value): Use convert_typed_floating.
2435         (arm_store_return_value): Likewise.
2436
2437         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2438         * sh-tdep.c: Do not include "floatformat.h".
2439         (sh_littlebyte_bigword_type): New function.
2440         (sh_register_convert_to_virtual): Use convert_typed_floating.
2441         (sh_register_convert_to_raw): Likewise.
2442         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2443         (sh64_littlebyte_bigword_type): New function.
2444         (sh64_extract_return_value): Use convert_typed_floating.
2445         (sh64_register_convert_to_virtual): Likewise.
2446         (sh64_register_convert_to_raw): Likewise.
2447
2448 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2449
2450         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2451         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2452
2453         * gdbtypes.h (union type_specific): Make field floatformat hold
2454         just a single struct floatformat, not an array.
2455         (floatformat_from_type): Move here.
2456         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2457         changed TYPE_FLOATFORMAT definition.
2458         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2459         (recursive_dump_type): Likewise.
2460         (init_float_type): Install correct floatformat for byte order.
2461         (arch_float_type): Likewise.
2462
2463 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2464
2465         * gdbtypes.c (init_type): Change incoming argument from
2466         length-in-bytes to length-in-bits.  Assert length is a
2467         multiple of TARGET_CHAR_BITS.
2468         (arch_type, arch_flags_type): Likewise.
2469         (init_integer_type): Update call to init_type.
2470         (init_character_type): Likewise.
2471         (init_boolean_type): Likewise.
2472         (init_float_type): Likewise.
2473         (init_decfloat_type): Likewise.
2474         (init_complex_type): Likewise.
2475         (init_pointer_type): Likewise.
2476         (objfile_type): Likewise.
2477         (arch_integer_type): Update call to arch_type.
2478         (arch_character_type): Likewise.
2479         (arch_boolean_type): Likewise.
2480         (arch_float_type): Likewise.
2481         (arch_decfloat_type): Likewise.
2482         (arch_complex_type): Likewise.
2483         (arch_pointer_type): Likewise.
2484         (gdbtypes_post_init): Likewise.
2485
2486         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2487         (read_base_type): Likewise.
2488         * mdebugread.c (basic_type): Likewise.
2489         * stabsread.c (dbx_init_float_type): Likewise.
2490         (rs6000_builtin_type): Likewise.
2491         (read_range_type): Likewise.  Also, fix call to init_integer_type
2492         with erroneous length argument.
2493
2494         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2495         * d-lang.c (build_d_types): Likewise.
2496         * f-lang.c (build_fortran_types): Likewise.
2497         * go-lang.c (build_go_types): Likewise.
2498         * opencl-lang.c (build_opencl_types): Likewise.
2499         * jit.c (finalize_symtab): Likewise.
2500         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2501         (build_std_type_info_type): Likewise.
2502         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2503         update call to arch_flags_type.
2504
2505         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2506         arch_type.
2507         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2508         * windows-tdep.c (windows_get_tlb_type): Likewise.
2509
2510         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2511         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2512         * m32c-tdep.c (make_types): Likewise.
2513         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2514         (rl78_psw_type): Update call to arch_flags_type.
2515         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2516         * rx-tdep.c (rx_psw_type): Likewise.
2517         (rx_fpsw_type): Likewise.
2518         * sparc-tdep.c (sparc_psr_type): Likewise.
2519         (sparc_fsr_type): Likewise.
2520         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2521         (sparc64_ccr_type): Likewise.
2522         (sparc64_fsr_type): Likewise.
2523         (sparc64_fprs_type): Likewise.
2524
2525 2017-09-27  Tom Tromey  <tom@tromey.com>
2526
2527         * findcmd.c (find_command): Constify.
2528
2529 2017-09-27  Tom Tromey  <tom@tromey.com>
2530
2531         * ada-tasks.c (task_command_1, task_command): Constify.
2532
2533 2017-09-27  Tom Tromey  <tom@tromey.com>
2534
2535         * symtab.c (maintenance_print_symbol_cache)
2536         (maintenance_flush_symbol_cache)
2537         (maintenance_print_symbol_cache_statistics): Constify.
2538
2539 2017-09-27  Tom Tromey  <tom@tromey.com>
2540
2541         * inferior.c (detach_inferior_command, kill_inferior_command)
2542         (inferior_command): Constify.
2543
2544 2017-09-27  Tom Tromey  <tom@tromey.com>
2545
2546         * regcache.c (regcache_print, maintenance_print_registers)
2547         (maintenance_print_raw_registers)
2548         (maintenance_print_cooked_registers)
2549         (maintenance_print_register_groups)
2550         (maintenance_print_remote_registers): Constify.
2551
2552 2017-09-27  Tom Tromey  <tom@tromey.com>
2553
2554         * printcmd.c (map_display_numbers, undisplay_command)
2555         (enable_disable_display_command, enable_display_command)
2556         (disable_display_command): Constify.
2557
2558 2017-09-27  Tom Tromey  <tom@tromey.com>
2559
2560         * breakpoint.h (delete_command): Don't declare.
2561         * breakpoint.c (delete_command, enable_once_command)
2562         (enable_count_command, enable_delete_command, breakpoint_1)
2563         (maintenance_info_breakpoints, stopin_command, stopat_command)
2564         (delete_command, delete_trace_command, save_breakpoints)
2565         (save_breakpoints_command, save_tracepoints_command): Constify.
2566
2567 2017-09-27  Tom Tromey  <tom@tromey.com>
2568
2569         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2570         (skip_ws, extract_identifier, macro_define_command)
2571         (macro_undef_command, macro_list_command): Constify.
2572
2573 2017-09-27  Tom Tromey  <tom@tromey.com>
2574
2575         * infcmd.c (environment_info, set_environment_command)
2576         (unset_environment_command, path_info, info_proc_cmd_1)
2577         (info_proc_cmd_mappings, info_proc_cmd_stat)
2578         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2579         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2580
2581 2017-09-27  Tom Tromey  <tom@tromey.com>
2582
2583         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2584         Constify.
2585
2586 2017-09-27  Tom Tromey  <tom@tromey.com>
2587
2588         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2589
2590 2017-09-27  Tom Tromey  <tom@tromey.com>
2591
2592         * demangle.c (demangle_command): Constify.
2593
2594 2017-09-27  Tom Tromey  <tom@tromey.com>
2595
2596         * progspace.c (maintenance_info_program_spaces_command):
2597         Constify.
2598
2599 2017-09-27  Tom Tromey  <tom@tromey.com>
2600
2601         * compile/compile.c (check_raw_argument, compile_file_command)
2602         (compile_code_command, compile_print_command): Constify.
2603
2604 2017-09-27  Tom Tromey  <tom@tromey.com>
2605
2606         * reggroups.c (maintenance_print_reggroups): Constify.
2607
2608 2017-09-27  Tom Tromey  <tom@tromey.com>
2609
2610         * dwarf2read.c (save_gdb_index_command): Constify.
2611
2612 2017-09-27  Tom Tromey  <tom@tromey.com>
2613
2614         * stap-probe.c (info_probes_stap_command): Constify.
2615
2616 2017-09-27  Tom Tromey  <tom@tromey.com>
2617
2618         * fork-child.c (unset_exec_wrapper_command): Constify.
2619
2620 2017-09-27  Tom Tromey  <tom@tromey.com>
2621
2622         * btrace.c (get_uint, get_context_size, no_chunk)
2623         (maint_btrace_packet_history_cmd)
2624         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2625         (maint_info_btrace_cmd): Constify.
2626
2627 2017-09-27  Tom Tromey  <tom@tromey.com>
2628
2629         * reverse.c (delete_bookmark_command): Constify.
2630
2631 2017-09-27  Tom Tromey  <tom@tromey.com>
2632
2633         * remote.c (set_memory_packet_size)
2634         (set_memory_write_packet_size, show_memory_write_packet_size)
2635         (set_memory_read_packet_size, show_memory_read_packet_size)
2636         (compare_sections_command, packet_command, remote_put_command)
2637         (remote_get_command, remote_delete_command): Constify.
2638
2639 2017-09-27  Tom Tromey  <tom@tromey.com>
2640
2641         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2642         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2643         (set_mipsfpu_auto_command): Constify.
2644
2645 2017-09-27  Tom Tromey  <tom@tromey.com>
2646
2647         * cli/cli-cmds.h (cd_command): Constify.
2648         * cli/cli-cmds.c (cd_command): Constify.
2649
2650 2017-09-27  Tom Tromey  <tom@tromey.com>
2651
2652         * thread.c (thread_name_command, thread_find_command): Constify.
2653
2654 2017-09-27  Tom Tromey  <tom@tromey.com>
2655
2656         * probe.c (enable_probes_command, disable_probes_command):
2657         Constify.
2658
2659 2017-09-27  Tom Tromey  <tom@tromey.com>
2660
2661         * symfile.c (symbol_file_command): Constify.
2662         * gdbcore.h (deprecated_file_changed_hook): Constify.
2663         * exec.c (deprecated_file_changed_hook, exec_file_command)
2664         (file_command): Constify.
2665         * defs.h (symbol_file_command): Constify.
2666
2667 2017-09-27  Tom Tromey  <tom@tromey.com>
2668
2669         * remote-fileio.c (set_system_call_allowed)
2670         (show_system_call_allowed): Constify.
2671
2672 2017-09-27  Tom Tromey  <tom@tromey.com>
2673
2674         * tracepoint.c (delete_trace_variable_command)
2675         (tfind_end_command, tfind_start_command, tfind_pc_command)
2676         (tfind_tracepoint_command, tfind_line_command)
2677         (tfind_range_command, tfind_outside_command): Constify.
2678
2679 2017-09-27  Tom Tromey  <tom@tromey.com>
2680
2681         * ax-gdb.c (maint_agent_printf_command, agent_command)
2682         (agent_eval_command): Constify.
2683
2684 2017-09-27  Tom Tromey  <tom@tromey.com>
2685
2686         * tracepoint.c (info_scope_command): Constify.
2687         * python/python.c (gdbpy_decode_line): Constify.
2688         * python/py-breakpoint.c (bppy_init): Constify.
2689         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2690         * location.h: (new_linespec_location)
2691         (string_to_event_location_basic, string_to_event_location):
2692         Constify.
2693         * location.c (new_linespec_location)
2694         (string_to_event_location_basic, string_to_event_location):
2695         Constify.
2696         * linespec.h (decode_line_with_current_source)
2697         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2698         * linespec.c (linespec_lex_to_end)
2699         (decode_line_with_current_source)
2700         (decode_line_with_last_displayed): Constify.
2701         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2702         Constify.
2703         * cli/cli-cmds.c (edit_command, list_command): Constify.
2704         * breakpoint.h (until_break_command, watch_command_wrapper)
2705         (awatch_command_wrapper, rwatch_command_wrapper)
2706         (init_ada_exception_breakpoint): Constify.
2707         * breakpoint.c (break_command_1, dprintf_command)
2708         (break_range_command, watch_command_wrapper)
2709         (rwatch_command_wrapper, awatch_command_wrapper)
2710         (until_break_command, init_ada_exception_breakpoint)
2711         (strace_marker_create_sals_from_location, trace_command)
2712         (ftrace_command, strace_command, struct tracepoint): Constify.
2713         * ax-gdb.c (agent_command_1): Constify.
2714         * ada-lang.c (ada_exception_sal): Constify.
2715
2716 2017-09-27  Tom Tromey  <tom@tromey.com>
2717
2718         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2719         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2720         (get_context_size, no_chunk, get_insn_history_modifiers)
2721         (cmd_record_insn_history, get_call_history_modifiers)
2722         (cmd_record_call_history): Constify.
2723
2724 2017-09-27  Tom Tromey  <tom@tromey.com>
2725
2726         * source.c (show_substitute_path_command)
2727         (unset_substitute_path_command, set_substitute_path_command):
2728         Constify.
2729
2730 2017-09-27  Tom Tromey  <tom@tromey.com>
2731
2732         * typeprint.c (maintenance_print_type): Constify.
2733         * maint.c (maintenance_dump_me, maintenance_demangle)
2734         (maintenance_time_display, maintenance_info_sections)
2735         (maintenance_print_statistics, maintenance_deprecate)
2736         (maintenance_undeprecate): Constify.
2737         (maintenance_do_deprecate): Constify.  Use std::string.
2738         (maintenance_selftest): Constify.
2739         * gdbtypes.h (maintenance_print_type): Constify.
2740
2741 2017-09-27  Tom Tromey  <tom@tromey.com>
2742
2743         * hppa-tdep.c (unwind_command): Constify.
2744
2745 2017-09-27  Tom Tromey  <tom@tromey.com>
2746
2747         * target-descriptions.c (unset_tdesc_filename_cmd)
2748         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2749         Constify.
2750
2751 2017-09-27  Tom Tromey  <tom@tromey.com>
2752
2753         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2754
2755 2017-09-27  Tom Tromey  <tom@tromey.com>
2756
2757         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2758
2759 2017-09-27  Tom Tromey  <tom@tromey.com>
2760
2761         * tui/tui-regs.c (tui_reg_command): Constify.
2762
2763 2017-09-27  Tom Tromey  <tom@tromey.com>
2764
2765         * skip.c (skip_file_command, skip_function_command)
2766         (skip_enable_command, skip_disable_command, skip_delete_command):
2767         Constify.
2768
2769 2017-09-27  Tom Tromey  <tom@tromey.com>
2770
2771         * record-btrace.c (cmd_record_btrace_bts_start)
2772         (cmd_record_btrace_pt_start): Constify.
2773
2774 2017-09-27  Tom Tromey  <tom@tromey.com>
2775
2776         * symmisc.c (maintenance_print_symbols)
2777         (maintenance_print_msymbols, maintenance_print_objfiles)
2778         (maintenance_info_symtabs, maintenance_check_symtabs)
2779         (maintenance_expand_symtabs, maintenance_info_line_tables):
2780         Constify.
2781
2782 2017-09-27  Tom Tromey  <tom@tromey.com>
2783
2784         * top.c (new_ui_command): Constify.
2785
2786 2017-09-27  Tom Tromey  <tom@tromey.com>
2787
2788         * symfile.c (add_symbol_file_command)
2789         (remove_symbol_file_command, list_overlays_command)
2790         (map_overlay_command, unmap_overlay_command)
2791         (overlay_auto_command, overlay_manual_command)
2792         (overlay_off_command, overlay_load_command): Constify.
2793
2794 2017-09-27  Tom Tromey  <tom@tromey.com>
2795
2796         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2797         (info_spu_mailbox_command, info_spu_dma_command)
2798         (info_spu_proxydma_command): Constify.
2799
2800 2017-09-27  Tom Tromey  <tom@tromey.com>
2801
2802         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2803
2804 2017-09-27  Tom Tromey  <tom@tromey.com>
2805
2806         * cli/cli-script.c (user_defined_command): Constify.
2807
2808 2017-09-27  Tom Tromey  <tom@tromey.com>
2809
2810         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2811         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2812         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2813         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2814         (dump_binary_value, append_binary_memory, append_binary_value):
2815         Constify.
2816         (struct dump_context) <func>: Constify.
2817         (add_dump_command): Update.
2818
2819 2017-09-27  Tom Tromey  <tom@tromey.com>
2820
2821         * cli/cli-cmds.c (show_version, show_configuration)
2822         (source_command, show_user): Constify.
2823
2824 2017-09-27  Tom Tromey  <tom@tromey.com>
2825
2826         * target.c (maintenance_print_target_stack): Constify.
2827
2828 2017-09-27  Tom Tromey  <tom@tromey.com>
2829
2830         * interps.c (interpreter_exec_cmd): Constify.
2831
2832 2017-09-27  Tom Tromey  <tom@tromey.com>
2833
2834         * record-full.c (cmd_record_full_restore): Constify.
2835
2836 2017-09-27  Tom Tromey  <tom@tromey.com>
2837
2838         * memattr.c (enable_mem_command, disable_mem_command)
2839         (delete_mem_command): Constify.
2840
2841 2017-09-27  Tom Tromey  <tom@tromey.com>
2842
2843         * value.c (show_convenience): Constify.
2844
2845 2017-09-27  Tom Tromey  <tom@tromey.com>
2846
2847         * gdbcore.h (core_file_command): Update.
2848         * corefile.c (core_file_command): Constify.
2849
2850 2017-09-27  Tom Tromey  <tom@tromey.com>
2851
2852         * user-regs.c (maintenance_print_user_registers): Constify.
2853
2854 2017-09-27  Tom Tromey  <tom@tromey.com>
2855
2856         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2857
2858 2017-09-27  Tom Tromey  <tom@tromey.com>
2859
2860         * cp-support.c (first_component_command): Constify.
2861
2862 2017-09-27  Tom Tromey  <tom@tromey.com>
2863
2864         * psymtab.c (maintenance_print_psymbols)
2865         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2866         Constify.
2867
2868 2017-09-27  Tom Tromey  <tom@tromey.com>
2869
2870         * windows-tdep.c (display_tib): Constify.
2871
2872 2017-09-27  Tom Tromey  <tom@tromey.com>
2873
2874         * linux-fork.c (delete_checkpoint_command)
2875         (detach_checkpoint_command): Constify.
2876
2877 2017-09-27  Tom Tromey  <tom@tromey.com>
2878
2879         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2880
2881 2017-09-27  Tom Tromey  <tom@tromey.com>
2882
2883         * arc-tdep.c (dump_arc_instruction_command): Constify.
2884
2885 2017-09-27  Tom Tromey  <tom@tromey.com>
2886
2887         * valprint.c (set_radix, show_radix): Constify.
2888
2889 2017-09-27  Tom Tromey  <tom@tromey.com>
2890
2891         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2892
2893 2017-09-27  Tom Tromey  <tom@tromey.com>
2894
2895         * command.h (not_just_help_class_command): Update.
2896         * cli/cli-decode.h (not_just_help_class_command): Update.
2897         * cli/cli-decode.c (not_just_help_class_command): Constify.
2898
2899 2017-09-27  Tom Tromey  <tom@tromey.com>
2900
2901         * gdb_bfd.c (maintenance_info_bfds): Constify.
2902
2903 2017-09-27  Tom Tromey  <tom@tromey.com>
2904
2905         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2906         overloads.
2907         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2908         (do_const_cfunc): New function.
2909         (cmd_cfunc_eq): New overload.
2910         (cli_user_command_p): Check do_const_cfunc.
2911         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2912         const_cfunc.
2913         * command.h (add_cmd): Add const overload and no-function
2914         overload.
2915         (set_cmd_cfunc): Add const overload.
2916         (cmd_const_cfunc_ftype): Declare.
2917         (cmd_cfunc_eq): Add const overload.
2918         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2919         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2920         overload.
2921
2922 2017-09-27  Tom Tromey  <tom@tromey.com>
2923
2924         * macroexp.c (get_next_token_for_substitution): New function.
2925         (substitute_args): Call it.  Check for __VA_OPT__.
2926
2927 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2928             Pedro Alves <palves@redhat.com>
2929
2930         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2931         producer_is_icc_lt_14.
2932         (producer_is_icc_lt_14): New function.
2933         (check_producer): Add code for checking version of ICC.
2934         (producer_is_icc): Move to producer.c.
2935         (read_structure_type): Restrict ICC workaround to ICC<14.
2936         * producer.c: Include selftest.h.
2937         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2938         New functions.
2939         * producer.h (producer_is_icc): New declaration.
2940
2941 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2942
2943         * Makefile.in (SFILES): Add producer.c.
2944         (COMMON_OBS): Add producer.o
2945         * amd64-tdep.c (producer.h): Add new include.
2946         * dwarf2read.c (producer.h): Add new include.
2947         * producer.c: New file.
2948         * producer.h: New file.
2949         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2950         producer.c.
2951         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2952         producer.h.
2953
2954 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2955
2956         * configure.ac: Search ncursesw before ncurses.
2957         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2958         * gdb_curses.h: Include <ncursesw/ncurses.h>
2959         * config.in, configure: Regenerate.
2960
2961 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2962
2963         PR gdb/22185
2964         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2965         obsolete.
2966         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2967         Remove i386sol2 support.
2968         * configure.nat <i386sol2>: Remove.
2969         <sol2-64>: Fold into ...
2970         <sol2>: ... this.
2971         Move common settings to default section.
2972         Add sol-thread.o.
2973         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2974         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2975         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2976         <i[34567]86-*-solaris*>: Remove.
2977         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2978
2979         * configure.ac: Remove wctype in libw check.
2980         (_MSE_INT_H): Don't define on Solaris 7-9.
2981         <solaris*>: Remove libthread_db.so.1 check.
2982         * configure: Regenerate.
2983         * config.in: Regenerate.
2984
2985         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2986         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2987         (gdb_ps_size_t): Remove.
2988         Use base types in users.
2989         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2990
2991         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2992
2993 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2994
2995         PR build/22206
2996         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2997         (adi_is_addr_mapped): Likewise.
2998         (PSR_ICC): Don't redefine.
2999         (PSR_IMPL): Likewise.
3000
3001 2017-09-25  Tom Tromey  <tom@tromey.com>
3002
3003         * regcache.c (regcache::dump): Use string_printf.
3004
3005 2017-09-25  Tom Tromey  <tom@tromey.com>
3006
3007         * regcache.c (class regcache_invalidator): New.
3008         (struct register_to_invalidate): Remove.
3009         (make_cleanup_regcache_invalidate): Remove.
3010         (regcache::raw_write): Use regcache_invalidator.
3011
3012 2017-09-25  Tom Tromey  <tom@tromey.com>
3013
3014         * spu-tdep.c (spu2ppu_sniffer): Update.
3015         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3016         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3017         Remove.
3018         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3019         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3020         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3021         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3022         (frame_pop): Update.
3023
3024 2017-09-25  Tom Tromey  <tom@tromey.com>
3025
3026         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3027         * regcache.h (regcache_xfree): Don't declare.
3028         * regcache.c (regcache_xfree): Remove.
3029         (do_regcache_xfree): Use delete.
3030         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3031         * linux-fork.c (free_fork): Use delete.
3032         (fork_save_infrun_state): Likewise.
3033         * jit.c (jit_dealloc_cache): Use delete.
3034         * infrun.c (discard_infcall_suspend_state): Use delete.
3035
3036 2017-09-25  Tom Tromey  <tom@tromey.com>
3037
3038         * regcache.h (regcache_xmalloc): Don't declare.
3039         (regcache_raw_set_cached_value): Update comment.
3040         * regcache.c (regcache_xmalloc): Remove.
3041         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3042         * jit.c (jit_frame_sniffer): Use new.
3043         * frame.c (frame_save_as_regcache): Use new.
3044
3045 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3046
3047         * NEWS: Advertise support for guarded-storage registers on IBM z.
3048
3049 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3050
3051         * s390-linux-nat.c (have_regset_gs): New static variable.
3052         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3053         control block and guarded-storage broadcast control regsets.
3054         (s390_read_description): Detect whether the target has
3055         guarded-storage support, return appropriate tdesc.
3056         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3057         (features/s390x-gs-linux64.c): Likewise.
3058         (struct gdbarch_tdep) <have_gs>: New field.
3059         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3060         (s390_gsbc_regset): New variables.
3061         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3062         and s390_gsbc_regset, if applicable.
3063         (s390_core_read_description): Check whether core file was from a
3064         target with guarded-storage support; include appropriate regsets.
3065         (s390_gdbarch_init): Add registers for guarded-storage support.
3066         (_initialize_s390_tdep): Initialize new target descriptions that
3067         include registers for guarded-storage support.
3068         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3069         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3070         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3071         (S390_NUM_REGS): Adjust macro definition.
3072         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3073         (tdesc_s390x_gs_linux64): New declarations.
3074
3075 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3076
3077         * features/s390-gs-linux64.xml: New file.
3078         * features/s390-gs.xml: New file.
3079         * features/s390-gsbc.xml: New file.
3080         * features/s390x-gs-linux64.xml: New file.
3081         * features/Makefile (WHICH): Add s390-gs-linux64 and
3082         s390x-gs-linux64.
3083         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3084         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3085         * features/s390-gs-linux64.c: New generated file.
3086         * features/s390x-gs-linux64.c: New file.
3087         * regformats/s390-gs-linux64.dat: New file.
3088         * regformats/s390x-gs-linux64.dat: New file.
3089
3090 2017-09-23  Tom Tromey  <tom@tromey.com>
3091
3092         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3093
3094 2017-09-22  Tom Tromey  <tom@tromey.com>
3095
3096         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3097         type to scoped_restore_tmpl.
3098         <scoped_input_handler>: Initialize m_quit_handler directly.
3099
3100 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3101
3102         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3103         (cd_command): Likewise.  Free "current_directory" before
3104         assigning to it.
3105         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3106         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3107         * top.c (gdb_dirbuf): Remove global declaration.
3108         * top.h (gdb_dirbuf): Likewise.
3109
3110 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3111
3112         * gnulib/aclocal.m4: Regenerate.
3113         * gnulib/config.in: Regenerate.
3114         * gnulib/configure: Regenerate.
3115         * gnulib/import/Makefile.am: Regenerate.
3116         * gnulib/import/Makefile.in: Regenerate.
3117         * gnulib/import/assure.h: New file.
3118         * gnulib/import/at-func.c: Likewise
3119         * gnulib/import/chdir-long.c: New file.
3120         * gnulib/import/chdir-long.h: New file.
3121         * gnulib/import/cloexec.c: New file.
3122         * gnulib/import/cloexec.h: New file.
3123         * gnulib/import/close.c: New file.
3124         * gnulib/import/closedir.c: New file.
3125         * gnulib/import/dirent-private.h: New file.
3126         * gnulib/import/dup-safer.c: New file.
3127         * gnulib/import/dup.c: New file.
3128         * gnulib/import/dup2.c: New file.
3129         * gnulib/import/error.c: New file.
3130         * gnulib/import/error.h: New file.
3131         * gnulib/import/exitfail.c: New file.
3132         * gnulib/import/exitfail.h: New file.
3133         * gnulib/import/fchdir.c: New file.
3134         * gnulib/import/fcntl.c: New file.
3135         * gnulib/import/fcntl.in.h: New file.
3136         * gnulib/import/fd-hook.c: New file.
3137         * gnulib/import/fd-hook.h: New file.
3138         * gnulib/import/fd-safer.c: New file.
3139         * gnulib/import/fdopendir.c: New file.
3140         * gnulib/import/filename.h: New file.
3141         * gnulib/import/filenamecat-lgpl.c: New file.
3142         * gnulib/import/filenamecat.h: New file.
3143         * gnulib/import/fstat.c: New file.
3144         * gnulib/import/fstatat.c: New file.
3145         * gnulib/import/getcwd-lgpl.c: New file.
3146         * gnulib/import/getcwd.c: New file.
3147         * gnulib/import/getdtablesize.c: New file.
3148         * gnulib/import/getlogin_r.c: New file.
3149         * gnulib/import/getprogname.c: New file.
3150         * gnulib/import/getprogname.h: New file.
3151         * gnulib/import/gettext.h: New file.
3152         * gnulib/import/glob-libc.h: New file.
3153         * gnulib/import/glob.c: New file.
3154         * gnulib/import/glob.in.h: New file.
3155         * gnulib/import/intprops.h: New file.
3156         * gnulib/import/m4/chdir-long.m4: New file.
3157         * gnulib/import/m4/close.m4: New file.
3158         * gnulib/import/m4/closedir.m4: New file.
3159         * gnulib/import/m4/d-ino.m4: New file.
3160         * gnulib/import/m4/d-type.m4: New file.
3161         * gnulib/import/m4/dup.m4: New file.
3162         * gnulib/import/m4/dup2.m4: New file.
3163         * gnulib/import/m4/error.m4: New file.
3164         * gnulib/import/m4/fchdir.m4: New file.
3165         * gnulib/import/m4/fcntl.m4: New file.
3166         * gnulib/import/m4/fcntl_h.m4: New file.
3167         * gnulib/import/m4/fdopendir.m4: New file.
3168         * gnulib/import/m4/filenamecat.m4: New file.
3169         * gnulib/import/m4/fstat.m4: New file.
3170         * gnulib/import/m4/fstatat.m4: New file.
3171         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3172         * gnulib/import/m4/getcwd-path-max.m4: New file.
3173         * gnulib/import/m4/getcwd.m4: New file.
3174         * gnulib/import/m4/getdtablesize.m4: New file.
3175         * gnulib/import/m4/getlogin_r.m4: New file.
3176         * gnulib/import/m4/getprogname.m4: New file.
3177         * gnulib/import/m4/glob.m4: New file.
3178         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3179         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3180         * gnulib/import/m4/mempcpy.m4: New file.
3181         * gnulib/import/m4/memrchr.m4: New file.
3182         * gnulib/import/m4/mode_t.m4: New file.
3183         * gnulib/import/m4/msvc-inval.m4: New file.
3184         * gnulib/import/m4/msvc-nothrow.m4: New file.
3185         * gnulib/import/m4/open.m4: New file.
3186         * gnulib/import/m4/openat.m4: New file.
3187         * gnulib/import/m4/opendir.m4: New file.
3188         * gnulib/import/m4/readdir.m4: New file.
3189         * gnulib/import/m4/realloc.m4: New file.
3190         * gnulib/import/m4/rewinddir.m4: New file.
3191         * gnulib/import/m4/save-cwd.m4: New file.
3192         * gnulib/import/m4/strdup.m4: New file.
3193         * gnulib/import/m4/strerror.m4: New file.
3194         * gnulib/import/m4/unistd-safer.m4: New file.
3195         * gnulib/import/mempcpy.c: New file.
3196         * gnulib/import/memrchr.c: New file.
3197         * gnulib/import/msvc-inval.c: New file.
3198         * gnulib/import/msvc-inval.h: New file.
3199         * gnulib/import/msvc-nothrow.c: New file.
3200         * gnulib/import/msvc-nothrow.h: New file.
3201         * gnulib/import/open.c: New file.
3202         * gnulib/import/openat-die.c: New file.
3203         * gnulib/import/openat-priv.h: New file.
3204         * gnulib/import/openat-proc.c: New file.
3205         * gnulib/import/openat.c: New file.
3206         * gnulib/import/openat.h: New file.
3207         * gnulib/import/opendir.c: New file.
3208         * gnulib/import/pipe-safer.c: New file.
3209         * gnulib/import/readdir.c: New file.
3210         * gnulib/import/realloc.c: New file.
3211         * gnulib/import/rewinddir.c: New file.
3212         * gnulib/import/save-cwd.c: New file.
3213         * gnulib/import/save-cwd.h: New file.
3214         * gnulib/import/strdup.c: New file.
3215         * gnulib/import/strerror-override.c: New file.
3216         * gnulib/import/strerror-override.h: New file.
3217         * gnulib/import/strerror.c: New file.
3218         * gnulib/import/unistd--.h: New file.
3219         * gnulib/import/unistd-safer.h: New file.
3220         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3221         "getcwd" and "glob".
3222         * ser-tcp.c: Undefine "close" before redefining it.
3223
3224 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3225
3226         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3227         get rid of res_val.
3228
3229 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3230
3231         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3232         <sol2,sparc>: Likewise.
3233         <sol2-64,i386>: Likewise.
3234
3235         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3236         -Wdeprecated-declarations on *-*-solaris*.
3237         * configure: Regenerate.
3238
3239         * procfs.c: Include "nat/inferior.h".
3240         (procfs_info_proc): Fix typo.
3241
3242 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3243
3244         * remote.c (vector): Include.
3245         (struct private_thread_info): Add field, thread_handle.
3246         (free_private_thread_info): Deallocate storage associated with
3247         thread handle.
3248         (get_private_info_thread): Initialize `thread_handle' field.
3249         (struct thread_item): Add field, thread_handle.
3250         (clear_threads_listing_context): Deallocate storage associated
3251         with thread handle.
3252         (start_thread): Add support for "handle" attribute.
3253         (thread_attributes): Add "handle".
3254         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3255         field.
3256         (remote_update_thread_list): Update thread_handle.
3257         (remote_thread_handle_to_thread_info): New function.
3258         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3259
3260 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3261
3262         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3263         function.
3264         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3265         * python/python-internal.h (thread_object_type): Declare.
3266
3267 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3268
3269         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3270         (target_thread_handle_to_thread_info): Declare.
3271         * target.c (target_thread_handle_to_thread_info): New function.
3272         * target-delegates.c: Regenerate.
3273         * gdbthread.h (find_thread_by_handle): Declare.
3274         * thread.c (find_thread_by_handle): New function.
3275         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3276         function.
3277         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3278
3279 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3282
3283 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3284
3285         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3286
3287 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3288
3289         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3290         to gdb_target_obs.
3291
3292 2017-09-20  Tom Tromey  <tom@tromey.com>
3293
3294         * breakpoint.c (struct counted_command_line): Remove.
3295         (breakpoint_commands): Update.
3296         (alloc_counted_command_line, incref_counted_command_line)
3297         (decref_counted_command_line, do_cleanup_counted_command_line)
3298         (make_cleanup_decref_counted_command_line): Remove.
3299         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3300         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3301         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3302         (save_breakpoints): Update.
3303         * breakpoint.h (counted_command_line): Now a typedef to
3304         shared_ptr.
3305         (struct breakpoint) <commands>: Now a counted_command_line.
3306         (struct bpstats) <command>: Likewise.
3307
3308 2017-09-20  Tom Tromey  <tom@tromey.com>
3309
3310         * breakpoint.c (struct commands_info, do_map_commands_command):
3311         Remove.
3312         (commands_command_1): Update.
3313         (iterate_over_related_breakpoints): Take a function_view.
3314         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3315         (delete_command): Update.
3316         (map_breakpoint_numbers): Take a function_view.
3317         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3318         (disable_command): Update.
3319         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3320         (enable_command): Update.
3321         (struct disp_data, do_enable_breakpoint_disp)
3322         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3323         (do_map_enable_delete_breakpoint): Remove.
3324         (enable_once_command, enable_count_command, enable_delete_command)
3325         (delete_trace_variable_command): Update.
3326
3327 2017-09-20  Tom Tromey  <tom@tromey.com>
3328
3329         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3330         (bpstat_clear): Use delete.
3331         (bpstats): New constructors.
3332         (bpstat_copy, bpstat_stop_status): Use new.
3333         (dprintf_after_condition_true): Update.
3334         * breakpoint.h (bpstats::bpstats): Add constructors.
3335         (bpstats::~bpstats): Add destructor.
3336
3337 2017-09-20  Pedro Alves  <palves@redhat.com>
3338
3339         * eval.c (make_params): Delete, refactored as ...
3340         (class fake_method): ... this new type's ctor.
3341         (fake_method::~fake_method): New.
3342         (evaluate_subexp_standard): Use 'fake_method'.
3343
3344 2017-09-20  Tom Tromey  <tom@tromey.com>
3345
3346         * windows-nat.c (get_windows_debug_event, windows_wait)
3347         (do_initial_windows_stuff, windows_attach): Update.
3348         * utils.c (vwarning, internal_vproblem): Update.
3349         (ui_unregister_input_event_handler_cleanup)
3350         (prepare_to_handle_input): Remove.
3351         (class scoped_input_handler): New.
3352         (defaulted_query, prompt_for_continue): Update.
3353         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3354         Update.
3355         * top.c (undo_terminal_modifications_before_exit): Update.
3356         * target/target.h (target_terminal_init, target_terminal_inferior)
3357         (target_terminal_ours): Don't declare.
3358         (class target_terminal): New.
3359         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3360         (target_terminal_ours_for_output)
3361         (make_cleanup_restore_target_terminal): Don't declare.
3362         (target_terminal_info): Remove.
3363         * target.c (enum terminal_state, terminal_state): Remove.
3364         (target_terminal::terminal_state): Define.
3365         (target_terminal::init): Rename from target_terminal_init.
3366         (target_terminal::inferior): Rename from
3367         target_terminal_inferior.
3368         (target_terminal::ours): Rename from target_terminal_ours.
3369         (target_terminal::ours_for_output): Rename from
3370         target_terminal_ours_for_output.
3371         (target_terminal::info): New method.
3372         (cleanup_restore_target_terminal)
3373         (make_cleanup_restore_target_terminal): Remove.
3374         * solib.c (handle_solib_event): Update.
3375         * remote.c (remote_serial_quit_handler): Update.
3376         (remote_terminal_inferior, remote_wait_as): Update.
3377         * record-full.c (record_full_wait_1): Update.
3378         * nto-procfs.c (procfs_create_inferior): Update.
3379         * nat/fork-inferior.c (startup_inferior): Update.
3380         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3381         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3382         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3383         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3384         (mi_breakpoint_created, mi_breakpoint_deleted)
3385         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3386         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3387         (mi_user_selected_context_changed, report_initial_inferior):
3388         Update.
3389         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3390         (linux_nat_terminal_inferior): Update.
3391         * infrun.c (follow_fork_inferior)
3392         (handle_vfork_child_exec_or_exit, do_target_resume)
3393         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3394         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3395         Update.
3396         * inflow.c (child_terminal_init, info_terminal_command): Update.
3397         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3398         (attach_command): Update.
3399         * infcall.c (call_thread_fsm_should_stop): Update.
3400         * gnu-nat.c (gnu_attach): Update.
3401         * extension.c (struct active_ext_lang_state)
3402         (restore_active_ext_lang): Update.
3403         * exceptions.c (print_flush): Update.
3404         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3405         (struct quit_handler_cleanup_data, restore_quit_handler)
3406         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3407         Remove.
3408         * cp-support.c (gdb_demangle): Update.
3409         * breakpoint.c (update_inserted_breakpoint_locations)
3410         (insert_breakpoint_locations, handle_jit_event)
3411         (disable_breakpoints_in_unloaded_shlib): Update.
3412         * annotate.c (annotate_breakpoints_invalid)
3413         (annotate_frames_invalid): Update.
3414
3415 2017-09-20  Tom Tromey  <tom@tromey.com>
3416
3417         * main.c (catch_command_errors): Rename from
3418         catch_command_errors_const.
3419         (captured_main_1): Update.
3420
3421 2017-09-20  Pedro Alves  <palves@redhat.com>
3422
3423         * cli/cli-cmds.c (list_command): Use print_sal_location.
3424         (print_sal_location): New function.
3425         (ambiguous_line_spec): Use print_sal_location.
3426         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3427         * symtab.c (find_function_start_sal): Likewise.
3428         * symtab.h (symtab_and_line::symbol): New field.
3429
3430 2017-09-20  Pedro Alves  <palves@redhat.com>
3431
3432         * linespec.c (minsym_found): Handle non-text minsyms.
3433         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3434
3435 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3436
3437         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3438         backslash.
3439
3440 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3441
3442         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3443         vmovups instead vmovaps.
3444         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3445
3446 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3447
3448         * NEWS (Changes since GDB 8.0): Add starti.
3449         * infcmd.c (enum run_break): New.
3450         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3451         case.
3452         (run_command): Use enum run_how.
3453         (start_command): Likewise.
3454         (starti_command): New function.
3455         (RUN_ARGS_HELP): New macro.
3456         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3457         commands.  Add starti command.
3458
3459 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3460
3461         * Makefile.in (monitor.o): Remove the rule.
3462
3463 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3464
3465         * annotate.h (struct annotate_arg_emitter): Use
3466         DISABLE_COPY_AND_ASSIGN.
3467         * common/refcounted-object.h (refcounted_object): Likewise.
3468         * completer.h (struct completion_result): Likewise.
3469         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3470         * filename-seen-cache.h (filename_seen_cache): Likewise.
3471         * gdbcore.h (thread_section_name): Likewise.
3472         * gdb_regex.h (compiled_regex): Likewise.
3473         * gdbthread.h (scoped_restore_current_thread): Likewise.
3474         * inferior.h (scoped_restore_current_inferior): Likewise.
3475         * jit.c (jit_reader): Likewise.
3476         * linespec.h (struct linespec_result): Likewise.
3477         * mi/mi-parse.h (struct mi_parse): Likewise.
3478         * nat/fork-inferior.c (execv_argv): Likewise.
3479         * progspace.h (scoped_restore_current_program_space): Likewise.
3480         * python/python-internal.h (class gdbpy_enter): Likewise.
3481         * regcache.h (regcache): Likewise.
3482         * target-descriptions.c (struct tdesc_reg): Likewise.
3483         (struct tdesc_type): Likewise.
3484         (struct tdesc_feature): Likewise.
3485         * ui-out.h (ui_out_emit_type): Likewise.
3486
3487 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3488
3489         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3490         label abort_expression.
3491
3492 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3493
3494         * common/buffer.c (buffer_xml_printf): Adjust.
3495         * common/xml-utils.c (xml_escape_text): Change return type to
3496         std::string, update code accordingly.
3497         * common/xml-utils.h (xml_escape_text): Change return type to
3498         std::string.
3499         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3500         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3501         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3502         Adjust.
3503
3504 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3505
3506         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3507         (SUBDIR_UNITTESTS_OBS): Add new object file.
3508         * unittests/xml-utils-selftests.c: New file.
3509
3510 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3511
3512         * common/selftest.h (selftest): New struct/interface.
3513         (register_test): Add name parameter, add new overload.
3514         (run_tests): Add filter parameter.
3515         (for_each_selftest_ftype): New typedef.
3516         (for_each_selftest): New declaration.
3517         * common/selftest.c (tests): Change type to
3518         map<string, unique_ptr<selftest>>.
3519         (simple_selftest): New struct.
3520         (register_test): New function.
3521         (register_test): Add name parameter and use it.
3522         (run_tests): Add filter parameter and use it.  Add prints.
3523         Adjust to vector -> map change.
3524         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3525         registering selftests.
3526         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3527         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3528         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3529         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3530         * findvar.c (_initialize_findvar): Likewise.
3531         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3532         * maint.c (maintenance_selftest): Update call to run_tests.
3533         (maintenance_info_selftests): New function.
3534         (_initialize_maint_cmds): Register "maintenance info selftests"
3535         command.  Update "maintenance selftest" doc.
3536         * regcache.c (_initialize_regcache): Add names when registering
3537         selftests.
3538         * rust-exp.y (_initialize_rust_exp): Likewise.
3539         * selftest-arch.c (gdbarch_selftest): New struct.
3540         (gdbarch_tests): Remove.
3541         (register_test_foreach_arch): Add name parameter.  Call
3542         register_test.
3543         (tests_with_arch): Remove, move most content to
3544         gdbarch_selftest::operator().
3545         (_initialize_selftests_foreach_arch): Remove.
3546         * selftest-arch.h (register_test_foreach_arch): Add name
3547         parameter.
3548         (run_tests_with_arch): New declaration.
3549         * utils-selftests.c (_initialize_utils_selftests): Add names
3550         when registering selftests.
3551         * utils.c (_initialize_utils): Likewise.
3552         * unittests/array-view-selftests.c
3553         (_initialize_array_view_selftests): Likewise.
3554         * unittests/environ-selftests.c (_initialize_environ_selftests):
3555         Likewise.
3556         * unittests/function-view-selftests.c
3557         (_initialize_function_view_selftests): Likewise.
3558         * unittests/offset-type-selftests.c
3559         (_initialize_offset_type_selftests): Likewise.
3560         * unittests/optional-selftests.c
3561         (_initialize_optional_selftests): Likewise.
3562         * unittests/scoped_restore-selftests.c
3563         (_initialize_scoped_restore_selftests): Likewise.
3564         * NEWS: Document "maintenance selftest" and "maint info
3565         selftests".
3566
3567 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3568
3569         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3570         scoped_restore.
3571
3572 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3573
3574         * mi/mi-main.c (mi_load_progress): Make uiout variable
3575         a unique_ptr.
3576
3577 2017-09-15  Pedro Alves  <palves@redhat.com>
3578
3579         * compile/compile-c-types.c (convert_enum, convert_int)
3580         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3581
3582 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3583
3584         * dwarf2read.c (copy_string): Remove.
3585         (parse_macro_definition): Replace copy_string with savestring.
3586
3587 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3588
3589         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3590         gdb_target_obs.
3591         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3592         Likewise.
3593         (i[34567]86-*-linux*): Likewise.
3594
3595 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3596
3597         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3598         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3599         <stack>: Change type to std::vector.
3600         <stack_len, stack_allocated>: Remove.
3601         <grow_stack>: Remove.
3602         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3603         (dwarf_expr_context::~dwarf_expr_context): Remove.
3604         (dwarf_expr_context::grow_stack): Remove.
3605         (dwarf_expr_context::push): Adjust.
3606         (dwarf_expr_context::pop): Adjust.
3607         (dwarf_expr_context::fetch): Adjust.
3608         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3609         (dwarf_expr_context::stack_empty_p): Adjust.
3610         (dwarf_expr_context::execute_stack_op): Adjust.
3611
3612 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3613
3614         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3615         return type to bool.
3616         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3617
3618 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3619
3620         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3621         Change type to bool.
3622         (dwarf_stack_value) <in_stack_memory>: Likewise.
3623         (dwarf_expr_context) <push_address>: Change parameter type to
3624         bool.
3625         <fetch_in_stack_memory>: Change return type to bool.
3626         <push>: Change parameter type to bool.
3627         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3628         to bool.
3629         (dwarf_expr_context::push_address): Likewise.
3630         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3631         to bool.
3632         (dwarf_expr_context::execute_stack_op): Adjust.
3633         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3634
3635 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3636
3637         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3638         (struct dwarf_expr_context) <n_pieces>: Remove.
3639         <pieces>: Change type to std::vector.
3640         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3641         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3642         pieces.
3643         (dwarf_expr_context::add_piece): Adjust.
3644         * dwarf2loc.c (struct piece_closure): Initialize fields.
3645         <n_pieces>: Remove.
3646         <pieces>: Change type to std::vector.
3647         (allocate_piece_closure): Adjust, change parameter to
3648         std::vector rvalue and std::move it to piece_closure.
3649         (rw_pieced_value): Adjust.
3650         (check_pieced_synthetic_pointer): Adjust.
3651         (indirect_synthetic_pointer): Adjust.
3652         (coerce_pieced_ref): Adjust.
3653         (free_pieced_value_closure):  Adjust.  Use delete to free
3654         piece_closure.
3655         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3656         to allocate_piece_closure.
3657         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3658
3659 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3660
3661         * probe.h (probe_ops_cp): Remove typedef.
3662         (DEF_VEC_P (probe_ops_cp)): Remove.
3663         (all_probe_ops): Change type to std::vector.
3664         * probe.c (info_probes_for_ops): Adjust to vector change.
3665         (probe_linespec_to_ops): Likewise.
3666         (all_probe_ops): Change type to std::vector.
3667         (_initialize_probe): Adjust to vector change.
3668         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3669         * elfread.c (elf_get_probes): Likewise.
3670         * stap-probe.c (_initialize_stap_probe): Likewise.
3671
3672 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3673
3674         * probe.h (struct bound_probe): Define constructors.
3675         * probe.c (bound_probe_s): Remove typedef.
3676         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3677         (collect_probes): Change return type to std::vector, remove
3678         cleanup.
3679         (compare_probes): Return bool, change parameter type.  Change
3680         semantic to "less than".
3681         (gen_ui_out_table_header_info): Change parameter to std::vector
3682         and update.
3683         (exists_probe_with_pops): Likewise.
3684         (info_probes_for_ops): Update to std::vector change.
3685         (enable_probes_command): Likewise.
3686         (disable_probes_command): Likewise.
3687
3688 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3689
3690         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3691         vec to std::vector.
3692         * probe.c (parse_probes_in_pspace): Update.
3693         (find_probes_in_objfile): Update.
3694         (find_probe_by_pc): Update.
3695         (collect_probes): Update.
3696         (probe_any_get_probes): Update.
3697         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3698         return type to reference to std::vector.
3699         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3700         std::vector and update.
3701         (dtrace_process_dof): Likewise.
3702         (dtrace_get_probes): Likewise.
3703         * elfread.c (elf_get_probes): Change return type to std::vector,
3704         store an std::vector in bfd_data.
3705         (probe_key_free): Update to std::vector.
3706         * stap-probe.c (handle_stap_probe): Change parameter to
3707         std::vector and update.
3708         (stap_get_probes): Likewise.
3709         * symfile-debug.c (debug_sym_get_probes): Change return type to
3710         std::vector and update.
3711
3712 2017-09-11  Tom Tromey  <tom@tromey.com>
3713
3714         * breakpoint.c (program_breakpoint_here_p): Update.
3715         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3716         from make_show_memory_breakpoints_cleanup.  Return a
3717         scoped_restore_tmpl<int>.
3718         (restore_show_memory_breakpoints): Remove.
3719         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3720         * mem-break.c (memory_validate_breakpoint): Update.
3721         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3722         (ia64_memory_remove_breakpoint): Update.
3723         (ia64_breakpoint_from_pc): Update.
3724         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3725         from make_show_memory_breakpoints_cleanup.
3726
3727 2017-09-11  Tom Tromey  <tom@tromey.com>
3728
3729         * d-namespace.c (d_lookup_symbol): Use std::string.
3730         (find_symbol_in_baseclass): Likewise.
3731
3732 2017-09-11  Tom Tromey  <tom@tromey.com>
3733
3734         * ctf.c (ctf_start): Use std::string.
3735
3736 2017-09-11  Tom Tromey  <tom@tromey.com>
3737
3738         * ada-lang.c (is_known_support_routine): Update.
3739         (ada_unhandled_exception_name_addr_from_raise): Update.
3740         * guile/scm-frame.c (gdbscm_frame_name): Update.
3741         * python/py-frame.c (frapy_name): Update.
3742         (frapy_function): Update.
3743         * stack.h (find_frame_funname): Update.
3744         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3745         (print_frame): Update.
3746
3747 2017-09-11  Tom Tromey  <tom@tromey.com>
3748
3749         * findcmd.c (put_bits): Take a gdb::byte_vector.
3750         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3751         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3752         cleanups.
3753         (find_command): Update.
3754
3755 2017-09-11  Tom Tromey  <tom@tromey.com>
3756
3757         * cli/cli-script.c (class scoped_restore_hook_in): New.
3758         (clear_hook_in_cleanup): Remove.
3759         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3760         scoped_restore_hook_in.
3761
3762 2017-09-11  Tom Tromey  <tom@tromey.com>
3763
3764         * cli/cli-script.c (restore_interp): Remove.
3765         (read_command_lines): Use scoped_restore_interp.
3766         * interps.c (scoped_restore_interp::set_temp): Rename from
3767         interp_set_temp.
3768         * interps.h (class scoped_restore_interp): New.
3769         (interp_set_temp): Remove.
3770
3771 2017-09-11  Tom Tromey  <tom@tromey.com>
3772
3773         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3774         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3775         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3776         scoped_restore.
3777         (mi_cmd_break_insert_1): Update.
3778         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3779         scoped_restore.
3780
3781 2017-09-11  Tom Tromey  <tom@tromey.com>
3782
3783         * demangle.c (demangle_command): Update.
3784         * breakpoint.c (disable_command): Update.
3785         (enable_command): Update.
3786         (find_location_by_number): Make "number" const.  Use
3787         get_number_trailer.
3788         * cli/cli-utils.c (extract_arg): Return std::string.
3789         * probe.c (parse_probe_linespec): Update.  Change types.
3790         (collect_probes): Take string arguments.
3791         (parse_probe_linespec): Likewise.
3792         (info_probes_for_ops): Update.
3793         (enable_probes_command): Update.
3794         (disable_probes_command): Update.
3795         * break-catch-sig.c (catch_signal_split_args): Update.
3796         * mi/mi-parse.c (mi_parse): Update.
3797
3798 2017-09-11  Tom Tromey  <tom@tromey.com>
3799
3800         * language.h (language_enum): Make argument const.
3801         * language.c (language_enum): Make argument const.
3802
3803 2017-09-11  Tom Tromey  <tom@tromey.com>
3804
3805         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3806         as function.
3807         (skip_to_space): Rename from skip_to_space_const.
3808         * common/common-utils.c (skip_to_space): New function.
3809         (skip_to_space): Rename from skip_to_space_const.
3810         * cli/cli-utils.h (get_number): Rename from get_number_const.
3811         (extract_arg): Rename from extract_arg_const.
3812         * cli/cli-utils.c (get_number): Rename from get_number_const.
3813         (extract_arg): Rename from extract_arg_const.
3814         (number_or_range_parser::get_number): Use ::get_number.
3815         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3816         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3817         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3818         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3819         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3820         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3821         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3822         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3823
3824 2017-09-11  Tom Tromey  <tom@tromey.com>
3825
3826         * python/python.c (do_start_initialization): Use
3827         py-event-types.def to initialize types.
3828         Define all object type structures.
3829         * python/python-internal.h: Don't declare event initialization
3830         functions.
3831         * python/py-threadevent.c (thread_event_object_type): Don't
3832         define.
3833         * python/py-stopevent.c (stop_event_object_type): Don't define.
3834         * python/py-signalevent.c (signal_event_object_type): Don't
3835         declare or define.
3836         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3837         (clear_objfiles_event_object_type): Don't declare or define.
3838         * python/py-infevents.c (inferior_call_pre_event_object_type)
3839         (inferior_call_post_event_object_type)
3840         (register_changed_event_object_type)
3841         (memory_changed_event_object_type): Don't declare or define.
3842         * python/py-inferior.c (new_thread_event_object_type)
3843         (new_inferior_event_object_type)
3844         (inferior_deleted_event_object_type): Don't declare or define.
3845         * python/py-exitedevent.c (exited_event_object_type): Don't
3846         declare or define.
3847         * python/py-evts.c (gdbpy_initialize_py_events): Use
3848         py-all-events.def.
3849         * python/py-events.h (thread_event_object_type): Don't declare.
3850         (events_object): Use py-all-events.def.
3851         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3852         py-event-types.def.
3853         * python/py-event-types.def: New file.
3854         * python/py-continueevent.c (create_continue_event_object): Don't
3855         declare or define.
3856         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3857         declare or define.
3858         * python/py-all-events.def: New file.
3859
3860 2017-09-11  Tom Tromey  <tom@tromey.com>
3861
3862         * python/py-threadevent.c (create_thread_event_object): Return
3863         gdbpy_ref.
3864         * python/py-stopevent.h (create_stop_event_object)
3865         (create_breakpoint_event_object, create_signal_event_object):
3866         Update.
3867         * python/py-stopevent.c (create_stop_event_object): Return
3868         gdbpy_ref.
3869         (emit_stop_event): Update.
3870         * python/py-signalevent.c (create_signal_event_object): Return
3871         gdbpy_ref.
3872         * python/py-infevents.c (create_inferior_call_event_object):
3873         Update.
3874         * python/py-event.h (create_event_object)
3875         (create_thread_event_object): Update.
3876         * python/py-event.c (create_event_object): Return gdbpy_ref.
3877         * python/py-continueevent.c: Return gdbpy_ref.
3878         * python/py-bpevent.c (create_breakpoint_event_object): Return
3879         gdbpy_ref.
3880
3881 2017-09-11  Tom Tromey  <tom@tromey.com>
3882
3883         PR python/15622:
3884         * NEWS: Add entry.
3885         * python/python.c (do_start_initialization): Initialize new event
3886         types.
3887         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3888         (gdbpy_initialize_inferior_deleted_event)
3889         (gdbpy_initialize_new_thread_event): Declare.
3890         * python/py-threadevent.c (create_thread_event_object): Add option
3891         "thread" parameter.
3892         * python/py-inferior.c (new_thread_event_object_type)
3893         (new_inferior_event_object_type)
3894         (inferior_deleted_event_object_type): Declare.
3895         (python_new_inferior, python_inferior_deleted): New functions.
3896         (add_thread_object): Emit new_thread event.
3897         (gdbpy_initialize_inferior): Attach new functions to corresponding
3898         observers.
3899         (new_thread, new_inferior, inferior_deleted): Define new event
3900         types.
3901         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3902         registries.
3903         * python/py-events.h (events_object) <new_inferior,
3904         inferior_deleted, new_thread>: New fields.
3905         * python/py-event.h (create_thread_event_breakpoint): Add optional
3906         "thread" parameter.
3907
3908 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3909
3910         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3911         check current_ui instead.
3912         (internal_vproblem): Likewise.
3913
3914 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3915
3916         * thread.c (print_thread_info_1): Remove unnecessary calls to
3917         uiout->is_mi_like_p.
3918
3919 2017-09-09  Tom Tromey  <tom@tromey.com>
3920
3921         * namespace.h (add_using_directive): Update.
3922         * namespace.c (add_using_directive): Change type of excludes to
3923         std::vector.
3924         * dwarf2read.c (read_import_statement): Use std::vector.
3925         (read_namespace): Update.
3926         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3927
3928 2017-09-09  Tom Tromey  <tom@tromey.com>
3929
3930         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3931
3932 2017-09-09  Tom Tromey  <tom@tromey.com>
3933
3934         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3935
3936 2017-09-09  Tom Tromey  <tom@tromey.com>
3937
3938         * stack.c (func_command): Use gdb::def_vector.
3939
3940 2017-09-09  Tom Tromey  <tom@tromey.com>
3941
3942         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3943         ui_out_emit_list, ui_out_emit_tuple.
3944         (mi_cmd_var_update): Likewise.
3945
3946 2017-09-09  Tom Tromey  <tom@tromey.com>
3947
3948         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3949         ui_out_redirect_pop.
3950         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3951         ui_out_redirect_pop.
3952         * utils.c (do_ui_out_redirect_pop)
3953         (make_cleanup_ui_out_redirect_pop): Remove.
3954         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3955         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3956         * ui-out.h (ui_out_redirect_pop): New class.
3957
3958 2017-09-09  Tom Tromey  <tom@tromey.com>
3959
3960         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3961         (list_available_thread_groups, mi_cmd_list_thread_groups)
3962         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3963         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3964         Likewise.
3965
3966 2017-09-09  Tom Tromey  <tom@tromey.com>
3967
3968         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3969         ui_out_emit_tuple.
3970
3971 2017-09-09  Tom Tromey  <tom@tromey.com>
3972
3973         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3974         * stack.c (print_frame): Use ui_out_emit_tuple.
3975         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3976         (info_spu_mailbox_command, info_spu_dma_command)
3977         (info_spu_proxydma_command): Likewise.
3978         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3979         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3980         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3981         ui_out_emit_tuple.
3982         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3983
3984 2017-09-09  Tom Tromey  <tom@tromey.com>
3985
3986         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3987         (class ui_out_emit_table): Update comment.
3988         * ui-out.c (do_cleanup_table_end)
3989         (make_cleanup_ui_out_table_begin_end): Remove.
3990         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3991         (info_spu_dma_cmdlist): Likewise.
3992         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3993         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3994         ui_out_emit_table.
3995
3996 2017-09-09  Tom Tromey  <tom@tromey.com>
3997
3998         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3999         ui_out_emit_list, gdb::optional.
4000
4001 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4002
4003         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4004         prototype.
4005         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4006         prototype.
4007         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4008         prototype.
4009         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4010         * ada-exp.y: Remove _initialize_ada_exp prototype.
4011         * ada-lang.c: Remove _initialize_ada_language prototype.
4012         * ada-tasks.c: Remove _initialize_tasks prototype.
4013         * addrmap.c: Remove _initialize_addrmap prototype.
4014         * agent.c: Remove _initialize_agent prototype.
4015         * aix-thread.c: Remove _initialize_aix_thread prototype.
4016         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4017         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4018         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4019         prototype.
4020         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4021         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4022         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4023         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4024         prototype.
4025         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4026         prototype.
4027         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4028         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4029         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4030         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4031         prototype.
4032         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4033         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4034         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4035         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4036         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4037         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4038         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4039         prototype.
4040         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4041         prototype.
4042         * annotate.c: Remove _initialize_annotate prototype.
4043         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4044         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4045         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4046         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4047         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4048         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4049         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4050         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4051         prototype.
4052         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4053         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4054         * auto-load.c: Remove _initialize_auto_load prototype.
4055         * auxv.c: Remove _initialize_auxv prototype.
4056         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4057         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4058         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4059         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4060         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4061         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4062         prototype.
4063         * break-catch-throw.c: Remove _initialize_break_catch_throw
4064         prototype.
4065         * breakpoint.c: Remove _initialize_breakpoint prototype.
4066         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4067         * btrace.c: Remove _initialize_btrace prototype.
4068         * charset.c: Remove _initialize_charset prototype.
4069         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4070         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4071         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4072         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4073         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4074         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4075         * coffread.c: Remove _initialize_coffread prototype.
4076         * compile/compile.c: Remove _initialize_compile prototype.
4077         * complaints.c: Remove _initialize_complaints prototype.
4078         * completer.c: Remove _initialize_completer prototype.
4079         * copying.awk: Remove _initialize_copying prototype.
4080         * copying.c: Regenerate.
4081         * core-regset.c: Remove _initialize_core_regset prototype.
4082         * corefile.c: Remove _initialize_core prototype.
4083         * corelow.c: Remove _initialize_corelow prototype.
4084         * cp-abi.c: Remove _initialize_cp_abi prototype.
4085         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4086         * cp-support.c: Remove _initialize_cp_support prototype.
4087         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4088         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4089         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4090         * ctf.c: Remove _initialize_ctf prototype.
4091         * d-lang.c: Remove _initialize_d_language prototype.
4092         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4093         prototype.
4094         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4095         * dbxread.c: Remove _initialize_dbxread prototype.
4096         * dcache.c: Remove _initialize_dcache prototype.
4097         * demangle.c: Remove _initialize_demangler prototype.
4098         * disasm-selftests.c: Remove _initialize_disasm_selftests
4099         prototype.
4100         * disasm.c: Remove _initialize_disasm prototype.
4101         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4102         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4103         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4104         prototype.
4105         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4106         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4107         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4108         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4109         * elfread.c: Remove _initialize_elfread prototype.
4110         * exec.c: Remove _initialize_exec prototype.
4111         * extension.c: Remove _initialize_extension prototype.
4112         * f-lang.c: Remove _initialize_f_language prototype.
4113         * f-valprint.c: Remove _initialize_f_valprint prototype.
4114         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4115         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4116         * filesystem.c: Remove _initialize_filesystem prototype.
4117         * findcmd.c: Remove _initialize_mem_search prototype.
4118         * fork-child.c: Remove _initialize_fork_child prototype.
4119         * frame-base.c: Remove _initialize_frame_base prototype.
4120         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4121         * frame.c: Remove _initialize_frame prototype.
4122         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4123         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4124         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4125         * gcore.c: Remove _initialize_gcore prototype.
4126         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4127         * gdbarch.c: Regenerate.
4128         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4129         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4130         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4131         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4132         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4133         * go-lang.c: Remove _initialize_go_language prototype.
4134         * go32-nat.c: Remove _initialize_go32_nat prototype.
4135         * guile/guile.c: Remove _initialize_guile prototype.
4136         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4137         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4138         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4139         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4140         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4141         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4142         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4143         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4144         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4145         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4146         prototype.
4147         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4148         prototype.
4149         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4150         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4151         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4152         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4153         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4154         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4155         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4156         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4157         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4158         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4159         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4160         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4161         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4162         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4163         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4164         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4165         prototype.
4166         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4167         prototype.
4168         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4169         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4170         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4171         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4172         * infcall.c: Remove _initialize_infcall prototype.
4173         * infcmd.c: Remove _initialize_infcmd prototype.
4174         * inferior.c: Remove _initialize_inferiors prototype.
4175         * inflow.c: Remove _initialize_inflow prototype.
4176         * infrun.c: Remove _initialize_infrun prototype.
4177         * interps.c: Remove _initialize_interpreter prototype.
4178         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4179         * jit.c: Remove _initialize_jit prototype.
4180         * language.c: Remove _initialize_language prototype.
4181         * linux-fork.c: Remove _initialize_linux_fork prototype.
4182         * linux-nat.c: Remove _initialize_linux_nat prototype.
4183         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4184         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4185         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4186         * m2-lang.c: Remove _initialize_m2_language prototype.
4187         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4188         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4189         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4190         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4191         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4192         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4193         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4194         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4195         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4196         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4197         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4198         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4199         * machoread.c: Remove _initialize_machoread prototype.
4200         * macrocmd.c: Remove _initialize_macrocmd prototype.
4201         * macroscope.c: Remove _initialize_macroscope prototype.
4202         * maint.c: Remove _initialize_maint_cmds prototype.
4203         * mdebugread.c: Remove _initialize_mdebugread prototype.
4204         * memattr.c: Remove _initialize_mem prototype.
4205         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4206         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4207         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4208         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4209         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4210         * microblaze-linux-tdep.c: Remove
4211         _initialize_microblaze_linux_tdep prototype.
4212         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4213         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4214         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4215         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4216         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4217         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4218         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4219         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4220         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4221         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4222         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4223         prototype.
4224         * mipsread.c: Remove _initialize_mipsread prototype.
4225         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4226         prototype.
4227         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4228         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4229         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4230         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4231         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4232         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4233         prototype.
4234         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4235         * nto-procfs.c: Remove _initialize_procfs prototype.
4236         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4237         * objc-lang.c: Remove _initialize_objc_language prototype.
4238         * objfiles.c: Remove _initialize_objfiles prototype.
4239         * observer.c: Remove observer_test_first_notification_function,
4240         observer_test_second_notification_function,
4241         observer_test_third_notification_function, and
4242         _initialize_observer prototypes.
4243         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4244         * osabi.c: Remove _initialize_gdb_osabi prototype.
4245         * osdata.c: Remove _initialize_osdata prototype.
4246         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4247         * parse.c: Remove _initialize_parse prototype.
4248         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4249         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4250         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4251         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4252         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4253         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4254         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4255         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4256         * printcmd.c: Remove _initialize_printcmd prototype.
4257         * probe.c: Remove _initialize_probe prototype.
4258         * proc-api.c: Remove _initialize_proc_api prototype.
4259         * proc-events.c: Remove _initialize_proc_events prototype.
4260         * proc-service.c: Remove _initialize_proc_service prototype.
4261         * procfs.c: Remove _initialize_procfs prototype.
4262         * psymtab.c: Remove _initialize_psymtab prototype.
4263         * python/python.c: Remove _initialize_python prototype.
4264         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4265         * record-btrace.c: Remove _initialize_record_btrace prototype.
4266         * record-full.c: Remove _initialize_record_full prototype.
4267         * record.c: Remove _initialize_record prototype.
4268         * regcache.c: Remove _initialize_regcache prototype.
4269         * reggroups.c: Remove _initialize_reggroup prototype.
4270         * remote-notif.c: Remove _initialize_notif prototype.
4271         * remote-sim.c: Remove _initialize_remote_sim prototype.
4272         * remote.c: Remove _initialize_remote prototype.
4273         * reverse.c: Remove _initialize_reverse prototype.
4274         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4275         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4276         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4277         prototype.
4278         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4279         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4280         * rust-exp.y: Remove _initialize_rust_exp prototype.
4281         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4282         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4283         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4284         * score-tdep.c: Remove _initialize_score_tdep prototype.
4285         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4286         prototype.
4287         * ser-go32.c: Remove _initialize_ser_dos prototype.
4288         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4289         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4290         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4291         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4292         * serial.c: Remove _initialize_serial prototype.
4293         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4294         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4295         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4296         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4297         * skip.c: Remove _initialize_step_skip prototype.
4298         * sol-thread.c: Remove _initialize_sol_thread prototype.
4299         * solib-aix.c: Remove _initialize_solib_aix prototype.
4300         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4301         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4302         * solib-frv.c: Remove _initialize_frv_solib prototype.
4303         * solib-spu.c: Remove _initialize_spu_solib prototype.
4304         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4305         * solib-target.c: Remove _initialize_solib_target prototype.
4306         * solib.c: Remove _initialize_solib prototype.
4307         * source.c: Remove _initialize_source prototype.
4308         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4309         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4310         prototype.
4311         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4312         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4313         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4314         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4315         prototype.
4316         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4317         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4318         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4319         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4320         prototype.
4321         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4322         prototype.
4323         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4324         prototype.
4325         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4326         prototype.
4327         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4328         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4329         prototype.
4330         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4331         prototype.
4332         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4333         prototype.
4334         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4335         prototype.
4336         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4337         prototype.
4338         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4339         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4340         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4341         * stabsread.c: Remove _initialize_stabsread prototype.
4342         * stack.c: Remove _initialize_stack prototype.
4343         * stap-probe.c: Remove _initialize_stap_probe prototype.
4344         * std-regs.c: Remove _initialize_frame_reg prototype.
4345         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4346         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4347         * symfile.c: Remove _initialize_symfile prototype.
4348         * symmisc.c: Remove _initialize_symmisc prototype.
4349         * symtab.c: Remove _initialize_symtab prototype.
4350         * target-dcache.c: Remove _initialize_target_dcache prototype.
4351         * target-descriptions.c: Remove _initialize_target_descriptions
4352         prototype.
4353         * thread.c: Remove _initialize_thread prototype.
4354         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4355         prototype.
4356         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4357         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4358         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4359         prototype.
4360         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4361         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4362         * tracefile.c: Remove _initialize_tracefile prototype.
4363         * tracepoint.c: Remove _initialize_tracepoint prototype.
4364         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4365         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4366         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4367         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4368         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4369         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4370         * tui/tui.c: Remove _initialize_tui prototype.
4371         * typeprint.c: Remove _initialize_typeprint prototype.
4372         * user-regs.c: Remove _initialize_user_regs prototype.
4373         * utils.c: Remove _initialize_utils prototype.
4374         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4375         * valarith.c: Remove _initialize_valarith prototype.
4376         * valops.c: Remove _initialize_valops prototype.
4377         * valprint.c: Remove _initialize_valprint prototype.
4378         * value.c: Remove _initialize_values prototype.
4379         * varobj.c: Remove _initialize_varobj prototype.
4380         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4381         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4382         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4383         * windows-nat.c: Remove _initialize_windows_nat,
4384         _initialize_check_for_gdb_ini, and _initialize_loadable
4385         prototypes.
4386         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4387         * xcoffread.c: Remove _initialize_xcoffread prototype.
4388         * xml-support.c: Remove _initialize_xml_support prototype.
4389         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4390         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4391         prototype.
4392         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4393         prototype.
4394         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4395
4396 2017-09-08  Keith Seitz  <keiths@redhat.com>
4397
4398         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4399         field.
4400
4401 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4402
4403         * f-valprint.c (f_val_print): Remove check for one byte
4404         sized integers. Remove printing of character type.
4405
4406 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4407             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4408             Bernhard Heckel  <bernhard.heckel@intel.com>
4409
4410         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4411         to maintain proper indentation when printing pointers/refs.
4412
4413 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4414
4415         GDB 8.0.1 released.
4416
4417 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4418
4419         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4420
4421 2017-09-05  Tom Tromey  <tom@tromey.com>
4422
4423         * parse.c (funcall_chain): Now a std::vector.
4424         (start_arglist, end_arglist): Simplify.
4425         (free_funcalls): Remove.
4426         (parse_exp_in_context_1): Remove cleanup.
4427
4428 2017-09-05  Tom Tromey  <tom@tromey.com>
4429
4430         * go-exp.y (go_parse): Don't create a cleanup.
4431
4432 2017-09-05  Tom Tromey  <tom@tromey.com>
4433
4434         * d-exp.y (PrimaryExpression): Use std::string.
4435         (d_parse): Don't create a cleanup.
4436
4437 2017-09-05  Tom Tromey  <tom@tromey.com>
4438
4439         * utils.c (do_clear_parser_state): Remove.
4440         (make_cleanup_clear_parser_state): Remove.
4441         * p-exp.y (pascal_parse): Use scoped_restore.
4442         * m2-exp.y (m2_parse): Use scoped_restore.
4443         * f-exp.y (f_parse): Use scoped_restore.
4444         * d-exp.y (d_parse): Use scoped_restore.
4445         * c-exp.y (c_parse): Use scoped_restore.
4446         * ada-exp.y (ada_parse): Use scoped_restore.
4447         * utils.h (make_cleanup_clear_parser_state): Remove.
4448
4449 2017-09-06  Keith Seitz  <keiths@redhat.com>
4450
4451         * dwarf2read.c (dw2_linkage_name_attr): New function.
4452         (dw2_linkage_name): New function.
4453         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4454         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4455         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4456
4457 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4458
4459         * config/djgpp/djconfig.sh: Correct shell portability issue.
4460
4461 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4462
4463         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4464
4465 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4466
4467         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4468         * NEWS: Mention new FreeBSD/mips native configuration.
4469         * configure.host: Add aarch64*-*-freebsd*.
4470         * configure.nat: Likewise.
4471         * aarch64-fbsd-nat.c: New file.
4472
4473 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4474
4475         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4476         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4477         * NEWS: Mention new FreeBSD/aarch64 target.
4478         * configure.tgt: Add aarch64*-*-freebsd*.
4479         * aarch64-fbsd-tdep.c: New file.
4480         * aarch64-fbsd-tdep.h: New file.
4481
4482 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4483
4484         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4485
4486 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4487
4488         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4489         of TLS symbols.
4490
4491 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4492
4493         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4494         call.
4495
4496 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4497
4498         * infrun.c (follow_exec): Call add_thread after
4499         target_find_description.
4500
4501 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4502
4503         * infrun.c (handle_inferior_event_1): When exec'ing, read
4504         stop_pc after follow_exec.
4505
4506 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4507
4508         * remote.c (process_g_packet): Update error message.
4509
4510 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4511
4512         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4513         targets.
4514
4515 2017-09-05  Pedro Alves  <palves@redhat.com>
4516
4517         * eval.c (eval_call, evaluate_funcall): New functions, factored
4518         out from ...
4519         (evaluate_subexp_standard): ... this.
4520
4521 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4522
4523         * amd64-tdep.c (amd64_target_description): Create target
4524         descriptions.
4525         (_initialize_amd64_tdep): Don't call functions
4526         initialize_tdesc_amd64_*.  Add self tests.
4527         * arch/amd64.c (amd64_create_target_description): Add parameter
4528         is_linux.  Call set_tdesc_osabi if is_linux is true.
4529         * arch/amd64.h (amd64_create_target_description): Update the
4530         declaration.
4531         * arch/i386.c (i386_create_target_description): Add parameter
4532         is_linux.  Call set_tdesc_osabi if is_linux is true.
4533         * arch/i386.h (i386_create_target_description): Update
4534         declaration.
4535         * configure.tgt: Add i386.o to gdb_target_obs.
4536         * features/Makefile (XMLTOC): Remove i386/*.xml.
4537         * features/i386/amd64-avx-avx512.c: Remove.
4538         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4539         * features/i386/amd64-avx-mpx.c: Remove.
4540         * features/i386/amd64-avx.c: Remove.
4541         * features/i386/amd64-mpx.c: Remove.
4542         * features/i386/amd64.c: Remove.
4543         * features/i386/i386-avx-avx512.c: Remove.
4544         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4545         * features/i386/i386-avx-mpx.c: Remove.
4546         * features/i386/i386-avx.c: Remove.
4547         * features/i386/i386-mmx.c: Remove.
4548         * features/i386/i386-mpx.c: Remove.
4549         * features/i386/i386.c: Remove.
4550         * i386-tdep.c: Don't include features/i386/i386*.c., include
4551         target-descriptions.h and arch/i386.h.
4552         (i386_target_description): Create target descriptions.
4553         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4554         functions.  Do self tests.
4555
4556 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4557
4558         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4559         * features/i386/amd64-avx-avx512-linux.c: Removed.
4560         * features/i386/amd64-avx-linux.c: Removed.
4561         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4562         * features/i386/amd64-avx-mpx-linux.c: Removed.
4563         * features/i386/amd64-linux.c: Removed.
4564         * features/i386/amd64-mpx-linux.c: Removed.
4565         * features/i386/x32-avx-avx512-linux.c: Removed.
4566         * features/i386/x32-avx-linux.c: Removed.
4567         * features/i386/x32-linux.c: Removed.
4568
4569 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4570
4571         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4572         features/i386/*.c.
4573         (amd64_linux_read_description): Call
4574         amd64_create_target_description.
4575         * arch/amd64.c: New file.
4576         * arch/amd64.h: New file.
4577         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4578         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4579
4580 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4581
4582         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4583         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4584         (amd64_linux_read_description): Create target descriptions.
4585         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4586         functions.  Add unit tests.
4587         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4588         x32-core.xml.
4589         * features/i386/64bit-avx.c: Generated.
4590         * features/i386/64bit-avx512.c: Generated.
4591         * features/i386/64bit-core.c: Generated.
4592         * features/i386/64bit-linux.c: Generated.
4593         * features/i386/64bit-mpx.c: Generated.
4594         * features/i386/64bit-pkeys.c: Generated.
4595         * features/i386/64bit-segments.c: Generated.
4596         * features/i386/64bit-sse.c: Generated.
4597         * features/i386/x32-core.c: Generated.
4598         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4599         c files for amd64-linux and x32-linux.
4600
4601 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4602
4603         * amd64-linux-tdep.c (amd64_linux_read_description): New
4604         function.
4605         (amd64_linux_core_read_description): Call
4606         amd64_linux_read_description.
4607         (amd64_linux_init_abi): Likewise.
4608         (amd64_x32_linux_init_abi): Likewise.
4609         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4610         * x86-linux-nat.c (x86_linux_read_description): Call
4611         amd64_linux_read_description.
4612
4613 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4614
4615         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4616         comments.
4617
4618 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4619
4620         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4621         * features/i386/i386-avx-avx512-linux.c: Remove.
4622         * features/i386/i386-avx-linux.c: Remove.
4623         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4624         * features/i386/i386-avx-mpx-linux.c: Remove.
4625         * features/i386/i386-linux.c: Remove.
4626         * features/i386/i386-mmx-linux.c: Remove.
4627         * features/i386/i386-mpx-linux.c: Remove.
4628
4629 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4630
4631         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4632         (SFILES): Add arch/i386.c.
4633         (HFILES_NO_SRCDIR): Add arch/i386.h.
4634         * arch/i386.c: New file.
4635         * arch/i386.h: New file.
4636         * arch/tdesc.h (allocate_target_description): Declare.
4637         (set_tdesc_architecture): Declare.
4638         (set_tdesc_osabi): Declare.
4639         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4640         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4641         include arch/i386.h.
4642         (i386_linux_read_description): Remove code and call
4643         i386_create_target_description.
4644         (set_tdesc_architecture): New function.
4645         (set_tdesc_osabi): New function.
4646         * target-descriptions.h (allocate_target_description): Remove.
4647
4648 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4649
4650         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4651         * target-descriptions.c (tdesc_create_feature): Likewise, and
4652         adjust code.
4653         * features/i386/32bit-avx.c: Re-generated.
4654         * features/i386/32bit-avx512.c: Re-generated.
4655         * features/i386/32bit-core.c: Re-generated.
4656         * features/i386/32bit-linux.c: Re-generated.
4657         * features/i386/32bit-mpx.c: Re-generated.
4658         * features/i386/32bit-pkeys.c: Re-generated.
4659         * features/i386/32bit-sse.c: Re-generated.
4660
4661 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4662
4663         * regformats/regdef.h (struct reg): Override operator == and !=.
4664
4665 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4666
4667         * arch/tdesc.h: New file.
4668         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4669         * target-descriptions.c: Update comments.
4670         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4671         declarations.
4672         * features/i386/32bit-avx.c: Re-generated.
4673         * features/i386/32bit-avx512.c: Re-generated.
4674         * features/i386/32bit-core.c: Re-generated.
4675         * features/i386/32bit-linux.c: Re-generated.
4676         * features/i386/32bit-mpx.c: Re-generated.
4677         * features/i386/32bit-pkeys.c: Re-generated.
4678         * features/i386/32bit-sse.c: Re-generated.
4679
4680 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4681
4682         * regformats/regdat.sh: Update generated code.
4683
4684 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4685
4686         * regformats/regdat.sh: Adjust code order.
4687
4688 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4689
4690         * expprint.c (dump_subexp_body_standard): Use constant format
4691         string in fprintf_filtered call.
4692
4693 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4694
4695         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4696         NetBSD/i386.
4697         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4698
4699 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4700
4701         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4702
4703 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4704
4705         * bsd-kvm.o: Define _KMEMUSER.
4706         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4707         * configure: Regenerate.
4708
4709 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4710
4711         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4712         * i386-fbsd-nat.c: Likewise.
4713
4714 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4715
4716         * unittests/array-view-selftests.c: Add include of <array>.
4717
4718 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4719
4720         * spu-tdep.c (flush_ea_cache): Add missing argument to
4721         call_function_by_hand.
4722
4723 2017-09-04  Pedro Alves  <palves@redhat.com>
4724
4725         * NEWS (Safer support for debugging with no debug info): New.
4726
4727 2017-09-04  Pedro Alves  <palves@redhat.com>
4728
4729         * c-exp.y (function_method, function_method_void): Add current
4730         instance flags to TYPE_INSTANCE.
4731         * dwarf2read.c (check_modifier): New.
4732         (compute_delayed_physnames): Assert that only C++ adds delayed
4733         physnames.  Mark fn_fields as const/volatile depending on
4734         physname.
4735         * eval.c (make_params): New type_instance_flags parameter.  Use
4736         it as the new type's instance flags.
4737         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4738         flags element and pass it to make_params.
4739         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4740         instance flags element.
4741         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4742         * gdbtypes.h: Include "enum-flags.h".
4743         (type_instance_flags): New enum-flags type.
4744         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4745         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4746         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4747         (follow_type_instance_flags): New function.
4748         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4749         * parser-defs.h (follow_type_instance_flags): Declare.
4750         * valops.c (value_struct_elt_for_reference): const/volatile must
4751         match too.
4752
4753 2017-09-04  Pedro Alves  <palves@redhat.com>
4754
4755         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4756         function/method scopes; lookup the nested name as a function local
4757         static variable.
4758
4759 2017-09-04  Pedro Alves  <palves@redhat.com>
4760
4761         (%type <voidval>): Add function_method.
4762         * c-exp.y (exp): New production for calls with no arguments.
4763         (function_method, function_method_void_or_typelist): New
4764         productions.
4765         (exp): New production for "method()::static_var".
4766         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4767         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4768         Handle OP_FUNC_STATIC_VAR.
4769         * parse.c (operator_length_standard):
4770         Handle OP_FUNC_STATIC_VAR.
4771
4772 2017-09-04  Pedro Alves  <palves@redhat.com>
4773
4774         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4775         handling.
4776         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4777         Ditto.
4778         * parse.c (operator_length_standard, operator_check_standard):
4779         Ditto.
4780         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4781
4782 2017-09-04  Pedro Alves  <palves@redhat.com>
4783
4784         * ax-gdb.c: Include "typeprint.h".
4785         (gen_expr_for_cast): New function.
4786         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4787         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4788         type is unknown.
4789         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4790         nodebug_data_symbol.
4791         * eval.c: Include "typeprint.h".
4792         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4793         Error out if symbol has unknown type.
4794         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4795         evaluate_subexp_for_cast.
4796         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4797         OP_VAR_MSYM_VALUE.
4798         (evaluate_subexp_for_cast): New function.
4799         * gdbtypes.c (init_nodebug_var_type): New function.
4800         (objfile_type): Use it to initialize types of variables with no
4801         debug info.
4802         * typeprint.c (error_unknown_type): New.
4803         * typeprint.h (error_unknown_type): New declaration.
4804         * compile/compile-c-types.c (convert_type_basic): Handle
4805         TYPE_CODE_ERROR; warn and fallback to int for variables with
4806         unknown type.
4807
4808 2017-09-04  Pedro Alves  <palves@redhat.com>
4809
4810         * eval.c (evaluate_var_value): New function, factored out from ...
4811         (evaluate_subexp_standard): ... here.
4812
4813 2017-09-04  Pedro Alves  <palves@redhat.com>
4814
4815         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4816         Remove useless assignments to 'op'.
4817
4818 2017-09-04  Pedro Alves  <palves@redhat.com>
4819
4820         * eval.c (eval_skip_value): New function.
4821         (evaluate_subexp_standard): Use it.
4822
4823 2017-09-04  Pedro Alves  <palves@redhat.com>
4824
4825         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4826         function name from symbol/minsym and pass it to
4827         error_call_unknown_return_type.
4828
4829 2017-09-04  Pedro Alves  <palves@redhat.com>
4830
4831         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4832         * ax-gdb.c (gen_msym_var_ref): New function.
4833         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4834         * eval.c (evaluate_var_msym_value): New function.
4835         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4836         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4837         to call_function_by_hand.
4838         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4839         Handle OP_VAR_MSYM_VALUE.
4840         (union exp_element) <msymbol>: New field.
4841         * minsyms.h (struct type): Forward declare.
4842         (find_minsym_type_and_address): Declare.
4843         * parse.c (write_exp_elt_msym): New function.
4844         (write_exp_msymbol): Delete, refactored as ...
4845         (find_minsym_type_and_address): ... this new function.
4846         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4847         (operator_length_standard, operator_check_standard): Handle
4848         OP_VAR_MSYM_VALUE.
4849         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4850
4851 2017-09-04  Pedro Alves  <palves@redhat.com>
4852
4853         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4854         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4855         unknown.
4856         * ada-typeprint.c (print_func_type): Handle functions with unknown
4857         return type.
4858         * c-typeprint.c (c_type_print_base): Handle functions and methods
4859         with unknown return type.
4860         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4861         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4862         * compile/compile-c-types.c: Include "objfiles.h".
4863         (convert_func): For functions with unknown return type, warn and
4864         default to int.
4865         * compile/compile-object-run.c (compile_object_run): Adjust call
4866         to call_function_by_hand_dummy.
4867         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4868         call_function_by_hand.
4869         * eval.c (evaluate_subexp_standard): Adjust calls to
4870         call_function_by_hand.  Handle functions and methods with unknown
4871         return type.  Pass expect_type to call_function_by_hand.
4872         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4873         return type.
4874         * gcore.c (call_target_sbrk): Adjust call to
4875         call_function_by_hand.
4876         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4877         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4878         an integer address type instead of nodebug.
4879         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4880         call_function_by_hand.
4881         * infcall.c (error_call_unknown_return_type): New function.
4882         (call_function_by_hand): New "default_return_type" parameter.
4883         Pass it down.
4884         (call_function_by_hand_dummy): New "default_return_type"
4885         parameter.  Use it instead of defaulting to int.  If there's no
4886         default and the return type is unknown, throw an error.  If
4887         there's a default return type, and the called function has no
4888         debug info, then assume the function is prototyped.
4889         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4890         New "default_return_type" parameter.
4891         (error_call_unknown_return_type): New declaration.
4892         * linux-fork.c (call_lseek): Cast return type of lseek.
4893         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4894         call_function_by_hand.
4895         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4896         calls to call_function_by_hand.
4897         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4898         return type.
4899         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4900         (value_nsstring, print_object_command): Adjust calls to
4901         call_function_by_hand.
4902         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4903         functions with unknown return type.
4904         (pascal_type_print_func_varspec_suffix): New function.
4905         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4906         TYPE_CODE_METHOD>: Use it.
4907         * python/py-value.c (valpy_call): Adjust call to
4908         call_function_by_hand.
4909         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4910         call_function_by_hand.
4911         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4912         call_function_by_hand.
4913         * valops.c (value_allocate_space_in_inferior): Adjust call to
4914         call_function_by_hand.
4915         * typeprint.c (type_print_unknown_return_type): New function.
4916         * typeprint.h (type_print_unknown_return_type): New declaration.
4917
4918 2017-09-04  Pedro Alves  <palves@redhat.com>
4919
4920         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4921         types with more than one parameter as prototyped.
4922
4923 2017-09-04  Pedro Alves  <palves@redhat.com>
4924
4925         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4926         (disassemble_command): Use gdb_disassembly_flags instead of bare
4927         int.
4928         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4929         (dump_insns, do_mixed_source_and_assembly_deprecated)
4930         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4931         Use gdb_disassembly_flags instead of bare int.
4932         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4933         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4934         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4935         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4936         (enum gdb_disassembly_flag): ... values of this new enumeration.
4937         (gdb_disassembly_flags): Define.
4938         (gdb_disassembly)
4939         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4940         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4941         gdb_disassembly_flags instead of bare int.
4942         * record-btrace.c (btrace_insn_history)
4943         (record_btrace_insn_history, record_btrace_insn_history_range)
4944         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4945         instead of bare int.
4946         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4947         Use gdb_disassembly_flags instead of bare int.
4948         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4949         Define.
4950         * target-delegates.c: Regenerate.
4951         * target.c (target_insn_history, target_insn_history_from)
4952         (target_insn_history_range): Use gdb_disassembly_flags instead of
4953         bare int.
4954         * target.h: Include "disasm.h".
4955         (struct target_ops) <to_insn_history, to_insn_history_from,
4956         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4957         int.
4958         (target_insn_history, target_insn_history_from)
4959         (target_insn_history_range): Use gdb_disassembly_flags instead of
4960         bare int.
4961
4962 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4963
4964         * cli/cli-script.c (build_command_line): For if/while commands,
4965         check whether args is empty.
4966
4967 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4968
4969         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4970         (enum command_control_type): Likewise.
4971         (struct command_line): Likewise.
4972         (free_command_lines): Likewise.
4973         (struct command_lines_deleter): Likewise.
4974         (command_line_up): Likewise.
4975         (read_command_lines): Likewise.
4976         (read_command_lines_1): Likewise.
4977         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4978         (enum command_control_type): Likewise.
4979         (struct command_line): Likewise.
4980         (free_command_lines): Likewise.
4981         (struct command_lines_deleter): Likewise.
4982         (command_line_up): Likewise.
4983         (read_command_lines): Likewise.
4984         (read_command_lines_1): Likewise.
4985         * breakpoint.h: Include cli/cli-script.h.
4986         * extension-priv.h: Likewise.
4987         * gdbcmd.h: Likewise.
4988
4989 2017-09-04  Pedro Alves  <palves@redhat.com>
4990
4991         * ada-lang.c (is_known_support_routine): Move sal declaration to
4992         where it is initialized.
4993         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4994         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4995         (clear_command, update_static_tracepoint): Remove init_sal
4996         references.  Move declarations closer to initializations.
4997         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4998         initializations.
4999         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5000         references.  Move sal declarations closer to initializations.
5001         * frame.c (find_frame_sal): Return a symtab_and_line via function
5002         return instead of output parameter.  Remove init_sal references.
5003         * frame.h (find_frame_sal): Return a symtab_and_line via function
5004         return instead of output parameter.
5005         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5006         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5007         instead of memset.
5008         (gdbscm_find_pc_line): Remove init_sal reference.
5009         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5010         references.  Move declarations closer to initializations.
5011         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5012         initializations.
5013         (finish_backward): Remove init_sal references.  Move declarations
5014         closer to initializations.
5015         * infrun.c (process_event_stop_test, handle_step_into_function)
5016         (insert_hp_step_resume_breakpoint_at_frame)
5017         (insert_step_resume_breakpoint_at_caller): Likewise.
5018         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5019         (symbol_to_sal): Likewise.
5020         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5021         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5022         to its initialization.
5023         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5024         init_sal references.  Move declarations closer to initializations.
5025         * source.c (get_current_source_symtab_and_line): Remove brace
5026         initialization.
5027         (set_current_source_symtab_and_line): Now takes the sal by const
5028         reference.  Remove brace initialization.
5029         (line_info): Remove init_sal reference.
5030         * source.h (set_current_source_symtab_and_line): Now takes a
5031         symtab_and_line via const reference.
5032         * stack.c (set_current_sal_from_frame): Adjust.
5033         (print_frame_info): Adjust.
5034         (get_last_displayed_sal): Return the sal via function return
5035         instead of via output parameter.  Simplify.
5036         (frame_info): Adjust.
5037         * stack.h (get_last_displayed_sal): Return the sal via function
5038         return instead of via output parameter.
5039         * symtab.c (init_sal): Delete.
5040         (find_pc_sect_line): Remove init_sal references.  Move
5041         declarations closer to initializations.
5042         (find_function_start_sal): Remove init_sal references.  Move
5043         declarations closer to initializations.
5044         * symtab.h (struct symtab_and_line): In-class initialize all
5045         fields.
5046         * tracepoint.c (set_traceframe_context)
5047         (print_one_static_tracepoint_marker): Remove init_sal references.
5048         Move declarations closer to initializations.
5049         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5050         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5051         declarations closer to initializations.
5052         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5053         init_sal references.  Adjust.
5054
5055 2017-09-04  Pedro Alves  <palves@redhat.com>
5056
5057         * ax-gdb.c (agent_command_1): Use range-for.
5058         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5059         * breakpoint.c: Include "common/array-view.h".
5060         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5061         parameter from struct symtabs_and_lines to
5062         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5063         (breakpoint_sals_to_pc): Change sals parameter from struct
5064         symtabs_and_lines to std::vector reference.
5065         (check_fast_tracepoint_sals): Change sals parameter from struct
5066         symtabs_and_lines to std::array_view.  Use range-for.
5067         (decode_static_tracepoint_spec): Return a std::vector instead of
5068         symtabs_and_lines.  Update.
5069         (create_breakpoint): Update.
5070         (break_range_command, until_break_command, clear_command): Update.
5071         (base_breakpoint_decode_location, bkpt_decode_location)
5072         (bkpt_probe_create_sals_from_location)
5073         (bkpt_probe_decode_location, tracepoint_decode_location)
5074         (tracepoint_probe_decode_location)
5075         (strace_marker_create_sals_from_location): Return a std::vector
5076         instead of symtabs_and_lines.
5077         (strace_marker_create_breakpoints_sal): Update.
5078         (strace_marker_decode_location): Return a std::vector instead of
5079         symtabs_and_lines.  Update.
5080         (update_breakpoint_locations): Change struct symtabs_and_lines
5081         parameters to gdb::array_view.  Adjust.
5082         (location_to_sals): Return a std::vector instead of
5083         symtabs_and_lines.  Update.
5084         (breakpoint_re_set_default): Use std::vector instead of struct
5085         symtabs_and_lines.
5086         (decode_location_default): Return a std::vector instead of
5087         symtabs_and_lines.  Update.
5088         * breakpoint.h: Include "common/array-view.h".
5089         (struct breakpoint_ops) <decode_location>: Now returns a
5090         std::vector instead of returning a symtabs_and_lines via output
5091         parameter.
5092         (update_breakpoint_locations): Change sals parameters to use
5093         gdb::array_view.
5094         * cli/cli-cmds.c (edit_command, list_command): Update to use
5095         std::vector and gdb::array_view.
5096         (ambiguous_line_spec): Adjust to use gdb::array_view and
5097         range-for.
5098         (compare_symtabs): Rename to ...
5099         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5100         const reference and adjust.
5101         (filter_sals): Rewrite using std::vector and standard algorithms.
5102         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5103         (jump_command): Update to use std::vector.
5104         * linespec.c (struct linespec_state) <canonical_names>: Update
5105         comment.
5106         (add_sal_to_sals_basic): Delete.
5107         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5108         (decode_line_2, create_sals_line_offset)
5109         (convert_address_location_to_sals, convert_linespec_to_sals)
5110         (convert_explicit_location_to_sals, parse_linespec)
5111         (event_location_to_sals, decode_line_full, decode_line_1)
5112         (decode_line_with_current_source)
5113         (decode_line_with_last_displayed, decode_objc)
5114         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5115         (linespec_result::~linespec_result): Adjust to use std::vector
5116         instead of symtabs_and_lines.
5117         * linespec.h (linespec_sals::sals): Now a std::vector.
5118         (struct linespec_result): Use std::vector, bool, and in-class
5119         initialization.
5120         (decode_line_1, decode_line_with_current_source)
5121         (decode_line_with_last_displayed): Return std::vector.
5122         * macrocmd.c (info_macros_command): Use std::vector.
5123         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5124         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5125         std::vector.
5126         * probe.h (parse_probes): Return a std::vector.
5127         * python/python.c (gdbpy_decode_line): Use std::vector and
5128         gdb::array_view.
5129         * source.c (select_source_symtab, line_info): Use std::vector.
5130         * stack.c (func_command): Use std::vector.
5131         * symtab.h (struct symtabs_and_lines): Delete.
5132         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5133
5134 2017-09-04  Pedro Alves  <palves@redhat.com>
5135
5136         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5137         unittests/array-view-selftests.c.
5138         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5139         * common/array-view.h: New file.
5140         * unittests/array-view-selftests.c: New file.
5141
5142 2017-09-04  Pedro Alves  <palves@redhat.com>
5143
5144         * cli/cli-cmds.c (edit_command): Pass message to
5145         ambiguous_line_spec.
5146         (list_command): Pass message to ambiguous_line_spec.  Say
5147         "first"/"last" instead of "start" and "end" to be consistent with
5148         the manual.
5149         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5150         them to print formatted message.
5151
5152 2017-09-04  Pedro Alves  <palves@redhat.com>
5153
5154         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5155         ftrace_update_insns by reference instead of pointer.
5156
5157 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5158
5159         * i386-go32-tdep.c: Include x86-xstate.h.
5160         (i386_go32_init_abi): Call i386_target_description.
5161         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5162         if xcr0 is X86_XSTATE_X87_MASK.
5163         * i386-tdep.h (tdesc_i386): Remove the declaration.
5164         (tdesc_i386_mmx): Likewise.
5165
5166 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5167
5168         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5169         X86_XSTATE_SSE_MASK instead of 0.
5170
5171 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5172
5173         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5174         i386_target_description.
5175         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5176         i386_target_description.
5177         * i386-tdep.c (i386_gdbarch_init): Likewise.
5178
5179 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5180
5181         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5182         (x86_darwin_init_abi_64): Call amd64_target_description.
5183         * amd64-dicos-tdep.c: Likewise.
5184         * amd64-fbsd-nat.c: Likewise.
5185         * amd64-fbsd-tdep.c: Likewise.
5186         * amd64-nbsd-tdep.c: Likewise.
5187         * amd64-obsd-tdep.c: Likewise.
5188         * amd64-sol2-tdep.c: Likewise.
5189         * amd64-windows-tdep.c: Likewise.
5190         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5191
5192 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5193
5194         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5195         (btrace_function) <insn>: Change type to use std::vector.
5196         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5197         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5198         ftrace_update_insns, ftrace_compute_global_level_offset,
5199         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5200         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5201         change to std::vector.
5202         (ftrace_update_insns): Adjust to change to std::vector, change
5203         type of INSN parameter.
5204         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5205         * record-btrace.c (btrace_call_history_insn_range,
5206         btrace_compute_src_line_range,
5207         record_btrace_frame_prev_register): Adjust to change to
5208         std::vector.
5209         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5210         to change to std::vector.
5211
5212 2017-09-03  Tom Tromey  <tom@tromey.com>
5213
5214         * corefile.c (reopen_exec_file): Use std::string.
5215
5216 2017-09-03  Tom Tromey  <tom@tromey.com>
5217
5218         * compile/compile.c (compile_register_name_mangled): Return
5219         std::string.
5220         * compile/compile-loc2c.c (pushf_register_address): Update.
5221         (pushf_register): Update.
5222         * compile/compile-c-types.c (convert_array): Update.
5223         * compile/compile-c-symbols.c (generate_vla_size): Update.
5224         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5225         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5226         (convert_one_symbol): Update.
5227         (generate_c_for_for_one_variable): Update.
5228         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5229         std::string.
5230         (generate_register_struct): Update.
5231         * compile/compile-internal.h (c_get_range_decl_name): Return a
5232         std::string.
5233         (compile_register_name_mangled): Return std::string.
5234
5235 2017-09-03  Tom Tromey  <tom@tromey.com>
5236
5237         * utils.c (perror_string): Return a std::string.
5238         (throw_perror_with_name, perror_warning_with_name): Update.
5239
5240 2017-09-03  Tom Tromey  <tom@tromey.com>
5241
5242         * demangle.c (demangle_command): Use std::string,
5243         unique_xmalloc_ptr.
5244
5245 2017-09-03  Tom Tromey  <tom@tromey.com>
5246
5247         * cli/cli-setshow.c (do_set_command): Use std::string.
5248
5249 2017-09-03  Tom Tromey  <tom@tromey.com>
5250
5251         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5252
5253 2017-09-03  Tom Tromey  <tom@tromey.com>
5254
5255         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5256
5257 2017-09-03  Tom Tromey  <tom@tromey.com>
5258
5259         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5260         gdb::unique_xmalloc_ptr.
5261
5262 2017-09-03  Tom Tromey  <tom@tromey.com>
5263
5264         * thread.c (print_thread_info_1): Use string_printf.
5265         (thread_apply_command, thread_apply_all_command): Use
5266         std::string.
5267
5268 2017-09-03  Tom Tromey  <tom@tromey.com>
5269
5270         * valprint.c (val_print_string): Update.
5271         * gdbcore.h (memory_error_message): Return std::string.
5272         * corefile.c (memory_error_message): Return std::string.
5273         (memory_error): Update.
5274         * breakpoint.c (insert_bp_location): Update.
5275
5276 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5277
5278         * target/waitstatus.h (target_waitstatus_to_string): Change
5279         return type to std::string.
5280         * target/waitstatus.c (target_waitstatus_to_string): Return
5281         std::string.
5282         * target.h (target_waitstatus_to_string): Remove declaration.
5283         * infrun.c (resume, clear_proceed_status_thread,
5284         print_target_wait_results, do_target_wait, save_waitstatus,
5285         stop_all_threads): Adjust.
5286         * record-btrace.c (record_btrace_wait): Adjust.
5287         * target-debug.h
5288         (target_debug_print_struct_target_waitstatus_p): Adjust.
5289
5290 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5291
5292         PR gdb/22046
5293         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5294         detection.
5295
5296 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5297
5298         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5299         for setting/unsetting environment variables on the remote target.
5300         (New remote packets): Add entries for QEnvironmentHexEncoded,
5301         QEnvironmentUnset and QEnvironmentReset.
5302         * common/environ.c (gdb_environ::operator=): Extend method to
5303         handle m_user_set_env_list and m_user_unset_env_list.
5304         (gdb_environ::clear): Likewise.
5305         (match_var_in_string): Change type of first parameter from 'char
5306         *' to 'const char *'.
5307         (gdb_environ::set): Extend method to handle
5308         m_user_set_env_list and m_user_unset_env_list.
5309         (gdb_environ::unset): Likewise.
5310         (gdb_environ::clear_user_set_env): New method.
5311         (gdb_environ::user_set_envp): Likewise.
5312         (gdb_environ::user_unset_envp): Likewise.
5313         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5314         m_user_unset_env_list on move constructor/assignment.
5315         (unset): Add new default parameter 'update_unset_list = true'.
5316         (clear_user_set_env): New method.
5317         (user_set_envp): Likewise.
5318         (user_unset_envp): Likewise.
5319         (m_user_set_env_list): New std::set.
5320         (m_user_unset_env_list): Likewise.
5321         * common/rsp-low.c (hex2str): New function.
5322         (bin2hex): New overload for bin2hex function.
5323         * common/rsp-low.c (hex2str): New prototype.
5324         (str2hex): New overload prototype.
5325         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5326         QEnvironmentUnset and QEnvironmentReset.
5327         (remote_protocol_features): Add QEnvironmentHexEncoded,
5328         QEnvironmentUnset and QEnvironmentReset packets.
5329         (send_environment_packet): New function.
5330         (extended_remote_environment_support): Likewise.
5331         (extended_remote_create_inferior): Call
5332         extended_remote_environment_support.
5333         (_initialize_remote): Add QEnvironmentHexEncoded,
5334         QEnvironmentUnset and QEnvironmentReset packet configs.
5335         * unittests/environ-selftests.c (gdb_selftest_env_var):
5336         New variable.
5337         (test_vector_initialization): New function.
5338         (test_init_from_host_environ): Likewise.
5339         (test_reinit_from_host_environ): Likewise.
5340         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5341         Likewise.
5342         (test_unset_set_empty_vector): Likewise.
5343         (test_vector_clear): Likewise.
5344         (test_std_move): Likewise.
5345         (test_move_constructor):
5346         (test_self_move): Likewise.
5347         (test_set_unset_reset): Likewise.
5348         (run_tests): Rewrite in terms of the functions above.
5349
5350 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5351
5352         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5353         (adi_available): Use a temp variable of type CORE_ADDR as argument
5354         3 when calling target_auxv_search.
5355         (adi_normalize_address): Use masks and xor operators to calculate
5356         normalized address.
5357         (adi_read_versions, adi_write_versions, adi_print_versions)
5358         (do_examine, do_assign): Use paddress.
5359
5360 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5361
5362         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5363         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5364         out of loop and add supply of FIR.
5365         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5366         add collect of FIR.
5367
5368 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5369
5370         PR gdb/21827
5371         * cli/cli-script.c (define_command): Don't convert command name
5372         to lower case.
5373
5374 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5375
5376         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5377         Update all callers accordingly. Remove all code blocks handling
5378         the case where DISPP is not NULL.
5379
5380 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5381
5382         PR symtab/22003
5383         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5384         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5385         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5386
5387 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5388
5389         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5390         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5391         (read_comp_units_from_section): New parameter abbrev_section, use
5392         read_and_check_comp_unit_head, allocate signatured_type if needed.
5393         (create_all_comp_units): Update read_comp_units_from_section caller.
5394
5395 2017-08-23  Pedro Alves  <palves@redhat.com>
5396
5397         PR remote/21852
5398         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5399         to null_ptid and switch to thread without reading the registers
5400         after adding the inferior.
5401
5402 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5403
5404         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5405         compile-gcc.
5406         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5407         (compile_to_object): Implement compile_gcc.
5408         (_initialize_compile): Install "set compile-gcc".  Initialize
5409         compile_gcc.
5410
5411 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5412
5413         * compile/compile.c (compile_to_object): Conditionally call
5414         set_verbose.  Conditionally call compile or compile_v0.
5415
5416 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5417
5418         * sparc64-tdep.h: (adi_normalize_address): New export.
5419         * sparc-nat.h: (open_adi_tag_fd): New export.
5420         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5421         * sparc64-linux-tdep.c:
5422         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5423         (sparc64_linux_handle_segmentation_fault): New function.
5424         (sparc64_linux_init_abi): Register
5425         sparc64_linux_handle_segmentation_fault
5426         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5427         (sparc64_addr_bits_remove): New function.
5428         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5429         (MAX_PROC_NAME_SIZE): New macro.
5430         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5431         (sparc64adilist): New variable.
5432         (adi_proc_list): New variable.
5433         (find_adi_info): New function.
5434         (add_adi_info): New function.
5435         (get_adi_info_proc): New function.
5436         (get_adi_info): New function.
5437         (info_adi_command): New function.
5438         (read_maps_entry): New function.
5439         (adi_available): New function.
5440         (adi_normalize_address): New function.
5441         (adi_align_address): New function.
5442         (adi_convert_byte_count): New function.
5443         (adi_tag_fd): New function.
5444         (adi_is_addr_mapped): New function.
5445         (adi_read_versions): New function.
5446         (adi_write_versions): New function.
5447         (adi_print_versions): New function.
5448         (do_examine): New function.
5449         (do_assign): New function.
5450         (adi_examine_command): New function.
5451         (adi_assign_command): New function.
5452         (_initialize_sparc64_adi_tdep): New function.
5453
5454 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5455
5456         * breakpoint.c (breakpoints_info): Rename to ...
5457         (info_breakpoints_command): ... this.
5458         (watchpoints_info): Rename to ...
5459         (info_watchpoints_command): ... this.
5460         (tracepoints_info): Rename to ...
5461         (info_tracepoints_command): ... this.
5462         (_initialize_breakpoint): Adjust.
5463         * dcache.c (dcache_info): Rename to ...
5464         (info_display_command): ... this.
5465         (_initialize_dcache): Adjust.
5466         * frame.h (args_info): Rename to ...
5467         (info_args_command): ... this.
5468         (locals_info): Rename to ...
5469         (info_locals_command): ... this.
5470         * infcmd.c (nofp_registers_info): Rename to ...
5471         (info_registers_command): ... this.
5472         (float_info): Rename to ...
5473         (info_float_command): ... this.
5474         (program_info): Rename to ...
5475         (info_program_command): ... this.
5476         (all_registers_info): Rename to ...
5477         (info_all_registers_command): ... this.
5478         (vector_info): Rename to ...
5479         (info_vector_command): ... this.
5480         (float_info): Rename to ...
5481         (info_float_command): ... this.
5482         (_initialize_infcmd): Adjust.
5483         * inferior.h (term_info): Rename to ...
5484         (info_terminal_command): ... this.
5485         * inflow.c (term_info): Rename to ...
5486         (info_terminal_command): ... this.
5487         (_initialize_inflow): Adjust.
5488         * infrun.c (signals_info): Rename to ...
5489         (info_signals_command): ... this.
5490         (_initialize_infrun): Adjust.
5491         * objc-lang.c (classes_info): Rename to ...
5492         (info_classes_command): ... this.
5493         (selectors_info): Rename to ...
5494         (info_selectors_command): ... this.
5495         (_initialize_objc_language): Adjust.
5496         * printcmd.c (sym_info): Rename to ...
5497         (info_symbol_command): ... this.
5498         (address_info): Rename to ...
5499         (info_address_command): ... this.
5500         (display_info): Rename to ...
5501         (info_display_command): ... this.
5502         (_initialize_printcmd): Adjust.
5503         * reverse.c (bookmarks_info): Rename to ...
5504         (info_breakpoints_command): ... this.
5505         (_initialize_reverse): Adjust.
5506         * ser-go32.c (dos_info): Rename to ...
5507         (info_serial_command): ... this.
5508         (_initialize_ser_dos): Adjust.
5509         * skip.c (skip_info): Rename to ...
5510         (info_skip_command): ... this.
5511         (_initialize_step_skip): Adjust.
5512         * source.c (line_info): Rename to ...
5513         (info_line_command): ... this.
5514         (source_info): Rename to ...
5515         (info_source_command)
5516         * stack.c (frame_info): Rename to ...
5517         (info_frame_command): ... this.
5518         (locals_info): Rename to ...
5519         (info_locals_command): ... this.
5520         (args_info): Rename to ...
5521         (info_args_command): ... this.
5522         (_initialize_stack): Adjust.
5523         * symtab.c (sources_info): Rename to ...
5524         (info_sources_command): ... this.
5525         (variables_info): Rename to ...
5526         (info_variables_command): ... this.
5527         (functions_info): Rename to ...
5528         (info_functions_command): ... this.
5529         (types_info): Rename to ...
5530         (info_types_command): ... this.
5531         (_initialize_symtab): Adjust.
5532         * target.c (target_info): Rename to ...
5533         (info_target_command): ... this.
5534         (initialize_targets): Adjust.
5535         * tracepoint.c (tvariables_info): Rename to ...
5536         (info_tvariables_command): ... this.
5537         (scope_info): Rename to ...
5538         (info_scope_command): ... this.
5539         (trace_dump_actions): Adjust.
5540         (_initialize_tracepoint): Adjust.
5541
5542 2017-08-22  Tom Tromey  <tom@tromey.com>
5543
5544         * breakpoint.h (install_breakpoint): Update.
5545         * breakpoint.c (add_solib_catchpoint): Update.
5546         (install_breakpoint): Change argument to a std::unique_ptr.
5547         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5548         (create_breakpoint_sal, create_breakpoint): Update.
5549         (watch_command_1, catch_exec_command_1)
5550         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5551         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5552         Return the breakpoint.
5553         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5554         (new_single_step_breakpoint): Update.
5555         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5556         std::unique_ptr.
5557         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5558         std::unique_ptr.
5559         * break-catch-sig.c (create_signal_catchpoint): Use
5560         std::unique_ptr.
5561         * ada-lang.c (create_ada_exception_catchpoint): Use
5562         std::unique_ptr.
5563
5564 2017-08-22  Tom Tromey  <tom@tromey.com>
5565
5566         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5567
5568 2017-08-22  Tom Tromey  <tom@tromey.com>
5569
5570         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5571         (lookup_partial_symbol): Update.
5572
5573 2017-08-22  Tom Tromey  <tom@tromey.com>
5574
5575         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5576         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5577         (find_and_open_source, symtab_to_fullname): Update.
5578         * psymtab.c (psymtab_to_fullname): Update.
5579
5580 2017-08-22  Tom Tromey  <tom@tromey.com>
5581
5582         * exec.c (exec_file_attach): Update.
5583         * linux-thread-db.c (try_thread_db_load): Update.
5584         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5585         * utils.c (gdb_realpath): Change return type.
5586         (gdb_realpath_keepfile): Update.
5587         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5588         (_initialize_utils): Register the new self test.
5589         * source.c (openp): Update.
5590         (find_and_open_source): Update.
5591         * nto-tdep.c (nto_find_and_open_solib): Update.
5592         * main.c (set_gdb_data_directory): Update.
5593         (captured_main_1): Update.
5594         * dwarf2read.c (dwarf2_get_dwz_file): Update
5595         (dw2_map_symbol_filenames): Update.
5596         * auto-load.c (auto_load_safe_path_vec_update): Update.
5597         (filename_is_in_auto_load_safe_path_vec): Change type of
5598         "filename_realp".
5599         (auto_load_objfile_script): Update.
5600         (file_is_auto_load_safe): Update.  Use std::string.
5601         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5602
5603 2017-08-22  Tom Tromey  <tom@tromey.com>
5604
5605         * utils.c (gdb_realpath_keepfile): Return a
5606         gdb::unique_xmalloc_ptr.
5607         * exec.c (exec_file_attach): Update.
5608         * utils.h (gdb_realpath_keepfile): Return a
5609         gdb::unique_xmalloc_ptr.
5610
5611 2017-08-22  Tom Tromey  <tom@tromey.com>
5612
5613         * compile/compile.c (compile_file_command): Use
5614         gdb::unique_xmalloc_ptr, std::string.
5615         * utils.c (gdb_abspath): Change return type.
5616         * source.c (openp): Update.
5617         * objfiles.c (allocate_objfile): Update.
5618         * main.c (set_gdb_data_directory): Update.
5619         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5620
5621 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5622
5623         * cli-cmds.c (list_commands): List actual code around more than
5624         one location.
5625
5626 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5627
5628         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5629
5630 2017-08-21  Pedro Alves  <palves@redhat.com>
5631
5632         PR gdb/19487
5633         * c-exp.y (variable production): Handle function aliases.
5634         * minsyms.c (msymbol_is_text): New function.
5635         * minsyms.h (msymbol_is_text): Declare.
5636         * symtab.c (find_function_alias_target): New function.
5637         * symtab.h (find_function_alias_target): Declare.
5638
5639 2017-08-21  Pedro Alves  <palves@redhat.com>
5640
5641         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5642         typedefs.
5643         * typeprint.c (whatis_exp): If handling "whatis", and expression
5644         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5645         typedefs here.
5646         * valops.c (value_cast): Save "to" type before resolving
5647         stubs/typedefs.  Use that type as resulting value's type.
5648
5649 2017-08-18  Tom Tromey  <tom@tromey.com>
5650             Pedro Alves  <palves@redhat.com>
5651
5652         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5653         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5654         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5655         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5656         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5657         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5658         (linux_get_siginfo_data): Add "thread" argument.  Use
5659         scoped_restore.
5660         * linux-nat.c (linux_child_follow_fork)
5661         (check_stopped_by_watchpoint): Use scoped_restore.
5662         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5663         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5664         (restore_inferior_ptid, save_inferior_ptid): Remove.
5665         * btrace.c (btrace_fetch): Use scoped_restore.
5666         * bsd-uthread.c (bsd_uthread_fetch_registers)
5667         (bsd_uthread_store_registers): Use scoped_restore.
5668         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5669         scoped_restore.
5670         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5671         (aix_thread_xfer_partial): Use scoped_restore.
5672         * inferior.h (save_inferior_ptid): Remove.
5673
5674 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5675
5676         PR tdep/21818
5677         * arm-tdep.c (gdb_print_insn_arm): Mark
5678         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5679
5680 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5681
5682         * NEWS: Mention GDBserver's new option "--selftest".
5683         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5684         * selftest.c: Move it to common/selftest.c.
5685         * selftest.h: Move it to common/selftest.h.
5686         * selftest-arch.c (reset): New function.
5687         (tests_with_arch): Call reset.
5688
5689 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5690
5691         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5692         instead of exception_fprintf and printf_filtered.
5693
5694 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5695
5696         * selftest.c (register_self_test): Rename it to
5697         selftests::register_test.
5698         (run_self_tests): selftest::run_tests.
5699         * selftest.h: Update declarations.
5700         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5701         selftests::register_test_foreach_arch.
5702         * selftest-arch.h: Update declaration.
5703         * aarch64-tdep.c: Update.
5704         * arm-tdep.c: Likewise.
5705         * disasm-selftests.c: Likewise.
5706         * dwarf2loc.c: Likewise.
5707         * dwarf2-frame.c: Likewise.
5708         * findvar.c: Likewise.
5709         * gdbarch-selftests.c: Likewise.
5710         * maint.c (maintenance_selftest): Likewise.
5711         * regcache.c: Likewise.
5712         * rust-exp.y: Likewise.
5713         * selftest-arch.c: Likewise.
5714         * unittests/environ-selftests.c: Likewise.
5715         * unittests/function-view-selftests.c: Likewise.
5716         * unittests/offset-type-selftests.c: Likewise.
5717         * unittests/optional-selftests.c: Likewise.
5718         * unittests/scoped_restore-selftests.c: Likewise.
5719         * utils-selftests.c: Likewise.
5720
5721 2017-08-17  Pedro Alves  <palves@redhat.com>
5722
5723         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5724         local.
5725
5726 2017-08-17  Pedro Alves  <palves@redhat.com>
5727
5728         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5729         field.
5730         (reset_die_in_process): Delete, replaced by ...
5731         (process_die_scope): ... this new class.  Make it responsible for
5732         freeing cu->line_header too.
5733         (process_die): Use process_die_scope.
5734         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5735         cu->line_header_die_owner.  Don't release the line header if it's
5736         owned by the CU.
5737         (setup_type_unit_groups): Make the CU/DIE own the line header.
5738         Don't release the line header here.
5739
5740 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5741
5742         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5743
5744 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5745
5746         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5747         Single-Key mode
5748
5749 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5750
5751         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5752         mode command list.
5753
5754 2017-08-15  Stafford Horne  <shorne@gmail.com>
5755
5756         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5757
5758 2017-08-15  Stafford Horne  <shorne@gmail.com>
5759
5760         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5761
5762 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5763
5764         PR gdb/21954
5765         * infcmd.c (unset_environment_command): Use the 'clear' method on
5766         the environment instead of resetting it.
5767
5768 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5769
5770         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5771         platforms.
5772
5773 2017-08-14  Tom Tromey  <tom@tromey.com>
5774
5775         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5776         (print_binary_chars): Likewise.
5777         (BITS_IN_BYTES): Remove.
5778
5779 2017-08-14  Tom Tromey  <tom@tromey.com>
5780
5781         PR gdb/21675
5782         * valprint.c (LOW_ZERO): Change value to 034.
5783         (print_octal_chars): Add static_asserts for octal constants.
5784         * printcmd.c (print_scalar_formatted): Add 'd' case.
5785
5786 2017-08-11  Tom Tromey  <tom@tromey.com>
5787
5788         * symfile.c (add_symbol_file_command): Use std::vector.
5789
5790 2017-08-14  Tom Tromey  <tom@tromey.com>
5791
5792         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5793         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5794         std::move.
5795         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5796
5797 2017-08-11  Pedro Alves  <palves@redhat.com>
5798
5799         * infrun.c (process_event_stop_test): Adjust
5800         function_name_is_marked_for_skip call.
5801         * skip.c: Include <list>.
5802         (skiplist_entry): Make it a class with private fields, and
5803         getters/setters.
5804         (skiplist_entry_chain): Delete.
5805         (skiplist_entries): New.
5806         (skiplist_entry_count): Delete.
5807         (highest_skiplist_entry_num): New.
5808         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5809         (add_skiplist_entry): Delete.
5810         (skiplist_entry::skiplist_entry): New.
5811         (skiplist_entry::add_entry): New.
5812         (skip_file_command, skip_function): Adjust.
5813         (compile_skip_regexp): Delete.
5814         (skip_command): Don't compile regexp here.  Adjust to use
5815         skiplist_entry::add_entry.
5816         (skip_info): Adjust to use range-for and getters.
5817         (skip_enable_command, skip_disable_command): Adjust to use
5818         range-for and setters.
5819         (skip_delete_command): Adjust to use std::list.
5820         (add_skiplist_entry): Delete.
5821         (skip_file_p): Delete, refactored as ...
5822         (skiplist_entry::do_skip_file_p): ... this new method.
5823         (skip_gfile_p): Delete, refactored as ...
5824         (skiplist_entry::do_gskip_file_p): ... this new method.
5825         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5826         (skiplist_entry::skip_function_p): ... this new method.
5827         (function_name_is_marked_for_skip): Now returns bool, and takes
5828         the function sal by const reference.  Adjust to use range-for and
5829         skiplist_entry methods.
5830         (_initialize_step_skip): Remove references to
5831         skiplist_entry_chain, skiplist_entry_count.
5832         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5833         takes the function sal by const reference.
5834
5835 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5836
5837         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5838         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5839         (dwarf2_frame_cache):
5840         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5841         RETURN_MASK_ALL and set *this_case to NULL.
5842         * frame-unwind.h: Update comments.
5843
5844 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5845
5846         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5847         (dwarf2_frame_state_copy_regs): Remove.
5848         (dwarf2_frame_state_free_regs): Remove.
5849         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5850         (dwarf2_restore_rule): Call method .alloc_regs instead of
5851         dwarf2_frame_state_alloc_regs.
5852         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5853         constructor.  Call std::move.
5854         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5855         (dwarf2_frame_cache): Likewise.
5856
5857         [GDB_SELF_TEST]: Include selftest.h and
5858         selftest-arch.h.
5859         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5860         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5861         execute_cfa_program_test.
5862
5863         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5864         copy ctor, assignment operator, move assignment.
5865         <alloc_regs>: New method.
5866         <swap>: New method.
5867         (struct dwarf2_frame_state): Delete dtor.
5868         (dwarf2_frame_state_alloc_regs): Remove declaration.
5869         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5870         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5871
5872 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5873
5874         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5875         (dwarf2_frame_state::dwarf2_frame_state): New.
5876         (dwarf2_frame_state::~dwarf2_frame_state): New.
5877         (dwarf2_fetch_cfa_info): Update.
5878         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5879         rather than a pointer.  Update code.
5880         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5881         dtor.
5882         <data_align, code_align, retaddr_column>: Change them to const.
5883         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5884         to bool.
5885
5886 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5887
5888         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5889         <loc.exp>: New field.
5890         * dwarf2-frame.c (execute_cfa_program): Update.
5891         (dwarf2_frame_prev_register): Update.
5892
5893 2017-08-10  Pedro Alves  <palves@redhat.com>
5894
5895         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5896
5897 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5898
5899         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5900         (fbsd_pending_children): Use std::list.
5901         (fbsd_remember_child): Likewise.
5902         (fbsd_is_child_pending): Likewise.
5903         (fbsd_pending_vfork_done): Use std::forward_list.
5904         (fbsd_add_vfork_done): Likewise.
5905         (fbsd_is_vfork_done_pending): Likewise.
5906         (fbsd_next_vfork_done): Likewise.
5907
5908 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5909
5910         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5911         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5912         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5913         for `mapfilename'.
5914         (fbsd_xfer_partial): Use gdb::byte_vector.
5915         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5916
5917 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5918
5919         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5920         "filestuff.h".
5921         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5922
5923 2017-08-09  Tom Tromey  <tom@tromey.com>
5924
5925         * skip.c (skiplist_entry): New constructor.
5926         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5927         (skiplist_entry::file_is_glob): Now bool.
5928         (skiplist_entry::file, skiplist_entry::function): Now
5929         std::string.
5930         (make_skip_entry): Return a unique_ptr.  Use new.
5931         (free_skiplist_entry, free_skiplist_entry_cleanup)
5932         (make_free_skiplist_entry_cleanup): Remove.
5933         (skip_command, skip_disable_command, add_skiplist_entry)
5934         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5935         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5936         (function_name_is_marked_for_skip): Update.
5937         (skip_delete_command): Update.  Use delete.
5938
5939 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5940
5941         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5942         (aarch64_linux_core_read_description): New function.
5943         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5944
5945 2017-08-09  Pedro Alves  <palves@redhat.com>
5946
5947         * cp-name-parser.y (cp_comp_to_string): Return a
5948         gdb::unique_xmalloc_ptr<char>.
5949         * cp-support.c (replace_typedefs_qualified_name)
5950         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5951         (cp_canonicalize_string_full): Use op= instead of explicit
5952         convertion.
5953         (cp_class_name_from_physname, method_name_from_physname)
5954         (cp_func_name, cp_remove_params): Adjust to use
5955         gdb::unique_xmalloc_ptr<char>.
5956         * cp-support.h (cp_comp_to_string): Return a
5957         gdb::unique_xmalloc_ptr<char>.
5958         * python/py-type.c (typy_lookup_type): Adjust to use
5959         gdb::unique_xmalloc_ptr<char>.
5960
5961 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5962
5963         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5964
5965 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5966             Yao Qi  <yao.qi@linaro.org>
5967
5968         * cp-support.c (cp_canonicalize_string_full): Use
5969         gdb::unique_xmalloc_ptr<char>.
5970         (cp_canonicalize_string): Likewise.
5971
5972 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5973
5974         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5975         * regformats/i386/amd64-avx-avx512.dat: Remove.
5976         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5977         * regformats/i386/amd64-avx-mpx.dat:Remove.
5978         * regformats/i386/amd64-avx.dat: Remove.
5979         * regformats/i386/amd64-mpx.dat: Remove.
5980         * regformats/i386/i386-avx-avx512.dat: Remove.
5981         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5982         * regformats/i386/i386-avx-mpx.dat: Remove.
5983         * regformats/i386/i386-mmx.dat: Remove.
5984         * regformats/i386/i386-mpx.dat: Remove.
5985
5986 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5987
5988         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5989         * amd64-tdep.c: Don't include features/i386/x32*.c.
5990         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5991         functions.
5992         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5993         and i386/x32-avx-avx512.
5994         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5995         and i386/x32.xml.
5996         * features/i386/x32-avx-avx512.c: Removed.
5997         * features/i386/x32-avx-avx512.xml: Removed.
5998         * features/i386/x32-avx.c: Removed.
5999         * features/i386/x32-avx.xml: Removed.
6000         * features/i386/x32.c: Removed.
6001         * features/i386/x32.xml: Removed.
6002         * regformats/i386/x32-avx-avx512.dat: Removed.
6003         * regformats/i386/x32-avx.dat: Removed.
6004         * regformats/i386/x32.dat: Removed.
6005
6006 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6007
6008         PR breakpoints/21886
6009         * mem-break.c (default_memory_insert_breakpoint): Use
6010         `->placed_address' rather than `->reqstd_address' for the
6011         breakpoint location.
6012
6013 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6014
6015         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6016         assertions.
6017
6018 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6019
6020         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6021         a union of `tdep_info', `tdesc_data' and `id'.
6022         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6023         rather than `info.tdep_info'.
6024         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6025         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6026         * i386-tdep.c (i386_gdbarch_init): Likewise.
6027         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6028         * mips-tdep.c (mips_gdbarch_init): Likewise.
6029         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6030         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6031         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6032         `info.tdep_info'.
6033         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6034         `info.tdep_info'.
6035         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6036         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6037         `info.tdep_info'.
6038         * spu-tdep.c (spu_gdbarch_init): Likewise.
6039         * gdbarch.h: Regenerate.
6040
6041 2017-08-07  Leszek Swirski  <leszeks@google.com>
6042
6043         PR symtab/20899
6044         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6045
6046 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6047
6048         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6049         (gdbsim_open): Rename gdb_argv args object to argv.
6050
6051 2017-08-05  Tom Tromey  <tom@tromey.com>
6052
6053         * compile/compile-object-load.c (compile_object_load): Use
6054         gdb::unique_xmalloc_ptr.
6055         * cli/cli-dump.c (scan_filename): Rename from
6056         scan_filename_with_cleanup.  Change return type.
6057         (scan_expression): Rename from scan_expression_with_cleanup.
6058         Change return type.
6059         (dump_memory_to_file, dump_value_to_file, restore_command):
6060         Use gdb::unique_xmalloc_ptr.  Update.
6061         * cli/cli-cmds.c (find_and_open_script): Use
6062         gdb::unique_xmalloc_ptr.
6063         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6064         * symmisc.c (maintenance_print_symbols)
6065         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6066         * symfile.c (symfile_bfd_open, generic_load)
6067         (add_symbol_file_command, remove_symbol_file_command): Use
6068         gdb::unique_xmalloc_ptr.
6069         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6070         * psymtab.c (maintenance_print_psymbols): Use
6071         gdb::unique_xmalloc_ptr.
6072         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6073         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6074         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6075         (reload_shared_libraries_1): Likewise.
6076
6077 2017-08-05  Tom Tromey  <tom@tromey.com>
6078
6079         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6080         (rust_op_vector, rust_set_vector): New typedefs.
6081         (current_parser): New global.
6082         (work_obstack): Change to pointer type.  Update all users.
6083         (rust_ast, pstate): Remove globals.
6084         (struct rust_parser): New.
6085         (%union) <params, field_inits>: Change type.
6086         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6087         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6088         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6089         (convert_params_to_types, convert_params_to_expression): Change
6090         type of "params".
6091         (ast_string): Change type of "fields".
6092         (rust_parse): Make a rust_parser.  Remove cleanups.
6093         (rust_lex_tests): Make and install an auto_obstack.
6094
6095 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6096
6097         * configure.srv (ipa_x32_linux_regobj): New.
6098         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6099         instead of X86_TDESC_AVX512.
6100         (initialize_low_tracepoint): Call
6101         init_registers_x32_avx_avx512_linux.
6102
6103 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6104
6105         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6106
6107 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6108
6109         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6110
6111 2017-08-03  Tom Tromey  <tom@tromey.com>
6112
6113         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6114         Remove.
6115         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6116
6117 2017-08-03  Tom Tromey  <tom@tromey.com>
6118
6119         * python/py-param.c (compute_enum_values): Use gdb_argv.
6120
6121 2017-08-03  Tom Tromey  <tom@tromey.com>
6122
6123         * utils.h (struct gdb_argv_deleter): New.
6124         (gdb_argv): New class.
6125         * utils.c (gdb_argv::reset): New method.
6126         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6127         * tracefile.c (tsave_command): Use gdb_argv.
6128         * top.c (new_ui_command): Use gdb_argv.
6129         * symmisc.c (maintenance_print_symbols)
6130         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6131         * symfile.c (symbol_file_command, generic_load)
6132         (remove_symbol_file_command): Use gdb_argv.
6133         * stack.c (backtrace_command): Use gdb_argv.
6134         * source.c (add_path, show_substitute_path_command)
6135         (unset_substitute_path_command, set_substitute_path_command):
6136         Use gdb_argv.
6137         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6138         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6139         * remote.c (extended_remote_run, remote_put_command)
6140         (remote_get_command, remote_delete_command): Use gdb_argv.
6141         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6142         (gdbsim_open): Use gdb_argv.
6143         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6144         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6145         * procfs.c (procfs_info_proc): Use gdb_argv.
6146         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6147         * infrun.c (handle_command): Use gdb_argv.
6148         * inferior.c (add_inferior_command, clone_inferior_command):
6149         Use gdb_argv.
6150         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6151         * exec.c (exec_file_command): Use gdb_argv.
6152         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6153         * compile/compile.c (build_argc_argv): Use gdb_argv.
6154
6155 2017-08-03  Tom Tromey  <tom@tromey.com>
6156
6157         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6158
6159 2017-08-03  Tom Tromey  <tom@tromey.com>
6160
6161         * python/python.c (compute_python_string): Return std::string.
6162         (gdbpy_eval_from_control_command): Update.
6163         (do_start_initialization): Use std::string.
6164         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6165         xstrprintf.
6166         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6167         xstrprintf.
6168
6169 2017-08-03  Tom Tromey  <tom@tromey.com>
6170
6171         * top.h (do_restore_instream_cleanup): Remove.
6172         * top.c (do_restore_instream_cleanup): Remove.
6173         (read_command_file): Use scoped_restore.
6174         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6175
6176 2017-08-03  Tom Tromey  <tom@tromey.com>
6177
6178         * cli/cli-script.c (execute_user_command)
6179         (execute_control_command): Use scoped_restore.
6180
6181 2017-08-03  Tom Tromey  <tom@tromey.com>
6182
6183         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6184         (execute_user_command): Remove user_call_depth; use
6185         user_args_stack's size instead.
6186
6187 2017-08-03  Tom Tromey  <tom@tromey.com>
6188
6189         * top.h (in_user_command): Remove.
6190         * top.c (in_user_command): Remove.
6191         * cli/cli-script.c (do_restore_user_call_depth)
6192         (execute_user_command): Update.
6193
6194 2017-08-03  Tom Tromey  <tom@tromey.com>
6195
6196         * valops.c (search_struct_method): Use gdb::byte_vector.
6197         * valarith.c (value_concat): Use std::vector.
6198         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6199         (simple_search_memory): Likewise.
6200         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6201         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6202         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6203         * elfread.c (elf_rel_plt_read): Use std::string.
6204         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6205         * cli/cli-dump.c (restore_section_callback): Use
6206         gdb::byte_vector.
6207
6208 2017-08-03  Tom Tromey  <tom@tromey.com>
6209
6210         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6211
6212 2017-08-03  Tom Tromey  <tom@tromey.com>
6213
6214         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6215         (tui_register_format): Use scoped_restore.
6216
6217 2017-08-03  Tom Tromey  <tom@tromey.com>
6218
6219         * reverse.c (exec_direction_default): Remove.
6220         (exec_reverse_once): Use scoped_restore.
6221         * remote.c (restore_remote_timeout): Remove.
6222         (remote_flash_erase, remote_flash_write, remote_flash_done)
6223         (readchar, remote_serial_write): Use scoped_restore.
6224         * cli/cli-script.c (struct source_cleanup_lines_args)
6225         (source_cleanup_lines): Remove.
6226         (script_from_file): Use scoped_restore.
6227         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6228         (source_command): Use scoped_restore.
6229
6230 2017-08-03  Tom Tromey  <tom@tromey.com>
6231
6232         * utils.h (make_cleanup_free_so): Remove.
6233         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6234         * solist.h (struct so_deleter): New.
6235         (so_list_up): New typedef.
6236         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6237
6238 2017-08-03  Tom Tromey  <tom@tromey.com>
6239
6240         * utils.h (make_cleanup_restore_current_language): Remove.
6241         * utils.c (do_restore_current_language)
6242         (make_cleanup_restore_current_language): Remove.
6243         * parse.c (parse_exp_in_context_1)
6244         (parse_expression_with_language): Use
6245         scoped_restore_current_language.
6246         * mi/mi-main.c (mi_cmd_execute): Use
6247         scoped_restore_current_language.
6248         * language.h (scoped_restore_current_language): New class.
6249
6250 2017-08-03  Tom Tromey  <tom@tromey.com>
6251
6252         * compile/compile.c (cleanup_unlink_file): Remove.
6253         (compile_to_object): Use gdb::unlinker.
6254         (eval_compile_command): Likewise.
6255
6256 2017-08-03  Tom Tromey  <tom@tromey.com>
6257
6258         * utils.h (make_cleanup_fclose): Remove.
6259         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6260
6261 2017-08-03  Tom Tromey  <tom@tromey.com>
6262
6263         * top.c (open_terminal_stream): Return gdb_file_up.
6264         (new_ui_command): Update.
6265
6266 2017-08-03  Tom Tromey  <tom@tromey.com>
6267
6268         * source.c (print_source_lines_base, forward_search_command)
6269         (reverse_search_command): Use gdb_file_up.
6270
6271 2017-08-03  Tom Tromey  <tom@tromey.com>
6272
6273         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6274
6275 2017-08-03  Tom Tromey  <tom@tromey.com>
6276
6277         * cli/cli-cmds.c (find_and_open_script): Change return type.
6278         Remove "streamp" and "full_path" parameters.
6279         (source_script_with_search): Update.
6280         * auto-load.c (source_script_file): Update.
6281         * cli/cli-cmds.h (find_and_open_script): Change type.
6282         (open_script): New struct.
6283
6284 2017-08-03  Tom Tromey  <tom@tromey.com>
6285
6286         * xml-support.c (xml_fetch_content_from_file): Update.
6287         * ui-file.c (stdio_file::open): Update.
6288         * tracefile-tfile.c (tfile_start): Update.
6289         * remote.c (remote_file_put, remote_file_get): Update.
6290         * nat/linux-procfs.c (linux_proc_get_int)
6291         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6292         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6293         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6294         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6295         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6296         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6297         * linux-nat.c (linux_proc_pending_signals): Update.
6298         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6299         (file_closer): Remove.
6300         * compile/compile.c (compile_to_object): Update.
6301         * common/filestuff.h (struct gdb_file_deleter): New.
6302         (gdb_file_up): New typedef.
6303         (gdb_fopen_cloexec): Change return type.
6304         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6305         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6306         (dump_binary_file, restore_binary_file): Update.
6307         * auto-load.c (auto_load_objfile_script_1): Update.
6308
6309 2017-08-03  Tom Tromey  <tom@tromey.com>
6310
6311         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6312         (info_static_tracepoint_markers_command): Likewise.
6313         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6314         * skip.c (skip_info): Use ui_out_emit_table.
6315         * progspace.c (print_program_space): Use ui_out_emit_table.
6316         * osdata.c (info_osdata): Use ui_out_emit_table.
6317         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6318         ui_out_emit_table.
6319         * linux-thread-db.c (info_auto_load_libthread_db): Use
6320         ui_out_emit_table.
6321         * inferior.c (print_inferior): Use ui_out_emit_table.
6322         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6323         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6324         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6325         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6326         * ui-out.h (class ui_out_emit_table): New.
6327
6328 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6329
6330         * mips-tdep.c (mips_fpu_type_str): New function.
6331         (mips_dump_tdep): Call it.
6332
6333 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6334
6335         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6336         `->mips_fpu_type'.
6337
6338 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6339
6340         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6341
6342 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6343
6344         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6345
6346 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6347
6348         * cli/cli-cmds.c (maintenancechecklist): New variable.
6349         * gdbcmd.h (maintenancechecklist): Declare it.
6350         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6351         Call i386_linux_read_description with different masks.
6352         * maint.c (maintenance_check_command): New function.
6353         (_initialize_maint_cmds): Call add_prefix_cmd.
6354         * target-descriptions.c (tdesc_reg): override operator != and ==.
6355         (tdesc_type): Likewise.
6356         (tdesc_feature): Likewise.
6357         (target_desc): Likewise.
6358         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6359         (maintenance_check_xml_descriptions): New function.
6360         (_initialize_target_descriptions) Add command "xml-descriptions".
6361         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6362
6363 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6364
6365         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6366         Include features/i386/32bit-*.c.
6367         (i386_linux_read_description): Generate target description if it
6368         doesn't exist.
6369         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6370         functions.
6371         * features/i386/32bit-linux.c: Re-generated.
6372         * features/i386/32bit-sse.c: Likewise.
6373         * target-descriptions.c (print_c_feature::visit): Print code to
6374         set register number if needed.
6375         (print_c_feature) <m_next_regnum>: New field.
6376
6377 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6378
6379         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6380         (FEATURE_XMLFILES): New.
6381         (FEATURE_CFILES): New.
6382         New rules.
6383         (clean-cfiles): Remove generated c files.
6384         * features/i386/32bit-avx.c: Generated.
6385         * features/i386/32bit-avx512.c: Generated.
6386         * features/i386/32bit-core.c: Generated.
6387         * features/i386/32bit-linux.c: Generated.
6388         * features/i386/32bit-mpx.c: Generated.
6389         * features/i386/32bit-pkeys.c: Generated.
6390         * features/i386/32bit-sse.c: Generated.
6391         * target-descriptions.c: Include algorithm.
6392         (tdesc_element_visitor): Add method visit_end.
6393         (print_c_tdesc): Implement visit_end.
6394         (print_c_tdesc:: m_filename_after_features): Move it to
6395         protected.
6396         (print_c_feature): New class.
6397         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6398         name starts with "i386/32bit-".
6399
6400 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6401
6402         * target-descriptions.c (tdesc_element_visitor): New class.
6403         (tdesc_element): New class.
6404         (tdesc_reg): Inherit from tdesc_element.
6405         (tdesc_reg::accept): New function.
6406         (tdesc_type): Inherit from tdesc_element.
6407         (tdesc_type::accept): New function.
6408         (tdesc_feature): Inherit from tdesc_element.
6409         (tdesc_feature::accept): New function.
6410         (target_desc): Inherit from tdesc_element.
6411         (target_desc::target_desc): New.
6412         (target_desc::~target_desc): New.
6413         (target_desc::accept): New.
6414         (allocate_target_description): Use new.
6415         (free_target_description): Use delete.
6416         (print_c_tdesc): New class.
6417         (maint_print_c_tdesc_cmd): Adjust.
6418
6419         * features/aarch64.c: Re-generated.
6420         * features/arc-arcompact.c: Re-generated.
6421         * features/arc-v2.c: Re-generated.
6422         * features/arm/arm-with-iwmmxt.c: Re-generated.
6423         * features/arm/arm-with-m.c: Re-generated.
6424         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6425         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6426         * features/arm/arm-with-neon.c: Re-generated.
6427         * features/arm/arm-with-vfpv2.c: Re-generated.
6428         * features/arm/arm-with-vfpv3.c: Re-generated.
6429         * features/i386/amd64-avx-avx512.c: Re-generated.
6430         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6431         * features/i386/amd64-avx.c: Re-generated.
6432         * features/i386/amd64-avx-linux.c: Re-generated.
6433         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6434         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6435         * features/i386/amd64-avx-mpx.c: Re-generated.
6436         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6437         * features/i386/amd64.c: Re-generated.
6438         * features/i386/amd64-linux.c: Re-generated.
6439         * features/i386/amd64-mpx.c: Re-generated.
6440         * features/i386/amd64-mpx-linux.c: Re-generated.
6441         * features/i386/i386-avx-avx512.c: Re-generated.
6442         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6443         * features/i386/i386-avx.c: Re-generated.
6444         * features/i386/i386-avx-linux.c: Re-generated.
6445         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6446         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6447         * features/i386/i386-avx-mpx.c: Re-generated.
6448         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6449         * features/i386/i386.c: Re-generated.
6450         * features/i386/i386-linux.c: Re-generated.
6451         * features/i386/i386-mmx.c: Re-generated.
6452         * features/i386/i386-mmx-linux.c: Re-generated.
6453         * features/i386/i386-mpx.c: Re-generated.
6454         * features/i386/i386-mpx-linux.c: Re-generated.
6455         * features/i386/x32-avx-avx512.c: Re-generated.
6456         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6457         * features/i386/x32-avx.c: Re-generated.
6458         * features/i386/x32-avx-linux.c: Re-generated.
6459         * features/i386/x32.c: Re-generated.
6460         * features/i386/x32-linux.c: Re-generated.
6461         * features/microblaze.c: Re-generated.
6462         * features/microblaze-with-stack-protect.c: Re-generated.
6463         * features/mips64-dsp-linux.c: Re-generated.
6464         * features/mips64-linux.c: Re-generated.
6465         * features/mips-dsp-linux.c: Re-generated.
6466         * features/mips-linux.c: Re-generated.
6467         * features/nds32.c: Re-generated.
6468         * features/nios2.c: Re-generated.
6469         * features/nios2-linux.c: Re-generated.
6470         * features/rs6000/powerpc-32.c: Re-generated.
6471         * features/rs6000/powerpc-32l.c: Re-generated.
6472         * features/rs6000/powerpc-403.c: Re-generated.
6473         * features/rs6000/powerpc-403gc.c : Re-generated.
6474         * features/rs6000/powerpc-405.c: Re-generated.
6475         * features/rs6000/powerpc-505.c: Re-generated.
6476         * features/rs6000/powerpc-601.c: Re-generated.
6477         * features/rs6000/powerpc-602.c: Re-generated.
6478         * features/rs6000/powerpc-603.c: Re-generated.
6479         * features/rs6000/powerpc-604.c: Re-generated.
6480         * features/rs6000/powerpc-64.c: Re-generated.
6481         * features/rs6000/powerpc-64l.c: Re-generated.
6482         * features/rs6000/powerpc-7400.c: Re-generated.
6483         * features/rs6000/powerpc-750.c: Re-generated.
6484         * features/rs6000/powerpc-860.c: Re-generated.
6485         * features/rs6000/powerpc-altivec32.c: Re-generated.
6486         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6487         * features/rs6000/powerpc-altivec64.c: Re-generated.
6488         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6489         * features/rs6000/powerpc-cell32l.c: Re-generated.
6490         * features/rs6000/powerpc-cell64l.c: Re-generated.
6491         * features/rs6000/powerpc-e500.c: Re-generated.
6492         * features/rs6000/powerpc-e500l.c: Re-generated.
6493         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6494         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6495         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6496         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6497         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6498         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6499         * features/rs6000/powerpc-vsx32.c: Re-generated.
6500         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6501         * features/rs6000/powerpc-vsx64.c: Re-generated.
6502         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6503         * features/rs6000/rs6000.c: Re-generated.
6504         * features/s390-linux32.c: Re-generated.
6505         * features/s390-linux32v1.c: Re-generated.
6506         * features/s390-linux32v2.c: Re-generated.
6507         * features/s390-linux64.c: Re-generated.
6508         * features/s390-linux64v1.c: Re-generated.
6509         * features/s390-linux64v2.c: Re-generated.
6510         * features/s390-te-linux64.c: Re-generated.
6511         * features/s390-tevx-linux64.c: Re-generated.
6512         * features/s390-vx-linux64.c: Re-generated.
6513         * features/s390x-linux64.c: Re-generated.
6514         * features/s390x-linux64v1.c: Re-generated.
6515         * features/s390x-linux64v2.c: Re-generated.
6516         * features/s390x-te-linux64.c: Re-generated.
6517         * features/s390x-tevx-linux64.c: Re-generated.
6518         * features/s390x-vx-linux64.c: Re-generated.
6519         * features/sparc/sparc32-solaris.c: Re-generated.
6520         * features/sparc/sparc64-solaris.c: Re-generated.
6521         * features/tic6x-c62x.c: Re-generated.
6522         * features/tic6x-c62x-linux.c: Re-generated.
6523         * features/tic6x-c64x.c: Re-generated.
6524         * features/tic6x-c64x-linux.c: Re-generated.
6525         * features/tic6x-c64xp.c: Re-generated.
6526         * features/tic6x-c64xp-linux.c: Re-generated.
6527
6528 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6529
6530         * i386-linux-tdep.c (i386_linux_read_description): New function.
6531         (i386_linux_core_read_description): Call
6532         i386_linux_read_description.
6533         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6534         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6535         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6536         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6537         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6538         * x86-linux-nat.c (x86_linux_read_description): Call
6539         i386_linux_read_description.
6540
6541 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6542
6543         * NEWS: Mention it.
6544         * features/Makefile (%.c: %.xml): Pass the xml file name to
6545         command "maint print c-tdesc".
6546         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6547         name from 'arg'.
6548
6549 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6550
6551         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6552         in-class initialization.
6553         (tdesc_create_feature): Call new instead of XCNEW.
6554         (free_target_description): Ue delete.
6555
6556 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6557
6558         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6559
6560 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6561
6562         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6563         constant.
6564         (amd64_x32_init_abi): Likewise.
6565         * amd64-tdep.h (amd64_init_abi): Update declaration.
6566         (amd64_x32_init_abi): Likewise.
6567
6568 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6569
6570         PR tdep/21717
6571         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6572         condition for FPSCR.
6573         (arm_linux_store_inferior_registers): Likewise.
6574
6575 2017-07-22  Tom Tromey  <tom@tromey.com>
6576
6577         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6578         <syscalls_counts>: Now a std::vector.
6579         (get_catch_syscall_inferior_data): Use "new".
6580         (catch_syscall_inferior_data_cleanup): Use "delete".
6581         (insert_catch_syscall, remove_catch_syscall)
6582         (clear_syscall_counts): Update.
6583
6584 2017-07-22  Tom Tromey  <tom@tromey.com>
6585
6586         * break-catch-syscall.c (syscall_catchpoint)
6587         <syscalls_to_be_caught>: Now a std::vector<int>
6588         (~syscall_catchpoint): Remove.
6589         (insert_catch_syscall, remove_catch_syscall)
6590         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6591         (print_mention_catch_syscall, print_recreate_catch_syscall):
6592         Update.
6593         (create_syscall_event_catchpoint): Change type of "filter"
6594         parameter.
6595         (catch_syscall_split_args): Return a std::vector.
6596         (catch_syscall_command_1, catching_syscall_number_1): Update.
6597
6598 2017-07-22  Tom Tromey  <tom@tromey.com>
6599
6600         * break-catch-throw.c (struct exception_catchpoint)
6601         <exception_rx>: Now a std::string.
6602         (~exception_catchpoint): Remove.
6603         (print_one_detail_exception_catchpoint): Update.
6604         (handle_gnu_v3_exceptions): Change type of except_rx.
6605         (extract_exception_regexp): Return a std::string.
6606         (catch_exception_command_1): Update.
6607
6608 2017-07-22  Tom Tromey  <tom@tromey.com>
6609
6610         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6611         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6612         std::vector.
6613         <catch_all>: Now a bool.
6614         (~signal_catchpoint): Remove.
6615         (signal_catchpoint_insert_location)
6616         (signal_catchpoint_remove_location)
6617         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6618         (signal_catchpoint_print_mention)
6619         (signal_catchpoint_print_recreate)
6620         (signal_catchpoint_explains_signal): Update.
6621         (create_signal_catchpoint): Change type of "filter" and
6622         "catch_all".
6623         (catch_signal_split_args): Return a std::vector.  Change type of
6624         "catch_all".
6625         (catch_signal_command): Update.
6626
6627 2017-07-20  Pedro Alves  <palves@redhat.com>
6628
6629         * ada-lang.c (ada_language_defn): Make extern.
6630         (_initialize_ada_language): Remove add_language call.
6631         * c-lang.c (c_language_defn, cplus_language_defn)
6632         (asm_language_defn, minimal_language_defn): Make extern.
6633         (_initialize_c_language): Delete.
6634         * completer.c (compare_cstrings): Delete, moved to utils.h.
6635         * d-lang.c (d_language_defn): Make extern.
6636         (_initialize_d_language): Remove add_language calls.
6637         * defs.h (enum language): Add comment.
6638         * f-lang.c (f_language_defn): Make extern.
6639         (_initialize_f_language): Remove add_language call.
6640         * go-lang.c (go_language_defn): Make extern.
6641         (_initialize_go_language): Remove add_language call.
6642         * language.c: Include <algorithm>.
6643         (languages): Redefine as const array.
6644         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6645         (set_language_command): Handle "local".  Use for-range loop.
6646         (set_language): Remove loop.
6647         (language_enum): Rewrite.
6648         (language_def, language_str): Remove loops.
6649         (add_language): Delete.
6650         (add_set_language_command): New, based on add_languages.
6651         (skip_language_trampoline): Adjust.
6652         (local_language_defn): Delete.
6653         (language_gdbarch_post_init): Adjust.
6654         (_initialize_language): Remove add_language calls.  Call
6655         add_set_language_command.
6656         * language.h (add_language): Delete.
6657         (auto_language_defn)
6658         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6659         (asm_language_defn, c_language_defn, cplus_language_defn)
6660         (d_language_defn, f_language_defn, go_language_defn)
6661         (m2_language_defn, objc_language_defn, opencl_language_defn)
6662         (pascal_language_defn, rust_language_defn): Declare.
6663         * m2-lang.c (m2_language_defn): Make extern.
6664         (_initialize_m2_language): Remove add_language call.
6665         * objc-lang.c (objc_language_defn): Make extern.
6666         (_initialize_objc_language): Remove add_language call.
6667         * opencl-lang.c (opencl_language_defn): Make extern.
6668         (_initialize_opencl_language): Remove add_language call.
6669         * p-lang.c (pascal_language_defn): Make extern.
6670         (_initialize_pascal_language): Delete.
6671         * rust-lang.c (rust_language_defn): Make extern.
6672         (_initialize_rust_language): Delete.
6673         * utils.h (compare_cstrings): New static inline function.
6674
6675 2017-07-20  Pedro Alves  <palves@redhat.com>
6676
6677         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6678         (get_var_value): Constify parameters.
6679         (get_int_var_value): Change prototype.
6680         (to_fixed_range_type): Adjust.
6681         * ada-lang.h (get_int_var_value): Change prototype.
6682
6683 2017-07-20  Pedro Alves  <palves@redhat.com>
6684
6685         * dwarf2read.c (dw2_lookup_symbol): Use
6686         SYMBOL_MATCHES_SEARCH_NAME.
6687         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6688
6689 2017-07-20  Pedro Alves  <palves@redhat.com>
6690
6691         * block.c (block_iter_name_step, block_iter_name_first)
6692         (block_iter_name_next): Delete.
6693         (block_lookup_symbol_primary): Adjust to use
6694         dict_iter_match_first/dict_iter_match_next.
6695         * block.h (block_iter_name_first, block_iter_name_next): Delete
6696         declarations.
6697         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6698         dict_iter_match_first/dict_iter_match_next.
6699
6700 2017-07-20  Pedro Alves  <palves@redhat.com>
6701
6702         * cp-support.c (cp_find_first_component_aux): Add missing case for
6703         end of string.
6704
6705 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6706
6707         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6708         of dwo_cu's dwo_file.
6709
6710 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6711
6712         * remote.c (store_registers_using_G): Remove one line comment.
6713
6714 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6715
6716         * regcache.c (regcache_cpy): Simplify it.
6717         (regcache::cpy_no_passthrough): Remove it.
6718         * regcache.h (cpy_no_passthrough): Remove it.
6719         (regcache_dup, regcache_cpy): Update comments.
6720
6721 2017-07-18  Pedro Alves  <palves@redhat.com>
6722
6723         * remote-sim.c (sim_command_completer): Adjust to work with a
6724         completion_tracker instead of a VEC.
6725
6726 2017-07-17  Pedro Alves  <palves@redhat.com>
6727
6728         * completer.c (complete_source_filenames): New function.
6729         (complete_address_and_linespec_locations): New function.
6730         (location_completer): Use complete_address_and_linespec_locations.
6731         (completion_tracker::build_completion_result): Honor the tracker's
6732         request to suppress append.
6733         * completer.h (completion_tracker::suppress_append_ws)
6734         (completion_tracker::set_suppress_append_ws): New methods.
6735         (completion_tracker::m_suppress_append_ws): New field.
6736         (complete_source_filenames): New declaration.
6737         * linespec.c (linespec_complete_what): New.
6738         (struct ls_parser) <complete_what, completion_word,
6739         completion_quote_char, completion_quote_end, completion_tracker>:
6740         New fields.
6741         (string_find_incomplete_keyword_at_end): New.
6742         (linespec_lexer_lex_string): Record quote char.  If in completion
6743         mode, don't throw.
6744         (linespec_lexer_consume_token): Advance the completion word point.
6745         (linespec_lexer_peek_token): Save/restore completion info.
6746         (save_stream_and_consume_token): New.
6747         (set_completion_after_number): New.
6748         (linespec_parse_basic): Set what to complete next depending on
6749         token.  Handle function and label completions specially.
6750         (parse_linespec): Disable objc shortcut in completion mode.  Set
6751         what to complete next depending on token type.  Skip keyword if in
6752         completion mode.
6753         (complete_linespec_component, linespec_complete): New.
6754         * linespec.h (linespec_complete): Declare.
6755
6756 2017-07-17  Pedro Alves  <palves@redhat.com>
6757
6758         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6759         Handle 'operator<' / 'operator<<'.
6760
6761 2017-07-17  Pedro Alves  <palves@redhat.com>
6762
6763         * completer.c (collect_explicit_location_matches): Handle
6764         MATCH_LABEL.
6765         (convert_explicit_location_to_linespec): New, factored out from
6766         ...
6767         (convert_explicit_location_to_sals): ... this.
6768         (complete_label): New.
6769         (linespec_complete_label, find_label_symbols_in_block): New.
6770         (find_label_symbols): Add completion_mode parameter and adjust to
6771         call find_label_symbols_in_block.
6772         * linespec.h (linespec_complete_label): Declare.
6773
6774 2017-07-17  Pedro Alves  <palves@redhat.com>
6775
6776         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6777         complete_symbol_mode parameter.
6778         * cli/cli-cmds.c (complete_command): Get the completion result out
6779         of the handle_brkchars tracker if used a custom word point.
6780         * completer.c: Include "linespec.h".
6781         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6782         (advance_to_expression_complete_word_point): New.
6783         (completion_tracker::completes_to_completion_word): New.
6784         (complete_files_symbols): Pass down
6785         complete_symbol_mode::EXPRESSION.
6786         (explicit_options, probe_options): New.
6787         (collect_explicit_location_matches): Complete on the
6788         explictit_loc->foo instead of word.  Use
6789         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6790         keyword and options completions.
6791         (backup_text_ptr): Delete.
6792         (skip_keyword): New.
6793         (complete_explicit_location): Remove 'word' parameter.  Add
6794         language, quoted_arg_start and quoted_arg_end parameters.
6795         Rewrite, parsing left to right.
6796         (location_completer): Rewrite.
6797         (location_completer_handle_brkchars): New function.
6798         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6799         (enum complete_line_internal_reason): Adjust comments.
6800         (completion_tracker::discard_completions): New.
6801         (completer_handle_brkchars_func_for_completer): Handle
6802         location_completer.
6803         (gdb_custom_word_point_brkchars)
6804         (gdb_org_rl_basic_quote_characters): New.
6805         (gdb_completion_word_break_characters_throw)
6806         (completion_find_completion_word): Handle trackers that use a
6807         custom word point.
6808         (completion_tracker::advance_custom_word_point_by): New.
6809         (completion_tracker::build_completion_result): Don't rely on
6810         readline appending the quote char.
6811         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6812         use a custom word point.
6813         (gdb_rl_attempted_completion_function): Restore
6814         rl_basic_quote_characters.
6815         * completer.h (class completion_tracker): Extend intro comment.
6816         (completion_tracker::set_quote_char)
6817         (completion_tracker::quote_char)
6818         (completion_tracker::set_use_custom_word_point)
6819         (completion_tracker::use_custom_word_point)
6820         (completion_tracker::custom_word_point)
6821         (completion_tracker::set_custom_word_point)
6822         (completion_tracker::advance_custom_word_point_by)
6823         (completion_tracker::completes_to_completion_word)
6824         (completion_tracker::discard_completions): New methods.
6825         (completion_tracker::m_quote_char)
6826         (completion_tracker::m_use_custom_word_point)
6827         (completion_tracker::m_custom_word_point): New fields.
6828         (advance_to_expression_complete_word_point): Declare.
6829         * f-lang.c (f_collect_symbol_completion_matches): Add
6830         complete_symbol_mode parameter.
6831         * language.h (struct language_defn)
6832         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6833         parameter.
6834         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6835         (linespec_complete_function): New function.
6836         (linespec_lexer_lex_keyword): Adjust.
6837         * linespec.h (linespec_keywords, linespec_complete_function): New
6838         declarations.
6839         * location.c (find_end_quote): New function.
6840         (explicit_location_lex_one): Add explicit_completion_info
6841         parameter.  Save quoting info.  Don't throw if being called for
6842         completion.  Don't handle Ada operators here.
6843         (is_cp_operator, skip_op_false_positives, first_of)
6844         (explicit_location_lex_one_function): New function.
6845         (string_to_explicit_location): Replace 'dont_throw' parameter with
6846         an explicit_completion_info pointer parameter.  Handle it.  Don't
6847         use explicit_location_lex_one to lex function names.  Use
6848         explicit_location_lex_one_function instead.
6849         * location.h (struct explicit_completion_info): New.
6850         (string_to_explicit_location): Replace 'dont_throw' parameter with
6851         an explicit_completion_info pointer parameter.
6852         * symtab.c (default_collect_symbol_completion_matches_break_on):
6853         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6854         (default_collect_symbol_completion_matches)
6855         (collect_symbol_completion_matches): Add complete_symbol_mode
6856         parameter.
6857         (collect_symbol_completion_matches_type): Pass down
6858         complete_symbol_mode::EXPRESSION.
6859         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6860         parameter.  Handle LINESPEC mode.
6861         * symtab.h (complete_symbol_mode): New.
6862         (default_collect_symbol_completion_matches_break_on)
6863         (default_collect_symbol_completion_matches)
6864         (collect_symbol_completion_matches)
6865         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6866         parameter.
6867
6868 2017-07-17  Pedro Alves  <palves@redhat.com>
6869
6870         * utils.c (enum class strncmp_iw_mode): New.
6871         (strcmp_iw): Rename to ...
6872         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6873         parameters.  Handle them.
6874         (strncmp_iw): New.
6875         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6876         * utils.h (strncmp_iw): Declare.
6877         (strcmp_iw): Move describing comments here.
6878
6879 2017-07-17  Pedro Alves  <palves@redhat.com>
6880
6881         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6882         CP_OPERATOR_STR.
6883         * c-typeprint.c (is_type_conversion_operator): Use
6884         CP_OPERATOR_STR.
6885         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6886         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6887         CP_OPERATOR_LEN.
6888         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6889         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6890         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6891         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6892         CP_OPERATOR_STR.
6893         * location.c: Include "cp-support.h".
6894         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6895         CP_OPERATOR_STR.
6896         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6897         CP_OPERATOR_LEN.
6898
6899 2017-07-17  Pedro Alves  <palves@redhat.com>
6900
6901         * cli/cli-cmds.c (complete_command): Use a completion tracker
6902         along with completion_find_completion_word for handle_brkchars
6903         phase.
6904         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6905         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6906         (struct gdb_rl_completion_word_info): New.
6907         (gdb_rl_find_completion_word): New.
6908         (completion_find_completion_word): New.
6909         * completer.h (completion_find_completion_word): Declare.
6910
6911 2017-07-17  Pedro Alves  <palves@redhat.com>
6912
6913         * ada-lang.c (symbol_completion_match): Adjust comments.
6914         (symbol_completion_add): Replace vector parameter with
6915         completion_tracker parameter.  Use it.
6916         (ada_make_symbol_completion_list): Rename to...
6917         (ada_collect_symbol_completion_matches): ... this.  Add
6918         completion_tracker parameter and use it.
6919         (ada_language_defn): Adjust.
6920         * break-catch-syscall.c (catch_syscall_completer): Adjust
6921         prototype and work with completion_tracker instead of VEC.
6922         * breakpoint.c (condition_completer): Adjust prototype and work
6923         with completion_tracker instead of VEC.
6924         * c-lang.c (c_language_defn, cplus_language_defn)
6925         (asm_language_defn, minimal_language_defn): Adjust to renames.
6926         * cli/cli-cmds.c (complete_command): Rework using
6927         completion_tracker.  Catch exceptions when completing.
6928         * cli/cli-decode.c (integer_unlimited_completer)
6929         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6930         with completion_tracker instead of VEC.
6931         * command.h (struct completion_tracker): Forward declare.
6932         (completer_ftype, completer_handle_brkchars_ftype): Change
6933         types.
6934         (complete_on_cmdlist, complete_on_enum): Adjust.
6935         * completer.c: Include <algorithm>.
6936         (struct gdb_completer_state): New.
6937         (current_completion): New global.
6938         (readline_line_completion_function): Delete.
6939         (noop_completer, filename_completer)
6940         (filename_completer_handle_brkchars, complete_files_symbols)
6941         (linespec_location_completer): Adjust to work with a
6942         completion_tracker instead of a VEC.
6943         (string_or_empty): New.
6944         (collect_explicit_location_matches): Adjust to work with a
6945         completion_tracker instead of a VEC.
6946         (explicit_location_completer): Rename to ...
6947         (complete_explicit_location): ... this and adjust to work with a
6948         completion_tracker instead of a VEC.
6949         (location_completer): Adjust to work with a completion_tracker
6950         instead of a VEC.
6951         (add_struct_fields): Adjust to work with a completion_list instead
6952         of VEC.
6953         (expression_completer): Rename to ...
6954         (complete_expression): ... this and adjust to work with a
6955         completion_tracker instead of a VEC.  Use complete_files_symbols.
6956         (expression_completer): Reimplement on top of complete_expression.
6957         (symbol_completer): Adjust to work with a completion_tracker
6958         instead of a VEC.
6959         (enum complete_line_internal_reason): Add describing comments.
6960         (complete_line_internal_normal_command): Adjust to work with a
6961         completion_tracker instead of a VEC.
6962         (complete_line_internal): Rename to ...
6963         (complete_line_internal_1): ... this and adjust to work with a
6964         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6965         handle_brkchars phase.
6966         (new_completion_tracker): Delete.
6967         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6968         complete_line_internal_1.
6969         (free_completion_tracker): Delete.
6970         (INITIAL_COMPLETION_HTAB_SIZE): New.
6971         (completion_tracker::completion_tracker)
6972         (completion_tracker::~completion_tracker): New.
6973         (maybe_add_completion): Delete.
6974         (completion_tracker::maybe_add_completion)
6975         (completion_tracker::add_completion)
6976         (completion_tracker::add_completions): New.
6977         (throw_max_completions_reached_error): Delete.
6978         (complete_line): Adjust to work with a completion_tracker instead
6979         of a VEC.  Don't create a completion_tracker_t or check for max
6980         completions here.
6981         (command_completer, command_completer_handle_brkchars)
6982         (signal_completer, reg_or_group_completer_1)
6983         (reg_or_group_completer, default_completer_handle_brkchars):
6984         Adjust to work with a completion_tracker.
6985         (gdb_completion_word_break_characters_throw): New.
6986         (gdb_completion_word_break_characters): Reimplement.
6987         (line_completion_function): Delete.
6988         (completion_tracker::recompute_lowest_common_denominator)
6989         (expand_preserving_ws)
6990         (completion_tracker::build_completion_result)
6991         (completion_result::completion_result)
6992         (completion_result::completion_result)
6993         (completion_result::~completion_result)
6994         (completion_result::completion_result)
6995         (completion_result::release_match_list, compare_cstrings)
6996         (completion_result::sort_match_list)
6997         (completion_result::reset_match_list)
6998         (gdb_rl_attempted_completion_function_throw)
6999         (gdb_rl_attempted_completion_function): New.
7000         * completer.h (completion_list, struct completion_result)
7001         (class completion_tracker): New.
7002         (complete_line): Add completion_tracker parameter.
7003         (readline_line_completion_function): Delete.
7004         (gdb_rl_attempted_completion_function): New.
7005         (noop_completer, filename_completer, expression_completer)
7006         (location_completer, symbol_completer, command_completer)
7007         (signal_completer, reg_or_group_completer): Update prototypes.
7008         (completion_tracker_t, new_completion_tracker)
7009         (make_cleanup_free_completion_tracker): Delete.
7010         (enum maybe_add_completion_enum): Delete.
7011         (maybe_add_completion): Delete.
7012         (throw_max_completions_reached_error): Delete.
7013         * corefile.c (complete_set_gnutarget): Adjust to work with a
7014         completion_tracker instead of a VEC.
7015         * cp-abi.c (cp_abi_completer): Adjust to work with a
7016         completion_tracker instead of a VEC.
7017         * d-lang.c (d_language_defn): Adjust.
7018         * disasm.c (disassembler_options_completer): Adjust to work with a
7019         completion_tracker instead of a VEC.
7020         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7021         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7022         with a completion_tracker instead of a VEC.
7023         (f_language_defn): Adjust.
7024         * go-lang.c (go_language_defn): Adjust.
7025         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7026         Adjust to work with a completion_tracker instead of a VEC.
7027         * infrun.c (handle_completer): Likewise.
7028         * interps.c (interpreter_completer): Likewise.
7029         * interps.h (interpreter_completer): Likewise.
7030         * language.c (unknown_language_defn, auto_language_defn)
7031         (local_language_defn): Adjust.
7032         * language.h (language_defn::la_make_symbol_completion_list):
7033         Rename to ...
7034         (language_defn::la_collect_symbol_completion_matches): ... this
7035         and adjust to work with a completion_tracker instead of a VEC.
7036         * m2-lang.c (m2_language_defn): Adjust.
7037         * objc-lang.c (objc_language_defn): Adjust.
7038         * opencl-lang.c (opencl_language_defn): Adjust.
7039         * p-lang.c (pascal_language_defn): Adjust.
7040         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7041         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7042         with a completion_tracker.
7043         * rust-lang.c (rust_language_defn): Adjust.
7044         * symtab.c (free_completion_list, do_free_completion_list)
7045         (return_val, completion_tracker): Delete.
7046         (completion_list_add_name, completion_list_add_symbol)
7047         (completion_list_add_msymbol, completion_list_objc_symbol)
7048         (completion_list_add_fields, add_symtab_completions): Add
7049         completion_tracker parameter and use it.
7050         (default_make_symbol_completion_list_break_on_1): Rename to...
7051         (default_collect_symbol_completion_matches_break_on): ... this.
7052         Add completion_tracker parameter and use it instead of allocating
7053         a completion tracker here.
7054         (default_make_symbol_completion_list_break_on): Delete old
7055         implementation.
7056         (default_make_symbol_completion_list): Delete.
7057         (default_collect_symbol_completion_matches): New.
7058         (make_symbol_completion_list): Delete.
7059         (collect_symbol_completion_matches): New.
7060         (make_symbol_completion_type): Rename to ...
7061         (collect_symbol_completion_matches_type): ... this.  Add
7062         completion_tracker parameter and use it instead of VEC.
7063         (make_file_symbol_completion_list_1): Rename to...
7064         (collect_file_symbol_completion_matches): ... this.  Add
7065         completion_tracker parameter and use it instead of VEC.
7066         (make_file_symbol_completion_list): Delete.
7067         (add_filename_to_list): Use completion_list instead of a VEC.
7068         (add_partial_filename_data::list): Now a completion_list.
7069         (make_source_files_completion_list): Work with a completion_list
7070         instead of a VEC.
7071         * symtab.h: Include "completer.h".
7072         (default_make_symbol_completion_list_break_on)
7073         (default_make_symbol_completion_list, make_symbol_completion_list)
7074         (make_symbol_completion_type, make_file_symbol_completion_list)
7075         (make_source_files_completion_list): Delete.
7076         (default_collect_symbol_completion_matches_break_on)
7077         (default_collect_symbol_completion_matches)
7078         (collect_symbol_completion_matches)
7079         (collect_symbol_completion_matches_type)
7080         (collect_file_symbol_completion_matches)
7081         (make_source_files_completion_list): New.
7082         * top.c (init_main): Don't install a rl_completion_entry_function
7083         hook.  Install a rl_attempted_completion_function hook instead.
7084         * tui/tui-layout.c (layout_completer): Adjust to work with a
7085         completion_tracker.
7086         * tui/tui-regs.c (tui_reggroup_completer):
7087         * tui/tui-win.c (window_name_completer, focus_completer)
7088         (winheight_completer): Adjust to work with a completion_tracker.
7089         * value.c: Include "completer.h".
7090         (complete_internalvar): Adjust to work with a completion_tracker.
7091         * value.h (complete_internalvar): Likewise.
7092
7093 2017-07-17  Pedro Alves  <palves@redhat.com>
7094
7095         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7096         renames.
7097         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7098         comments to completer_ftype's declaration.
7099         <completer_handle_brkchars>: Change type to
7100         completer_handle_brkchars_ftype.
7101         * command.h (completer_ftype): Add describing comment and give
7102         names to parameters.
7103         (completer_ftype_void): Rename to ...
7104         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7105         (set_cmd_completer_handle_brkchars): Adjust.
7106         * completer.c (filename_completer_handle_brkchars): New function.
7107         (complete_line_internal_normal_command): New function, factored
7108         out from ...
7109         (complete_line_internal): ... here.
7110         (command_completer_handle_brkchars)
7111         (default_completer_handle_brkchars)
7112         (completer_handle_brkchars_func_for_completer): New functions.
7113         * completer.h (set_gdb_completion_word_break_characters): Delete
7114         declaration.
7115         (completer_handle_brkchars_func_for_completer): New declaration.
7116         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7117         completer_handle_brkchars_func_for_completer.
7118
7119 2017-07-17  Pedro Alves  <palves@redhat.com>
7120
7121         * completer.c (symbol_completer): New function, based on
7122         make_symbol_completion_list_fn.
7123         * completer.h (symbol_completer): New declaration.
7124         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7125         * python/py-cmd.c (completers): Adjust.
7126         * symtab.c (make_symbol_completion_list_fn): Delete.
7127         * symtab.h (make_symbol_completion_list_fn): Delete.
7128         * cli/cli-decode.c (add_cmd): Adjust.
7129
7130 2017-07-17  Pedro Alves  <palves@redhat.com>
7131
7132         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7133         * dwarf2read.c: Include "filename-seen-cache.h".
7134         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7135         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7136         * filename-seen-cache.c: New file.
7137         * filename-seen-cache.h: New file.
7138         * symtab.c: Include "filename-seen-cache.h".
7139         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7140         (create_filename_seen_cache, clear_filename_seen_cache)
7141         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7142         to filename-seen-cache.h/filename-seen-cache.c.
7143         (output_source_filename, sources_info)
7144         (maybe_add_partial_symtab_filename)
7145         (make_source_files_completion_list): Adjust to use
7146         filename_seen_cache.
7147
7148 2017-07-17  Pedro Alves  <palves@redhat.com>
7149
7150         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7151         fields.
7152         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7153         dwarf2_debug_sections*)): New.
7154         (dwarf2_per_objfile::dwarf2_per_objfile(const
7155         dwarf2_per_objfile&)): Declare as deleted.
7156         (dwarf2_per_objfile::operator=): Declare as deleted.
7157         (dwarf2_per_objfile::dwarf2_per_objfile)
7158         (dwarf2_per_objfile::~dwarf2_per_objfile)
7159         (dwarf2_per_objfile::free_cached_comp_units): New.
7160         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7161         ctor.  Call dwarf2_per_objfile's ctor manually.
7162         (dwarf2_locate_sections): Deleted/refactored as ...
7163         (dwarf2_per_objfile::locate_sections): ... this new method.
7164         (free_cached_comp_units): Defer to
7165         dwarf2_per_objfile::free_cached_comp_units.
7166         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7167
7168 2017-07-14  Tom Tromey  <tom@tromey.com>
7169
7170         PR rust/21764:
7171         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7172         parameter.
7173         <UNOP_SIZEOF>: Split into separate case.
7174         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7175
7176 2017-07-14  Tom Tromey  <tom@tromey.com>
7177
7178         PR rust/21763:
7179         * symtab.c (symbol_matches_domain): Add language_rust to special
7180         case.
7181         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7182         treat LOC_TYPEDEF symbols as variables.
7183
7184 2017-07-14  Pedro Alves  <palves@redhat.com>
7185
7186         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7187         symtabs matching all symtabs with SRCFILE as file name instead of
7188         only considering the first hit, with lookup_symtab.
7189
7190 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7191
7192         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7193         operator_name parameters.
7194         (gen_expr): Update function call.
7195
7196 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7197
7198         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7199         parameter.
7200         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7201         Likewise.
7202         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7203         parameter, use agent_expr::gdbarch instead, update function
7204         calls.
7205         (locexpr_tracepoint_var_ref): Likewise.
7206         (loclist_tracepoint_var_ref): Likewise.
7207         * ax-gdb.c (gen_trace_static_fields): Likewise.
7208         (gen_traced_pop): Likewise.
7209         (gen_frame_args_address): Likewise.
7210         (gen_frame_locals_address): Likewise.
7211         (gen_var_ref): Likewise.
7212         (gen_struct_ref_recursive): Likewise.
7213         (gen_static_field): Likewise.
7214         (gen_maybe_namespace_elt): Likewise.
7215         (gen_expr): Likewise.
7216         (gen_trace_for_var): Likewise.
7217         (gen_trace_for_expr): Likewise.
7218         (gen_trace_for_return_address): Likewise.
7219
7220 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7221
7222         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7223         parameter.
7224         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7225
7226 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7227
7228         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7229         from ax, update calls.
7230         (gen_usual_arithmetic): Likewise.
7231         (gen_integral_promotions): Likewise.
7232         (gen_bitfield_ref): Likewise.
7233         (gen_primitive_field): Likewise.
7234         (gen_struct_ref_recursive): Likewise.
7235         (gen_struct_ref): Likewise.
7236         (gen_maybe_namespace_elt): Likewise.
7237         (gen_struct_elt_for_reference): Likewise.
7238         (gen_namespace_elt): Likewise.
7239         (gen_aggregate_elt_ref): Likewise.
7240         (gen_expr): Get gdbarch from ax, update calls.
7241         (gen_expr_binop_rest): Likewise.
7242
7243 2017-07-13  Pedro Alves  <palves@redhat.com>
7244
7245         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7246         as default tdesc.
7247         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7248         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7249         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7250         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7251         tdep.
7252         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7253         Get final tdesc from the tdep.
7254         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7255         default tdesc.
7256         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7257         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7258         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7259         Use it as default tdesc.
7260         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7261         down to amd_init_abi.  No longer handle fallback tdesc here.
7262         * amd64-tdep.h (tdesc_x32): Declare.
7263         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7264         parameter.
7265         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7266         as default tdesc.
7267
7268 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7269
7270         * s390-linux-tdep.c (s390_process_record): Add support for
7271         instructions new in arch12.
7272
7273 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7274
7275         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7276         PT_GETFSBASE and PT_GETGSBASE.
7277         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7278         PT_SETGSBASE.
7279
7280 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7281
7282         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7283         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7284         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7285         those rules.
7286         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7287         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7288         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7289         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7290         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7291         * features/i386/amd64.xml: Add 64bit-segments.xml.
7292         * features/i386/amd64-avx-avx512.c: Regenerated.
7293         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7294         * features/i386/amd64-avx-mpx.c: Regenerated.
7295         * features/i386/amd64-avx.c: Regenerated.
7296         * features/i386/amd64-mpx.c: Regenerated.
7297         * features/i386/amd64.c: Regenerated.
7298         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7299         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7300         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7301         * regformats/i386/amd64-avx.dat: Regenerated.
7302         * regformats/i386/amd64-mpx.dat: Regenerated.
7303         * regformats/i386/amd64.dat: Regenerated.
7304
7305 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7306
7307         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7308         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7309
7310 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7311
7312         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7313         unsetenv.
7314         * gnulib/aclocal.m4: Regenerate.
7315         * gnulib/config.in: Regenerate.
7316         * gnulib/configure: Regenerate.
7317         * gnulib/import/Makefile.am: Regenerate.
7318         * gnulib/import/Makefile.in: Regenerate.
7319         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7320         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7321         * gnulib/import/m4/environ.m4: New file.
7322         * gnulib/import/m4/setenv.m4: New file.
7323         * gnulib/import/setenv.c: New file.
7324         * gnulib/import/unsetenv.c: New file.
7325
7326 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7327
7328         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7329         address when op is DW_OP_addr.
7330
7331 2017-07-09  Tom Tromey  <tom@tromey.com>
7332
7333         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7334         check and apply to outer type.
7335
7336 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7337
7338         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7339         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7340         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7341         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7342
7343 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7344
7345         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7346
7347 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7348
7349         * corelow.c (get_core_siginfo): Remove.
7350         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7351         instead of get_core_siginfo.
7352         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7353         * gdbarch.h: Re-generate.
7354         * gdbarch.c: Re-generate.
7355         * linux-tdep.c (linux_core_xfer_siginfo): New.
7356         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7357
7358 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7359
7360         * corelow.c (thread_section_name): Move to ...
7361         * gdbcore.h (thread_section_name): ... here.
7362
7363 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7364
7365         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7366         (struct siginfo32): New.
7367         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7368         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7369         via ptrace(PT_LWPINFO).
7370
7371 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7372
7373         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7374         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7375         (fbsd_get_siginfo_type): New.
7376         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7377         (_initialize_fbsd_tdep): New.
7378
7379 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7380
7381         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7382         a singular dwo_unit*) to support multiple CUs in the same way that
7383         multiple TUs are supported.
7384         (create_cus_hash_table): Replace create_dwo_cu with a function for
7385         parsing multiple CUs from a DWO file.
7386         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7387         create_dwo_cu.
7388         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7389         htab_find, rather than comparing the signature to a singleton CU in
7390         the dwo_file.
7391
7392 2017-07-06  Pedro Alves  <palves@redhat.com>
7393
7394         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7395
7396 2017-07-04  Pedro Alves  <palves@redhat.com>
7397
7398         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7399         * gdbtypes.h (TYPE_STATIC): Delete.
7400         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7401         is_synchronized, is_native>: Delete.
7402         <dummy>: Bump.
7403         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7404         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7405         (TYPE_FN_FIELD_ABSTRACT): Delete.
7406
7407 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7408
7409         * buffer.h (buffer_finish): Fix spelling mistakes.
7410
7411 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7412
7413         * .dir-locals.el: Automatically switch to C-style comments in
7414         versions of Emacs that support the feature.
7415
7416 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7417             Pedro Alves  <palves@redhat.com>
7418
7419         PR cli/21688
7420         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7421         (process_next_line): New variable 'inline_cmd'.
7422         Adjust 'if' clauses for "python", "compile" and "guile" to use
7423         'command_name_equals' and check for '!inline_cmd'.
7424
7425 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7426
7427         PR cli/21688
7428         * cli/cli-script.c (command_name_equals_not_inline): New function.
7429         (process_next_line): Adjust 'if' clauses for "python", "compile"
7430         and "guile" to use command_name_equals_not_inline.
7431
7432 2017-06-29  Pedro Alves  <palves@redhat.com>
7433
7434         * completer.c (expression_completer): Call
7435         linespec_location_completer instead of location_completer.
7436
7437 2017-06-29  Pedro Alves  <palves@redhat.com>
7438
7439         * completer.c (expression_completer): Remove code that recomputes
7440         'text' from 'word'.
7441
7442 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7443
7444         * regformats/regdat.sh: Generate code with
7445         "ifndef IN_PROCESS_AGENT".
7446
7447 2017-06-28  Pedro Alves  <palves@redhat.com>
7448
7449         * command.h: Include "common/scoped_restore.h".
7450
7451 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7452
7453         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7454         instead of obstack_grow.
7455
7456 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7457
7458         PR gdb/21337
7459         * symfile.c (reread_symbols): Call objfiles_changed just before
7460         read_symbols.
7461
7462 2017-06-27  Pedro Alves  <palves@redhat.com>
7463
7464         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7465         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7466         (completion_list_add_symbol, completion_list_add_msymbol):
7467         ... these new functions.
7468         (add_symtab_completions)
7469         (default_make_symbol_completion_list_break_on_1): Adjust.
7470
7471 2017-06-27  Pedro Alves  <palves@redhat.com>
7472
7473         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7474         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7475         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7476         dtor.
7477         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7478         'storage_obstack' field an auto_obstack.  In-class initialize all
7479         non-bitfield fields.  Make minsyms_read bool.
7480         * symfile.c (read_symbols): Adjust.
7481
7482 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7483
7484         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7485         (gdbsim_store_register): Likewise.
7486
7487 2017-06-27  Pedro Alves  <palves@redhat.com>
7488
7489         * c-exp.y (name_obstack): Now an auto_obstack.
7490         (yylex): Use auto_obstack::clear.
7491         (c_parse): Use auto_obstack::clear instead of reinitializing and
7492         freeing the obstack.
7493         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7494         * d-exp.y (name_obstack): Now an auto_obstack.
7495         (yylex): Use auto_obstack::clear.
7496         (d_parse): Use auto_obstack::clear instead of reinitializing and
7497         freeing the obstack.
7498         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7499         auto_obstack.
7500         * dwarf2read.c (create_addrmap_from_index)
7501         (dwarf2_build_psymtabs_hard)
7502         (update_enumeration_type_from_children): Likewise.
7503         * gdb_obstack.h (auto_obstack): New type.
7504         * go-exp.y (name_obstack): Now an auto_obstack.
7505         (build_packaged_name): Use auto_obstack::clear.
7506         (go_parse): Use auto_obstack::clear instead of reinitializing and
7507         freeing the obstack.
7508         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7509         auto_obstack.
7510         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7511         * rust-exp.y (work_obstack): Now an auto_obstack.
7512         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7513         reinitializing and freeing the obstack.
7514         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7515         (host_char_to_target): Use auto_obstack.
7516         * utils.h (make_cleanup_obstack_free): Delete declaration.
7517         * valprint.c (generic_emit_char, generic_printstr): Use
7518         auto_obstack.
7519
7520 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7521
7522         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7523         thread.
7524         (darwin_init_thread_list): Don't update dummy thread.
7525         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7526
7527 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7528
7529         * record-full.c (netorder16): Remove.
7530
7531 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7532
7533         * common/diagnostics.h: Define macros for GCC.
7534         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7535         * common/vec.h: Include diagnostics.h.
7536         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7537         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7538         warning.
7539
7540 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7541
7542         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7543         New macro.
7544         * ada-lex.l: Ignore deprecated register warnings.
7545
7546 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7547
7548         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7549         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7550
7551 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7552
7553         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7554         its own line.
7555
7556 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7557
7558         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7559
7560 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7561
7562         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7563         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7564         (xtensa_register_read_masked): Likewise.
7565
7566 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7567
7568         * common/environ.c (gdb_environ::unset): Update comment.
7569
7570 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7571
7572         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7573         registers.
7574
7575 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7576
7577         * record-full.c (record_full_exec_insn): Use byte_vector.
7578
7579 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7580
7581         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7582         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7583
7584 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7585
7586         * remote.c (cached_reg): Move from here...
7587         * regcache.h (cached_reg): ...to here.
7588         * python/py-unwind.c (struct reg_info): Remove.
7589         (cached_frame_info): Use cached_reg_t.
7590         (pyuw_prev_register): Likewise.
7591         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7592         (pyuw_dealloc_cache): Free all registers.
7593
7594 2017-06-22  Pedro Alves  <palves@redhat.com>
7595             Simon Marchi  <simon.marchi@ericsson.com>
7596
7597         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7598         warning.
7599         * common/diagnostics.h: New file.
7600
7601 2017-06-22  Pedro Alves  <palves@redhat.com>
7602
7603         * common/agent.h: Add include guards.
7604
7605 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7606
7607         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7608         talk about addressable units instead of bytes.
7609
7610 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7611
7612         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7613         of '::const_iterator'.
7614
7615 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7616
7617         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7618         'unittests/environ-selftests.c'.
7619         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7620         * charset.c (find_charset_names): Declare object 'iconv_env'.
7621         Update code to use 'iconv_env' object.  Remove call to
7622         'free_environ'.
7623         * common/environ.c: Include <utility>.
7624         (make_environ): Delete function.
7625         (free_environ): Delete function.
7626         (gdb_environ::clear): New function.
7627         (gdb_environ::operator=): New function.
7628         (gdb_environ::get): Likewise.
7629         (environ_vector): Delete function.
7630         (set_in_environ): Delete function.
7631         (gdb_environ::set): New function.
7632         (unset_in_environ): Delete function.
7633         (gdb_environ::unset): New function.
7634         (gdb_environ::envp): Likewise.
7635         * common/environ.h: Include <vector>.
7636         (struct gdb_environ): Delete; transform into...
7637         (class gdb_environ): ... this class.
7638         (free_environ): Delete prototype.
7639         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7640         environ_vector): Likewise.
7641         * infcmd.c (run_command_1): Update code to call
7642         'envp' from 'gdb_environ' class.
7643         (environment_info): Update code to call methods from 'gdb_environ'
7644         class.
7645         (unset_environment_command): Likewise.
7646         (path_info): Likewise.
7647         (path_command): Likewise.
7648         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7649         (inferior::inferior): Initialize 'environment' using the host's
7650         information.
7651         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7652         Include "environ.h".
7653         (class inferior) <environment>: Change type from 'struct
7654         gdb_environ' to 'gdb_environ'.
7655         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7656         methods from 'gdb_environ' class.
7657         * solib.c (solib_find_1): Likewise
7658         * unittests/environ-selftests.c: New file.
7659
7660 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7661
7662         * features/i386/i386-linux.xml: Exchange the order of including
7663         32bit-linux.xml and 32bit-sse.xml.
7664         * features/i386/i386-linux.c: Regenerated.
7665
7666 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7667
7668         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7669         Delete copy ctor and assignment operator.
7670         (tdesc_type): Likewise.
7671         (tdesc_feature): Likewise.
7672         (tdesc_free_reg): Remove.
7673         (tdesc_create_reg): Use new.
7674         (tdesc_free_type): Remove.
7675         (tdesc_create_vector): Use new.
7676         (tdesc_create_union): Likewise.
7677         (tdesc_create_flags): Likewise.
7678         (tdesc_create_enum): Likewise.
7679         (tdesc_free_feature): Delete.
7680         (free_target_description): Use delete.
7681
7682 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7683
7684         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7685         registers.
7686
7687 2017-06-19  Pedro Alves  <palves@redhat.com>
7688
7689         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7690         after gdb::unlinker.
7691
7692 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7693
7694         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7695         gdb_environ to access an environment variable.
7696
7697 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7698
7699         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7700         gdb_byte*.
7701
7702 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7703
7704         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7705
7706 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7707
7708         * configure: Re-generate.
7709         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7710
7711 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7712
7713         * configure: Re-generate.
7714         * warning.m4: Pass -Werror to compiler when checking for
7715         supported warning flags.
7716
7717 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7718
7719         * Makefile.in (COMPILE.pre): Add "-x c++".
7720
7721 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7722             Pedro Alves  <palves@redhat.com>
7723             Yao Qi  <yao.qi@linaro.org>
7724
7725         * defs.h (RequireLongest): New.
7726         (extract_integer): Declare function template.
7727         (extract_signed_integer): Remove the declaration, but define it
7728         static inline.
7729         (extract_unsigned_integer): Likewise.
7730         (store_integer): Declare function template.
7731         (store_signed_integer): Remove the declaration, but define it
7732         static inline.
7733         (store_unsigned_integer): Likewise.
7734         * findvar.c (extract_integer): New function template.
7735         (extract_signed_integer): Remove.
7736         (extract_unsigned_integer): Remove.
7737         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7738         instantiations.
7739         (store_integer): New function template.
7740         (store_signed_integer): Remove.
7741         (store_unsigned_integer): Remove.
7742         (store_integer): Explicit instantiations.
7743         * regcache.c (regcache_raw_read_signed): Update.
7744         (regcache::raw_read): New function.
7745         (regcache::raw_read_signed): Remove.
7746         (regcache::raw_read_unsigned): Remove.
7747         (regcache_raw_read_unsigned): Update.
7748         (regcache_raw_write_unsigned): Update.
7749         (regcache::raw_write_signed): Remove.
7750         (regcache::raw_write): New function.
7751         (regcache_cooked_read_signed): Update.
7752         (regcache::raw_write_unsigned): Remove.
7753         (regcache::cooked_read_signed): Remove.
7754         (regcache_cooked_read_unsigned): Update.
7755         (regcache::cooked_read_unsigned): Remove.
7756         (regcache_cooked_write_signed): Update.
7757         (regcache_cooked_write_unsigned): Update.
7758         * regcache.h (regcache) <raw_read_signed>: Remove.
7759         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7760         <raw_read, raw_write>: New.
7761         <cooked_read_signed, cooked_write_signed>: Remove.
7762         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7763         <cooked_read, cooked_write>: New.
7764         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7765         (sh64_pseudo_register_write): Update.
7766
7767 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7768
7769         * arc-tdep.c (arc_disassembler_options): New variable.
7770         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7771         of default_print_insn.
7772         (arc_delayed_print_insn): Set info->section when needed,
7773         use default_print_insn to retrieve a disassembler.
7774
7775 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7776
7777         PR gdb/21574
7778         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7779         to mention $SHELL and startup-with-shell.
7780
7781 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7782
7783         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7784
7785 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7786
7787         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7788         default_print_insn instead of print_insn_aarch64.
7789         * arm-tdep.c (gdb_print_insn_arm): Call
7790         default_print_insn instead of print_insn_big_arm
7791         and print_insn_little_arm.
7792         * i386-tdep.c (i386_print_insn): Call default_print_insn
7793         instead of print_insn_i386.
7794         * ia64-tdep.c (ia64_print_insn): Call
7795         default_print_insn instead of print_insn_ia64.
7796         * mips-tdep.c (gdb_print_insn_mips): Call
7797         default_print_insn instead of print_insn_big_mips
7798         and print_insn_little_mips.
7799         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7800         instead of print_insn_spu.
7801
7802 2017-06-14  Pedro Alves  <palves@redhat.com>
7803
7804         * ada-lang.c: Include "common/byte-vector.h".
7805         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7806         * charset.c (wchar_iterator::iterate): Resize the vector instead
7807         of reserving it.
7808         * common/byte-vector.h: Include "common/def-vector.h".
7809         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7810         * cli/cli-dump.c: Include "common/byte-vector.h".
7811         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7812         * common/byte-vector.h: New file.
7813         * common/def-vector.h: New file.
7814         * common/default-init-alloc.h: New file.
7815         * dwarf2loc.c: Include "common/byte-vector.h".
7816         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7817         instead of reserving it.
7818         * dwarf2read.c: Include "common/byte-vector.h".
7819         (data_buf::m_vec): Now a gdb::byte_vector.
7820         * gdb_regex.c: Include "common/def-vector.h".
7821         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7822         * mi/mi-main.c: Include "common/byte-vector.h".
7823         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7824         * printcmd.c: Include "common/byte-vector.h".
7825         (print_scalar_formatted): Use gdb::byte_vector.
7826         * valprint.c: Include "common/byte-vector.h".
7827         (maybe_negate_by_bytes, print_decimal_chars): Use
7828         gdb::byte_vector.
7829
7830 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7831
7832         * darwin-nat.c: Include "nat/fork-inferior.h".
7833
7834 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7835
7836         * configure.nat: Factor out Darwin bits that are not
7837         architecture-specific.  Add fork-inferior.o.
7838
7839 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7840
7841         * configure.nat: Factor out AIX bits that are not
7842         architecture-specific.  Add fork-inferior.o.
7843
7844 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7845
7846         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7847         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7848         wrappers that just call rw_pieced_value.
7849
7850 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7851
7852         * dwarf2loc.c (write_pieced_value): When writing the data for a
7853         memory piece, use write_memory_with_notification instead of
7854         write_memory.
7855
7856 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7857
7858         * valops.c (read_value_memory): Change embedded_offset to
7859         represent a bit offset instead of a byte offset.
7860         * value.h (read_value_memory): Adjust comment.
7861
7862 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7863
7864         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7865         dest_offset_bits and source_offset_bits.
7866         (write_pieced_value): Likewise.
7867
7868 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7869
7870         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7871         given by DW_OP_bit_piece.
7872         (write_pieced_value): Likewise.
7873
7874 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7875
7876         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7877         some other preparations to the places where sufficient information
7878         is available.
7879         (write_pieced_value): Likewise.
7880
7881 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7882
7883         * dwarf2loc.c (bits_to_bytes): New function.
7884         (read_pieced_value): Fix offset calculations for register pieces
7885         on big-endian targets.
7886         (write_pieced_value): Likewise.
7887
7888 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7889
7890         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7891         (write_pieced_value): Likewise.
7892
7893 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7894
7895         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7896         transfer the source value's least significant bits, instead of its
7897         lowest-addressed ones.  Rename type_len to max_offset.
7898         (read_pieced_value): Mirror above changes to write_pieced_value as
7899         applicable.
7900
7901 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7902
7903         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7904         truncate full bytes from dest_offset_bits before using it as an
7905         offset into the buffer.
7906
7907 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7908
7909         * dwarf2loc.c (write_pieced_value): Include transfer size in
7910         byte-wise check.
7911
7912 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7913
7914         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7915         calculation of this_size.
7916
7917 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7918
7919         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7920         when targeting a bit-field.
7921         (write_pieced_value): Likewise.
7922
7923 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7924
7925         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7926         (allocate_piece_closure): Drop addr_size parameter.
7927         (dwarf2_evaluate_loc_desc_full): Adjust call to
7928         allocate_piece_closure.
7929
7930 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7931
7932         PR gdb/21226
7933         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7934         the LSB end, independent of endianness.
7935
7936 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7937
7938         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7939         size capping.
7940
7941 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7942
7943         * mips-linux-nat.c: Move include features/mips*-linux.c to
7944         mips-linux-tdep.c.
7945         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7946         to mips-linux-tdep.c.
7947         * mips-linux-tdep.c: Include features/mips*-linux.c
7948         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7949         functions.
7950         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7951         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7952         (tdesc_mips64_dsp_linux): Declare.
7953
7954 2017-06-12  Tom Tromey  <tom@tromey.com>
7955
7956         * valprint.h (val_print_type_code_int): Remove.
7957         * valprint.c (generic_val_print_int): Always call
7958         val_print_scalar_formatted.
7959         (val_print_type_code_int): Remove.
7960         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7961         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7962         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7963         * ada-valprint.c (ada_val_print_num): Use
7964         val_print_scalar_formatted.
7965
7966 2017-06-12  Tom Tromey  <tom@tromey.com>
7967
7968         * printcmd.c (print_scalar_formatted): Unify the two switches.
7969         Don't convert scalars to LONGEST.
7970
7971 2017-06-12  Tom Tromey  <tom@tromey.com>
7972
7973         PR exp/16225:
7974         * valprint.h (print_decimal_chars): Update.
7975         * valprint.c (maybe_negate_by_bytes): New function.
7976         (print_decimal_chars): Add "is_signed" argument.
7977         * printcmd.c (print_scalar_formatted): Update.
7978
7979 2017-06-12  Tom Tromey  <tom@tromey.com>
7980
7981         PR exp/16225:
7982         * valprint.h (print_binary_chars, print_hex_chars): Update.
7983         * valprint.c (val_print_type_code_int): Update.
7984         (print_binary_chars): Add "zero_pad" argument.
7985         (emit_octal_digit): New function.
7986         (print_octal_chars): Don't zero-pad.
7987         (print_decimal_chars): Likewise.
7988         (print_hex_chars): Add "zero_pad" argument.
7989         * sh64-tdep.c (sh64_do_fp_register): Update.
7990         * regcache.c (regcache::dump): Update.
7991         * printcmd.c (print_scalar_formatted): Update.
7992         * infcmd.c (default_print_one_register_info): Update.
7993
7994 2017-06-12  Pedro Alves  <palves@redhat.com>
7995             Alan Hayward  <alan.hayward@arm.com>
7996
7997         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7998         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7999         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8000         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8001         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8002
8003 2017-06-12  Pedro Alves  <palves@redhat.com>
8004
8005         * dwarf2read.c (mapped_symtab::data): Now a vector of
8006         symtab_index_entry instead of vector of
8007         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8008         whether an element's name is NULL instead of checking whether the
8009         element itself is NULL.
8010         (find_slot): Change return type.  Adjust.
8011         (hash_expand, , add_index_entry, uniquify_cu_indices)
8012         (write_hash_table): Adjust.
8013
8014 2017-06-12  Pedro Alves  <palves@redhat.com>
8015
8016         * dwarf2read.c (recursively_count_psymbols): New function.
8017         (write_psymtabs_to_index): Call it to compute number of psyms and
8018         pass estimate size of psyms_seen to unordered_set's ctor.
8019
8020 2017-06-12  Pedro Alves  <palves@redhat.com>
8021
8022         * dwarf2read.c (write_hash_table): Check if key already exists
8023         before emplacing.
8024
8025 2017-06-12  Pedro Alves  <palves@redhat.com>
8026
8027         * dwarf2read.c (data_buf::append_space): Rename to...
8028         (data_buf::grow): ... this, and make private.  Adjust all callers.
8029         (data_buf::append_uint): New method.
8030         (add_address_entry, write_one_signatured_type)
8031         (write_psymtabs_to_index): Use it.
8032
8033 2017-06-12  Pedro Alves  <palves@redhat.com>
8034
8035         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8036         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8037         (data_buf::file_write): Call ::fwrite directly.
8038
8039 2017-06-12  Pedro Alves  <palves@redhat.com>
8040
8041         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8042         std::vector::erase.
8043
8044 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8045
8046         Code cleanup: C++ify .gdb_index producer.
8047         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8048         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8049         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8050         (create_strtab, add_string): Remove.
8051         (file_write, data_buf): New.
8052         (struct symtab_index_entry): Use std::vector for cu_indices.
8053         (struct mapped_symtab): Use std::vector for data.
8054         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8055         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8056         Remove.
8057         (find_slot): Change return type.  Update it to the new data structures.
8058         (hash_expand, add_index_entry): Update it to the new data structures.
8059         (offset_type_compare): Remove.
8060         (uniquify_cu_indices): Update it to the new data structures.
8061         (c_str_view, c_str_view_hasher, vector_hasher): New.
8062         (add_indices_to_cpool): Remove.
8063         (write_hash_table): Update it to the new data structures.
8064         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8065         (eq_psymtab_cu_index): Remove.
8066         (psym_index_map): New typedef.
8067         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8068         reference and std::unordered_map for cu_index_htab.
8069         (add_address_entry, add_address_entry_worker, write_address_map)
8070         (write_psymbols): Update it to the new data structures.
8071         (write_obstack): Remove.
8072         (struct signatured_type_index_data): Change types_list to a data_buf
8073         reference and psyms_seen to a std::unordered_set reference.
8074         (write_one_signatured_type, recursively_write_psymbols)
8075         (write_psymtabs_to_index): Update it to the new data structures.
8076
8077 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8078
8079         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8080         separate-debug-file commands.
8081         * symfile.h (separate_debug_file_debug): New global.
8082         * symfile.c (separate_debug_file_debug): New global.
8083         (separate_debug_file_exists, find_separate_debug_file): Add
8084         debug output.
8085         (_initialize_symfile): Add "set debug separate-debug-file"
8086         command.
8087         * build-id.c (build_id_to_debug_bfd,
8088         find_separate_debug_file_by_buildid): Add debug output.
8089
8090 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8091
8092         * gdbarch.sh (displaced_step_free_closure): Remove.
8093         * gdbarch.h, gdbarch.c: Re-generate.
8094         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8095         displaced_step_free_closure.
8096         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8097         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8098         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8099         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8100         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8101         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8102         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8103         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8104         * infrun.c (displaced_step_clear): Call xfree instead of
8105         gdbarch_displaced_step_free_closure.
8106
8107 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8108
8109         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8110         NULL".
8111
8112 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8113
8114         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8115         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8116         (mn10300_push_dummy_call): Likewise.
8117
8118 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8119
8120         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8121
8122 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8123
8124         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8125
8126 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8127
8128         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8129         able to start inferiors using a shell.
8130         (New remote packets): Announce new packet "QStartupWithShell".
8131         * remote.c: Add PACKET_QStartupWithShell.
8132         (extended_remote_create_inferior): Handle new
8133         PACKET_QStartupWithShell.
8134         (remote_protocol_features) <QStartupWithShell>: New entry for
8135         PACKET_QStartupWithShell.
8136         (_initialize_remote): Call "add_packet_config_cmd" for
8137         QStartupShell.
8138
8139 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8140             Pedro Alves  <palves@redhat.com>
8141
8142         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8143         and "nat/fork-inferior.h".
8144         * common/common-inferior.h: New file, with contents from
8145         "gdb/inferior.h".
8146         * commom/common-utils.c: Include "common-utils.h".
8147         (stringify_argv): New function.
8148         * common/common-utils.h (stringify_argv): New prototype.
8149         * configure.nat: Add "fork-inferior.o" as a dependency for
8150         "*linux*", "fbsd*" and "nbsd*" hosts.
8151         * corefile.c (get_exec_file): Update comment.
8152         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8153         instead of "startup_inferior".
8154         (darwin_create_inferior): Call "add_thread_silent" after
8155         "fork_inferior".
8156         * fork-child.c: Cleanup unnecessary includes.
8157         (SHELL_FILE): Move to "common/common-fork-child.c".
8158         (environ): Likewise.
8159         (exec_wrapper): Initialize.
8160         (get_exec_wrapper): New function.
8161         (breakup_args): Move to "common/common-fork-child.c"; rename to
8162         "breakup_args_for_exec".
8163         (escape_bang_in_quoted_argument): Move to
8164         "common/common-fork-child.c".
8165         (saved_ui): New variable.
8166         (prefork_hook): New function.
8167         (postfork_hook): Likewise.
8168         (postfork_child_hook): Likewise.
8169         (gdb_startup_inferior): Likewise.
8170         (fork_inferior): Move to "common/common-fork-child.c".  Update
8171         function to support gdbserver.
8172         (startup_inferior): Likewise.
8173         * gdbcore.h (get_exec_file): Remove declaration.
8174         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8175         instead of "startup_inferior".  Call "add_thread_silent" after
8176         "fork_inferior".
8177         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8178         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8179         instead of "startup_inferior".  Call "add_thread_silent" after
8180         "fork_inferior".
8181         * inferior.h: Include "common-inferior.h".
8182         (trace_start_error): Move to "common/common-utils.h".
8183         (trace_start_error_with_name): Likewise.
8184         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8185         (startup_inferior): Likewise.
8186         (gdb_startup_inferior): New prototype.
8187         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8188         * nat/fork-inferior.h: New file.
8189         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8190         instead of "startup_inferior".  Call "add_thread_silent" after
8191         "fork_inferior".
8192         * target.h (target_terminal_init): Move prototype to
8193         "target/target.h".
8194         (target_terminal_inferior): Likewise.
8195         (target_terminal_ours): Likewise.
8196         * target/target.h (target_terminal_init): New prototype, moved
8197         from "target.h".
8198         (target_terminal_inferior): Likewise.
8199         (target_terminal_ours): Likewise.
8200         * utils.c (gdb_flush_out_err): New function.
8201
8202 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8203
8204         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8205         * common/common-gdbthread.h: New file, with parts from
8206         "gdb/gdbthread.h".
8207         * gdbthread.h: Include "common-gdbthread.h".
8208         (switch_to_thread): Moved to "common/common-gdbthread.h".
8209
8210 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8211
8212         * Makefile.in (SFILES): Add "common/job-control.c".
8213         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8214         (COMMON_OBS): Add "job-control.o".
8215         * common/job-control.c: New file, with contents from
8216         "gdb/inflow.c".
8217         * common/job-control.h: New file, with contents from "terminal.h".
8218         * fork-child.c: Include "job-control.h".
8219         * inflow.c: Include "job-control.h".
8220         (gdb_setpgid): Move to "common/common-inflow.c".
8221         (_initialize_inflow): Move setting of "job_control" to
8222         "handle_job_control".
8223         * terminal.h (job_control): Moved to "common/common-terminal.h".
8224         (gdb_setpgid): Likewise.
8225         * top.c: Include "job_control.h".
8226         * utils.c: Likewise.
8227         (job_control): Moved to "job-control.c".
8228
8229 2017-06-07  Pedro Alves  <palves@redhat.com>
8230
8231         * Makefile.in (SFILES): Add gdb_regex.c.
8232         (COMMON_OBS): Add gdb_regex.o.
8233         * ada-lang.c (ada_add_standard_exceptions)
8234         (ada_add_exceptions_from_frame, name_matches_regex)
8235         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8236         parameter type to compiled_regex.  Adjust.
8237         (ada_exceptions_list): Use compiled_regex.
8238         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8239         std::unique_ptr<compiled_regex>.
8240         (exception_catchpoint::~exception_catchpoint): Remove regfree
8241         call.
8242         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8243         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8244         * breakpoint.c (solib_catchpoint::compiled): Now a
8245         std::unique_ptr<compiled_regex>.
8246         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8247         (check_status_catch_solib): Adjust to use compiled_regex.
8248         (add_solib_catchpoint): Adjust to use compiled_regex.
8249         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8250         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8251         compiled_regex reference.  Adjust to use it.
8252         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8253         declaration.  Include "gdb_regex.h".
8254         (apropos_cmd): Change regex parameter to compiled_regex reference.
8255         * gdb_regex.c: New file.
8256         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8257         declarations.
8258         (class compiled_regex): New.
8259         * linux-tdep.c: Include "common/gdb_optional.h".
8260         (struct mapping_regexes): New, factored out from
8261         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8262         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8263         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8264         * probe.c: Include "common/gdb_optional.h".
8265         (collect_probes): Use compiled_regex and gdb::optional and remove
8266         cleanups.
8267         * skip.c: Include "common/gdb_optional.h".
8268         (skiplist_entry::compiled_function_regexp): Now a
8269         gdb::optional<compiled_regex>.
8270         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8271         (free_skiplist_entry): Remove regfree call.
8272         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8273         compiled_regex and gdb::optional.
8274         * symtab.c: Include "common/gdb_optional.h".
8275         (search_symbols): Use compiled_regex and gdb::optional.
8276         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8277         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8278         to gdb_regex.c.
8279
8280 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8281
8282         * regcache.c (regcache::save): Avoid buffer use.
8283         (regcache::dump): Likewise.
8284
8285 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8286
8287         * sh-tdep.c (sh_pseudo_register_read): Remove
8288         MAX_REGISTER_SIZE.
8289         (sh_pseudo_register_write): Likewise.
8290         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8291         (sh64_pseudo_register_write): Likewise
8292
8293 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8294
8295         * aarch64-tdep.c (aarch64_store_return_value): Use
8296         V_REGISTER_SIZE.
8297         (aarch64_pseudo_read_value): Likewise.
8298         (aarch64_pseudo_write): Likewise.
8299
8300 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8301
8302         * regformats/regdef.h (set_register_cache): Remove the
8303         declaration.
8304
8305 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8306
8307         * frame.c (frame_unwind_register_signed): Use
8308         frame_unwind_register_value.
8309
8310 2017-06-06  Pedro Alves  <palves@redhat.com>
8311
8312         PR breakpoints/21553
8313         * breakpoint.c (create_breakpoints_sal_default)
8314         (init_breakpoint_sal, create_breakpoint_sal): Use
8315         gdb::unique_xmalloc_ptr for string parameters.
8316         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8317         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8318         (base_breakpoint_create_breakpoints_sal)
8319         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8320         (strace_marker_create_breakpoints_sal)
8321         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8322         string parameters.
8323         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8324         gdb::unique_xmalloc_ptr for string parameters.
8325         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8326         parameters.
8327
8328 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8329
8330         * alpha-tdep.c (alpha_register_to_value): Use
8331         get_frame_register_value.
8332         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8333
8334 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8335
8336         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8337         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8338         (ia64_value_to_register): Likewise.
8339         (ia64_extract_return_value): Likewise.
8340         (ia64_store_return_value): Likewise.
8341         (ia64_push_dummy_call): Likewise.
8342
8343 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8344
8345         GDB 8.0 released.
8346
8347 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8348
8349         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8350
8351 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8352
8353         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8354         parameter.
8355         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8356
8357 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8358
8359         * event-loop.c (poll_timers): Unallocate timer using delete
8360         instead of xfree.
8361
8362 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8363
8364         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8365         (struct breakpoint) <~breakpoint>: New.
8366         (struct watchpoint): Inherit from breakpoint.
8367         <~watchpoint>: New.
8368         <base>: Remove.
8369         (struct tracepoint): Inherit from breakpoint.
8370         <base>: Remove.
8371         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8372         (struct longjmp_breakpoint): Inherit from breakpoint.
8373         <~longjmp_breakpoint>: New.
8374         <base>: Remove.
8375         (new_breakpoint_from_type): Remove casts.
8376         (watchpoint_in_thread_scope): Remove reference to base field.
8377         (watchpoint_del_at_next_stop): Likewise.
8378         (update_watchpoint): Likewise.
8379         (watchpoint_check): Likewise.
8380         (bpstat_check_watchpoint): Likewise.
8381         (set_longjmp_breakpoint): Likewise.
8382         (struct fork_catchpoint): Inherit from breakpoint.
8383         <base>: Remove.
8384         (struct solib_catchpoint): Inherit from breakpoint.
8385         <~solib_catchpoint>: New.
8386         <base>: Remove.
8387         (dtor_catch_solib): Change to ...
8388         (solib_catchpoint::~solib_catchpoint): ... this.
8389         (breakpoint_hit_catch_solib): Remove reference to base field.
8390         (add_solib_catchpoint): Likewise.
8391         (create_fork_vfork_event_catchpoint): Likewise.
8392         (struct exec_catchpoint): Inherit from breakpoint.
8393         <~exec_catchpoint>: New.
8394         <base>: Remove.
8395         (dtor_catch_exec): Change to ...
8396         (exec_catchpoint::~exec_catchpoint): ... this.
8397         (dtor_watchpoint): Change to ...
8398         (watchpoint::~watchpoint): ... this.
8399         (watch_command_1): Remove reference to base field.
8400         (catch_exec_command_1): Likewise.
8401         (base_breakpoint_dtor): Change to ...
8402         (breakpoint::~breakpoint): ... this.
8403         (base_breakpoint_ops): Remove dtor field value.
8404         (longjmp_bkpt_dtor): Change to ...
8405         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8406         (strace_marker_create_breakpoints_sal): Remove reference to base
8407         field.
8408         (delete_breakpoint): Don't manually call breakpoint destructor.
8409         (create_tracepoint_from_upload): Remove reference to base field.
8410         (trace_pass_set_count): Likewise.
8411         (initialize_breakpoint_ops): Don't initialize
8412         momentary_breakpoint_ops, don't set dtors.
8413         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8414         <~ada_catchpoint>: New.
8415         <base>: Remove.
8416         (create_excep_cond_exprs): Remove reference to base field.
8417         (dtor_exception): Change to ...
8418         (ada_catchpoint::~ada_catchpoint): ... this.
8419         (dtor_catch_exception): Remove.
8420         (dtor_catch_exception_unhandled): Remove.
8421         (dtor_catch_assert): Remove.
8422         (create_ada_exception_catchpoint): Remove reference to base
8423         field.
8424         (initialize_ada_catchpoint_ops): Don't set dtors.
8425         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8426         breakpoint.
8427         <~signal_catchpoint>: New.
8428         <base>: Remove.
8429         (signal_catchpoint_dtor): Change to ...
8430         (signal_catchpoint::~signal_catchpoint): ... this.
8431         (create_signal_catchpoint): Remove reference to base field.
8432         (initialize_signal_catchpoint_ops): Don't set dtor.
8433         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8434         from breakpoint.
8435         <~syscall_catchpoint>: New.
8436         <base>: Remove.
8437         (dtor_catch_syscall): Change to ...
8438         (syscall_catchpoint::~syscall_catchpoint): ... this.
8439         (create_syscall_event_catchpoint): Remove reference to base
8440         field.
8441         (initialize_syscall_catchpoint_ops): Don't set dtor.
8442         * break-catch-throw.c (struct exception_catchpoint): Inherit
8443         from breakpoint.
8444         <~exception_catchpoint>: New.
8445         <base>: Remove.
8446         (dtor_exception_catchpoint): Change to ...
8447         (exception_catchpoint::~exception_catchpoint): ... this.
8448         (handle_gnu_v3_exceptions): Remove reference to base field.
8449         (initialize_throw_catchpoint_ops): Don't set dtor.
8450         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8451         field.
8452         * remote.c (remote_get_tracepoint_status): Likewise.
8453         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8454         * tracefile.c (tracefile_fetch_registers): Likewise.
8455         * tracepoint.c (actions_command): Likewise.
8456         (validate_actionline): Likewise.
8457         (tfind_1): Likewise.
8458         (get_traceframe_location): Likewise.
8459         (find_matching_tracepoint_location): Likewise.
8460         (parse_tracepoint_status): Likewise.
8461         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8462
8463 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8464
8465         * breakpoint.c (struct longjmp_breakpoint): New struct.
8466         (is_tracepoint_type): Change return type to bool.
8467         (is_longjmp_type): New function.
8468         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8469         (set_raw_breakpoint_without_location): Use
8470         new_breakpoint_from_type.
8471         (set_raw_breakpoint): Likewise.
8472
8473 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8474
8475         * breakpoint.c (new_breakpoint_from_type): New function.
8476         (create_breakpoint_sal): Use new_breakpoint_from_type and
8477         unique_ptr.
8478         (create_breakpoint): Likewise.
8479
8480 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8481
8482         * memattr.c (mem_info_command): Rename to ...
8483         (info_mem_command): ... this.
8484         (mem_enable_command): Rename to ...
8485         (enable_mem_command): ... this.
8486         (mem_disable_command): Rename to ...
8487         (disable_mem_command): ... this.
8488         (mem_delete_command): Rename to ...
8489         (delete_mem_command): ... this.
8490         (_initialize_mem): Adjust function names.
8491
8492 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8493
8494         * btrace.c (handle_pt_insn_events): New.
8495         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8496         STATUS.  Split into this and ...
8497         (handle_pt_insn_event_flags): ... this.
8498
8499 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8500
8501         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8502         and struct pt_insn.resynced.
8503         * configure: Regenerated.
8504         * config.in: Regenerated.
8505
8506 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8507
8508         * btrace.c (ftrace_find_call_by_number): New function.
8509         (ftrace_new_function): Store objects, not pointers.
8510         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8511         ftrace_new_gap, ftrace_update_function,
8512         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8513         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8514         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8515         btrace_ends_with_single_insn, btrace_call_get): Account for
8516         btrace_thread_info::functions now storing objects.
8517         * btrace.h (struct btrace_thread_info): Add constructor.
8518         (struct btrace_thread_info) <functions>: Make std::vector.
8519         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8520         Initialize with default values.
8521         * record-btrace.c (record_btrace_frame_sniffer): Account for
8522         btrace_thread_info::functions now storing objects.
8523
8524 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8525
8526         * btrace.c: Remove typedef bfun_s.
8527         (ftrace_new_gap): Directly add gaps to the list of gaps.
8528         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8529         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8530         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8531         instead of gdb VEC.
8532
8533 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8534
8535         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8536         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8537         with btrace_thread_info::next_segment and
8538         btrace_thread_info::prev_segment.
8539         * btrace.h: Remove struct btrace_func_link.
8540         (struct btrace_function): Replace pair of function segment pointers
8541         with pair of indices.
8542         * python/py-record-btrace.c (btpy_call_prev_sibling,
8543         btpy_call_next_sibling): Replace references to
8544         btrace_thread_info::segment with btrace_thread_info::next_segment and
8545         btrace_thread_info::prev_segment.
8546         * record-btrace.c (record_btrace_frame_this_id): Use
8547         btrace_find_call_by_number.
8548
8549 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8550
8551         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8552         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8553         btrace_insn_next, btrace_insn_prev): Remove references to
8554         btrace_thread_info::flow.
8555         * btrace.h (struct btrace_function): Remove FLOW.
8556
8557 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8558
8559         * btrace.c (ftrace_find_call_by_number): New function.
8560         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8561         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8562         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8563         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8564         index.
8565         * btrace.h (struct btrace_function): Turn UP into an index.
8566         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8567         as an index.
8568         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8569         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8570         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8571
8572 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8573
8574         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8575         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8576         ftrace_update_function, ftrace_compute_global_level_offset,
8577         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8578         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8579         btrace_insn_end, btrace_is_empty): Remove references to
8580         btrace_thread_info::begin and btrace_thread_info::end.
8581         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8582         (struct btrace_thread_info) <functions>: Adjust comment.
8583         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8584         btrace_thread_info::begin.
8585
8586 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8587
8588         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8589         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8590         ftrace_update_function): Remove arguments that implicitly were always
8591         BTINFO->END.
8592         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8593         Don't pass BTINFO->END.
8594
8595 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8596
8597         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8598         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8599         btrace_find_insn_by_number): Replace function segment pointer with
8600         index.
8601         (btrace_insn_cmp): Simplify.
8602         * btrace.h: (struct btrace_insn_iterator) Rename index to
8603         insn_index.  Replace function segment pointer with index into function
8604         segment vector.
8605         * record-btrace.c (record_btrace_call_history): Replace function
8606         segment pointer use with index.
8607         (record_btrace_frame_sniffer): Retrieve function call segment through
8608         vector.
8609         (record_btrace_set_replay): Remove defunc't safety check.
8610
8611 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8612
8613         * btrace.c (btrace_ends_with_single_insn): New function.
8614         (btrace_call_get, btrace_call_number, btrace_call_begin,
8615         btrace_call_end, btrace_call_next, btrace_call_prev,
8616         btrace_find_call_by_number): Use index into call segment vector
8617         instead of pointer.
8618         (btrace_call_cmp): Simplify.
8619         * btrace.h (struct btrace_call_iterator): Replace function call segment
8620         pointer with index into vector.
8621         * record-btrace.c (record_btrace_call_history): Use index instead of
8622         pointer.
8623
8624 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8625
8626         * btrace.c (btrace_insn_begin, btrace_insn_end,
8627         btrace_find_insn_by_number): Add btinfo to iterator.
8628         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8629
8630 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8631
8632         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8633         and save pointers directly.
8634         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8635         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8636         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8637         changed signature of functions.
8638         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8639         (btrace_fetch): Remove code that adds btrace_function pointers to
8640         vector of btrace_functions.
8641         (btrace_clear): Simplify freeing vector of btrace_functions.
8642
8643 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8644
8645         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8646         Replace VEC_* with std::vector functions.
8647         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8648         (struct btrace_thread_info)<functions>: Change type to std::vector.
8649
8650 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8651
8652         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8653         "Removed targets and native configurations" up.  Merge duplicate
8654         "New commands" sub-sections.  Add "New options" sub-sections.
8655
8656 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8657
8658         * defs.h (copy_integer_to_size): New declaration.
8659         * findvar.c (copy_integer_to_size): New function.
8660         (do_cint_test): New selftest function.
8661         (copy_integer_to_size_test): Likewise.
8662         (_initialize_findvar): Likewise.
8663         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8664         (mips_fbsd_collect_reg): Use raw_collect_integer.
8665         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8666         (mips64_fill_gregset): Use raw_collect_integer
8667         (mips64_fill_fpregset): Use raw_supply_integer.
8668         * regcache.c (regcache::raw_supply_integer): New function.
8669         (regcache::raw_collect_integer): Likewise.
8670         * regcache.h: (regcache::raw_supply_integer): New declaration.
8671         (regcache::raw_collect_integer): Likewise.
8672
8673 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8674
8675         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8676         (COMMON_OBS): Add gdbarch-selftests.o.
8677         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8678         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8679         * gdbarch-selftests.c: New file.
8680         * regcache.h (regcache) <~regcache>: Mark it virtual if
8681         GDB_SELF_TEST.
8682         <raw_write>: Likewise.
8683
8684 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8685
8686         * regcache.c (current_regcache): Change it to
8687         regcache::current_regcache.
8688         (regcache_observer_target_changed): Update.
8689         (regcache_thread_ptid_changed): Make it a regcache static
8690         method.
8691         (regcache_thread_ptid_changed): Update.
8692         (class regcache_access): New.
8693         (current_regcache_test): Update.
8694         (_initialize_regcache): Update.
8695         * regcache.h: Include forward_list.
8696         (regcache): Declare regcache_thread_ptid_changed and declare
8697         registers_changed_ptid as friend.
8698
8699 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8700
8701         * i387-tdep.c (i387_register_to_value): Use register_size
8702         instead of TYPE_LENGTH.
8703         * m68k-tdep.c (m68k_register_to_value): Likewise.
8704
8705 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8706
8707         * i387-tdep.c (i387_convert_register_p): Return false if type
8708         code isn't TYPE_CODE_FLT.
8709
8710 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8711
8712         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8713         length is 4.
8714         (alpha_register_to_value): Remove type length check.
8715         (alpha_value_to_register): Likewise.
8716
8717 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8718
8719         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8720         TYPE_CODE_FLT.
8721
8722 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8723
8724         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8725         TYPE_CODE_FLT or not.
8726
8727 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8728
8729         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8730         * avr-tdep.c (avr_gdbarch_init): Likewise.
8731         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8732         * cris-tdep.c (cris_gdbarch_init): Likewise.
8733         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8734         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8735         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8736         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8737         * mep-tdep.c (mep_gdbarch_init): Likewise.
8738         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8739         * mips-tdep.c (mips_gdbarch_init): Likewise.
8740         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8741         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8742         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8743         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8744         * v850-tdep.c (v850_gdbarch_init): Likewise.
8745
8746 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8747
8748         * selftest-arch.c (tests_with_arch): Call registers_changed
8749         and reinit_frame_cache.
8750         * selftest.c (run_self_tests): Likewise.
8751
8752 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8753
8754         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8755         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8756
8757 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8758
8759         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8760         set_gdbarch_print_insn.
8761
8762 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8763
8764         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8765         set_gdbarch_print_insn.
8766
8767 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8768
8769         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8770         set_gdbarch_print_insn.
8771         * arc-tdep.c (arc_gdbarch_init): Likewise.
8772         * arch-utils.c: include dis-asm.h.
8773         (default_print_insn): New function.
8774         * arch-utils.h (default_print_insn): Declare.
8775         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8776         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8777         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8778         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8779         * frv-tdep.c (frv_gdbarch_init): Likewise.
8780         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8781         * gdbarch.sh (print_insn): Use default_print_insn.
8782         * gdbarch.c: Regenerated.
8783         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8784         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8785         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8786         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8787         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8788         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8789         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8790         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8791         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8792         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8793         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8794         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8795         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8796         * mt-tdep.c (mt_gdbarch_init): Likewise.
8797         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8798         * nios2-tdep.c (nios2_print_insn): Remove.
8799         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8800         * rx-tdep.c (rx_gdbarch_init): Likewise.
8801         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8802         * score-tdep.c (score_print_insn): Remove.
8803         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8804         * sh-tdep.c (sh_gdbarch_init): Likewise.
8805         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8806         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8807         * tic6x-tdep.c (tic6x_print_insn): Remove.
8808         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8809         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8810         * v850-tdep.c (v850_gdbarch_init): Likewise.
8811         * vax-tdep.c (vax_gdbarch_init): Likewise.
8812         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8813         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8814
8815 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8816
8817         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8818         (MIPS_FP0_REGNUM): Remove.
8819         (MIPS_FSR_REGNUM): Remove.
8820         (mips_fbsd_supply_fpregs): Use mips_regnum.
8821         (mips_fbsd_supply_gregs): Likewise.
8822         (mips_fbsd_collect_fpregs): Likewise.
8823         (mips_fbsd_collect_gregs): Likewise.
8824
8825 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8826
8827         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8828         (getpfpregs_supplies): New function.
8829         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8830         getfpregs_supplies.
8831         (mips_fbsd_store_inferior_registers): Likewise.
8832
8833 2017-05-22  Pedro Alves <palves@redhat.com>
8834
8835         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8836         maintainer.
8837
8838 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8839
8840         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8841         (store_register): Likewise.
8842         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8843         (get_decimal_float_return_value): Likewise.
8844         (do_ppc_sysv_return_value): Likewise.
8845         (ppc64_sysv_abi_push_integer): Likewise.
8846         (ppc64_sysv_abi_push_freg): Likewise.
8847         (ppc64_sysv_abi_return_value_base): Likewise.
8848         (ppc64_sysv_abi_return_value): Likewise.
8849         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8850         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8851         * rs6000-nat.c: Likewise.
8852         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8853         (rs6000_value_to_register): Likewise.
8854         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8855
8856 2017-05-21  Tom Tromey  <tom@tromey.com>
8857
8858         PR rust/21466:
8859         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8860         arrays as "[T]", not "[T; ]".
8861
8862 2017-05-19  Tom Tromey  <tom@tromey.com>
8863
8864         PR rust/21484:
8865         * rust-lang.c (exp_descriptor_rust): New function.
8866         (rust_language_defn): Use it.
8867         * p-lang.c (pascal_language_defn): Update.
8868         * opencl-lang.c (opencl_language_defn): Update.
8869         * objc-lang.c (objc_language_defn): Update.
8870         * m2-lang.c (m2_language_defn): Update.
8871         * language.h (struct language_defn)
8872         <la_watch_location_expression>: New member.
8873         * language.c (unknown_language_defn, auto_language_defn)
8874         (local_language_defn): Update.
8875         * go-lang.c (go_language_defn): Update.
8876         * f-lang.c (f_language_defn): Update.
8877         * d-lang.c (d_language_defn): Update.
8878         * c-lang.h (c_watch_location_expression): Declare.
8879         * c-lang.c (c_watch_location_expression): New function.
8880         (c_language_defn, cplus_language_defn, asm_language_defn)
8881         (minimal_language_defn): Use it.
8882         * breakpoint.c (watch_command_1): Call
8883         la_watch_location_expression.
8884         * ada-lang.c (ada_language_defn): Update.
8885
8886 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8887
8888         PR tui/21482
8889         * gdb_curses.h (NOMACROS): Define.
8890         (NCURSES_NOMACROS): Define.
8891
8892 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8893
8894         PR tui/21482
8895         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8896         arg to char *.
8897         * tui/tui-wingeneral.c (box_win): Likewise.
8898         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8899         (tui_show_source_line): Likewise.
8900         (tui_show_exec_info_content): Likewise.
8901
8902 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8903
8904         * sparc-tdep.c (sparc_structure_return_p)
8905         (sparc_arg_on_registers_p): New functions.
8906         (sparc32_store_arguments): Use them.
8907         * sparc64-tdep.c (sparc64_16_byte_align_p)
8908         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8909         Handle TYPE_CODE_ARRAY.
8910
8911 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8912
8913         * cli/cli-decode.c (add_alias_cmd): New function.
8914         * command.h (add_alias_cmd): Declare.
8915         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8916         instead call add_alias_cmd.
8917
8918 2017-05-17  Pedro Alves  <palves@redhat.com>
8919
8920         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8921         (nat_makefile_frag): ... this.  All references updated.
8922         * configure.ac: Likewise.
8923         * configure.nat: Likewise.  Enhance comments.
8924         * configure: Regenerate.
8925
8926 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8927
8928         * procfs.c (procfs_create_inferior): Change prototype to match
8929         definition.
8930
8931 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8932
8933         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8934         C++ compiler warning.
8935
8936 2017-05-12  Tom Tromey  <tom@tromey.com>
8937
8938         PR rust/21483:
8939         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8940         recurse, just call value_struct_elt directly.
8941
8942 2017-05-12  Tom Tromey  <tom@tromey.com>
8943
8944         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8945         OP_RUST_ARRAY>: Fix.
8946
8947 2017-05-12  Tom Tromey  <tom@tromey.com>
8948
8949         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8950
8951 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8952
8953         * regcache.c: Include <forward_list>.
8954         (struct regcache_list): Remove.
8955         (current_regcache): Update.
8956         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8957         (regcache_thread_ptid_changed): Likewise.
8958         (registers_changed_ptid): Likewise.
8959         (current_regcache_size): Likewise.
8960
8961 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8962
8963         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8964         (current_regcache_size): New function.
8965         (current_regcache_test): New function.
8966         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8967
8968 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8969
8970         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8971         (print_gp_register_row): Use get_frame_register_value.
8972
8973 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8974
8975         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8976         (mips_supply_fpregset): Likewise.
8977         (mips64_supply_gregset): Likewise.
8978
8979 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8980
8981         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8982         regcache->raw_supply_zeroed.
8983
8984 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8985
8986         * configure.nat: Rearrange 'case' statements to match
8987         host before cpu.
8988
8989 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8990
8991         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8992         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8993         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8994         "@nat_extra_makefile_frag@".
8995         (Makefile): Remove dependency on "@frags@".
8996         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8997         (data-directory/Makefile): Likewise.
8998         * config/aarch64/linux.mh: Deleted; moved contents to
8999         "gdb/configure.nat".
9000         * config/alpha/alpha-linux.mh: Likewise.
9001         * config/alpha/nbsd.mh: Likewise.
9002         * config/arm/linux.mh: Likewise.
9003         * config/arm/nbsdelf.mh: Likewise.
9004         * config/i386/cygwin.mh: Likewise.
9005         * config/i386/cygwin64.mh: Likewise.
9006         * config/i386/darwin.mh: Likewise.
9007         * config/i386/fbsd.mh: Likewise.
9008         * config/i386/fbsd64.mh: Likewise.
9009         * config/i386/go32.mh: Likewise.
9010         * config/i386/i386gnu.mh: Likewise.
9011         * config/i386/i386sol2.mh: Likewise.
9012         * config/i386/linux.mh: Likewise.
9013         * config/i386/linux64.mh: Likewise.
9014         * config/i386/mingw.mh: Likewise.
9015         * config/i386/mingw64.mh: Likewise.
9016         * config/i386/nbsd64.mh: Likewise.
9017         * config/i386/nbsdelf.mh: Likewise.
9018         * config/i386/nto.mh: Likewise.
9019         * config/i386/obsd.mh: Likewise.
9020         * config/i386/obsd64.mh: Likewise.
9021         * config/i386/sol2-64.mh: Likewise.
9022         * config/ia64/linux.mh: Likewise.
9023         * config/m32r/linux.mh: Likewise.
9024         * config/m68k/linux.mh: Likewise.
9025         * config/m68k/nbsdelf.mh: Likewise.
9026         * config/m68k/obsd.mh: Likewise.
9027         * config/m88k/obsd.mh: Likewise.
9028         * config/mips/fbsd.mh: Likewise.
9029         * config/mips/linux.mh: Likewise.
9030         * config/mips/nbsd.mh: Likewise.
9031         * config/mips/obsd64.mh: Likewise.
9032         * config/pa/linux.mh: Likewise.
9033         * config/pa/nbsd.mh: Likewise.
9034         * config/pa/obsd.mh: Likewise.
9035         * config/powerpc/aix.mh: Likewise.
9036         * config/powerpc/fbsd.mh: Likewise.
9037         * config/powerpc/linux.mh: Likewise.
9038         * config/powerpc/nbsd.mh: Likewise.
9039         * config/powerpc/obsd.mh: Likewise.
9040         * config/powerpc/ppc64-linux.mh: Likewise.
9041         * config/powerpc/spu-linux.mh: Likewise.
9042         * config/s390/linux.mh: Likewise.
9043         * config/sh/nbsd.mh: Likewise.
9044         * config/sparc/fbsd.mh: Likewise.
9045         * config/sparc/linux.mh: Likewise.
9046         * config/sparc/linux64.mh: Likewise.
9047         * config/sparc/nbsd64.mh: Likewise.
9048         * config/sparc/nbsdelf.mh: Likewise.
9049         * config/sparc/obsd64.mh: Likewise.
9050         * config/sparc/sol2.mh: Likewise.
9051         * config/tilegx/linux.mh: Likewise.
9052         * config/vax/nbsdelf.mh: Likewise.
9053         * config/vax/obsd.mh: Likewise.
9054         * config/xtensa/linux.mh: Likewise.
9055         * config/i386/i386gnu.mn: New file, with excerpts from
9056         "config/i386/i386gnu.mh".
9057         * configure: Regenerate.
9058         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9059         *.mh files under "gdb/config".
9060         * configure.nat: New file, with contents from the
9061         "gdb/config/*/*.mh" files.
9062
9063 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9064
9065         * btrace.c (btrace_clear): Free insn vector.
9066
9067 2017-05-05  Pedro Alves  <palves@redhat.com>
9068
9069         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9070         * configure: Regenerate.
9071
9072 2017-05-04  Pedro Alves  <palves@redhat.com>
9073
9074         * Makefile.in (SFILES): Add progspace-and-thread.c.
9075         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9076         (COMMON_OBS): Add progspace-and-thread.o.
9077         * breakpoint.c: Include "progspace-and-thread.h".
9078         (update_inserted_breakpoint_locations)
9079         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9080         Use scoped_restore_current_pspace_and_thread.
9081         (create_std_terminate_master_breakpoint): Use
9082         scoped_restore_current_program_space.
9083         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9084         (print_breakpoint_location): Use
9085         scoped_restore_current_program_space.
9086         (bp_loc_is_permanent): Use
9087         scoped_restore_current_pspace_and_thread.
9088         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9089         (download_tracepoint_locations): Use
9090         scoped_restore_current_pspace_and_thread.
9091         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9092         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9093         (enum step_over_calls_kind): Moved from inferior.h.
9094         (class scoped_restore_current_thread): New class.
9095         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9096         declaration.
9097         (scoped_restore_current_thread): New class.
9098         * infcmd.c: Include "common/gdb_optional.h".
9099         (continue_1, proceed_after_attach): Use
9100         scoped_restore_current_thread.
9101         (notice_new_inferior): Use scoped_restore_current_thread.
9102         * inferior.c: Include "progspace-and-thread.h".
9103         (restore_inferior, save_current_inferior): Delete.
9104         (add_inferior_command, clone_inferior_command): Use
9105         scoped_restore_current_pspace_and_thread.
9106         * inferior.h (scoped_restore_current_inferior): New class.
9107         * infrun.c: Include "progspace-and-thread.h" and
9108         "common/gdb_optional.h".
9109         (follow_fork_inferior): Use
9110         scoped_restore_current_pspace_and_thread.
9111         (scoped_restore_exited_inferior): New class.
9112         (handle_vfork_child_exec_or_exit): Use
9113         scoped_restore_exited_inferior,
9114         scoped_restore_current_pspace_and_thread,
9115         scoped_restore_current_thread and scoped_restore.
9116         (fetch_inferior_event): Use scoped_restore_current_thread.
9117         * linespec.c (decode_line_full, decode_line_1): Use
9118         scoped_restore_current_program_space.
9119         * mi/mi-main.c: Include "progspace-and-thread.h".
9120         (exec_continue): Use scoped_restore_current_thread.
9121         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9122         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9123         * proc-service.c (ps_pglobal_lookup): Use
9124         scoped_restore_current_program_space.
9125         * progspace-and-thread.c: New file.
9126         * progspace-and-thread.h: New file.
9127         * progspace.c (release_program_space, clone_program_space): Use
9128         scoped_restore_current_program_space.
9129         (restore_program_space, save_current_program_space)
9130         (save_current_space_and_thread): Delete.
9131         (switch_to_program_space_and_thread): Moved to
9132         progspace-and-thread.c.
9133         * progspace.h (save_current_program_space)
9134         (save_current_space_and_thread): Delete declarations.
9135         (scoped_restore_current_program_space): New class.
9136         * remote.c (remote_btrace_maybe_reopen): Use
9137         scoped_restore_current_thread.
9138         * symtab.c: Include "progspace-and-thread.h".
9139         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9140         * thread.c (print_thread_info_1): Use
9141         scoped_restore_current_thread.
9142         (struct current_thread_cleanup): Delete.
9143         (do_restore_current_thread_cleanup)
9144         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9145         (scoped_restore_current_thread::~scoped_restore_current_thread):
9146         ... this new dtor.
9147         (make_cleanup_restore_current_thread): Rename/convert to ...
9148         (scoped_restore_current_thread::scoped_restore_current_thread):
9149         ... this new ctor.
9150         (thread_apply_all_command): Use scoped_restore_current_thread.
9151         (thread_apply_command): Use scoped_restore_current_thread.
9152         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9153         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9154
9155 2017-05-04  Pedro Alves  <palves@redhat.com>
9156
9157         * thread.c (make_cleanup_restore_current_thread): Move
9158         find_thread_ptid call before the is_stopped call.  Assert that the
9159         thread is found.  Replace is_stopped call by checking the thread's
9160         state directly.  Remove unnecessary NULL-thread check.
9161
9162 2017-05-04  Pedro Alves  <palves@redhat.com>
9163
9164         * corelow.c (thread_section_name): New class.
9165         (get_core_register_section, get_core_siginfo): Use it.
9166
9167 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9168
9169         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9170         (get_core_register_section): Remove xfree of NULL pointer.
9171
9172 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9173
9174         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9175         * regcache.c (regcache::raw_supply_zeroed): New function.
9176         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9177
9178 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9179
9180         * gdbarch.sh: Remove commented out definition of
9181         TARGET_CHAR_BIT.
9182         * gdbarch.h: Re-generate.
9183
9184 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9185
9186         * configure: Regenerate.
9187
9188 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9189
9190         * solib-target.c (solib_target_relocate_section_addresses):
9191         Remove num_section_bases, num_bases, segment_bases variables.
9192
9193 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9194
9195         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9196
9197 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9198
9199         * solib-target.c: Include <vector>
9200         (struct lm_info_target) <~lm_info_target>: Remove.
9201         <segment_bases, section_bases>: Change type to
9202         std::vector<CORE_ADDR>.
9203         (library_list_start_segment, library_list_start_section,
9204         library_list_end_library,
9205         solib_target_relocate_section_addresses): Adjust.
9206
9207 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9208
9209         * gdbarch.sh (software_single_step): Change return type to
9210         std::vector<CORE_ADDR>.
9211         * gdbarch.c, gdbarch.h: Re-generate.
9212         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9213         Adjust.
9214         (arm_deal_with_atomic_sequence_raw): Adjust.
9215         (thumb_get_next_pcs_raw): Adjust.
9216         (arm_get_next_pcs_raw): Adjust.
9217         (arm_get_next_pcs): Adjust.
9218         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9219         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9220         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9221         (alpha_software_single_step): Adjust.
9222         * alpha-tdep.h (alpha_software_single_step): Adjust.
9223         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9224         * arm-tdep.c (arm_software_single_step): Adjust.
9225         (arm_breakpoint_kind_from_current_state): Adjust.
9226         * arm-tdep.h (arm_software_single_step): Adjust.
9227         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9228         * cris-tdep.c (cris_software_single_step): Adjust.
9229         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9230         (micromips_deal_with_atomic_sequence): Adjust.
9231         (deal_with_atomic_sequence): Adjust.
9232         (mips_software_single_step): Adjust.
9233         * mips-tdep.h (mips_software_single_step): Adjust.
9234         * moxie-tdep.c (moxie_software_single_step): Adjust.
9235         * nios2-tdep.c (nios2_software_single_step): Adjust.
9236         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9237         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9238         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9239         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9240         * sparc-tdep.c (sparc_software_single_step): Adjust.
9241         * spu-tdep.c (spu_software_single_step): Adjust.
9242         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9243
9244 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9245
9246         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9247         * gdbarch.h: Re-generate.
9248
9249 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9250
9251         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9252         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9253         * python/py-instruction.c, python/py-instruction.h: New file.
9254         * python/py-record.c: Add py-instruction.h include.
9255         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9256         gdb.RecordInstruction.
9257         * python/python-internal.h: Add gdbpy_initialize_instruction
9258         declaration.
9259         * python/python.c (do_start_initialization): Add
9260         gdbpy_initialize_instruction.
9261
9262 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9263
9264         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9265         Remove.
9266         (btrace_func_from_recpy_func): New function.
9267         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9268         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9269         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9270         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9271         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9272         Also, use new helper functions.
9273         (btpy_list_item): Use new helper functions.
9274         (recpy_bt_function_call_history): Use new type name.
9275         (btpy_call_getset): Remove.
9276         (gdbpy_initialize_btrace): Remove code to initialize
9277         gdb.BtraceFunctionCall.
9278         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9279         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9280         recpy_bt_func_prev, recpy_bt_func_next): New export.
9281         * python/py-record.c (recpy_func_type): New static object.
9282         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9283         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9284         recpy_func_next): New function.
9285         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9286         (recpy_func_getset): New static object.
9287         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9288         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9289
9290 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9291
9292         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9293         (btpy_object, btpy_insn_type, btpy_new): Remove.
9294         (btpy_list_object): Use gdb.RecordInstruction type instead of
9295         gdb.BtraceInstruction type.
9296         (btrace_insn_from_recpy_insn): New function.
9297         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9298         btpy_new.
9299         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9300         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9301         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9302         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9303         instead of btpy_object.
9304         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9305         btpy_insn_data, btpy_insn_decode): Rename to ...
9306         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9307         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9308         recpy_bt_insn_decode): This.  Also, use new helper functions.
9309         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9310         recpy_insn_type.
9311         (btpy_insn_getset): Remove.
9312         (gdbpy_initialize_btrace): Remove code to initialize
9313         gdb.BtraceInstruction.  Use recpy_element_object.
9314         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9315         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9316         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9317         * python/py-record.c (recpy_insn_type): New static object.
9318         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9319         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9320         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9321         New function.
9322         (recpy_insn_getset): New static object.
9323         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9324         * python/py-record.h (recpy_element_object): New typedef.
9325         (recpy_insn_type, recpy_insn_new): New export.
9326
9327 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9328
9329         * py-record-btrace.c (btpy_insn_new): Removed.
9330         (btpy_insn_or_gap_new): New function.
9331         (btpy_insn_error): Removed.
9332         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9333         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9334         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9335         btpy_insn_or_gap_new instead of btpy_insn_new.
9336         (btpy_insn_getset): Remove btpy_insn_error.
9337         * py-record.c (recpy_gap_type): New static object.
9338         (recpy_gap_object): New typedef.
9339         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9340         recpy_gap_reason_string): New function.
9341         (recpy_gap_getset): New static object.
9342         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9343         * py-record.h (recpy_gap_new): New export.
9344
9345 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9346
9347         * python/py-record.c (recpy_ptid): Remove.
9348         (recpy_record_getset): Remove recpy_ptid.
9349
9350 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9351
9352         * btrace.c (btrace_fetch): Set inferior_ptid.
9353         * python/py-record-btrace.c: Add "py-record.h" include.
9354         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9355         recpy_bt_end, recpy_bt_instruction_history,
9356         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9357         in gdb.Record object instead of current ptid.
9358         * python/py-record.c: Include new "py-record.h" file.
9359         (recpy_record_object): Moved to py-record.h.
9360         * python/py-record.h: New file.
9361
9362 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9363
9364         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9365         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9366         indentation.
9367
9368 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9369
9370         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9371         the past maintainers section.
9372
9373 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9374
9375         * infcmd.c (get_return_value): Use regcache ctor, and remove
9376         cleanup.
9377
9378 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9379             Pedro Alves  <palves@redhat.com>
9380
9381         * regcache.c (regcache::regcache): New tag dispatch ctor.
9382         (do_cooked_read): Moved above.
9383         (regcache_dup): Use the tag dispatch ctor..
9384         * regcache.h (regcache): Declare ctor, delete copy ctor and
9385         assignment operator, remove friend regcache_dup.
9386
9387 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9388
9389         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9390         call method save instead of regcache_cpy.
9391         * regcache.h (struct regcache): Make regcache_dup a friend.
9392
9393 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9394
9395         * regcache.c (struct regcache): Move to regcache.h
9396         (regcache::arch): New method.
9397         (regcache_get_ptid): Update.
9398         (get_regcache_arch): Call arch method.
9399         (get_regcache_aspace): Call method aspace.
9400         (register_buffer): Change it to method.
9401         (regcache_save): Change it to regcache::save.
9402         (regcache_restore): Likewise.
9403         (regcache_cpy_no_passthrough): Remove the declaration.
9404         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9405         (regcache_cpy_no_passthrough): Change it to method
9406         cpy_no_passthrough.
9407         (regcache_register_status): Change it to method
9408         get_register_status.
9409         (regcache_invalidate): Change it to method invalidate.
9410         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9411         (regcache_raw_update): Change it to method raw_update.
9412         (regcache_raw_read): Likewise.
9413         (regcache_raw_read_signed): Likewise.
9414         (regcache_raw_read_unsigned): Likewise.
9415         (regcache_raw_write_signed): Likewise.
9416         (regcache_raw_write_unsigned): Likewise.
9417         (regcache_cooked_read): Likewise.
9418         (regcache_cooked_read_value): Likewise.
9419         (regcache_cooked_read_signed): Likewise.
9420         (regcache_cooked_read_unsigned): Likewise.
9421         (regcache_cooked_write_signed): Likewise.
9422         (regcache_cooked_write_unsigned): Likewise.
9423         (regcache_raw_set_cached_value): Likewise.
9424         (regcache_raw_write): Likewise.
9425         (regcache_cooked_write): Likewise.
9426         (regcache_xfer_part): Likewise.
9427         (regcache_raw_read_part): Likewise.
9428         (regcache_raw_write_part): Likewise.
9429         (regcache_cooked_read_part): Likewise.
9430         (regcache_cooked_write_part): Likewise.
9431         (regcache_raw_supply): Likewise.
9432         (regcache_raw_collect): Likewise.
9433         (regcache_transfer_regset): Likewise.
9434         (regcache_supply_regset): Likewise.
9435         (regcache_collect_regset): Likewise.
9436         (regcache_debug_print_register): Likewise.
9437         (enum regcache_dump_what): Move it to regcache.h.
9438         (regcache_dump): Change it to method dump.
9439         * regcache.h (enum regcache_dump_what): New.
9440         (class regcache): New.
9441         * target.c (target_fetch_registers): Call method
9442         debug_print_register.
9443         (target_store_registers): Likewise.
9444
9445 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9446
9447         * windows-nat.c (struct lm_info_windows): Initialize field.
9448         (windows_make_so): Allocate lm_info_windows with new.
9449         (windows_free_so): Free lm_info_windows with delete.
9450
9451 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9452
9453         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9454         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9455         cleanup.
9456         (darwin_free_so): Free lm_info_darwin with delete.
9457
9458 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9459
9460         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9461         <l_addr_p>: Change type to bool.
9462         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9463         (svr4_free_so): Free lm_info_svr4 with delete.
9464         (svr4_copy_library_list): Replace memcpy with call to copy
9465         constructor.
9466         (library_list_start_library, svr4_default_sos): Allocate
9467         lm_info_svr4 with new.
9468
9469 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9470
9471         * solib-target.c (struct lm_info_target): Add destructor,
9472         initialize fields.
9473         <name>: Change type to std::string.
9474         (library_list_start_library): Allocate lm_info_target with new.
9475         (solib_target_free_library_list): Free lm_info_target with
9476         delete.
9477         (solib_target_current_sos): Adapt to std::string.
9478         (solib_target_free_so): Free lm_info_target with delete.
9479
9480 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9481
9482         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9483         fields.
9484         (frv_current_sos): Allocate lm_info_frv with new.
9485         (frv_relocate_main_executable): Free lm_info_frv with delete,
9486         allocate with new.
9487         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9488
9489 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9490
9491         * solib-frv.c (struct lm_info_frv): Fix indentation.
9492
9493 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9494
9495         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9496         map field.
9497         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9498         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9499         and allocate with new.
9500         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9501
9502 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9503
9504         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9505         <filename, member_name>: Change type to std::string.
9506         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9507         (library_list_start_library): Allocate lm_info_aix with new.
9508         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9509         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9510         with copy constructor.
9511
9512 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9513
9514         * solist.h (struct lm_info): Remove.
9515         (struct lm_info_base): New class.
9516         (struct so_list) <lm_info>: Change type to lm_info_base *.
9517         * nto-tdep.c (struct lm_info): Remove.
9518         (lm_addr): Adjust.
9519         * solib-aix.c (struct lm_info): Rename to ...
9520         (struct lm_info_aix): ... this.  Extend lm_info_base.
9521         (lm_info_p): Rename to ...
9522         (lm_info_aix_p): ... this, and adjust.
9523         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9524         solib_aix_parse_libraries, library_list_start_library,
9525         solib_aix_free_library_list, solib_aix_parse_libraries,
9526         solib_aix_get_library_list,
9527         solib_aix_relocate_section_addresses, solib_aix_free_so,
9528         solib_aix_get_section_offsets,
9529         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9530         Adjust.
9531         (struct solib_aix_inferior_data) <library_list>: Adjust.
9532         * solib-darwin.c (struct lm_info): Rename to ...
9533         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9534         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9535         * solib-dsbt.c (struct lm_info): Rename to ...
9536         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9537         (struct dsbt_info) <main_executable_lm_info): Adjust.
9538         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9539         dsbt_relocate_section_addresses): Adjust.
9540         * solib-frv.c (struct lm_info): Rename to ...
9541         (struct lm_info_frv): ... this.  Extend lm_info_base.
9542         (main_executable_lm_info): Adjust.
9543         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9544         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9545         find_canonical_descriptor_in_load_object,
9546         frv_fdpic_find_canonical_descriptor): Adjust.
9547         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9548         to lm_info_svr4.
9549         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9550         svr4_clear_so, svr4_copy_library_list,
9551         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9552         svr4_current_sos, svr4_fetch_objfile_link_map,
9553         solist_update_incremental): Adjust.
9554         * solib-svr4.h (struct lm_info_svr4): Move here from
9555         solib-svr4.c.
9556         * solib-target.c (struct lm_info): Rename to ...
9557         (struct lm_info_target): ... this.  Extend lm_info_base.
9558         (lm_info_p): Rename to ...
9559         (lm_info_target_p): ... this.
9560         (solib_target_parse_libraries, library_list_start_segment,
9561         library_list_start_section, library_list_start_library,
9562         library_list_end_library, solib_target_free_library_list,
9563         solib_target_current_sos, solib_target_free_so,
9564         solib_target_relocate_section_addresses): Adjust.
9565         * windows-nat.c (struct lm_info): Rename to ...
9566         (struct lm_info_windows): ... this.  Extend lm_info_base.
9567         (windows_make_so, handle_load_dll, handle_unload_dll,
9568         windows_xfer_shared_libraries): Adjust.
9569
9570 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9571
9572         * solib-darwin.c (struct darwin_so_list): Remove.
9573         (darwin_current_sos): Allocate an so_list object instead of a
9574         darwin_so_list, separately allocate an lm_info object.
9575         (darwin_free_so): Free lm_info.
9576
9577 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9578
9579         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9580         with fprintf_filtered.
9581
9582 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9583
9584         * regcache.c (regcache::regcache): New function.
9585         (regcache::~regcache): New function.
9586         (regcache_xmalloc_1): Remove.
9587         (regcache_xmalloc): Call new regcache.
9588         (regcache_xfree): Call delete regcache.
9589         (get_thread_arch_aspace_regcache): Call new regcache.
9590
9591 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9592
9593         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9594         lwp instead of ptid_get_lwp.
9595
9596 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9597
9598         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9599         lwp_info instead of getting from inferior_ptid.
9600
9601 2017-04-27  Keith Seitz  <keiths@redhat.com>
9602
9603         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9604         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9605         (CV_CONVERSION_BADNESS): Define.
9606         (rank_one_type): Remove overly restrictive rvalue reference
9607         rank checks.
9608         Add cv-qualifier checks and subranks for type equality.
9609         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9610         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9611         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9612
9613 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9614
9615         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9616         count when creating the object.
9617
9618 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9619             Ulrich Weigand  <uweigand@de.ibm.com>
9620
9621         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9622         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9623         is used in AIX.
9624         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9625         (process_xcoff_symbol): Likewise.
9626         (scan_xcoff_symtab): Likewise.
9627
9628 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9629
9630         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9631         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9632         (ia64_access_reg): Use get_frame_register_unsigned.
9633         (ia64_access_rse_reg): Likewise.
9634         (ia64_libunwind_frame_prev_register): Likewise.
9635
9636 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9637
9638         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9639         * gdbarch.c: Regenerated.
9640         * gdbarch.h: Regenerated.
9641         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9642         visibility external.
9643         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9644         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9645         (enum cfa_how_kind): Move to ...
9646         (struct dwarf2_frame_state_reg_info): Likewise.
9647         (struct dwarf2_frame_state): Likewise.
9648         * dwarf2-frame.h: ... here.
9649         (dwarf2_frame_state_alloc_regs): New declaration.
9650         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9651         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9652
9653 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9654
9655         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9656         regcache_raw_read_unsigned.
9657         (xtensa_pseudo_register_write): Likewise.
9658
9659 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9660
9661         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9662         (nds32_pseudo_register_write): Likewise.
9663
9664 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9665
9666         * regcache.c (struct regcache) <readonly_p>: Change its type
9667         to bool.
9668         (regcache_xmalloc_1): Update parameter type and callers update.
9669
9670 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9671
9672         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9673         set_gdbarch_wchar_bit.
9674         * arm-tdep.c (arm_gdbarch_init): Likewise.
9675
9676 2017-04-25  Pedro Alves  <palves@redhat.com>
9677
9678         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9679         (BothAreRelocatable, memcopy, memmove): Don't define.
9680         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9681         macros.
9682
9683 2017-04-25  Pedro Alves  <palves@redhat.com>
9684
9685         * common/common-defs.h: Include "common/poison.h".
9686         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9687         and adjust.
9688         * common/poison.h: New file.
9689         * common/traits.h: Include <type_traits>.
9690         (Not, Or, Requires): New, moved from common/function-view.h.
9691
9692 2017-04-25  Pedro Alves  <palves@redhat.com>
9693
9694         * breakpoint.h (struct breakpoint): In-class initialize all
9695         fields.  Make boolean fields "bool".
9696         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9697         memset call and initializations no longer necessary.
9698
9699 2017-04-25  Pedro Alves  <palves@redhat.com>
9700
9701         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9702         reference.
9703         (pt_btrace_insn): New function.
9704         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9705
9706 2017-04-25  Pedro Alves  <palves@redhat.com>
9707
9708         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9709         "base" field and inherit from "bp_location" instead.  Add
9710         non-default ctor.
9711         (allocate_location_exception): Use new non-default ctor.
9712         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9713         (init_bp_location): Convert to ...
9714         (bp_location::bp_location): ... this new ctor, and remove memset
9715         call.
9716         (base_breakpoint_allocate_location): Use the new non-default ctor.
9717         * breakpoint.h (bp_location): Now a class.  Declare default and
9718         non-default ctors.  In-class initialize all members.
9719         (init_bp_location): Remove declaration.
9720
9721 2017-04-25  Pedro Alves  <palves@redhat.com>
9722
9723         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9724         assignment operator.
9725
9726 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9727
9728         * doublest.c (convert_doublest_to_floatformat): Call
9729         floatformat_totalsize_bytes.
9730
9731 2017-04-22  Tom Tromey  <tom@tromey.com>
9732
9733         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9734         ui_out_emit_list.
9735         * stack.c (print_frame): Use ui_out_emit_list.
9736         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9737         ui_out_emit_list.
9738         * mi/mi-main.c (print_one_inferior)
9739         (mi_cmd_data_list_register_names)
9740         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9741         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9742         ui_out_emit_list.
9743         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9744         (mi_output_solib_attribs): Use ui_out_emit_list,
9745         ui_out_emit_tuple.
9746         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9747         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9748         (mi_cmd_stack_list_args, list_args_or_locals): Use
9749         ui_out_emit_list.
9750         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9751         * breakpoint.c (print_solib_event, output_thread_groups): Use
9752         ui_out_emit_list.
9753
9754 2017-04-22  Tom Tromey  <tom@tromey.com>
9755
9756         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9757         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9758         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9759
9760 2017-04-22  Tom Tromey  <tom@tromey.com>
9761
9762         * tracepoint.c (tvariables_info_1)
9763         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9764
9765 2017-04-22  Tom Tromey  <tom@tromey.com>
9766
9767         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9768         annotate_arg_emitter.
9769         * breakpoint.c (print_mention_watchpoint)
9770         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9771         * annotate.h (struct annotate_arg_emitter): New.
9772
9773 2017-04-22  Tom Tromey  <tom@tromey.com>
9774
9775         * record-btrace.c (record_btrace_insn_history)
9776         (record_btrace_insn_history_range, record_btrace_call_history)
9777         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9778         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9779         ui_out_emit_tuple.
9780         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9781         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9782         * skip.c (skip_info): Use ui_out_emit_tuple.
9783         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9784         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9785         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9786         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9787         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9788         ui_out_emit_tuple.
9789         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9790         (output_register, mi_cmd_data_read_memory)
9791         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9792         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9793         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9794         Use ui_out_emit_tuple.
9795         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9796         ui_out_emit_tuple.
9797         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9798         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9799         * linux-thread-db.c (info_auto_load_libthread_db): Use
9800         ui_out_emit_tuple.
9801         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9802         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9803         * disasm.c (do_mixed_source_and_assembly_deprecated)
9804         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9805         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9806         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9807         * breakpoint.c (print_one_breakpoint_location)
9808         (print_one_breakpoint): Use ui_out_emit_tuple.
9809         * auto-load.c (print_script, info_auto_load_cmd): Use
9810         ui_out_emit_tuple.
9811         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9812
9813 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9814
9815         * thread.c (print_thread_info_1): Remove dead code.
9816
9817 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9818
9819         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9820         GDB_SELF_TEST.
9821         * arm-tdep.c (selftests::arm_record_test): Likewise.
9822
9823 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9824
9825         * regcache.c (regcache_restore): Remove argument 2.  Replace
9826         argument 3 with regcache.  Get register status from
9827         src->register_status and get register contents from
9828         register_buffer (src, regnum).
9829         (regcache_cpy): Update.
9830
9831 2017-04-19  Pedro Alves  <palves@redhat.com>
9832
9833         * gdbthread.h (thread): Add missing closing parenthesis in
9834         comment.
9835
9836 2017-04-19  Pedro Alves  <palves@redhat.com>
9837
9838         * common/refcounted-object.h: New file.
9839         * gdbthread.h: Include "common/refcounted-object.h".
9840         (thread_info): Inherit from refcounted_object and add comments.
9841         (thread_info::incref, thread_info::decref)
9842         (thread_info::m_refcount): Delete.
9843         (thread_info::deletable): Use the refcounted_object::refcount()
9844         method.
9845         * inferior.c (current_inferior_): Add comment.
9846         (set_current_inferior): Increment/decrement refcounts.
9847         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9848         not-deletable instead of comparing with the current inferior.
9849         (initialize_inferiors): Increment the initial inferior's refcount.
9850         * inferior.h (struct inferior): Forward declare.
9851         Include "common/refcounted-object.h".
9852         (current_inferior, set_current_inferior): Move declaration to
9853         before struct inferior's definition, and fix comment.
9854         (inferior): Inherit from refcounted_object.  Add comments.
9855         * thread.c (switch_to_thread_no_regs): Reference the thread's
9856         inferior pointer directly instead of doing a ptid lookup.
9857         (switch_to_no_thread): New function.
9858         (switch_to_thread(thread_info *)): New function, factored out
9859         from ...
9860         (switch_to_thread(ptid_t)): ... this.
9861         (restore_current_thread): Delete.
9862         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9863         fields, and add 'inf' field.
9864         (do_restore_current_thread_cleanup): Check whether old->inf is
9865         alive instead of looking up an inferior by ptid.  Use
9866         switch_to_thread and switch_to_no_thread.
9867         (restore_current_thread_cleanup_dtor): Use old->inf directly
9868         instead of lookup up an inferior by id.  Decref the inferior.
9869         Don't restore 'removable'.
9870         (make_cleanup_restore_current_thread): Same the inferior pointer
9871         in old, instead of the inferior number.  Incref the inferior.
9872         Don't save/clear 'removable'.
9873
9874 2017-04-19  Pedro Alves  <palves@redhat.com>
9875
9876         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9877         unittests/scoped_restore-selftests.c.
9878         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9879         * common/scoped_restore.h (scoped_restore_base): Make "class".
9880         (scoped_restore_base::release): New public method.
9881         (scoped_restore_base::scoped_restore_base): New protected ctor.
9882         (scoped_restore_base::m_saved_var): New protected field.
9883         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9884         scoped_restore_base base class instead of m_saved_var directly.
9885         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9886         (scoped_restore_tmpl::scoped_restore_tmpl(const
9887         scoped_restore_tmpl<T>&)): Likewise.
9888         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9889         method.
9890         (scoped_restore_tmpl::saved_var): New method.
9891         (scoped_restore_tmpl::m_saved_var): Delete.
9892         * inferior.h (inferior::detaching): Now a bool.
9893         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9894         cleanup.
9895         * unittests/scoped_restore-selftests.c: New file.
9896
9897 2017-04-19  Pedro Alves  <palves@redhat.com>
9898
9899         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9900         Re-sort in alphabetic order.
9901
9902 2017-04-18  Pedro Alves  <palves@redhat.com>
9903
9904         * xml-support.c (obstack_xml_printf): Delete.
9905         * xml-support.h (obstack_xml_printf): Delete.
9906
9907 2017-04-18  Pedro Alves  <palves@redhat.com>
9908
9909         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9910         vdebug, verror, body_text, start_element, end_element, name,
9911         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9912         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9913         is_xinclude>: Make private and add m_ prefix.
9914         (gdb_xml_parser::body_text): New method, based on ...
9915         (gdb_xml_body_text): ... this.  Adjust.
9916         (gdb_xml_parser::vdebug): New method, based on ...
9917         (gdb_xml_debug): ... this.  Adjust.
9918         (gdb_xml_parser::verror): New method, based on ...
9919         (gdb_xml_error): ... this.  Adjust.
9920         (gdb_xml_parser::start_element): New method, based on ...
9921         (gdb_xml_start_element): ... this.  Adjust.
9922         (gdb_xml_start_element_wrapper): Defer to
9923         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9924         (gdb_xml_parser::end_element): New method, based on ...
9925         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9926         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9927         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9928         (gdb_xml_parser::use_dtd): New method, based on ...
9929         (gdb_xml_use_dtd): ... this.  Adjust.
9930         (gdb_xml_parser::parse): New method, based on ...
9931         (gdb_xml_parse): ... this.  Adjust.
9932         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9933         (xinclude_start_include): Adjust to call the parser's name method.
9934         (xml_xinclude_default, xml_xinclude_start_doctype)
9935         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9936         method.
9937         (xml_process_xincludes): Adjust to call parser methods.
9938         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9939         declarations.
9940
9941 2017-04-18  Pedro Alves  <palves@redhat.com>
9942
9943         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9944         gdb::optional<std::string>.
9945         * xml-support.c: Include <string>.
9946         (scope_level::scope_level(scope_level &&))
9947         (scope_level::~scope_level): Delete.
9948         (scope_level::body): Now a std::string.
9949         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9950         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9951         parameter.
9952         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9953         (xinclude_parsing_data::output): Now a std::string reference.
9954         (xinclude_start_include): Adjust.
9955         (xml_xinclude_default): Adjust.
9956         (xml_process_xincludes): Add 'output' parameter, and return bool.
9957         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9958         and return bool.
9959         * xml-tdesc.c: Include <unordered_map> and <string>.
9960         (tdesc_xml_cache): Delete.
9961         (tdesc_xml_cache_s): Delete.
9962         (xml_cache): Now an std::unordered_map.
9963         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9964         (target_fetch_description_xml): Change return type to
9965         gdb::optional<std::string>, and adjust.
9966         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9967         (target_fetch_description_xml): Change return type to
9968         gdb::optional<std::string>.
9969
9970 2017-04-18  Pedro Alves  <palves@redhat.com>
9971
9972         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9973         unittests/optional-selftests.c.
9974         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9975         * unittests/optional-selftests.c: New file.
9976         * unittests/optional/assignment/1.cc: New file.
9977         * unittests/optional/assignment/2.cc: New file.
9978         * unittests/optional/assignment/3.cc: New file.
9979         * unittests/optional/assignment/4.cc: New file.
9980         * unittests/optional/assignment/5.cc: New file.
9981         * unittests/optional/assignment/6.cc: New file.
9982         * unittests/optional/assignment/7.cc: New file.
9983         * unittests/optional/cons/copy.cc: New file.
9984         * unittests/optional/cons/default.cc: New file.
9985         * unittests/optional/cons/move.cc: New file.
9986         * unittests/optional/cons/value.cc: New file.
9987         * unittests/optional/in_place.cc: New file.
9988         * unittests/optional/observers/1.cc: New file.
9989         * unittests/optional/observers/2.cc: New file.
9990
9991 2017-04-18  Pedro Alves  <palves@redhat.com>
9992
9993         * common/gdb_optional.h: Include common/traits.h.
9994         (in_place_t): New type.
9995         (in_place): New constexpr variable.
9996         (optional::optional): Remove member initialization of
9997         m_instantiated.
9998         (optional::optional(in_place_t...)): New constructor.
9999         (optional::~optional): Use reset.
10000         (optional::optional(const optional&)): New.
10001         (optional::optional(const optional&&)): New.
10002         (optional::optional(T &)): New.
10003         (optional::optional(T &&)): New.
10004         (operator::operator=(const optional &)): New.
10005         (operator::operator=(optional &&)): New.
10006         (operator::operator= (const T &))
10007         (operator::operator= (T &&))
10008         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10009         (operator::reset): New.
10010         (operator::m_instantiated):: Add in-class initializer.
10011         * common/traits.h: Include <type_traits>.
10012         (struct And): New types.
10013
10014 2017-04-18  Pedro Alves  <palves@redhat.com>
10015
10016         * xml-support.c: Include <vector>.
10017         (scope_level::scope_level(const gdb_xml_element *))
10018         (scope_level::scope_level(scope_level&&)): New.
10019         (scope_level::~scope_level): New.
10020         (scope_level_s): Delete.
10021         (gdb_xml_parser::scopes): Now a std::vector.
10022         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10023         Use std::vector.
10024         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10025         scope cleanup code.
10026         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10027         of the scopes member.  Use std::vector::emplace_back.
10028
10029 2017-04-18  Pedro Alves  <palves@redhat.com>
10030
10031         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10032         a bool.
10033         (gdb_xml_end_element): Change type of first parameter.
10034         (gdb_xml_cleanup): Rename to ...
10035         (gdb_xml_parser::~gdb_xml_parser): ... this.
10036         (gdb_xml_create_parser_and_cleanup): Delete with ...
10037         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10038         to this new ctor.
10039         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10040         using gdb_xml_create_parser_and_cleanup.
10041         (xinclude_parsing_data): Add ctor/dtor.
10042         (xml_xinclude_cleanup): Delete.
10043         (xml_process_xincludes): Create a local xinclude_parsing_data
10044         instead of heap-allocating one.  Create a local gdb_xml_parser
10045         instead of heap-allocating one with
10046         gdb_xml_create_parser_and_cleanup.
10047
10048 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10049
10050         PR threads/20743
10051         * fbsd-nat.c (resume_one_thread_cb): Remove.
10052         (resume_all_threads_cb): Remove.
10053         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10054         iterate_over_threads.
10055
10056 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10057
10058         * NEWS: Create a new section for the next release branch.
10059         Rename the section of the current branch, now that it has
10060         been cut.
10061
10062 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10063
10064         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10065         * version.in: Bump version to 8.0.50.DATE-git.
10066
10067 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10068
10069         PR gdb/21385
10070         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10071         independently of the host, and fix build breakage on Cygwin.
10072
10073 2017-04-13  Pedro Alves  <palves@redhat.com>
10074
10075         * inferior.c (free_inferior): Convert to ...
10076         (inferior::~inferior): ... this dtor.
10077         (inferior::inferior): New ctor, factored out from ...
10078         (add_inferior_silent): ... here.  Allocate the inferior with a new
10079         expression.
10080         (delete_inferior): Call delete instead of free_inferior.
10081         * inferior.h (gdb_environ, continuation): Forward declare.
10082         (inferior): Now a class.  Add in-class initialization to all
10083         members.  Make boolean fields bool, except 'detaching'.
10084         (inferior::inferior): New explicit ctor.
10085         (inferior::~inferior): New.
10086
10087 2017-04-13  Pedro Alves  <palves@redhat.com>
10088
10089         * inferior.c (init_inferior_list): Delete.
10090         * inferior.h (init_inferior_list): Delete.
10091
10092 2017-04-13  Pedro Alves  <palves@redhat.com>
10093
10094         PR threads/13217
10095         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10096         (top level): Call it twice, with different thread sets.
10097
10098 2017-04-13  Pedro Alves  <palves@redhat.com>
10099
10100         * thread.c: Include <algorithm>.
10101         (thread_array_cleanup): Delete.
10102         (scoped_inc_dec_ref): New class.
10103         (live_threads_count): New function.
10104         (set_thread_refcount): Delete.
10105         (tp_array_compar_ascending): Now a bool.
10106         (tp_array_compar): Convert to a std::sort comparison function.
10107         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10108         and live_threads_count.
10109
10110 2017-04-13  Pedro Alves  <palves@redhat.com>
10111
10112         * infrun.c (follow_fork_inferior): Also switch the current
10113         inferior.
10114
10115 2017-04-13  Pedro Alves  <palves@redhat.com>
10116
10117         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10118         before calling create_internal_breakpoint.
10119
10120 2017-04-13  Pedro Alves  <palves@redhat.com>
10121
10122         * fork-child.c (execv_argv): New class.
10123         (breakup_args): Refactored as ...
10124         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10125         Copy arguments to storage and replace separators with NULL
10126         terminators in place.
10127         (escape_bang_in_quoted_argument): Adjust to return bool.
10128         (execv_argv::execv_argv): New ctor.
10129         (execv_argv::init_for_shell): New method, factored out from
10130         fork_inferior.  Don't strdup strings into the vector.
10131         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10132         Remove free_vector_argv call.
10133
10134 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10135
10136         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10137         tdep->rx_psw_type.
10138
10139 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10140
10141         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10142         * rx-tdep.c (rx_gdbarch_init): Likewise.
10143
10144 2017-04-13  Pedro Alves  <palves@redhat.com>
10145
10146         * breakpoint.h (struct breakpoint): Reindent.
10147
10148 2017-04-13  Pedro Alves  <palves@redhat.com>
10149
10150         * breakpoint.c (bp_location): Rename to ...
10151         (bp_locations): ... this.  All references updated.
10152         (bp_location_count): Rename to ...
10153         (bp_locations_count): ... this.  All references updated.
10154         (bp_location_placed_address_before_address_max): Rename to ...
10155         (bp_locations_placed_address_before_address_max): ... this.  All
10156         references updated.
10157         (bp_location_shadow_len_after_address_max): Rename to ...
10158         (bp_locations_shadow_len_after_address_max): ... this.  All
10159         references updated.
10160         (bp_location_compare_addrs): Rename to ...
10161         (bp_locations_compare_addrs): ... this.  All references updated.
10162         (bp_location_compare):Rename to ...
10163         (bp_locations_compare): ... this.  All references updated.
10164         (bp_location_target_extensions_update): Rename to ...
10165         (bp_locations_target_extensions_update): ... this.  All references
10166         updated.
10167
10168 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10169
10170         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10171         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10172         'sgtty.h'.
10173         * common/gdb_termios.h: New file, with parts of "terminal.h".
10174         * inflow.c: Include "gdb_termios.h".
10175         * ser-unix.c: Include "gdb_termios.h".
10176         * terminal.h: Move terminal-related defines to
10177         "common/gdb_termios.h".
10178
10179 2017-04-12  Tom Tromey  <tom@tromey.com>
10180
10181         * probe.c (parse_probes): Update.
10182         * location.h (delete_event_location): Don't declare.
10183         (event_location_deleter::operator()): Update.
10184         * location.c (event_location_deleter::operator()): Rename from
10185         delete_event_location.
10186         * linespec.h (linespec_result) <location>: Change type to
10187         event_location_up.
10188         * linespec.c (canonicalize_linespec, event_location_to_sals)
10189         (decode_objc): Update.
10190         (linespec_result): Don't call delete_event_location.
10191         * breakpoint.c (create_breakpoints_sal)
10192         (bkpt_probe_create_sals_from_location)
10193         (strace_marker_create_sals_from_location): Update.
10194
10195 2017-04-12  Tom Tromey  <tom@tromey.com>
10196
10197         * linespec.h (struct linespec_result): Add constructor and
10198         destructor.
10199         (init_linespec_result, destroy_linespec_result)
10200         (make_cleanup_destroy_linespec_result): Don't declare.
10201         * linespec.c (init_linespec_result): Remove.
10202         (linespec_result::~linespec_result): Rename from
10203         destroy_linespec_result.  Update.
10204         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10205         Remove.
10206         * breakpoint.c (create_breakpoint, break_range_command)
10207         (decode_location_default): Update.
10208         * ax-gdb.c (agent_command_1): Update.
10209
10210 2017-04-12  Tom Tromey  <tom@tromey.com>
10211
10212         * remote.c (remote_download_tracepoint): Update.
10213         * python/py-breakpoint.c (bppy_get_location): Update.
10214         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10215         (gdbscm_breakpoint_location): Update.
10216         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10217         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10218         Change type to event_location_up.
10219         * breakpoint.c (create_overlay_event_breakpoint)
10220         (create_longjmp_master_breakpoint)
10221         (create_std_terminate_master_breakpoint)
10222         (create_exception_master_breakpoint)
10223         (breakpoint_event_location_empty_p, print_breakpoint_location)
10224         (print_one_breakpoint_location, create_thread_event_breakpoint)
10225         (init_breakpoint_sal, create_breakpoint)
10226         (print_recreate_ranged_breakpoint, break_range_command)
10227         (init_ada_exception_breakpoint, say_where): Update.
10228         (base_breakpoint_dtor): Don't call delete_event_location.
10229         (bkpt_print_recreate, tracepoint_print_recreate)
10230         (dprintf_print_recreate, update_static_tracepoint)
10231         (breakpoint_re_set_default): Update.
10232
10233 2017-04-12  Tom Tromey  <tom@tromey.com>
10234
10235         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10236         type of "to_do".  Update.
10237         (compute_stack_depth): Use std::vector.
10238
10239 2017-04-12  Tom Tromey  <tom@tromey.com>
10240
10241         * printcmd.c (find_instruction_backward): Use std::vector.
10242
10243 2017-04-12  Tom Tromey  <tom@tromey.com>
10244
10245         * symfile.c (objfilep): Remove typedef.
10246         (reread_symbols): Use a std::vector.
10247
10248 2017-04-12  Tom Tromey  <tom@tromey.com>
10249
10250         * mi/mi-main.c (exec_direction_forward): Remove.
10251         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10252         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10253         scoped_restore.
10254         * guile/guile.c (guile_repl_command, guile_command)
10255         (gdbscm_execute_gdb_command): Use scoped_restore.
10256         * go-exp.y (go_parse): Use scoped_restore.
10257         * d-exp.y (d_parse): Use scoped_restore.
10258         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10259         * c-exp.y (c_parse): Use scoped_restore.
10260
10261 2017-04-12  Tom Tromey  <tom@tromey.com>
10262
10263         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10264         (mi_parse): Update return type.
10265         (mi_parse_free): Remove.
10266         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10267         (mi_parse::~mi_parse): Rename from mi_parse_free.
10268         (mi_parse_cleanup): Remove.
10269         (mi_parse): Return a unique_ptr.  Use new.
10270         * mi/mi-main.c (mi_execute_command): Update.
10271
10272 2017-04-12  Tom Tromey  <tom@tromey.com>
10273
10274         * location.c (explicit_location_lex_one): Return a
10275         unique_xmalloc_ptr.
10276         (string_to_explicit_location): Update.  Remove cleanups.
10277
10278 2017-04-12  Tom Tromey  <tom@tromey.com>
10279
10280         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10281         (compare_value_and_voffset): Change type.  Update.
10282         (compute_vtable_size): Change type of "offset_vec".
10283         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10284         (gnuv3_get_typeid): Remove extraneous declaration.
10285
10286 2017-04-12  Tom Tromey  <tom@tromey.com>
10287
10288         * charset.h (wchar_iterator): Fix comment.
10289
10290 2017-04-12  Tom Tromey  <tom@tromey.com>
10291
10292         * charset.c (iconv_wrapper): New class.
10293         (cleanup_iconv): Remove.
10294         (convert_between_encodings): Use it.
10295
10296 2017-04-12  Tom Tromey  <tom@tromey.com>
10297
10298         * symfile.h (increment_reading_symtab): Update type.
10299         * symfile.c (decrement_reading_symtab): Remove.
10300         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10301         * psymtab.c (psymtab_to_symtab): Update.
10302         * dwarf2read.c (dw2_instantiate_symtab): Update.
10303
10304 2017-04-12  Tom Tromey  <tom@tromey.com>
10305
10306         * jit.c (struct jit_reader): Declare separately.  Add constructor
10307         and destructor.  Change type of "handle".
10308         (loaded_jit_reader): Define separately.
10309         (jit_reader_load): Update.  New "new".
10310         (jit_reader_unload_command): Use "delete".
10311         * gdb-dlfcn.h (struct dlclose_deleter): New.
10312         (gdb_dlhandle_up): New typedef.
10313         (gdb_dlopen, gdb_dlsym): Update types.
10314         (gdb_dlclose): Remove.
10315         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10316         (gdb_dlsym): Change type of "handle".
10317         (make_cleanup_dlclose): Remove.
10318         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10319         * compile/compile-c-support.c (load_libcc): Update.
10320
10321 2017-04-12  Tom Tromey  <tom@tromey.com>
10322
10323         * symtab.h (find_pcs_for_symtab_line): Change return type.
10324         * symtab.c (find_pcs_for_symtab_line): Change return type.
10325         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10326         type of "vec".  Update.
10327         (ltpy_get_pcs_for_line): Update.
10328         * linespec.c (decode_digits_ordinary): Update.
10329
10330 2017-04-12  Tom Tromey  <tom@tromey.com>
10331
10332         * tracepoint.c (actions_command): Update.
10333         * python/python.c (python_command, python_interactive_command):
10334         Update.
10335         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10336         * guile/guile.c (guile_command): Update.
10337         * defs.h (read_command_lines, read_command_lines_1): Return
10338         command_line_up.
10339         (command_lines_deleter): New struct.
10340         (command_line_up): New typedef.
10341         * compile/compile.c (compile_code_command)
10342         (compile_print_command): Update.
10343         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10344         command_line_up.
10345         (make_cleanup_free_command_lines): Remove.
10346         * cli/cli-script.c (get_command_line, read_command_lines_1)
10347         (copy_command_lines): Return command_line_up.
10348         (while_command, if_command, read_command_lines, define_command)
10349         (document_command): Update.
10350         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10351         Remove.
10352         * breakpoint.h (breakpoint_set_commands): Change type of
10353         "commands".
10354         * breakpoint.c (breakpoint_set_commands): Change type of
10355         "commands".  Update.
10356         (do_map_commands_command, update_dprintf_command_list)
10357         (create_tracepoint_from_upload): Update.
10358
10359 2017-04-12  Tom Tromey  <tom@tromey.com>
10360
10361         * tracepoint.c (scope_info): Update.
10362         * spu-tdep.c (spu_catch_start): Update.
10363         * python/python.c (gdbpy_decode_line): Update.
10364         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10365         * python/py-breakpoint.c (bppy_init): Update.
10366         * probe.c (parse_probes): Update.
10367         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10368         * location.h (event_location_deleter): New struct.
10369         (event_location_up): New typedef.
10370         (new_linespec_location, new_address_location, new_probe_location)
10371         (new_explicit_location, copy_event_location)
10372         (string_to_event_location, string_to_event_location_basic)
10373         (string_to_explicit_location): Update return type.
10374         (make_cleanup_delete_event_location): Remove.
10375         * location.c (new_linespec_location, new_address_location)
10376         (new_probe_location, new_explicit_location, copy_event_location):
10377         Return event_location_up.
10378         (delete_event_location_cleanup)
10379         (make_cleanup_delete_event_location): Remove.
10380         (string_to_explicit_location, string_to_event_location_basic)
10381         (string_to_event_location): Return event_location_up.
10382         * linespec.c (canonicalize_linespec, event_location_to_sals)
10383         (decode_line_with_current_source)
10384         (decode_line_with_last_displayed, decode_objc): Update.
10385         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10386         * completer.c (location_completer): Update.
10387         * cli/cli-cmds.c (edit_command, list_command): Update.
10388         * breakpoint.c (create_overlay_event_breakpoint)
10389         (create_longjmp_master_breakpoint)
10390         (create_std_terminate_master_breakpoint)
10391         (create_exception_master_breakpoint)
10392         (create_thread_event_breakpoint): Update.
10393         (init_breakpoint_sal): Update.  Remove some dead code.
10394         (create_breakpoint_sal): Change type of "location".  Update.
10395         (create_breakpoints_sal, create_breakpoint, break_command_1)
10396         (dprintf_command, break_range_command, until_break_command)
10397         (init_ada_exception_breakpoint)
10398         (strace_marker_create_sals_from_location)
10399         (update_static_tracepoint, trace_command, ftrace_command)
10400         (strace_command, create_tracepoint_from_upload): Update.
10401         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10402         * ax-gdb.c (agent_command_1): Update.
10403
10404 2017-04-12  Pedro Alves  <palves@redhat.com>
10405
10406         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10407         * configure.tgt: Handle i[34567]86-*-go32* and
10408         i[34567]86-*-msdosdjgpp*.
10409         * i386-tdep.c (i386_svr4_reg_to_regnum):
10410         Make extern.
10411         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10412         i386-go32-tdep.c.
10413         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10414         * i386-go32-tdep.c: New file.
10415         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10416         declarations.
10417
10418 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10419
10420         * aix-thread.c (pd_status2str): Change return type to const char *.
10421
10422 2017-04-12  Pedro Alves  <palves@redhat.com>
10423
10424         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10425         calls to set_gdbarch_gnu_triplet_regexp.
10426
10427 2017-04-12  Pedro Alves  <palves@redhat.com>
10428
10429         PR gdb/21323
10430         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10431         New enum value.
10432         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10433         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10434         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10435         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10436         * gdbarch.h, gdbarch.c: Regenerate.
10437         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10438         gdbarch_wchar_bit and gdbarch_wchar_signed.
10439         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10440         * arm-tdep.c (arm_gdbarch_init): Likewise.
10441         * avr-tdep.c (avr_gdbarch_init): Likewise.
10442         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10443         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10444         * i386-tdep.c (i386_go32_init_abi): Likewise.
10445         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10446         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10447         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10448         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10449         * sh-tdep.c (sh_gdbarch_init): Likewise.
10450         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10451         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10452         * windows-tdep.c (windows_init_abi): Likewise.
10453         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10454
10455 2017-04-12  Pedro Alves  <palves@redhat.com>
10456
10457         PR c++/21323
10458         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10459         cplus_primitive_type_char32_t>: New enum values.
10460         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10461         and cplus_primitive_type_char32_t.
10462         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10463         32, use the archtecture's built-in type for char16_t and char32_t,
10464         respectively.  Otherwise, fallback to init_integer_type as before,
10465         but make the type unsigned, and issue a complaint.
10466         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10467
10468 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10469
10470         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10471         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10472
10473 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10474
10475         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10476         'const char *'.
10477
10478 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10479
10480         * common/common-utils.c (free_vector_argv): New function.
10481         * common/common-utils.h: Include <vector>.
10482         (free_vector_argv): New prototype.
10483         * darwin-nat.c (darwin_create_inferior): Rewrite function
10484         prototype in order to constify "exec_file" and accept a
10485         "std::string" for "allargs".
10486         * fork-child.c: Include <vector>.
10487         (breakup_args): Rewrite function, using C++.
10488         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10489         and accept "std::string" for "allargs".  Update the code to
10490         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10491         and "execvp".
10492         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10493         order to constify "exec_file" and accept a "std::string" for
10494         "allargs".
10495         * go32-nat.c (go32_create_inferior): Likewise.
10496         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10497         * infcmd.c (run_command_1): Constify "exec_file".  Use
10498         "std::string" for inferior arguments.
10499         * inferior.h (fork_inferior): Update prototype.
10500         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10501         prototype in order to constify "exec_file" and accept a
10502         "std::string" for "allargs".
10503         * nto-procfs.c (procfs_create_inferior): Likewise.
10504         * procfs.c (procfs_create_inferior): Likewise.
10505         * remote-sim.c (gdbsim_create_inferior): Likewise.
10506         * remote.c (extended_remote_run): Update code to accept
10507         "std::string" as argument.
10508         (extended_remote_create_inferior): Rewrite function prototype in
10509         order to constify "exec_file" and accept a "std::string" for
10510         "allargs".
10511         * rs6000-nat.c (super_create_inferior): Likewise.
10512         (rs6000_create_inferior): Likewise.
10513         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10514         * windows-nat.c (windows_create_inferior): Likewise.
10515
10516 2017-04-11  Pedro Alves  <palves@redhat.com>
10517
10518         * thread.c: Fix whitespace throughout.
10519
10520 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10521
10522         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10523
10524 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10525
10526         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10527
10528 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10529
10530         PR gdb/21364
10531         * osdata.c (info_osdata): Check if 'type' is an empty string
10532         instead of NULL.
10533
10534 2017-04-10  Pedro Alves  <palves@redhat.com>
10535
10536         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10537         (ptid_to_global_thread_id, in_thread_list)
10538         (do_captured_list_thread_ids, set_resumed, set_running)
10539         (set_executing, set_stop_requested, finish_thread_state)
10540         (validate_registers_access, can_access_registers_ptid)
10541         (print_thread_info_1, switch_to_thread)
10542         (do_restore_current_thread_cleanup)
10543         (make_cleanup_restore_current_thread, thread_command)
10544         (thread_name_command): Use operator== instead of ptid_equal.
10545
10546 2017-04-10  Pedro Alves  <palves@redhat.com>
10547
10548         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10549         (current_thread_cleanup_chain): Delete.
10550         (restore_current_thread_cleanup_dtor)
10551         (make_cleanup_restore_current_thread): Remove references to
10552         current_thread_cleanup_chain.
10553
10554 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10555
10556         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10557         REG_UNKNOWN.
10558
10559 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10560
10561         PR gdb/19942
10562         * gdbthread.h (thread_info::deletable): New method.
10563         (thread_info::incref): New method.
10564         (thread_info::decref): New method.
10565         (thread_info::refcount): Move it to private.
10566         * infrun.c (save_stop_context): Call inc_refcount.
10567         (release_stop_context_cleanup): Likewise.
10568         * thread.c (set_thread_exited): New function.
10569         (init_thread_list): Delete "tp" only it is deletable, otherwise
10570         call set_thread_exited.
10571         (delete_thread_1): Call set_thread_exited.
10572         (current_thread_cleanup) <inferior_pid>: Remove.
10573         <thread>: New field.
10574         (restore_current_thread_ptid_changed): Removed.
10575         (do_restore_current_thread_cleanup): Adjust.
10576         (restore_current_thread_cleanup_dtor): Don't call
10577         find_thread_ptid.
10578         (set_thread_refcount): Use dec_refcount.
10579         (make_cleanup_restore_current_thread): Adjust.
10580         (thread_apply_all_command): Call inc_refcount.
10581         (_initialize_thread): Don't call
10582         observer_attach_thread_ptid_changed.
10583
10584 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10585
10586         * thread.c (delete_thread_1): Hoist code on marking thread as
10587         exited.
10588
10589 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10590
10591         * windows-nat.c (windows_detach): Initialize ptid with
10592         minus_one_ptid.
10593
10594 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10595
10596         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10597
10598 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10599
10600         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10601         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10602         (bfin_pseudo_register_write): Likewise
10603
10604 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10605
10606         * common/ptid.h (struct ptid): Change to...
10607         (class ptid_t): ... this.
10608         <ptid_t>: New constructors.
10609         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10610         matches>: New methods.
10611         <make_null, make_minus_one>: New static methods.
10612         <pid>: Rename to...
10613         <m_pid>: ...this.
10614         <lwp>: Rename to...
10615         <m_lwp>: ...this.
10616         <tid>: Rename to...
10617         <m_tid>: ...this.
10618         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10619         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10620         as references, move comment to class ptid_t.
10621         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10622         ptid_t static methods.
10623         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10624         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10625         Take ptid arguments as references, implement using ptid_t methods.
10626         * unittests/ptid-selftests.c: New file.
10627         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10628         unittests/ptid-selftests.c.
10629         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10630
10631 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10632
10633         * python/python.c (python_run_simple_file): Cast mode literal to
10634         non-const char pointer as expected by PyFile_FromString.
10635
10636 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10637
10638         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10639         minus_one_ptid and null_ptid.
10640
10641 2017-04-05  Pedro Alves  <palves@redhat.com>
10642
10643         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10644         * configure: Regenerate.
10645
10646 2017-04-05  Pedro Alves  <palves@redhat.com>
10647
10648         * ada-exp.y (yyerror): Constify.
10649         * ada-lang.c (bound_name, get_selections)
10650         (ada_variant_discrim_type)
10651         (ada_variant_discrim_name, ada_value_struct_elt)
10652         (ada_lookup_struct_elt_type, is_unchecked_variant)
10653         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10654         (catch_ada_exception_command_split)
10655         (catch_ada_assert_command_split, catch_assert_command)
10656         (ada_op_name): Constify.
10657         * ada-lang.h (ada_yyerror, get_selections)
10658         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10659         * arc-tdep.c (arc_print_frame_cache): Constify.
10660         * arm-tdep.c (arm_skip_stub): Constify.
10661         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10662         (gen_aggregate_elt_ref): Constify.
10663         * bcache.c (print_bcache_statistics): Constify.
10664         * bcache.h (print_bcache_statistics): Constify.
10665         * break-catch-throw.c (catch_exception_command_1):
10666         * breakpoint.c (struct ep_type_description::description):
10667         Constify.
10668         (add_solib_catchpoint): Constify.
10669         (catch_fork_command_1): Add cast.
10670         (add_catch_command): Constify.
10671         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10672         Constify.
10673         * bsd-uthread.c (bsd_uthread_state): Constify.
10674         * buildsym.c (patch_subfile_names): Constify.
10675         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10676         Constify.
10677         * c-exp.y (yyerror): Constify.
10678         (token::oper): Constify.
10679         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10680         * c-varobj.c (cplus_describe_child): Constify.
10681         * charset.c (find_charset_names): Add cast.
10682         (find_charset_names): Constify array and add const_cast.
10683         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10684         (edit_command): Constify.
10685         * cli/cli-decode.c (lookup_cmd): Constify.
10686         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10687         Constify.
10688         (struct dump_context): Constify.
10689         (add_dump_command, restore_command): Constify.
10690         * cli/cli-script.c (get_command_line): Constify.
10691         * cli/cli-script.h (get_command_line): Constify.
10692         * cli/cli-utils.c (check_for_argument): Constify.
10693         * cli/cli-utils.h (check_for_argument): Constify.
10694         * coff-pe-read.c (struct read_pe_section_data): Constify.
10695         * command.h (lookup_cmd): Constify.
10696         * common/print-utils.c (decimal2str): Constify.
10697         * completer.c (gdb_print_filename): Constify.
10698         * corefile.c (set_gnutarget): Constify.
10699         * cp-name-parser.y (yyerror): Constify.
10700         * cp-valprint.c (cp_print_class_member): Constify.
10701         * cris-tdep.c (cris_register_name, crisv32_register_name):
10702         Constify.
10703         * d-exp.y (yyerror): Constify.
10704         (struct token::oper): Constify.
10705         * d-lang.h (d_yyerror): Constify.
10706         * dbxread.c (struct header_file_location::name): Constify.
10707         (add_old_header_file, add_new_header_file, last_function_name)
10708         (dbx_next_symbol_text, add_bincl_to_list)
10709         (find_corresponding_bincl_psymtab, set_namestring)
10710         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10711         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10712         * defs.h (command_line_input, print_address_symbolic)
10713         (deprecated_readline_begin_hook): Constify.
10714         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10715         Constify.
10716         * event-top.c (handle_line_of_input): Constify and add cast.
10717         * exceptions.c (catch_errors): Constify.
10718         * exceptions.h (catch_errors): Constify.
10719         * expprint.c (print_subexp_standard, op_string, op_name)
10720         (op_name_standard, dump_raw_expression, dump_raw_expression):
10721         * expression.h (op_name, op_string, dump_raw_expression):
10722         Constify.
10723         * f-exp.y (yyerror): Constify.
10724         (struct token::oper): Constify.
10725         (struct f77_boolean_val::name): Constify.
10726         * f-lang.c (f_word_break_characters): Constify.
10727         * f-lang.h (f_yyerror): Constify.
10728         * fork-child.c (fork_inferior): Add cast.
10729         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10730         (new_variant): Constify.
10731         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10732         * gdbarch.c: Regenerate.
10733         * gdbcore.h (set_gnutarget): Constify.
10734         * go-exp.y (yyerror): Constify.
10735         (token::oper): Constify.
10736         * go-lang.h (go_yyerror): Constify.
10737         * go32-nat.c (go32_sysinfo): Constify.
10738         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10739         * guile/scm-cmd.c (cmdscm_function): Constify.
10740         * guile/scm-param.c (pascm_param_value): Constify.
10741         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10742         (h8300sx_register_name): Constify.
10743         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10744         Constify.
10745         * ia64-tdep.c (ia64_register_names): Constify.
10746         * infcmd.c (construct_inferior_arguments): Constify.
10747         (path_command, attach_post_wait): Constify.
10748         * language.c (show_range_command, show_case_command)
10749         (unk_lang_error): Constify.
10750         * language.h (language_defn::la_error)
10751         (language_defn::la_name_of_this): Constify.
10752         * linespec.c (decode_line_2): Constify.
10753         * linux-thread-db.c (thread_db_err_str): Constify.
10754         * lm32-tdep.c (lm32_register_name): Constify.
10755         * m2-exp.y (yyerror): Constify.
10756         * m2-lang.h (m2_yyerror): Constify.
10757         * m32r-tdep.c (m32r_register_names): Constify and make static.
10758         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10759         * m88k-tdep.c (m88k_register_name): Constify.
10760         * macroexp.c (appendmem): Constify.
10761         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10762         (upgrade_type, parse_external, parse_partial_symbols)
10763         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10764         (new_symbol): Constify.
10765         * memattr.c (mem_info_command): Constify.
10766         * mep-tdep.c (register_name_from_keyword): Constify.
10767         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10768         Constify.
10769         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10770         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10771         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10772         cast.
10773         (mi_execute_async_cli_command): Constify.
10774         * mips-tdep.c (mips_register_name): Constify.
10775         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10776         (am33_register_name, am33_2_register_name)
10777         * moxie-tdep.c (moxie_register_names): Constify.
10778         * nat/linux-osdata.c (osdata_type): Constify fields.
10779         * nto-tdep.c (nto_parse_redirection): Constify.
10780         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10781         (lookup_child_selector): Constify.
10782         (objc_methcall::name): Constify.
10783         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10784         (lookup_struct_typedef): Constify.
10785         * objfiles.c (pc_in_section): Constify.
10786         * objfiles.h (pc_in_section): Constify.
10787         * p-exp.y (struct token::oper): Constify.
10788         (yyerror): Constify.
10789         * p-lang.h (pascal_yyerror): Constify.
10790         * parser-defs.h (op_name_standard): Constify.
10791         (op_print::string): Constify.
10792         (exp_descriptor::op_name): Constify.
10793         * printcmd.c (print_address_symbolic): Constify.
10794         * psymtab.c (print_partial_symbols): Constify.
10795         * python/py-breakpoint.c (stop_func): Constify.
10796         (bppy_get_expression): Constify.
10797         * python/py-cmd.c (cmdpy_completer::name): Constify.
10798         (cmdpy_function): Constify.
10799         * python/py-event.c (evpy_add_attribute)
10800         (gdbpy_initialize_event_generic): Constify.
10801         * python/py-event.h (evpy_add_attribute)
10802         (gdbpy_initialize_event_generic): Constify.
10803         * python/py-evts.c (add_new_registry): Constify.
10804         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10805         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10806         * python/py-inferior.c (get_buffer): Add cast.
10807         * python/py-param.c (parm_constant::name): Constify.
10808         * python/py-unwind.c (fprint_frame_id): Constify.
10809         * python/python.c (gdbpy_parameter_value): Constify.
10810         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10811         * remote.c (memory_packet_config::name): Constify.
10812         (show_packet_config_cmd, remote_write_bytes)
10813         (remote_buffer_add_string):
10814         * reverse.c (exec_reverse_once): Constify.
10815         * rs6000-tdep.c (variant::name, variant::description): Constify.
10816         * rust-exp.y (rustyyerror): Constify.
10817         * rust-lang.c (rust_op_name): Constify.
10818         * rust-lang.h (rustyyerror): Constify.
10819         * serial.h (serial_ops::name): Constify.
10820         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10821         (sh_sh3e_register_name, sh_sh2e_register_name)
10822         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10823         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10824         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10825         (sh_sh4al_dsp_register_name): Constify.
10826         * sh64-tdep.c (sh64_register_name): Constify.
10827         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10828         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10829         * stabsread.c (patch_block_stabs, read_type_number)
10830         (ref_map::stabs, ref_add, process_reference)
10831         (symbol_reference_defined, define_symbol, define_symbol)
10832         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10833         (read_one_struct_field, read_struct_fields, read_baseclasses)
10834         (read_tilde_fields, read_struct_type, read_array_type)
10835         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10836         (read_huge_number, read_range_type, read_args, common_block_start)
10837         (find_name_end): Constify.
10838         * stabsread.h (common_block_start, define_symbol)
10839         (process_one_symbol, symbol_reference_defined, ref_add):
10840         * symfile.c (get_section_index, add_symbol_file_command):
10841         * symfile.h (get_section_index): Constify.
10842         * target-descriptions.c (tdesc_type::name): Constify.
10843         (tdesc_free_type): Add cast.
10844         * target.c (find_default_run_target):
10845         (add_deprecated_target_alias, find_default_run_target)
10846         (target_announce_detach): Constify.
10847         (do_option): Constify.
10848         * target.h (add_deprecated_target_alias): Constify.
10849         * thread.c (print_thread_info_1): Constify.
10850         * top.c (deprecated_readline_begin_hook, command_line_input):
10851         Constify.
10852         (init_main): Add casts.
10853         * top.h (handle_line_of_input): Constify.
10854         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10855         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10856         (tfind_command): Rename to ...
10857         (tfind_command_1): ... this and constify.
10858         (tfind_command): New function.
10859         (tfind_end_command, tfind_start_command): Adjust.
10860         (encode_source_string): Constify.
10861         * tracepoint.h (encode_source_string): Constify.
10862         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10863         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10864         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10865         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10866         * tui/tui-win.c (parse_scrolling_args): Constify.
10867         * tui/tui-windata.c (tui_erase_data_content): Constify.
10868         * tui/tui-windata.h (tui_erase_data_content): Constify.
10869         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10870         * tui/tui.c (tui_enable): Add cast.
10871         * utils.c (defaulted_query): Constify.
10872         (init_page_info): Add cast.
10873         (puts_debug, subset_compare): Constify.
10874         * utils.h (subset_compare): Constify.
10875         * varobj.c (varobj_format_string): Constify.
10876         * varobj.h (varobj_format_string): Constify.
10877         * vax-tdep.c (vax_register_name): Constify.
10878         * windows-nat.c (windows_detach): Constify.
10879         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10880         * xml-support.c (gdb_xml_end_element): Constify.
10881         * xml-tdesc.c (tdesc_start_reg): Constify.
10882         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10883         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10884         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10885
10886 2017-04-05  Pedro Alves  <palves@redhat.com>
10887
10888         * proc-api.c (struct trans): Constify.
10889         (procfs_note): Constify.
10890         * proc-events.c (struct trans, syscall_table):
10891         * proc-flags.c (struct trans): Constify.
10892         * proc-utils.h (procfs_note): Constify.
10893         * proc-why.c (struct trans): Constify.
10894         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10895         (procfs_detach): Constify.
10896         * sol-thread.c (struct string_map): Constify.
10897         (td_err_string, td_state_string): Constify.
10898
10899 2017-04-05  Pedro Alves  <palves@redhat.com>
10900
10901         * proc-api.c (procfs_filename): Don't initialize
10902         procfs_filename.
10903         (prepare_to_trace): Assume procfs_filename is non-NULL.
10904         (_initialize_proc_api): Give procfs_filename a default value here.
10905
10906 2017-04-05  Pedro Alves  <palves@redhat.com>
10907
10908         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10909         'cond_string' parameter.
10910         (extract_exception_regexp): Constify 'string' parameter.
10911         (catch_exception_command_1): Constify.
10912         * breakpoint.c (init_catchpoint)
10913         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10914         parameter.
10915         (ep_parse_optional_if_clause, catch_fork_command_1)
10916         (catch_exec_command_1): Constify.
10917         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10918         parameter.
10919         (ep_parse_optional_if_clause): Constify.
10920         * cli/cli-utils.c (remove_trailing_whitespace)
10921         (check_for_argument): Constify.
10922         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10923         non-const overload.
10924         (check_for_argument): Likewise.
10925
10926 2017-04-05  Pedro Alves  <palves@redhat.com>
10927
10928         * event-top.c (command_line_handler): Add cast to execute_command
10929         call.
10930         * record-btrace.c (cmd_record_btrace_bts_start)
10931         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10932         (cmd_record_btrace_start): Add cast to execute_command call.
10933         * record-full.c (record_full_goto_insn):
10934         * record.c (record_start, record_stop): Add cast to
10935         execute_command_to_string calls.
10936         (cmd_record_start): Add cast to execute_command calls.
10937
10938 2017-04-05  Pedro Alves  <palves@redhat.com>
10939
10940         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10941         static inline function.
10942         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10943         array and use gdb_PyArg_ParseTupleAndKeywords.
10944         * python/py-cmd.c (cmdpy_init): Likewise.
10945         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10946         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10947         (infpy_search_memory): Likewise.
10948         * python/py-objfile.c (objfpy_add_separate_debug_file)
10949         (gdbpy_lookup_objfile): Likewise.
10950         * python/py-symbol.c (gdbpy_lookup_symbol)
10951         (gdbpy_lookup_global_symbol): Likewise.
10952         * python/py-type.c (gdbpy_lookup_type): Likewise.
10953         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10954         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10955         Likewise.
10956
10957 2017-04-05  Pedro Alves  <palves@redhat.com>
10958
10959         * python/python-internal.h (gdb_PyGetSetDef): New type.
10960         * python/py-block.c (block_object_getset)
10961         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10962         * python/py-event.c (event_object_getset)
10963         (finish_breakpoint_object_getset): Likewise.
10964         * python/py-inferior.c (inferior_object_getset): Likewise.
10965         * python/py-infthread.c (thread_object_getset): Likewise.
10966         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10967         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10968         * python/py-objfile.c (objfile_getset): Likewise.
10969         * python/py-progspace.c (pspace_getset): Likewise.
10970         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10971         Likewise.
10972         * python/py-record.c (recpy_record_getset): Likewise.
10973         * python/py-symbol.c (symbol_object_getset): Likewise.
10974         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10975         Likewise.
10976         * python/py-type.c (type_object_getset, field_object_getset):
10977         Likewise.
10978         * python/py-value.c (value_object_getset): Likewise.
10979
10980 2017-04-05  Pedro Alves  <palves@redhat.com>
10981
10982         * python/python-internal.h (gdb_PyObject_CallMethod)
10983         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10984         New functions.
10985         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10986         (PySys_GetObject, PySys_SetPath): New macros.
10987
10988 2017-04-05  Pedro Alves  <palves@redhat.com>
10989
10990         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10991         info_osdata_command.
10992         * osdata.c (info_osdata_command): Rename to ...
10993         (info_osdata): ... this.  Constify 'type' parameter, and remove
10994         the 'from_tty' parameter.  Accept NULL TYPE.
10995         (info_osdata_command): New function.
10996         * osdata.h (info_osdata_command): Remove declaration.
10997         (info_osdata): New declaration.
10998
10999 2017-04-05  Pedro Alves  <palves@redhat.com>
11000
11001         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11002         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11003         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11004         parameter.
11005         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11006         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11007         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11008         parameter.
11009         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11010         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11011         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11012         (mi_cmd_file_list_exec_source_files)
11013         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11014         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11015         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11016         parameter.
11017         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11018         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11019         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11020         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11021         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11022         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11023         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11024         'command' parameter.
11025         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11026         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11027         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11028         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11029         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11030         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11031         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11032         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11033         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11034         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11035         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11036         parameter.
11037         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11038         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11039         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11040         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11041         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11042         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11043         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11044         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11045         (mi_cmd_data_list_changed_registers)
11046         (mi_cmd_data_write_register_values)
11047         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11048         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11049         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11050         (mi_cmd_list_features, mi_cmd_list_target_features)
11051         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11052         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11053         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11054         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11055         (mi_cmd_trace_frame_collected): Constify 'command'
11056         parameter.
11057         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11058         'command' parameter.
11059
11060 2017-04-05  Pedro Alves  <palves@redhat.com>
11061
11062         * ada-lang.c (ada_completer_word_break_characters): Now a const
11063         array.
11064         (ada_get_gdb_completer_word_break_characters): Constify.
11065         * completer.c (gdb_completer_command_word_break_characters)
11066         (gdb_completer_file_name_break_characters)
11067         (gdb_completer_quote_characters): Now const arrays.
11068         (get_gdb_completer_quote_characters): Constify.
11069         (set_rl_completer_word_break_characters): New function.
11070         (set_gdb_completion_word_break_characters)
11071         (complete_line_internal): Use it.
11072         * completer.h (get_gdb_completer_quote_characters): Constify.
11073         (set_rl_completer_word_break_characters): Declare.
11074         * f-lang.c (f_word_break_characters): Constify.
11075         * language.c (default_word_break_characters): Constify.
11076         * language.h (language_defn::la_word_break_characters): Constify.
11077         (default_word_break_characters): Constify.
11078         * top.c (init_main): Use set_rl_completer_word_break_characters.
11079
11080 2017-04-05  Pedro Alves  <palves@redhat.com>
11081
11082         * aix-thread.c (aix_thread_pid_to_str)
11083         (aix_thread_extra_thread_info): Constify.
11084         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11085         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11086         (bsd_uthread_pid_to_str): Constify.
11087         * corelow.c (core_pid_to_str): Constify.
11088         * darwin-nat.c (darwin_pid_to_str): Constify.
11089         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11090         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11091         Constify.
11092         * gnu-nat.c (gnu_pid_to_str): Constify.
11093         * go32-nat.c (go32_pid_to_str): Constify.
11094         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11095         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11096         * inferior.c (inferior_pid_to_str): Constify.
11097         * linux-nat.c (linux_nat_pid_to_str): Constify.
11098         * linux-tdep.c (linux_core_pid_to_str): Constify.
11099         * linux-thread-db.c (thread_db_pid_to_str)
11100         (thread_db_extra_thread_info): Constify.
11101         * nto-tdep.c (nto_extra_thread_info): Constify.
11102         * nto-tdep.h (nto_extra_thread_info): Constify.
11103         * obsd-nat.c (obsd_pid_to_str): Constify.
11104         * procfs.c (procfs_pid_to_str): Constify.
11105         * ravenscar-thread.c (ravenscar_extra_thread_info)
11106         (ravenscar_pid_to_str): Constify.
11107         * remote-sim.c (gdbsim_pid_to_str): Constify.
11108         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11109         Constify.
11110         * sol-thread.c (solaris_pid_to_str): Constify.
11111         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11112         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11113         * target.c (default_pid_to_str, target_pid_to_str)
11114         (normal_pid_to_str, default_pid_to_str): Constify.
11115         * target.h (target_ops::to_pid_to_str)
11116         (target_ops::to_extra_thread_info): Constify.
11117         (target_pid_to_str, normal_pid_to_str): Constify.
11118         * windows-nat.c (windows_pid_to_str): Constify.
11119         * gdbarch.sh (core_pid_to_str): Constify.
11120         * target-delegates.c: Regenerate.
11121         * gdbarch.h, gdbarch.c: Regenerate.
11122
11123 2017-04-05  Pedro Alves  <palves@redhat.com>
11124
11125         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11126         the memory of the temporary warning_pre_print override.
11127         * utils.c (warning_pre_print): Constify.
11128         * utils.h (warning_pre_print): Constify.
11129
11130 2017-04-05  Pedro Alves  <palves@redhat.com>
11131
11132         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11133         (shell_command): New function.
11134         (make_command): Use std::string.
11135         (init_cli_cmds): Register shell_command instead of shell_escape.
11136
11137 2017-04-05  Pedro Alves  <palves@redhat.com>
11138
11139         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11140         * tracepoint.c (default_collect): Don't initialize.
11141
11142 2017-04-05  Pedro Alves  <palves@redhat.com>
11143
11144         * macroexp.c (macro_buffer::shared): Now a bool.
11145         (init_buffer): Update.
11146         (init_shared_buffer): Constify 'addr' parameter.
11147         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11148         casts.
11149
11150 2017-04-05  Pedro Alves  <palves@redhat.com>
11151
11152         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11153         * disasm.c (set_disassembler_options): Constify local.
11154         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11155
11156 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11157
11158         PR gdb/21352
11159         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11160         option.
11161
11162 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11163
11164         * frame.c (frame_unwind_register_unsigned): Call
11165         frame_unwind_register_value.
11166
11167 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11168
11169         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11170         Use gdb_test_multiple, and don't match anchor.
11171
11172 2017-04-05  Pedro Alves  <palves@redhat.com>
11173
11174         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11175         (Write After Approval): Remove Simon Marchi.
11176
11177 2017-04-05  Pedro Alves  <palves@redhat.com>
11178
11179         * common/gdb_optional.h (optional::optional): Make constexpr and
11180         initialize m_dummy.
11181
11182 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11183
11184         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11185         (amd64fbsd_jmp_buf_reg_offset): Remove.
11186         (amd64fbsd_supply_uthread): Remove function.
11187         (amd64fbsd_collect_uthread): Remove function.
11188         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11189         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11190         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11191         (fbsd-nat.c): Update comment.
11192         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11193         (i386fbsd_jmp_buf_reg_offset): Remove.
11194         (i386fbsd_supply_uthread): Remove function.
11195         (i386fbsd_collect_uthread): Remove function.
11196         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11197
11198 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11199
11200         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11201         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11202         * NEWS: Mention that support for FreeBSD/alpha was removed.
11203         * alpha-fbsd-tdep.c: Delete file.
11204         * config/alpha/fbsd.mh: Delete file.
11205         * configure.host: Delete alpha*-*-freebsd* and
11206         alpha*-*-kfreebsd*-gnu.
11207         * configure.tgt: Delete alpha*-*-freebsd* and
11208         alpha*-*-kfreebsd*-gnu.
11209
11210 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11211
11212         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11213         amd64bsd_store_inferior_registers): Use ptid from regcache.
11214
11215 2017-04-04  Pedro Alves  <palves@redhat.com>
11216
11217         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11218         data fields, make them private and add "m_" prefixes.
11219         (lnp_state_machine::lnp_state_machine): New ctor.
11220         (record_line, check_line_address, handle_set_discriminator)
11221         (handle_set_address, handle_advance_pc, handle_special_opcode)
11222         (handle_advance_line, handle_set_file, handle_negate_stmt)
11223         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11224         (end_sequence, advance_line): New methods.
11225         (m_gdbarch, m_record_lines_p): New fields.
11226         (lnp_reader_state): Delete.
11227         (dwarf_record_line): Rename to ...
11228         (lnp_state_machine::record_line): ... adjust.
11229         (init_lnp_state_machine): Delete.
11230         (lnp_state_machine::lnp_state_machine): New.
11231         (check_line_address): Rename to ...
11232         (lnp_state_machine::check_line_address): This.
11233         (dwarf_decode_lines_1): Remove reference to "reader_state".
11234         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11235         State machine internal state manipulation moved to
11236         lnp_state_machine methods.
11237
11238 2017-04-04  Pedro Alves  <palves@redhat.com>
11239
11240         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11241         unittests/offset-type-selftests.c.
11242         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11243         * common/offset-type.h: New file.
11244         * common/preprocessor.h: New file.
11245         * common/traits.h: New file.
11246         * common/valid-expr.h: New file.
11247         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11248         sect_offset and cu_offset strong typedefs throughout.
11249         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11250         typedefs throughout.
11251         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11252         sect_offset and cu_offset strong typedefs throughout.
11253         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11254         typedefs throughout.
11255         * gdbtypes.h: Include "common/offset-type.h".
11256         (cu_offset): Now an offset type (strong typedef) instead of a
11257         struct.
11258         (sect_offset): Likewise.
11259         (union call_site_parameter_u): Rename "param_offset" field to
11260         "param_cu_off".
11261         * unittests/offset-type-selftests.c: New file.
11262
11263 2017-04-04  Pedro Alves  <palves@redhat.com>
11264
11265         * common/underlying.h: New file.
11266         * dwarf2read.c: Include "common/gdb_optional.h" and
11267         "common/underlying.h".
11268         (dir_index, file_name_index): New types.
11269         (file_entry): Use them.
11270         (file_entry::include): Use to_underlying.
11271         (line_header::add_file_name): Use dir_index.
11272         (read_formatted_entries): Use gdb::optional.  Read form before
11273         writting to file_entry.
11274         (dwarf_decode_line_header): Use dir_index.
11275         (lnp_state_machine::current_file): Use to_underlying.
11276         (lnp_state_machine::file): Change type to file_name_index.
11277         (dwarf_record_line): Use to_underlying.
11278         (init_lnp_state_machine): Use file_name_index.
11279         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11280
11281 2017-04-04  Pedro Alves  <palves@redhat.com>
11282
11283         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11284         operator bool, has_value and get methods.
11285
11286 2017-04-04  Pedro Alves  <palves@redhat.com>
11287
11288         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11289         fields.
11290         (line_header): Initialize all data fields.  Change type of
11291         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11292         Change type of include_dirs to std::vector<const char *>.  Remove
11293         num_include_dirs, include_dirs_size.  Change type of file_names to
11294         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11295         (line_header::line_header): New.
11296         (line_header::add_include_dir, line_header::add_file_name): New
11297         methods.
11298         (line_header::include_dir_at): Remove NULL check.
11299         (line_header::file_name_at): Add const overload.
11300         (line_header_up): New unique_ptr typedef.
11301         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11302         std::vector.  Remove free_line_header call.
11303         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11304         free_line_header call.
11305         (free_cu_line_header): Delete.
11306         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11307         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11308         Adjust to use std::vector.
11309         (free_line_header): Delete.
11310         (free_line_header_voidp): Use delete.
11311         (add_include_dir): Replace with ...
11312         (line_header::add_include_dir): ... this method.  Use std::vector.
11313         (add_file_name): Replace with ...
11314         (line_header::add_file_name): ... this method.  Use std::vector.
11315         (add_include_dir_stub): Delete.
11316         (read_formatted_entries): Remove memset.
11317         (dwarf_decode_line_header): Return a line_header_up instead of a
11318         raw pointer.  Remove cleanup handling.  Pass lambdas to
11319         read_formatted_entries.  Adjust to use line_header methods.
11320         (dwarf_decode_lines_1): Adjust to use line_header methods.
11321         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11322         use std::vector.
11323
11324 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11325
11326         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11327         instead of struct ptid.
11328
11329 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11330
11331         * frame.c (get_frame_register_bytes): Unwind using value.
11332         (put_frame_register_bytes): Likewise.
11333
11334 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11335
11336         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11337         aggregate-like.
11338
11339 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11340
11341         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11342
11343 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11344
11345         * gdbthread.h (struct thread_info): Declare constructor and
11346         destructor.  Add some in-class member initializers.
11347         * thread.c (free_thread): Remove.
11348         (init_thread_list): Call delete instead of free_thread.
11349         (new_thread): Call thread_info constructor.
11350         (thread_info::thread_info): New function.
11351         (thread_info::~thread_info): New function.
11352         (delete_thread_1): Call delete instead of free_thread.
11353         (make_cleanup_restore_current_thread): Move tp and frame to
11354         inner block.
11355
11356 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11357
11358         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11359         (arc_skip_prologue): Likewise.
11360         (arc_make_frame_cache): Likewise.
11361         (arc_pv_get_operand): New function.
11362         (arc_is_in_prologue): Likewise.
11363         (arc_analyze_prologue): Likewise.
11364         (arc_print_frame_cache): Likewise.
11365         (MAX_PROLOGUE_LENGTH): New constant.
11366
11367 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11368
11369         * configure.tgt: Add arc-insn.o.
11370         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11371         (dump_arc_instruction_command): New function.
11372         (arc_fprintf_disasm): Likewise.
11373         (arc_disassemble_info): Likewise.
11374         (arc_insn_get_operand_value): Likewise.
11375         (arc_insn_get_operand_value_signed): Likewise.
11376         (arc_insn_get_memory_base_reg): Likewise.
11377         (arc_insn_get_memory_offset): Likewise.
11378         (arc_insn_get_branch_target): Likewise.
11379         (arc_insn_dump): Likewise.
11380         (arc_insn_get_linear_next_pc): Likewise.
11381         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11382         (arc_disassemble_info): Likewise.
11383         (arc_insn_get_branch_target): Likewise.
11384         (arc_insn_get_linear_next_pc): Likewise.
11385         * NEWS: Mention new "maint print arc arc-instruction".
11386
11387 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11388
11389         * arc-tdep (maintenance_print_arc_list): New variable.
11390         (maintenance_print_arc_command): New function.
11391
11392 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11393
11394         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11395         Add "limm" and "reserved".
11396         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11397         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11398         * arc-tdep.h (arc_regnum): Likewise.
11399
11400 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11401
11402         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11403         for THREADPTR register.
11404         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11405         register.
11406         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11407         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11408         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11409
11410 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11411
11412         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11413         registers above gdbarch_num_regs (gdbarch) as privileged in
11414         call0 ABI.
11415
11416 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11417
11418         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11419         for a single specified register or for all registers in
11420         a0_base..a0_base + C0_NREGS range.
11421         (supply_gregset_reg): Call regcache_raw_supply for a single
11422         specified register or for all registers in a0_base..a0_base +
11423         C0_NREGS range.
11424
11425 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11426
11427         * arch/xtensa.h (C0_NREGS): Add definition.
11428         * xtensa-tdep.c (C0_NREGS): Remove definition.
11429
11430 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11431
11432         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11433         Drop xtensa_default_isa initialization.
11434         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11435
11436 2017-03-27  Pedro Alves  <palves@redhat.com>
11437
11438         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11439         (file_entry::include_dir): New method.
11440         (line_header::include_dir_at, line_header::file_name_at): New
11441         methods.
11442         (setup_type_unit_groups, setup_type_unit_groups)
11443         (psymtab_include_file_name): Simplify using the new methods.
11444         (lnp_state_machine) <the_line_header>: New field.
11445         <file>: Add comment.
11446         (lnp_state_machine::current_file): New method.
11447         (dwarf_record_line): Simplify using the new methods.
11448         (init_lnp_state_machine): Initialize the "the_line_header" field.
11449         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11450         Simplify using the new methods.
11451
11452 2017-03-27  Pedro Alves  <palves@redhat.com>
11453
11454         * cp-name-parser.y (make_empty): Delete.
11455         (demangler_special, nested_name, ptr_operator, array_indicator)
11456         (direct_declarator, declarator_1): Use fill_comp instead of
11457         make_empty.
11458
11459 2017-03-27  Pedro Alves  <palves@redhat.com>
11460
11461         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11462         to ATTRIBUTE_PRINTF.
11463         * solib-target.c (library_list_start_list): Print "string" not
11464         "version".
11465         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11466         gdb_xml_error call.
11467
11468 2017-03-27  Pedro Alves  <palves@redhat.com>
11469
11470         * dwarf2read.c (struct file_and_directory): New.
11471         (dwarf2_get_dwz_file): Adjust to use std::string.
11472         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11473         (find_file_and_directory): Adjust to return a file_and_directory
11474         object.
11475         (read_file_scope): Adjust to use file_and_directory.  Remove
11476         make_cleanup/do_cleanups calls.
11477         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11478         make_cleanup/do_cleanups calls.
11479         * python/python.c (do_start_initialization): Adjust to ldirname
11480         returning a std::string.
11481         * utils.c (ldirname): Now returns a std::string.
11482         * utils.h (ldirname): Change return type to std::string.
11483         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11484         returning a std::string.
11485         * xml-tdesc.c (file_read_description_xml): Likewise.
11486
11487 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11488
11489         * regcache.c (regcache_debug_print_register): New function.
11490         * regcache.h (regcache_debug_print_register): New declaration.
11491         * target.c (debug_print_register): Remove.
11492         (target_fetch_registers): Call regcache_debug_print_register.
11493         (target_store_registers): Likewise.
11494
11495 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11496
11497         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11498         reference beyond the 'lh->include_dirs' array before accessing to
11499         it.
11500         (psymtab_include_file_name): Likewise.
11501         (dwarf_decode_lines_1): Likewise.
11502         (dwarf_decode_lines): Likewise.
11503         (file_file_name): Likewise.
11504
11505 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11506
11507         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11508         inferior_ptid.
11509         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11510         ps_lsetfpregs): Likewise.
11511         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11512         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11513         ps_lsetfpregs): Likewise.
11514         * target.c (target_fetch_registers, target_store_registers):
11515         Remove asserts.
11516
11517 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11518
11519         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11520
11521 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11522
11523         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11524         (_initialize_aarch64_tdep): Register it.
11525         (aarch64_record_load_store): Handle PRFM instruction.
11526         (aarch64_process_record_test): New function.
11527
11528 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11529
11530         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11531         indentation.
11532
11533 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11534
11535         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11536
11537 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11538
11539         python/python.c (do_start_initialization): Fix memory leak.
11540
11541 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11542
11543         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11544         using get_ptrace_pid.
11545         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11546         inferior_ptid.
11547         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11548         inferior_ptid instead of pid.
11549
11550 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11551
11552         * aarch64-tdep.c: Wrap locally used classes in anonymous
11553         namespace.
11554         * arm-tdep.c: Likewise.
11555         * linespec.c: Likewise.
11556         * ui-out.c: Likewise.
11557
11558 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11559
11560         PR gdb/19637
11561         * python/lib/gdb/printer/bound_registers.py: Import sys.
11562
11563 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11564
11565         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11566         windows_thread_info parameter and use it instead of
11567         current_thread.
11568         (windows_fetch_inferior_registers): Don't set current_thread,
11569         pass the thread to do_windows_fetch_inferior_registers.  Use
11570         ptid from regcache instead of inferior_ptid.
11571         (do_windows_store_inferior_registers): Add windows_thread_info
11572         parameter and use it instead of current_thread.
11573         (windows_store_inferior_registers): Don't set current_thread,
11574         pass the thread to do_windows_store_inferior_registers.  Use
11575         ptid from regcache instead of inferior_ptid.
11576
11577 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11578
11579         * ser-mingw.c (ser_windows_raw): Remove reference to
11580         struct serial::current_timeout.
11581
11582 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11583
11584         PR tdep/20928
11585         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11586         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11587         (sparc64_fsr_type): Fix %fsr decoding.
11588
11589 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11590
11591         * python/py-record-btrace.c (btpy_insn_data): Change return type
11592         for Python 2.
11593
11594 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11595
11596         * spu-linux-nat.c (spu_fetch_inferior_registers,
11597         spu_store_inferior_registers): Use ptid from regcache, set and
11598         restore inferior_ptid.
11599         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11600         Likewise.
11601
11602 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11603
11604         * i386-linux-nat.c (fetch_register, store_register,
11605         i386_linux_fetch_inferior_registers,
11606         i386_linux_store_inferior_registers): Use ptid from regcache.
11607         * ia64-linux-nat.c (ia64_linux_fetch_register,
11608         ia64_linux_store_register): Likewise.
11609         * inf-ptrace.c (inf_ptrace_fetch_register,
11610         inf_ptrace_store_register): Likewise.
11611         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11612         m32r_linux_store_inferior_registers): Likewise.
11613         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11614         m68kbsd_store_inferior_registers): Likewise.
11615         * m68k-linux-nat.c (fetch_register, store_register,
11616         m68k_linux_fetch_inferior_registers,
11617         m68k_linux_store_inferior_registers): Likewise.
11618         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11619         m88kbsd_store_inferior_registers): Likewise.
11620         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11621         mips_fbsd_store_inferior_registers): Likewise.
11622         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11623         mips64_linux_regsets_store_registers): Likewise.
11624         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11625         mipsnbsd_store_inferior_registers): Likewise.
11626         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11627         mips64obsd_store_inferior_registers): Likewise.
11628         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11629         Likewise.
11630         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11631         ppcfbsd_store_inferior_registers): Likewise.
11632         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11633         ppc_linux_store_inferior_registers): Likewise.
11634         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11635         ppcnbsd_store_inferior_registers): Likewise.
11636         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11637         ppcobsd_store_registers): Likewise.
11638         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11639         Likewise.
11640         * ravenscar-thread.c (ravenscar_fetch_registers,
11641         ravenscar_store_registers, ravenscar_prepare_to_store):
11642         Likewise.
11643         * record-btrace.c (record_btrace_fetch_registers,
11644         record_btrace_store_registers, record_btrace_prepare_to_store):
11645         Likewise.
11646         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11647         Lookup inferior using ptid from regcache, instead of
11648         current_inferior.
11649         * remote.c (remote_fetch_registers, remote_store_registers): Use
11650         ptid from regcache.
11651         * rs6000-nat.c (fetch_register, store_register): Likewise.
11652         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11653         s390_linux_store_inferior_registers): Likewise.
11654         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11655         shnbsd_store_inferior_registers): Likewise.
11656         * sol-thread.c (sol_thread_fetch_registers,
11657         sol_thread_store_registers): Likewise.
11658         * sparc-nat.c (sparc_fetch_inferior_registers,
11659         sparc_store_inferior_registers): Likewise.
11660         * tilegx-linux-nat.c (fetch_inferior_registers,
11661         store_inferior_registers): Likewise.
11662         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11663         vaxbsd_store_inferior_registers): Likewise.
11664         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11665         store_xtregs): Likewise.
11666
11667 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11668
11669         PR gdb/14441
11670         * NEWS: Mention support for rvalue references in GDB and python.
11671         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11672         supports both lvalue and rvalue references.
11673
11674 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11675
11676         PR gdb/14441
11677         * gdbtypes.c (rank_one_type): Implement overloading
11678         resolution rules regarding rvalue references.
11679
11680 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11681
11682         PR gdb/14441
11683         * aarch64-tdep.c (aarch64_type_align)
11684         (aarch64_extract_return_value, aarch64_store_return_value): Change
11685         lvalue reference type checks to general reference type checks.
11686         * amd64-tdep.c (amd64_classify): Likewise.
11687         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11688         Likewise.
11689         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11690         (arm_store_return_value): Likewise.
11691         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11692         * c-typeprint.c (c_print_type): Likewise.
11693         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11694         (cplus_number_of_children, cplus_describe_child): Likewise.
11695         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11696         * completer.c (expression_completer): Likewise.
11697         * cp-support.c (make_symbol_overload_list_adl_namespace):
11698         Likewise.
11699         * darwin-nat-info.c (info_mach_region_command): Likewise.
11700         * dwarf2loc.c (entry_data_value_coerce_ref)
11701         (value_of_dwarf_reg_entry): Likewise.
11702         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11703         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11704         Likewise.
11705         * findvar.c (extract_typed_address, store_typed_address):
11706         Likewise.
11707         * gdbtypes.c (rank_one_type): Likewise.
11708         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11709         * infcall.c (value_arg_coerce): Likewise.
11710         * language.c (pointer_type): Likewise.
11711         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11712         Likewise.
11713         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11714         * mn10300-tdep.c (mn10300_type_align): Likewise.
11715         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11716         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11717         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11718         Likewise.
11719         * printcmd.c (print_formatted, x_command): Likewise.
11720         * python/py-type.c (typy_get_composite, typy_template_argument):
11721         Likewise.
11722         * python/py-value.c (valpy_referenced_value)
11723         (valpy_get_dynamic_type, value_has_field): Likewise.
11724         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11725         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11726         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11727         * spu-tdep.c (spu_scalar_value_p): Likewise.
11728         * symtab.c (lookup_symbol_aux): Likewise.
11729         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11730         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11731         Likewise.
11732         * valops.c (value_cast_pointers, value_cast)
11733         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11734         (value_struct_elt, value_struct_elt_bitpos)
11735         (value_find_oload_method_list, find_overload_match)
11736         (value_rtti_indirect_type): Likewise.
11737         * valprint.c (val_print_scalar_type_p, generic_val_print):
11738         Likewise.
11739         * value.c (value_actual_type, value_as_address, unpack_long)
11740         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11741         (coerce_ref): Likewise.
11742         * varobj.c (varobj_get_value_type): Likewise.
11743
11744 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11745
11746         PR gdb/14441
11747         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11748         table of constants.
11749         * python/lib/gdb/command/explore.py: Support exploring values
11750         of rvalue reference types.
11751         * python/lib/gdb/types.py: Implement get_basic_type() for
11752         rvalue reference types.
11753         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11754         constant.
11755         * python/py-value.c (valpy_getitem): Add an rvalue reference
11756         check.
11757         (valpy_reference_value): Add new parameter "refcode".
11758         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11759         New wrappers for valpy_reference_value().
11760         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11761         (gdbpy_invoke_xmethod): Likewise.
11762
11763 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11764
11765         PR gdb/14441
11766         * dwarf2read.c (process_die, read_type_die_1): Handle the
11767         DW_TAG_rvalue_reference_type DIE.
11768         (read_tag_reference_type): Add new parameter "refcode".
11769
11770 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11771
11772         PR gdb/14441
11773         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11774         (c_type_print_modifier, c_type_print_varspec_suffix)
11775         (c_type_print_base): Support printing rvalue reference types.
11776         * c-valprint.c (c_val_print, c_value_print): Support printing
11777         rvalue reference values.
11778
11779 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11780
11781         PR gdb/14441
11782         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11783         typename.
11784         * cp-support.c (replace_typedefs): Handle
11785         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11786         * python/py-type.c (typy_lookup_type): Likewise.
11787
11788 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11789
11790         PR gdb/14441
11791         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11792         * parse.c (insert_type): Change assert statement.
11793         (follow_types): Handle rvalue reference types.
11794         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11795         constant.
11796
11797 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11798
11799         PR gdb/14441
11800         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11801         value_ref() interface.
11802         * c-valprint.c (c_value_print): Likewise.
11803         * infcall.c (value_arg_coerce): Likewise.
11804         * python/py-value.c (valpy_reference_value): Likewise.
11805         * valops.c (value_cast, value_reinterpret_cast)
11806         (value_dynamic_cast, typecmp): Likewise.
11807         (value_ref): Parameterize by kind of return value reference type.
11808         * value.h (value_ref): Add new parameter "refcode".
11809
11810 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11811
11812         PR gdb/14441
11813         * dwarf2read.c (read_tag_reference_type): Use
11814         lookup_lvalue_reference_type() instead of lookup_reference_type().
11815         * eval.c (evaluate_subexp_standard): Likewise.
11816         * f-exp.y: Likewise.
11817         * gdbtypes.c (make_reference_type, lookup_reference_type):
11818         Generalize with rvalue reference types.
11819         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11820         convenience wrappers for lookup_reference_type().
11821         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11822         reference kind parameter.
11823         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11824         wrappers for lookup_reference_type().
11825         * guile/scm-type.c (gdbscm_type_reference): Use
11826         lookup_lvalue_reference_type() instead of lookup_reference_type().
11827         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11828         * parse.c (follow_types): Likewise.
11829         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11830         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11831         Likewise.
11832         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11833         (gdbpy_invoke_xmethod): Likewise.
11834         * stabsread.c: Provide extra argument to make_reference_type()
11835         call.
11836         * valops.c (value_ref, value_rtti_indirect_type): Use
11837         lookup_lvalue_reference_type() instead of lookup_reference_type().
11838
11839 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11840
11841         PR gdb/14441
11842         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11843         (TYPE_IS_REFERENCE): New macro.
11844         (struct type): Add rvalue_reference_type field.
11845         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11846
11847 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11848
11849         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11850         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11851         New function definition.
11852         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11853         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11854         New function declaration.
11855         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11856         * mi/mi-interp.h: New file.
11857         * solib.c (info_sharedlibrary_command): Replace for loop with
11858         ALL_SO_LIBS macro
11859         * solib.h (update_solib_list): New function declaration.
11860         (so_list_head): Move macro.
11861         * solist.h (ALL_SO_LIBS): New macro.
11862
11863 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11864
11865         * infcmd.c (post_create_inferior): Remove unused argument in
11866         call to solib_add.
11867         * remote.c (remote_start_remote): Likewise.
11868         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11869         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11870         (enable_break): Likewise.
11871         * solib.c (update_solib_list): Remove unused target argument
11872         and its documentation.
11873         (solib_add): Remove unused target argument.  Remove unused
11874         argument in call to update_solib_list.
11875         (info_sharedlibrary_command): Remove unused argument in call
11876         to update_solib_list.
11877         (sharedlibrary_command): Remove unused argument in call to
11878         solib_add.
11879         (handle_solib_event): Likewise.
11880         (reload_shared_libraries): Likewise.
11881         * solib.h (solib_add): Remove unused target argument.
11882
11883 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11884
11885         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11886         (s390_displaced_step_fixup): Cover relative branches with the
11887         default fixup handling.  This fixes lack of support for some
11888         relative branch instructions.
11889
11890 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11891
11892         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11893         ptid from regcache.
11894
11895 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11896
11897         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11898         i386_darwin_store_inferior_registers): Use ptid from regcache.
11899
11900 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11901
11902         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11903         i386bsd_store_inferior_registers): Use ptid from regcache.
11904
11905 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11906
11907         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11908         hppaobsd_store_registers): Use ptid from regcache.
11909
11910 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11911
11912         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11913         hppanbsd_store_registers): Use ptid from regcache.
11914
11915 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11916
11917         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11918         from regcache.  Use get_ptrace_pid.
11919
11920 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11921
11922         * corelow.c (get_core_register_section): Use ptid from regcache,
11923         update doc.
11924
11925 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11926
11927         * bsd-uthread.c (bsd_uthread_fetch_registers,
11928         bsd_uthread_store_registers): Use ptid from regcache, set and
11929         restore inferior_ptid.
11930
11931 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11932
11933         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11934         fetch_fp_regs, store_register, store_regs, store_fp_register,
11935         store_fp_regs): Use ptid from regcache.
11936
11937 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11938
11939         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11940         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11941         store_vfp_regs): Use ptid from regcache.
11942
11943 2017-03-17  Pedro Alves  <palves@redhat.com>
11944
11945         PR remote/21188
11946         * ser-base.c (ser_base_wait_for): Add comment.
11947         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11948         version.
11949         * ser-unix.c (hardwire_raw): Remove reference to
11950         scb->current_timeout.
11951         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11952         (hardwire_ops): Install ser_base_readchar instead of
11953         hardwire_readchar.
11954         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11955         Remove fields.
11956
11957 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11958
11959         PR gdb/19637
11960         * python/lib/gdb/printer/bound_registers.py: Add support for
11961         Python 3.
11962
11963 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11964
11965         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11966         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11967         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11968         byte_offset to subobj_byte_offset.  Fix the handling of
11969         DWARF_VALUE_STACK on big-endian targets when coming via an
11970         implicit pointer.
11971         (dwarf2_evaluate_loc_desc): Adjust call to
11972         dwarf2_evaluate_loc_desc_full.
11973         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11974         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11975
11976 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11977
11978         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11979         and REVSH instructions.
11980
11981 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11982
11983         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11984         (arm_record_test): Declare.
11985         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11986         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11987         align with the manual.
11988         (thumb_record_misc): Adjust the code order to align with the
11989         manual.
11990         (thumb2_record_decode_insn_handler): Fix instruction matching.
11991         (instruction_reader_thumb): New class.
11992         (arm_record_test): New function.
11993
11994 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11995
11996         * arm-tdep.c (abstract_memory_reader): New class.
11997         (instruction_reader): New class.
11998         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11999         (decode_insn): Likewise.
12000
12001 2017-03-16  Doug Evans  <dje@google.com>
12002
12003         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12004         member.  Change type of TYPE member to SCM.  All uses updated.
12005         (lsscm_make_lazy_string_smob): Add assert.
12006         (lsscm_make_lazy_string): Flag bad length values.
12007         (lsscm_elt_type): New function.
12008         (gdbscm_lazy_string_to_value): Rewrite to use
12009         lsscm_safe_lazy_string_to_value.
12010         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12011         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12012         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12013         in incoming type.
12014         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12015         * guile/scm-type.c (tyscm_scm_to_type): New function.
12016
12017 2017-03-15  Doug Evans  <dje@google.com>
12018
12019         PR python/17728, python/18439, python/18779
12020         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12021         member.  Change type of TYPE member to PyObject *.  All uses updated.
12022         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12023         (gdbpy_create_lazy_string_object): Flag bad length values.
12024         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12025         Handle typedefs in incoming type.
12026         (stpy_lazy_string_elt_type): New function.
12027         (gdbpy_extract_lazy_string): Call it.
12028         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12029         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12030         typedefs in incoming type.
12031
12032 2017-03-16  Doug Evans  <dje@google.com>
12033
12034         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12035         * guile/scm-type.c (tyscm_scm_to_type): New function.
12036
12037 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12038
12039         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12040         "ULONGEST" for "skip".
12041
12042 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12043
12044         PR gdb/21220
12045         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12046         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12047         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12048         over ptrace peek/poke until end of buffer or error.
12049
12050 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12051
12052         * parse.c (length_of_subexp): Make static.
12053         * parser-defs.h (length_of_subexp): Remove.
12054
12055 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12056
12057         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12058         as well.
12059
12060 2017-03-14  Pedro Alves  <palves@redhat.com>
12061
12062         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12063         (main): Use std::unique_ptr.  Remove calls to
12064         cp_demangled_name_parse_free.
12065
12066 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12067
12068         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12069         alphabsd_store_inferior_registers): Use regcache->ptid instead
12070         of inferior_ptid.
12071
12072 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12073
12074         * aix-thread.c (aix_thread_fetch_registers,
12075         aix_thread_store_registers): Use regcache->ptid instead of
12076         inferior_ptid.
12077
12078 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12079
12080         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12081         store_gregs_to_thread, fetch_fpregs_from_thread,
12082         store_fpregs_to_thread): Use regcache->ptid instead of
12083         inferior_ptid.
12084
12085 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12086
12087         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12088         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12089         instead of inferior_ptid.
12090
12091 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12092
12093         * target.c (target_fetch_registers, target_store_registers): Add
12094         assert.
12095
12096 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12097
12098         * regcache.h (regcache_get_ptid): New function.
12099         * regcache.c (regcache_get_ptid): New function.
12100
12101 2017-03-13  Mark Wielaard  <mark@klomp.org>
12102
12103         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12104
12105 2017-03-10  Keith Seitz  <keiths@redhat.com>
12106
12107         PR c++/8218
12108         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12109
12110 2017-03-08  Pedro Alves  <palves@redhat.com>
12111
12112         PR gdb/18360
12113         * infrun.c (start_step_over, do_target_resume, resume)
12114         (restart_threads): Assert we're not resuming a thread that is
12115         meant to be stopped.
12116         (infrun_thread_stop_requested_callback): Delete.
12117         (infrun_thread_stop_requested): If the thread is internally
12118         stopped, queue a pending stop event and clear the thread's
12119         inline-frame state.
12120         (handle_stop_requested): New function.
12121         (handle_syscall_event, handle_inferior_event_1): Use
12122         handle_stop_requested.
12123         (handle_stop_requested): New function.
12124         (handle_signal_stop): Set the thread's stop_signal here instead of
12125         at caller.
12126         (finish_step_over): Clear step over info unconditionally.
12127         (handle_signal_stop): If the user had interrupted the event
12128         thread, consider the stop a random signal.
12129         (handle_signal_stop) <signal arrived while stepping over
12130         breakpoint>: Don't restart threads here.
12131         (stop_waiting): Don't clear step-over info here.
12132
12133 2017-03-08  Pedro Alves  <palves@redhat.com>
12134
12135         PR 21206
12136         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12137         goes to argument 2, not 1.
12138
12139 2017-03-08  Pedro Alves  <palves@redhat.com>
12140
12141         PR cli/21218
12142         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12143         display_gdb_prompt.
12144         (command_line_input): Add comment.
12145
12146 2017-03-08  Pedro Alves  <palves@redhat.com>
12147
12148         PR tui/21216
12149         * tui/tui-file.c (tui_file::write): New.
12150         * tui/tui-file.h (tui_file): Override "write".
12151         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12152         factored out from ...
12153         (tui_puts): ... here.
12154         (tui_putc): Use them.
12155         (tui_write): New function.
12156         * tui/tui-io.h (tui_write): Declare.
12157
12158 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12159
12160         * Makefile.in (SFILES): Replace "environ.c" with
12161         "common/environ.c".
12162         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12163         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12164         to...
12165         * common/environ.c: ... here.
12166         * environ.h: Moved to...
12167         * common/environ.h: ... here.
12168
12169 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12170
12171         * gdbarch.sh (pstring_ptr): New static function.
12172         (gdbarch_disassembler_options): Use it.
12173         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12174         not valid_disassembler_option->name.
12175         * gdbarch.c: Regenerate.
12176
12177 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12178
12179         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12180
12181 2017-03-07  Pedro Alves  <palves@redhat.com>
12182
12183         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12184
12185 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12186
12187         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12188         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12189         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12190         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12191
12192 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12193
12194         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12195
12196 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12197
12198         * remote.c (remote_add_target_side_commands): Use range-based
12199         for loop.
12200
12201 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12202
12203         PR gdb/21165
12204         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12205         value is lazy.
12206         * valprint.c (common_val_print): Likewise.
12207
12208 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12209
12210         * NEWS: Mention new set/show disassembler-options commands.
12211         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12212         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12213         (prospective_options): New static variable.
12214         (gdb_disassembler::gdb_disassembler): Initialize
12215         m_di.disassembler_options.
12216         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12217         (get_disassembler_options): New function.
12218         (set_disassembler_options): Likewise.
12219         (set_disassembler_options_sfunc): Likewise.
12220         (show_disassembler_options_sfunc): Likewise.
12221         (disassembler_options_completer): Likewise.
12222         (_initialize_disasm): Likewise.
12223         * disasm.h (get_disassembler_options): New prototype.
12224         (set_disassembler_options): Likewise.
12225         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12226         (gdbarch_verify_disassembler_options): Likewise.
12227         * gdbarch.c: Regenerate.
12228         * gdbarch.h: Likewise.
12229         * arm-tdep.c (num_disassembly_options): Delete.
12230         (set_disassembly_style): Likewise.
12231         (arm_disassembler_options): New static variable.
12232         (set_disassembly_style_sfunc): Convert short style name into long
12233         option name.  Call set_disassembler_options.
12234         (show_disassembly_style_sfunc): New function.
12235         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12236         set_gdbarch_verify_disassembler_options.
12237         (_initialize_arm_tdep): Delete regnames variable and update callers.
12238         (arm_disassembler_options): Initialize.
12239         (disasm_options): New variable.
12240         (num_disassembly_options): Rename from this...
12241         (num_disassembly_styles): ...to this.  Compute by scanning through
12242         disasm_options.
12243         (valid_disassembly_styles): Initialize using disasm_options.
12244         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12245         set_arm_regname_option.
12246         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12247         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12248         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12249         set_gdbarch_verify_disassembler_options.
12250         * s390-tdep.c (s390_disassembler_options): New static variable.
12251         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12252         set_gdbarch_verify_disassembler_options.
12253
12254 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12255
12256         * remote.c (remote_add_target_side_condition): Remove "struct"
12257         keyword from range-based for loop.
12258
12259 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12260
12261         * remote.c (remote_add_target_side_condition): Use range-based
12262         for loop.  Update comment.
12263
12264 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12265
12266         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12267
12268 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12269
12270         * regcache.c (regcache_raw_update): New function.
12271         (regcache_raw_read): Move code to regcache_raw_update.
12272         * regcache.h (regcache_raw_update): New declaration.
12273         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12274
12275 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12276
12277         * dwarf2read.c (create_debug_type_hash_table): Initialize
12278         header.signature and header.type_offset_in_tu.
12279
12280 2017-02-24  Pedro Alves  <palves@redhat.com>
12281
12282         * symtab.c (make_file_symbol_completion_list_1): Use
12283         add_symtab_completions.
12284
12285 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12286
12287         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12288
12289 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12290
12291         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12292         I386_MAX_REGISTER_SIZE.
12293         (i386_pseudo_register_write): Likewise.
12294         (i386_process_record): Likewise.
12295         * i387-tdep.c (i387_supply_xsave): Likewise.
12296         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12297         (store_register): Likewise.
12298
12299 2017-02-23  Pedro Alves  <palves@redhat.com>
12300
12301         * ada-lang.c: Include "common/function-view.h".
12302         (ada_iterate_over_symbols): Adjust to use function_view as
12303         callback type.
12304         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12305         (ada_make_symbol_completion_list): Use a lambda.
12306         (ada_exc_search_name_matches): Delete.
12307         (name_matches_regex): New.
12308         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12309         * compile/compile-c-support.c: Include "common/function-view.h".
12310         (print_one_macro): Change prototype to accept a ui_file pointer.
12311         (write_macro_definitions): Use a lambda.
12312         * dwarf2read.c: Include "common/function-view.h".
12313         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12314         (dw2_expand_symtabs_matching): Adjust to use function_view as
12315         callback type.
12316         * language.h: Include "common/function-view.h".
12317         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12318         function_view as callback type.
12319         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12320         * linespec.c: Include "common/function-view.h".
12321         (collect_info::add_symbol): New method.
12322         (struct symbol_and_data_callback, iterate_inline_only, struct
12323         symbol_matcher_data, iterate_name_matcher): Delete.
12324         (iterate_over_all_matching_symtabs): Adjust to use function_view
12325         as callback type and lambdas.
12326         (iterate_over_file_blocks): Adjust to use function_view as
12327         callback type.
12328         (decode_compound_collector): Now a class with private fields.
12329         (decode_compound_collector::release_symbols): New method.
12330         (collect_one_symbol): Rename to...
12331         (decode_compound_collector::operator()): ... this and adjust.
12332         (lookup_prefix_sym): decode_compound_collector construction bits
12333         move to decode_compound_collector ctor.  Pass the
12334         decode_compound_collector object directly as callback.  Remove
12335         cleanups and use decode_compound_collector::release_symbols
12336         instead.
12337         (symtab_collector): Now a class with private fields.
12338         (symtab_collector::release_symtabs): New method.
12339         (add_symtabs_to_list): Rename to...
12340         (symtab_collector::operator()): ... this and adjust.
12341         (collect_symtabs_from_filename): symtab_collector construction
12342         bits move to symtab_collector ctor.  Pass the symtab_collector
12343         object directly as callback.  Remove cleanups and use
12344         symtab_collector::release_symtabs instead.
12345         (collect_symbols): Delete.
12346         (add_matching_symbols_to_info): Use lambdas.
12347         * macrocmd.c (print_macro_callback): Delete.
12348         (info_macro_command): Use a lambda.
12349         (info_macros_command): Pass print_macro_definition as callable
12350         directly.
12351         (print_one_macro): Remove 'ignore' parameter.
12352         (macro_list_command): Adjust.
12353         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12354         (macro_for_each_data::user_data): Delete field.
12355         (foreach_macro): Adjust to call the function_view.
12356         (macro_for_each): Adjust to use function_view as callback type.
12357         (foreach_macro_in_scope): Adjust to call the function_view.
12358         (macro_for_each_in_scope): Adjust to use function_view as callback
12359         type.
12360         * macrotab.h: Include "common/function-view.h".
12361         (macro_callback_fn): Declare a prototype instead of a pointer.
12362         Remove "user_data" parameter.
12363         (macro_for_each, macro_for_each_in_scope): Adjust to use
12364         function_view as callback type.
12365         * psymtab.c (partial_map_expand_apply)
12366         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12367         Adjust to use function_view as callback type and to return bool.
12368         (psym_expand_symtabs_matching): Adjust to use function_view as
12369         callback types.
12370         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12371         to use function_view as callback type and to return bool.
12372         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12373         callback types.
12374         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12375         as callback types.
12376         * symfile.h: Include "common/function-view.h".
12377         (expand_symtabs_file_matcher_ftype)
12378         (expand_symtabs_symbol_matcher_ftype)
12379         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12380         return bool.
12381         (quick_symbol_functions::map_symtabs_matching_filename)
12382         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12383         function_view as callback type and return bool.
12384         (expand_symtabs_matching): Adjust to use function_view as callback
12385         type.
12386         (maintenance_expand_name_matcher)
12387         (maintenance_expand_file_matcher): Delete.
12388         (maintenance_expand_symtabs): Use lambdas.
12389         * symtab.c (iterate_over_some_symtabs): Adjust to use
12390         function_view as callback types and return bool.
12391         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12392         of a cleanup.
12393         (lookup_symtab_callback): Delete.
12394         (lookup_symtab): Use a lambda.
12395         (iterate_over_symbols): Adjust to use function_view as callback
12396         type.
12397         (struct search_symbols_data, search_symbols_file_matches)
12398         (search_symbols_name_matches): Delete.
12399         (search_symbols): Use a pair of lambdas.
12400         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12401         (symtab_expansion_callback): Delete.
12402         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12403         * symtab.h: Include "common/function-view.h".
12404         (iterate_over_some_symtabs): Adjust to use function_view as
12405         callback type and return bool.
12406         (iterate_over_symtabs): Adjust to use function_view as callback
12407         type.
12408         (symbol_found_callback_ftype): Remove 'data' parameter and return
12409         bool.
12410         (iterate_over_symbols): Adjust to use function_view as callback
12411         type.
12412
12413 2017-02-23  Pedro Alves  <palves@redhat.com>
12414
12415         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12416         (%.o) <unittests/%.c>: New pattern.
12417         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12418         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12419         * common/function-view.h: New file.
12420         * unittests/function-view-selftests.c: New file.
12421         * configure: Regenerate.
12422
12423 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12424
12425         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12426         inferior_ptid.
12427         * go32-nat.c (go32_thread_alive): Likewise.
12428
12429 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12430
12431         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12432         delete.
12433
12434 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12435
12436         * varobj.c (varobj_clear_saved_item): Use delete instead of
12437         xfree.
12438         (update_dynamic_varobj_children): Likewise.
12439
12440 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12441
12442         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12443
12444 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12445
12446         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12447         m_enum_value to 0 in default constructor.
12448
12449 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12450
12451         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12452         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12453         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12454         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12455         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12456         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12457         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12458         IS_STORE_CONDITIONAL_INSN.
12459
12460 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12461
12462         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12463
12464 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12465
12466         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12467
12468 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12469
12470         * dwarf2read.c (skip_one_die, read_attribute_value)
12471         (dwarf2_const_value_attr, dump_die_shallow)
12472         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12473         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12474
12475 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12476
12477         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12478         (dwarf_parse_macro_header): Accept DWARF version 5.
12479         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12480
12481 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12482
12483         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12484         DW_AT_GNU_*.
12485         * common/common-exceptions.h (enum errors): Likewise.
12486         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12487         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12488         (dwarf_expr_context::execute_stack_op): Likewise.
12489         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12490         Likewise.
12491         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12492         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12493         (show_entry_values_debug, call_site_to_target_addr)
12494         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12495         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12496         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12497         (value_of_dwarf_block_entry, indirect_pieced_value)
12498         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12499         (disassemble_dwarf_expression): Likewise.
12500         * dwarf2read.c (process_die, inherit_abstract_dies)
12501         (read_call_site_scope): Likewise.
12502         * gdbtypes.h (struct func_type, struct call_site_parameter)
12503         (struct call_site): Likewise.
12504         * stack.c (read_frame_arg): Likewise.
12505         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12506
12507 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12508
12509         * defs.h (read_unsigned_leb128): New declaration.
12510         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12511         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12512         (dwarf2_find_location_expression): Call also
12513         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12514         * dwarf2loc.h (dwarf2_version): New declaration.
12515         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12516         rnglists.
12517         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12518         .debug_rnglists.
12519         (struct dwop_section_names): Add loclists_dwo.
12520         (dwop_section_names): Add .debug_loclists.dwo.
12521         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12522         (struct dwarf2_per_cu_data): Add dwarf_version.
12523         (struct dwo_sections): Add loclists.
12524         (struct attr_abbrev): Add implicit_const.
12525         (read_indirect_line_string): New declaration.
12526         (read_unsigned_leb128): Delete declaration.
12527         (rcuh_kind): New definition.
12528         (read_and_check_comp_unit_head): Change parameter
12529         is_debug_types_section to section_kind.
12530         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12531         (read_comp_unit_head): Change parameter abfd to section, add parameter
12532         section_kind.  Handle DWARF-5.
12533         (error_check_comp_unit_head): Accept also DWARF version 5.
12534         (read_and_check_comp_unit_head): Change parameter
12535         is_debug_types_section to section_kind.
12536         (read_and_check_type_unit_head): Delete function.
12537         (read_abbrev_offset): Handle DWARF-5.
12538         (create_debug_type_hash_table): Add parameter section_kind.  Process
12539         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12540         comp_unit_head.
12541         (create_debug_types_hash_table): Update create_debug_type_hash_table
12542         caller.
12543         (create_all_type_units): Call create_debug_type_hash_table.
12544         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12545         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12546         caller.
12547         (skip_one_die): Handle DW_FORM_implicit_const.
12548         (dwarf2_rnglists_process): New function.
12549         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12550         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12551         (read_attribute_value): Handle DW_FORM_implicit_const,
12552         DW_FORM_line_strp.
12553         (read_attribute): Handle DW_FORM_implicit_const.
12554         (read_indirect_string_at_offset_from): New function from
12555         read_indirect_string_at_offset.
12556         (read_indirect_string_at_offset): Call
12557         read_indirect_string_at_offset_from.
12558         (read_indirect_line_string_at_offset): New function.
12559         (read_indirect_string): New function comment.
12560         (read_indirect_line_string): New function.
12561         (read_unsigned_leb128): Make it global.
12562         (dwarf2_string_attr): Handle DWARF-5.
12563         (add_include_dir_stub, read_formatted_entries): New functions.
12564         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12565         Handle DWARF-5.
12566         (per_cu_header_read_in): Update read_comp_unit_head caller.
12567         (dwarf2_version): New function.
12568         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12569         rnglists.
12570         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12571         fields.
12572
12573 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12574
12575         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12576
12577 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12578
12579         * dwarf2read.c (dwarf2_ranges_process): New function from
12580         dwarf2_ranges_read.
12581         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12582         dwarf2_ranges_process.
12583
12584 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12585
12586         * dwarf2read.c (create_debug_type_hash_table): New function from
12587         create_debug_types_hash_table.
12588         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12589         (create_all_type_units, open_and_init_dwo_file): Update
12590         create_debug_types_hash_table callers.
12591
12592 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12593
12594         PR gdb/16188
12595         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12596         refer to 'ap', not 'args'.
12597
12598 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12599             Pedro Alves  <palves@redhat.com>
12600
12601         PR gdb/16188
12602         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12603         calls succeeded.
12604         * fork-child.c (trace_start_error): New function.
12605         (trace_start_error_with_name): Likewise.
12606         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12607         * inf-ptrace.c (inf_ptrace_me): Likewise.
12608         * inferior.h (trace_start_error): New prototype.
12609         (trace_start_error_with_name): Likewise.
12610
12611 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12612
12613         PR gdb/21164
12614         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12615         NULL before using it.
12616         * symmisc.c (maintenance_print_symbols): Likewise.
12617         (maintenance_print_msymbols): Likewise.
12618
12619 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12620
12621         * NEWS: Add record Python bindings entry.
12622
12623 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12624
12625         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12626         py-record-full.o.
12627         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12628         * python/py-record-btrace.c, python/py-record-btrace.h,
12629         python/py-record-full.c, python/py-record-full.h: New file.
12630         * python/py-record.c: Add include for py-record-btrace.h and
12631         py-record-full.h.
12632         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12633         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12634         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12635         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12636         New definition.
12637         (gdbpy_initialize_btrace): New export.
12638         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12639
12640 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12641
12642         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12643         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12644         * python/py-record.c: New file.
12645         * python/python-internal.h (gdbpy_start_recording,
12646         gdbpy_current_recording, gdpy_stop_recording,
12647         gdbpy_initialize_record): New export.
12648         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12649         (python_GdbMethods): Add gdbpy_start_recording,
12650         gdbpy_current_recording and gdbpy_stop_recording.
12651
12652 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12653
12654         * record-btrace.c (record_btrace_record_method): New function.
12655         (init_record_btrace_ops): Initialize to_record_method.
12656         * record-full.c (record_full_record_method): New function.
12657         (init_record_full_ops, init_record_full_core_ops): Add
12658         record_full_record_method.
12659         * record.h (enum record_method): New enum.
12660         * target-debug.h (target_debug_print_enum_record_method: New define.
12661         * target-delegates.c: Regenerate.
12662         * target.c (target_record_method): New function.
12663         * target.h: Include record.h.
12664         (struct target_ops) <to_record_method>: New field.
12665         (target_record_method): New export.
12666
12667 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12668
12669         * record.h (record_start, record_stop): New export.
12670         * record.c (record_start, record_stop): New function.
12671
12672 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12673
12674         * btrace.c (btrace_fetch): Copy function call segments pointer
12675         into a vector.
12676         (btrace_clear): Clear the vector.
12677         (btrace_find_insn_by_number): Use binary search to find the correct
12678         function call segment.
12679         * btrace.h (brace_fun_p): New typedef.
12680         (struct btrace_thread_info) <functions>: New field.
12681
12682 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12683
12684         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12685         * btrace.c (btrace_decode_error): ... here.  New function.
12686         * btrace.h (btrace_decode_error): New export.
12687
12688 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12689
12690         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12691         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12692         btrace_find_insn_by_number): Remove special case for gaps.
12693         * btrace.h (btrace_insn_get_error): New export.
12694         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12695         * record-btrace.c (btrace_insn_history): Print number for gaps.
12696         (record_btrace_info, record_btrace_goto): Handle gaps.
12697
12698 2017-02-14  Tom Tromey  <tom@tromey.com>
12699
12700         PR python/13598:
12701         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12702         event.
12703         * python/py-evts.c (gdbpy_initialize_py_events): Add
12704         before_prompt registry.
12705         * python/py-events.h (events_object) <before_prompt>: New field.
12706
12707 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12708
12709         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12710
12711 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12712
12713         * symfile (_initialize_symfile): Add usage text to the load command's
12714         help text.
12715
12716 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12717
12718         * utils.c (defaulted_query): Don't query on secondary UIs.
12719
12720 2017-02-10  Tom Tromey  <tom@tromey.com>
12721
12722         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12723
12724 2017-02-10  Tom Tromey  <tom@tromey.com>
12725
12726         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12727         "cleanup" local.
12728         * python/py-type.c (typy_legacy_template_argument): Remove
12729         unnecessary "cleanup" local.
12730
12731 2017-02-10  Tom Tromey  <tom@tromey.com>
12732
12733         * python/python.c (do_start_initialization): New function, from
12734         _initialize_python.
12735         (_initialize_python): Call do_start_initialization.
12736         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12737         goto.
12738
12739 2017-02-10  Tom Tromey  <tom@tromey.com>
12740
12741         * python/py-prettyprint.c (pretty_print_one_value): Use
12742         gdbpy_ref.
12743
12744 2017-02-10  Tom Tromey  <tom@tromey.com>
12745
12746         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12747         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12748         gdbpy_ref.
12749         * python/py-type.c (field_new): Use gdbpy_ref.
12750         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12751         gdbpy_ref.
12752         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12753         (py_free_pspace): Likewise.
12754         (pspace_to_pspace_object): Likewise.
12755         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12756         (py_free_objfile): Likewise.
12757         (objfile_to_objfile_object): Likewise.
12758         * python/py-inferior.c (delete_thread_object): Use
12759         gdbpy_ref.
12760         (infpy_read_memory): Likewise.
12761         (py_free_inferior): Likewise.
12762         * python/py-evtregistry.c (create_eventregistry_object): Use
12763         gdbpy_ref.
12764         * python/py-event.c (create_event_object): Use gdbpy_ref.
12765
12766 2017-02-10  Tom Tromey  <tom@tromey.com>
12767
12768         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12769         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12770         used.
12771         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12772         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12773         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12774         python/py-framefilter.c, python/py-function.c,
12775         python/py-inferior.c, python/py-infevents.c,
12776         python/py-linetable.c, python/py-newobjfileevent.c,
12777         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12778         python/py-signalevent.c, python/py-stopevent.c,
12779         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12780         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12781         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12782         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12783
12784 2017-02-10  Tom Tromey  <tom@tromey.com>
12785
12786         * ui-out.h (ui_out_emit_type): New class.
12787         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12788         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12789         and ui_out_emit_tuple.
12790         (enumerate_locals): Likewise.
12791         (py_mi_print_variables, py_print_locals, py_print_args): Use
12792         ui_out_emit_list.
12793         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12794         ui_out_emit_list.
12795         * common/gdb_optional.h: New file.
12796
12797 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12798
12799         * MAINTAINERS (Write After Approval): Update my e-mail address.
12800
12801 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12802
12803         PR gdb/21122
12804         * breakpoint.c (_initialize_breakpoint): Update the help description
12805         of the 'commands' command to indicate that it takes a list argument.
12806
12807 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12808
12809         * interps.c (current_interp_set_logging): Remove "return".
12810
12811 2017-02-09  Gary Benson  <gbenson@redhat.com>
12812
12813         * symtab.c (add_symtab_completions): Prevent NULL pointer
12814         dereference.
12815
12816 2017-02-08  Pedro Alves  <palves@redhat.com>
12817
12818         * interps.c (interp::interp): Remove reference to quiet_p.
12819         (interp_set): Make static.  Remove dead "Switching to" output
12820         code.
12821         (interp_quiet_p, interp_set_quiet): Delete.
12822         (interpreter_exec_cmd): Don't set the interpreter quiet.
12823         * interps.h (interp_quiet_p): Make static.
12824         (class interp) <quiet_p>: Remove field
12825
12826 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12827
12828         * cli/cli-decode.c (find_command_name_length): Make it extern.
12829         * cli/cli-decode.h (find_command_name_length): Declare.
12830         * cli/cli-script.c (command_name_equals, line_first_arg):
12831         New functions.
12832         (process_next_line): Use cli-decode to parse command names.
12833         (build_command_line): Make args a constant pointer.
12834
12835 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12836
12837         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12838         Remove case-insensitive search.
12839
12840 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12841
12842         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12843         at the end of the line.  Avoids an ARI warning.
12844
12845 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12846
12847         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12848         rdseed instructions.
12849         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12850
12851 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12852
12853         PR tdep/20936
12854         Provide and use sparc32 and sparc64 target description XML files.
12855         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12856         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12857         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12858         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12859         * features/sparc/sparc32-solaris.xml: New file.
12860         * features/sparc/sparc64-solaris.xml: New file.
12861         * features/sparc/sparc32-solaris.c: Generated.
12862         * features/sparc/sparc64-solaris.c: Generated.
12863         * sparc-tdep.h: Account for differences in target descriptions.
12864         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12865         (sparc32_register_type): Use target provided registers.
12866         (validate_tdesc_registers): New function.
12867         (sparc32_gdbarch_init): Use tdesc_has_registers.
12868         Set pseudoregister functions.
12869         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12870         (sparc64_register_type): Use target provided registers.
12871         (sparc64_init_abi): Set pseudoregister functions.
12872
12873 2017-02-03  Tom Tromey  <tom@tromey.com>
12874
12875         PR rust/21097:
12876         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12877         with a single member.
12878
12879 2017-02-03  Pedro Alves  <palves@redhat.com>
12880
12881         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12882         (cli_interp_base::~cli_interp_base): New.
12883         (cli_interp): New struct.
12884         (as_cli_interp): Cast the interp itself to cli_interp.
12885         (cli_interpreter_pre_command_loop): Rename to ...
12886         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12887         parameter.
12888         (cli_interpreter_init): Rename to ...
12889         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12890         boolean.  Make extern.
12891         (cli_interpreter_resume): Rename to ...
12892         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12893         extern.
12894         (cli_interpreter_suspend): Rename to ...
12895         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12896         extern.
12897         (cli_interpreter_exec): Rename to ...
12898         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12899         extern.
12900         (cli_interpreter_supports_command_editing): Rename to ...
12901         (cli_interp_base::supports_command_editing): ... this.  Remove
12902         'interp' parameter.  Make extern.
12903         (cli_ui_out): Rename to ...
12904         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12905         Make extern.
12906         (cli_set_logging): Rename to ...
12907         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12908         parameter.  Make extern.
12909         (cli_interp_procs): Delete.
12910         (cli_interp_factory): Adjust to use "new".
12911         * cli/cli-interp.h: Include "interps.h".
12912         (struct cli_interp_base): New struct.
12913         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12914         (interp_new): Delete.
12915         (interp::interp, interp::~interp): New.
12916         (interp_set): Use bool, and return void.  Assume the interpreter
12917         has suspend, init and resume methods, and that the all return
12918         void.
12919         (set_top_level_interpreter): interp_set returns void.
12920         (interp_ui_out): Adapt.
12921         (current_interp_set_logging): Adapt.
12922         (interp_data): Delete.
12923         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12924         (interp_exec): Adapt.
12925         (top_level_interpreter_data): Delete.
12926         * interps.h (interp_init_ftype, interp_resume_ftype)
12927         (interp_suspend_ftype, interp_exec_ftype)
12928         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12929         (class interp): New.
12930         (interp_new): Delete.
12931         (interp_set): Now returns void.  Use bool.
12932         (interp_data, top_level_interpreter_data): Delete.
12933         * mi/mi-common.h: Include interps.h.
12934         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12935         init, resume, suspect, exec, interp_ui_out, set_logging and
12936         pre_command_loop methods.
12937         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12938         (mi_interpreter_init): Rename to ...
12939         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12940         bool, return void and make extern.  Adjust.
12941         (mi_interpreter_resume): ... Rename to ...
12942         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12943         return void and make extern.  Adjust.
12944         (mi_interpreter_suspend): ... Rename to ...
12945         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12946         return void and make extern.  Adjust.
12947         (mi_interpreter_exec): ... Rename to ...
12948         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12949         extern.  Adjust.
12950         (mi_interpreter_pre_command_loop): ... Rename to ...
12951         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12952         parameter and make extern.
12953         (mi_on_normal_stop_1): Adjust.
12954         (mi_ui_out): Rename to ...
12955         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12956         parameter and make extern.  Adjust.
12957         (mi_set_logging): Rename to ...
12958         (mi_interp::set_logging): ... this.  Remove the 'interp'
12959         parameter and make extern.  Adjust.
12960         (mi_interp_procs): Delete.
12961         (mi_interp_factory): Adjust to use 'new'.
12962         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12963         (mi_print_exception, mi_execute_command, mi_load_progress):
12964         Adjust.
12965         * tui/tui-interp.c (tui_interp): New class.
12966         (as_tui_interp): Return a tui_interp pointer.
12967         (tui_on_normal_stop, tui_on_signal_received)
12968         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12969         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12970         to use interp::interp_ui_out.
12971         (tui_init): Rename to ...
12972         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12973         bool, return void and make extern.  Adjust.
12974         (tui_resume): Rename to ...
12975         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12976         return void and make extern.  Adjust.
12977         (tui_suspend): Rename to ...
12978         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12979         return void and make extern.  Adjust.
12980         (tui_ui_out): Rename to ...
12981         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12982         parameter, and make extern.  Adjust.
12983         (tui_exec): Rename to ...
12984         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12985         make extern.
12986         (tui_interp_procs): Delete.
12987         (tui_interp_factory): Use "new".
12988
12989 2017-02-02  Tom Tromey  <tom@tromey.com>
12990
12991         * rust-exp.y (ends_raw_string, space_then_number)
12992         (rust_identifier_start_p): Return bool.
12993         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12994         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12995         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12996         (rust_chartype_p): Return bool.
12997         (val_print_struct, rust_print_struct_def, rust_print_type):
12998         Update.
12999         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13000         Return bool.
13001
13002 2017-02-02  Tom Tromey  <tom@tromey.com>
13003
13004         * rust-lang.c: Reindent.
13005
13006 2017-02-02  Tom Tromey  <tom@tromey.com>
13007
13008         * rust-lang.h (rust_crate_for_block): Update.
13009         * rust-lang.c (rust_crate_for_block): Return std::string.
13010         (rust_get_disr_info): Use std:;string, not
13011         gdb::unique_xmalloc_ptr.
13012         * rust-exp.y (crate_name): Update.
13013
13014 2017-02-02  Pedro Alves  <palves@redhat.com>
13015
13016         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13017         field out of gdb_disassembler_test and make it static.
13018
13019 2017-02-02  Pedro Alves  <palves@redhat.com>
13020
13021         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13022         mi1_interp and mi_interp fields.
13023
13024 2017-02-02  Pedro Alves  <palves@redhat.com>
13025
13026         * cli/cli-interp.c (struct saved_output_files, saved_output):
13027         Moved from cli/cli-logging.c.
13028         (cli_set_logging): New function.
13029         (cli_interp_procs): Install cli_set_logging.
13030         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13031         Declare.
13032         * cli/cli-logging.c (struct saved_output_files, saved_output):
13033         Moved to cli/cli-interp.c.
13034         (pop_output_files): Don't save outputs here.
13035         (make_logging_output): New function.
13036         (handle_redirections): Don't build tee nor save previous outputs
13037         here.
13038         * interps.c (current_interp_set_logging): Change prototype.
13039         Assume there's always a set_logging_proc method installed.
13040         * interps.h (interp_set_logging_ftype): Change prototype.
13041         (current_interp_set_logging): Change prototype and adjust comment.
13042         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13043         use make_logging_output.
13044         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13045 2017-02-02  Pedro Alves  <palves@redhat.com>
13046
13047         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13048         from ...
13049         (set_logging_overwrite): ... here.
13050         (logging_no_redirect_file): Delete.
13051         (set_logging_redirect): Don't handle redirection on the fly.
13052         Instead warn that "logging off" / "logging on" is necessary.
13053         (pop_output_files): Delete references to logging_no_redirect_file.
13054         (show_logging_command): Always speak in terms of what will happen
13055         once logging is reenabled.
13056
13057 2017-02-02  Pedro Alves  <palves@redhat.com>
13058
13059         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13060
13061 2017-02-02  Pedro Alves  <palves@redhat.com>
13062
13063         * disasm.c (gdb_pretty_print_insn): Rename to ...
13064         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13065         Remove gdbarch parameter.  Adapt to clear the object's buffers
13066         instead of allocating new buffers, and to print using the object's
13067         gdb_disassembler instead of calling gdb_print_insn.
13068         (dump_insns): Use gdb_pretty_print_disassembler.
13069         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13070         (gdb_pretty_print_disassembler): New class.
13071         * record-btrace.c (btrace_insn_history): Use
13072         gdb_pretty_print_disassembler.
13073
13074 2017-02-02  Pedro Alves  <palves@redhat.com>
13075
13076         * ada-lang.c (type_as_string): Use string_file.
13077         * ada-valprint.c (ada_print_floating): Use string_file.
13078         * ada-varobj.c (ada_varobj_scalar_image)
13079         (ada_varobj_get_value_image): Use string_file.
13080         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13081         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13082         * breakpoint.c (update_inserted_breakpoint_locations)
13083         (insert_breakpoint_locations, reattach_breakpoints)
13084         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13085         (print_it_watchpoint): Use string_file.
13086         (save_breakpoints): Use stdio_file.
13087         * c-exp.y (oper): Use string_file.
13088         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13089         tee_file.
13090         (pop_output_files): Use delete.
13091         (handle_redirections): Use stdio_file and tee_file.
13092         * cli/cli-setshow.c (do_show_command): Use string_file.
13093         * compile/compile-c-support.c (c_compute_program): Use
13094         string_file.
13095         * compile/compile-c-symbols.c (generate_vla_size): Take a
13096         'string_file &' instead of a 'ui_file *'.
13097         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13098         of a 'ui_file *'.  Use string_file.
13099         (generate_c_for_variable_locations): Take a 'string_file &'
13100         instead of a 'ui_file *'.
13101         * compile/compile-internal.h (generate_c_for_for_one_variable):
13102         Take a 'string_file &' instead of a 'ui_file *'.
13103         * compile/compile-loc2c.c (push, pushf, unary, binary)
13104         (print_label, pushf_register_address, pushf_register)
13105         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13106         'ui_file *'.  Adjust.
13107         * compile/compile.c (compile_to_object): Use string_file.
13108         * compile/compile.h (compile_dwarf_expr_to_c)
13109         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13110         'ui_file *'.
13111         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13112         (replace_typedefs_qualified_name): Use string_file and
13113         obstack_copy0.
13114         * disasm.c (gdb_pretty_print_insn): Use string_file.
13115         (gdb_disassembly): Adjust reference the null_stream global.
13116         (do_ui_file_delete): Delete.
13117         (gdb_insn_length): Use null_stream.
13118         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13119         * dwarf2loc.c (dwarf2_compile_property_to_c)
13120         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13121         'string_file &' instead of a 'ui_file *'.
13122         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13123         * dwarf2read.c (do_ui_file_peek_last): Delete.
13124         (dwarf2_compute_name): Use string_file.
13125         * event-top.c (gdb_setup_readline): Use stdio_file.
13126         * gdbarch.sh (verify_gdbarch): Use string_file.
13127         * gdbtypes.c (safe_parse_type): Use null_stream.
13128         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13129         string_file.
13130         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13131         'string_file *' instead of a 'ui_file *'.
13132         (gdbscm_arch_disassemble): Use string_file.
13133         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13134         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13135         inherits from ui_file.
13136         (ioscm_file_port_delete, ioscm_file_port_rewind)
13137         (ioscm_file_port_put): Delete.
13138         (ioscm_file_port_write): Rename to ...
13139         (ioscm_file_port::write): ... this.  Remove file_port_magic
13140         checks.
13141         (ioscm_file_port_new): Delete.
13142         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13143         ui_file_up.
13144         * guile/scm-type.c (tyscm_type_name): Use string_file.
13145         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13146         Use string_file.
13147         * infcmd.c (print_return_value_1): Use string_file.
13148         * infrun.c (print_target_wait_results): Use string_file.
13149         * language.c (add_language): Use string_file.
13150         * location.c (explicit_to_string_internal): Use string_file.
13151         * main.c (captured_main_1): Use null_file.
13152         * maint.c (maintenance_print_architecture): Use stdio_file.
13153         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13154         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13155         event_channel>: Change type to mi_console_file pointer.
13156         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13157         (mi_console_file_delete): Delete.
13158         (struct mi_console_file): Delete.
13159         (mi_console_file_magic): Delete.
13160         (mi_console_file_new): Delete.
13161         (mi_console_file::mi_console_file): New.
13162         (mi_console_file_delete): Delete.
13163         (mi_console_file_fputs): Delete.
13164         (mi_console_file::write): New.
13165         (mi_console_raw_packet): Delete.
13166         (mi_console_file::flush): New.
13167         (mi_console_file_flush): Delete.
13168         (mi_console_set_raw): Rename to ...
13169         (mi_console_file::set_raw): ... this.
13170         * mi/mi-console.h (class mi_console_file): New class.
13171         (mi_console_file_new, mi_console_set_raw): Delete.
13172         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13173         (mi_set_logging): Use delete and tee_file.  Adjust.
13174         * mi/mi-main.c (output_register): Use string_file.
13175         (mi_cmd_data_evaluate_expression): Use string_file.
13176         (mi_cmd_data_read_memory): Use string_file.
13177         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13178         * mi/mi-out.c (mi_ui_out::main_stream): New.
13179         (mi_ui_out::rewind): Use main_stream and
13180         string_file.
13181         (mi_ui_out::put): Use main_stream and string_file.
13182         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13183         Allocate a 'string_file' instead.
13184         (mi_out_new): Don't allocate a mem_fileopen stream here.
13185         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13186         (mi_ui_out::main_stream): Declare method.
13187         * printcmd.c (eval_command): Use string_file.
13188         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13189         * python/py-arch.c (archpy_disassemble): Use string_file.
13190         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13191         * python/py-frame.c (frapy_str): Use string_file.
13192         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13193         Use string_file.
13194         * python/py-type.c (typy_str): Use string_file.
13195         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13196         * python/py-value.c (valpy_str): Use string_file.
13197         * record-btrace.c (btrace_insn_history): Use string_file.
13198         * regcache.c (regcache_print): Use stdio_file.
13199         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13200         * remote.c (escape_buffer): Use string_file.
13201         * rust-lang.c (rust_get_disr_info): Use string_file.
13202         * serial.c (serial_open_ops_1): Use stdio_file.
13203         (do_serial_close): Use delete.
13204         * stack.c (print_frame_arg): Use string_file.
13205         (print_frame_args): Remove local mem_fileopen stream, not used.
13206         (print_frame): Use string_file.
13207         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13208         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13209         Take a 'string_file *' instead of a 'ui_file *'.
13210         * top.c (new_ui): Use stdio_file and stderr_file.
13211         (free_ui): Use delete.
13212         (execute_command_to_string): Use string_file.
13213         (quit_confirm): Use string_file.
13214         * tracepoint.c (collection_list::append_exp): Use string_file.
13215         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13216         * tui/tui-file.c: Don't include "ui-file.h".
13217         (enum streamtype, struct tui_stream): Delete.
13218         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13219         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13220         (tui_file::tui_file): New method.
13221         (tui_file_fputs): Delete.
13222         (tui_file_get_strbuf): Delete.
13223         (tui_file::puts): New method.
13224         (tui_file_adjust_strbuf): Delete.
13225         (tui_file_flush): Delete.
13226         (tui_file::flush): New method.
13227         * tui/tui-file.h: Tweak intro comment.
13228         Include ui-file.h.
13229         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13230         (tui_file_adjust_strbuf): Delete declarations.
13231         (class tui_file): New class.
13232         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13233         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13234         (tui_register_format): Use string_stream.
13235         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13236         (tui_get_function_from_frame): Use string_file.
13237         * typeprint.c (type_to_string): Use string_file.
13238         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13239         (null_stream): New global.
13240         (ui_file_delete): Delete.
13241         (ui_file::ui_file): New.
13242         (null_file_isatty): Delete.
13243         (ui_file::~ui_file): New.
13244         (null_file_rewind): Delete.
13245         (ui_file::printf): New.
13246         (null_file_put): Delete.
13247         (null_file_flush): Delete.
13248         (ui_file::putstr): New.
13249         (null_file_write): Delete.
13250         (ui_file::putstrn): New.
13251         (null_file_read): Delete.
13252         (ui_file::putc): New.
13253         (null_file_fputs): Delete.
13254         (null_file_write_async_safe): Delete.
13255         (ui_file::vprintf): New.
13256         (null_file_delete): Delete.
13257         (null_file::write): New.
13258         (null_file_fseek): Delete.
13259         (null_file::puts): New.
13260         (ui_file_data): Delete.
13261         (null_file::write_async_safe): New.
13262         (gdb_flush, ui_file_isatty): Adjust.
13263         (ui_file_put, ui_file_rewind): Delete.
13264         (ui_file_write): Adjust.
13265         (ui_file_write_for_put): Delete.
13266         (ui_file_write_async_safe, ui_file_read): Adjust.
13267         (ui_file_fseek): Delete.
13268         (fputs_unfiltered): Adjust.
13269         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13270         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13271         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13272         (set_ui_file_data): Delete.
13273         (string_file::~string_file, string_file::write)
13274         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13275         (do_ui_file_as_string, ui_file_as_string): Delete.
13276         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13277         (struct mem_file): Delete.
13278         (mem_file_new): Delete.
13279         (stdio_file::stdio_file): New.
13280         (mem_file_delete): Delete.
13281         (stdio_file::stdio_file): New.
13282         (mem_fileopen): Delete.
13283         (stdio_file::~stdio_file): New.
13284         (mem_file_rewind): Delete.
13285         (stdio_file::set_stream): New.
13286         (mem_file_put): Delete.
13287         (stdio_file::open): New.
13288         (mem_file_write): Delete.
13289         (stdio_file_magic, struct stdio_file): Delete.
13290         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13291         (stdio_file::flush): New.
13292         (stdio_file_read): Rename to ...
13293         (stdio_file::read): ... this.  Adjust.
13294         (stdio_file_write): Rename to ...
13295         (stdio_file::write): ... this.  Adjust.
13296         (stdio_file_write_async_safe): Rename to ...
13297         (stdio_file::write_async_safe) ... this.  Adjust.
13298         (stdio_file_fputs): Rename to ...
13299         (stdio_file::puts) ... this.  Adjust.
13300         (stdio_file_isatty): Delete.
13301         (stdio_file_fseek): Delete.
13302         (stdio_file::isatty): New.
13303         (stderr_file_write): Rename to ...
13304         (stderr_file::write) ... this.  Adjust.
13305         (stderr_file_fputs): Rename to ...
13306         (stderr_file::puts) ... this.  Adjust.
13307         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13308         (stderr_file::stderr_file): New.
13309         (tee_file_magic): Delete.
13310         (struct tee_file): Delete.
13311         (tee_file::tee_file): New.
13312         (tee_file_new): Delete.
13313         (tee_file::~tee_file): New.
13314         (tee_file_delete): Delete.
13315         (tee_file_flush): Rename to ...
13316         (tee_file::flush): ... this.  Adjust.
13317         (tee_file_write): Rename to ...
13318         (tee_file::write): ... this.  Adjust.
13319         (tee_file::write_async_safe): New.
13320         (tee_file_fputs): Rename to ...
13321         (tee_file::puts): ... this.  Adjust.
13322         (tee_file_isatty): Rename to ...
13323         (tee_file::isatty): ... this.  Adjust.
13324         * ui-file.h (struct obstack, struct ui_file): Don't
13325         forward-declare.
13326         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13327         (ui_file_write_ftype)
13328         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13329         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13330         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13331         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13332         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13333         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13334         (set_ui_file_fseek): Delete.
13335         (ui_file_data, ui_file_delete, ui_file_rewind)
13336         (struct ui_file): New.
13337         (ui_file_up): New.
13338         (class null_file): New.
13339         (null_stream): Declare.
13340         (ui_file_write_for_put, ui_file_put): Delete.
13341         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13342         Delete.
13343         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13344         (gdb_fopen, tee_file_new): Delete.
13345         (struct string_file): New.
13346         (struct stdio_file): New.
13347         (stdio_file_up): New.
13348         (struct stderr_file): New.
13349         (class tee_file): New.
13350         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13351         of a 'ui_file *'.  Adjust.
13352         * ui-out.h (class ui_out) <field_stream>: Likewise.
13353         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13354         (null_stream): Delete.
13355         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13356         Adjust.
13357         * utils.h (struct ui_file): Delete forward declaration..
13358         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13359         (error_stream): Take a 'string_file &' instead of a
13360         'ui_file *'.
13361         * varobj.c (varobj_value_get_print_value): Use string_file.
13362         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13363         * gdbarch.c: Regenerate.
13364
13365 2017-02-02  Pedro Alves  <palves@redhat.com>
13366
13367         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13368         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13369         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13370         Adjust to call gdb_print_insn instead of
13371         gdb_disassembler::print_insn.
13372         (dump_insns, do_mixed_source_and_assembly_deprecated)
13373         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13374         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13375         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13376         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13377         declaration.
13378         (gdb_pretty_print_insn): Re-add declaration.
13379         * record-btrace.c (btrace_insn_history): Don't allocate a
13380         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13381
13382 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13383
13384         * disasm.h (gdb_disassembly): Remove file_string parameter.
13385         * disasm.c (gdb_disassembly): Likewise.
13386         * cli/cli-cmds.c (print_disassembly): Adapt.
13387         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13388         * stack.c (do_gdb_disassembly): Likewise.
13389
13390 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13391
13392         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13393         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13394         targets.  And if the implicit value is longer than needed, extract
13395         the first bytes instead of the "least significant" ones.
13396
13397 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13398
13399         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13400         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13401         (btrace_fetch): Assert can_access_registers_ptid.
13402         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13403         validate_registers_access.
13404
13405 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13406
13407         * gdbthread.h (can_access_registers_ptid): New.
13408         * thread.c (can_access_registers_ptid): New.
13409
13410 2017-02-01  Pedro Alves  <palves@redhat.com>
13411
13412         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13413
13414 2017-01-31  Pedro Alves  <palves@redhat.com>
13415
13416         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13417         Fix typos.
13418
13419 2017-01-31  Pedro Alves  <palves@redhat.com>
13420
13421         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13422         not used.
13423
13424 2017-01-31  Pedro Alves  <palves@redhat.com>
13425
13426         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13427
13428 2017-01-31  Pedro Alves  <palves@redhat.com>
13429
13430         * common/scoped_restore.h
13431         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13432         change the value's parameter type to T2.
13433         (make_scoped_restore): Likewise.
13434
13435 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13436             Richard Henderson  <rth@redhat.com>
13437
13438         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13439         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13440         GS_BASE for older kernels.
13441         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13442         GS_BASE for older kernels.
13443         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13444         and GS_BASE to the offset table.
13445         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13446         system register group.
13447         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13448         for older kernels.
13449         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13450         amd64 ABI.
13451         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13452         AMD64_GSBASE_REGNUM.
13453         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13454         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13455         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13456         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13457         i386/64bit-segments.xml in those rules.
13458         * features/i386/64bit-segments.xml: New file.
13459         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13460         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13461         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13462         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13463         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13464         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13465         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13466         * features/i386/amd64-avx-linux.c: Regenerated.
13467         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13468         * features/i386/amd64-avx-mpx.c: Regenerated.
13469         * features/i386/amd64-avx512-linux.c: Regenerated.
13470         * features/i386/amd64-linux.c: Regenerated.
13471         * features/i386/amd64-mpx-linux.c: Regenerated.
13472         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13473         * features/i386/i386-avx-mpx.c: Regenerated.
13474         * features/i386/x32-avx-linux.c: Regenerated.
13475         * features/i386/x32-avx512-linux.c: Regenerated.
13476         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13477         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13478         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13479         * regformats/i386/amd64-linux.dat: Regenerated.
13480         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13481         * regformats/i386/x32-avx-linux.dat: Regenerated.
13482         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13483         * regformats/i386/x32-linux.dat: Regenerated.
13484
13485 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13486
13487         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13488         Set to AMD64_NUM_REGS.
13489
13490 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13491
13492         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13493         that checks validity of a register number.
13494
13495 2017-01-27  Kees Cook  <keescook@google.com>
13496
13497         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13498         fetch_fpregs if target has fpa registers.
13499         (arm_linux_store_inferior_registers): Call store_fpregs if target
13500         has fpa registers.
13501
13502 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13503
13504         * cris-tdep.c (cris_gdbarch_init): Remove check for
13505         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13506
13507 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13508
13509         * corelow.c (get_core_register_section): Check for regset
13510         existence before checking for REGSET_VARIABLE_SIZE.
13511
13512 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13513             Pedro Alves  <palves@redhat.com>
13514
13515         PR gdb/20939
13516         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13517         call memory_error, save memaddr instead.
13518         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13519         negative, cal memory_error.
13520         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13521
13522 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13523
13524         * disasm-selftests.c (memory_error_test): New function.
13525         (_initialize_disasm_selftests): Register memory_error_test.
13526
13527 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13528
13529         * Makefile.in (SFILES): Add disasm-selftests.c and
13530         selftest-arch.c.
13531         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13532         * disasm-selftests.c: New file.
13533         * selftest-arch.c: New file.
13534         * selftest-arch.h: New file.
13535
13536 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13537
13538         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13539         to bfd_arch_mep.  Don't return 0 if section is not
13540         found.  Call print_insn_mep.
13541
13542 2017-01-26  Pedro Alves  <palves@redhat.com>
13543             Yao Qi  <yao.qi@linaro.org>
13544
13545         * arm-tdep.c: Include "disasm.h".
13546         (gdb_print_insn_arm): Update code to get gdbarch.
13547         * disasm.c (dis_asm_read_memory): Change it to
13548         gdb_disassembler::dis_asm_read_memory.
13549         (dis_asm_memory_error): Likewise.
13550         (dis_asm_print_address): Likewise.
13551         (gdb_pretty_print_insn): Change it to
13552         gdb_disassembler::pretty_print_insn.
13553         (dump_insns): Add one argument gdb_disassemlber.  All
13554         callers updated.
13555         (do_mixed_source_and_assembly_deprecated): Likewise.
13556         (do_mixed_source_and_assembly): Likewise.
13557         (do_assembly_only): Likewise.
13558         (gdb_disassembler::gdb_disassembler): New.
13559         (gdb_disassembler::print_insn): New.
13560         * disasm.h (class gdb_disassembler): New.
13561         (gdb_pretty_print_insn): Remove declaration.
13562         (gdb_disassemble_info): Likewise.
13563         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13564         (gdbscm_disasm_read_memory_worker): Update.
13565         (gdbscm_disasm_read_memory): Update.
13566         (gdbscm_disasm_memory_error): Remove.
13567         (gdbscm_disasm_print_address): Remove.
13568         (gdbscm_disassembler::gdbscm_disassembler): New.
13569         (gdbscm_print_insn_from_port): Update.
13570         * mips-tdep.c: Include disasm.h.
13571         (gdb_print_insn_mips): Update code to get gdbarch.
13572         * record-btrace.c (btrace_insn_history): Update.
13573         * spu-tdep.c: Include disasm.h.
13574         (struct spu_dis_asm_data): Remove.
13575         (struct spu_dis_asm_info): New.
13576         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13577         SPU id.
13578         (gdb_print_insn_spu): Cast disassemble_info to
13579         spu_dis_asm_info.
13580
13581 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13582
13583         * disasm.c (do_ui_file_delete): Delete.
13584         (gdb_insn_length): Move code creating stream to ...
13585         * utils.c (null_stream): ... here.  New function.
13586         * utils.h (null_stream): Declare.
13587
13588 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13589
13590         * python/py-inferior.c (find_thread_object): Return directly
13591         from the loop.  Remove "found" variable.
13592
13593 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13594
13595         GDB 7.12.1 released.
13596
13597 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13598
13599         * python/py-function.c (fnpy_call): Reorder declarations to have
13600         the gdbpy_enter object declared first.
13601         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13602
13603 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13604
13605         PR python/21068
13606         * python/python-internal.h (PyMem_RawMalloc): Define for
13607         Python < 3.4.
13608         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13609         PyMem_RawMalloc instead of PyMem_Malloc.
13610
13611 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13612             Luis Machado  <lgustavo@codesourcery.com>
13613
13614         * NEWS (New commands): Mention flash-erase.
13615         (New MI commands): Mention target-flash-erase.
13616         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13617         command.
13618         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13619         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13620         * target.c (flash_erase_command): New function.
13621         (initialize_targets): Add new flash-erase command.
13622         * target.h (flash_erase_command): New declaration.
13623
13624 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13625
13626         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13627         HAVE_SYS_PROCFS_H is defined.
13628
13629 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13630
13631         * remote.c (struct cached_reg): Change data into a pointer.
13632         * (stop_reply_dtr): Free data pointers before deleting vector.
13633         (process_stop_reply): Likewise.
13634         (remote_parse_stop_reply): Allocate space for data
13635
13636 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13637
13638         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13639         MAX_REGISTER_SIZE.
13640         (amd64_pseudo_register_read_value): Likewise.
13641         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13642         (store_register_using_P): Likewise.
13643         * regcache.c (regcache_xfer_part): Likewise.
13644
13645 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13646
13647         Split real and pseudo registers.
13648         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13649         (sparc32_pseudo_regnum): New enum.
13650         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13651         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13652         (SPARC32_CP0_REGISTERS): New macro.
13653         (sparc32_pseudo_register_name): New function.
13654         (sparc32_register_name): Use sparc32_pseudo_register_name.
13655         (sparc32_pseudo_register_type): New function.
13656         (sparc32_register_type): Use sparc32_pseudo_register_type.
13657         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13658         pseudo register numbers.
13659         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13660         (SPARC64_CP0_REGISTERS): New macro.
13661         (sparc64_pseudo_register_name): New function.
13662         (sparc64_register_name): Use sparc64_pseudo_register_name.
13663         (sparc64_pseudo_register_type): New function.
13664         (sparc64_register_type): Use sparc64_pseudo_register_type.
13665         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13666         pseudo register numbers.
13667         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13668         sparc64_store_arguments): Handle pseudo register numbers.
13669
13670 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13671
13672         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13673         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13674         output.
13675         (getpkt_or_notif_sane_1): Likewise.
13676
13677 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13678
13679         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13680         of CC.  Pass "-x c++-header" instead of "-x c".
13681
13682 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13683
13684         * remote.c (remote_can_async_p): Update comment.
13685
13686 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13687
13688         * linux-nat.c (linux_nat_can_async_p): Update comment.
13689
13690 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13691
13692         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13693
13694 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13695
13696         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13697
13698 2017-01-10  Tom Tromey  <tom@tromey.com>
13699
13700         * python/py-type.c (typy_legacy_template_argument): Update.
13701         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13702         ~demangle_parse_info): Declare new members.
13703         (cp_demangled_name_to_comp): Return unique_ptr.
13704         (cp_demangled_name_parse_free)
13705         (make_cleanup_cp_demangled_name_parse_free)
13706         (cp_new_demangle_parse_info): Remove.
13707         * cp-support.c (do_demangled_name_parse_free_cleanup)
13708         (make_cleanup_cp_demangled_name_parse_free): Remove.
13709         (inspect_type, cp_canonicalize_string_full)
13710         (cp_canonicalize_string): Update.
13711         (mangled_name_to_comp): Change return type.
13712         (cp_class_name_from_physname, method_name_from_physname)
13713         (cp_func_name, cp_remove_params): Update.
13714         * cp-name-parser.y (demangle_parse_info): New constructor, from
13715         cp_new_demangle_parse_info.
13716         (~demangle_parse_info): New destructor, from
13717         cp_demangled_name_parse_free.
13718         (cp_merge_demangle_parse_infos): Update.
13719         (cp_demangled_name_to_comp): Change return type.
13720
13721 2017-01-10  Tom Tromey  <tom@tromey.com>
13722
13723         * top.c (prevent_dont_repeat): Change return type.
13724         * python/python.c (execute_gdb_command): Use std::string.
13725         Update.
13726         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13727         * command.h (prevent_dont_repeat): Change return type.
13728         * breakpoint.c (bpstat_do_actions_1): Update.
13729
13730 2017-01-10  Tom Tromey  <tom@tromey.com>
13731
13732         * value.h (scoped_value_mark::~scoped_value_mark): Call
13733         free_to_mark.
13734         (scoped_value_mark::free_to_mark): New method.
13735         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13736         scoped_value_mark.
13737
13738 2017-01-10  Tom Tromey  <tom@tromey.com>
13739
13740         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13741         (valpy_reference_value, valpy_const_value, valpy_get_address)
13742         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13743         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13744         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13745         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13746         scoped_value_mark.
13747         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13748         * value.h (scoped_value_mark): New class.
13749
13750 2017-01-10  Tom Tromey  <tom@tromey.com>
13751
13752         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13753         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13754         * psymtab.c (discard_psymtabs_upto): Remove.
13755         (make_cleanup_discard_psymtabs): Remove.
13756         (struct psymtab_state): Remove.
13757
13758 2017-01-10  Tom Tromey  <tom@tromey.com>
13759
13760         * record-full.c (record_full_save_cleanups): Remove.
13761         (record_full_save): Use gdb::unlinker.
13762         * gcore.c (do_bfd_delete_cleanup): Remove.
13763         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13764         cleanups.
13765         * dwarf2read.c (unlink_if_set): Remove.
13766         (write_psymtabs_to_index): Use gdb::unlinker.
13767         * common/gdb_unlinker.h: New file.
13768
13769 2017-01-10  Tom Tromey  <tom@tromey.com>
13770
13771         * windows-tdep.c (windows_xfer_shared_library): Update.
13772         * windows-nat.c (windows_make_so): Update.
13773         * utils.h (make_cleanup_bfd_unref): Remove.
13774         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13775         * symfile.h (symfile_bfd_open)
13776         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13777         * symfile.c (read_symbols, symbol_file_add)
13778         (separate_debug_file_exists): Update.
13779         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13780         (generic_load, reread_symbols): Update.
13781         * symfile-mem.c (symbol_file_add_from_memory): Update.
13782         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13783         (spu_symbol_file_add_from_memory): Update.
13784         * solist.h (struct target_so_ops) <bfd_open>: Return
13785         gdb_bfd_ref_ptr.
13786         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13787         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13788         gdb_bfd_ref_ptr.
13789         (solib_map_sections, reload_shared_libraries_1): Update.
13790         * solib-svr4.c (enable_break): Update.
13791         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13792         * solib-frv.c (enable_break2): Update.
13793         * solib-dsbt.c (enable_break): Update.
13794         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13795         gdb_bfd_ref_ptr.
13796         (darwin_solib_get_all_image_info_addr_at_init): Update.
13797         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13798         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13799         * record-full.c (record_full_save): Update.
13800         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13801         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13802         * minidebug.c (find_separate_debug_file_in_section): Return
13803         gdb_bfd_ref_ptr.
13804         * machoread.c (macho_add_oso_symfile): Change abfd to
13805         gdb_bfd_ref_ptr.
13806         (macho_symfile_read_all_oso): Update.
13807         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13808         (macho_symfile_read): Update.
13809         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13810         (jit_bfd_try_read_symtab): Update.
13811         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13812         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13813         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13814         gdb_bfd_ref_ptr.
13815         (gdb_bfd_ref_policy): New struct.
13816         (gdb_bfd_ref_ptr): New typedef.
13817         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13818         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13819         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13820         gdb_bfd_ref_ptr.
13821         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13822         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13823         (gcore_command): Update.
13824         * exec.c (exec_file_attach): Update.
13825         * elfread.c (elf_symfile_read): Update.
13826         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13827         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13828         (open_and_init_dwo_file): Update.
13829         (open_dwp_file): Return gdb_bfd_ref_ptr.
13830         (open_and_init_dwp_file): Update.
13831         * corelow.c (core_open): Update.
13832         * compile/compile-object-load.c (compile_object_load): Update.
13833         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13834         * coffread.c (coff_symfile_read): Update.
13835         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13836         gdb_bfd_ref_ptr.  Rename.
13837         (dump_bfd_file, restore_command): Update.
13838         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13839         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13840         (find_separate_debug_file_by_buildid): Update.
13841
13842 2017-01-10  Tom Tromey  <tom@tromey.com>
13843
13844         * common/gdb_ref_ptr.h: New file.
13845         * python/py-ref.h (struct gdbpy_ref_policy): New.
13846         (gdbpy_ref): Now a typedef.
13847
13848 2017-01-10  Tom Tromey  <tom@tromey.com>
13849
13850         * utils.h (make_cleanup_htab_delete): Don't declare.
13851         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13852         Remove.
13853         * linespec.c (decode_compound_collector): Add constructor,
13854         destructor.
13855         (lookup_prefix_sym): Remove cleanup.
13856         (symtab_collector): Add constructor, destructor.
13857         (collect_symtabs_from_filename): Remove cleanup.
13858         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13859         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13860         Use htab_up.
13861         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13862         * dwarf2read.c (dw2_expand_symtabs_matching)
13863         (dw2_map_symbol_filenames, dwarf_decode_macros)
13864         (write_psymtabs_to_index): Use htab_up.
13865         * dwarf2loc.c (func_verify_no_selftailcall)
13866         (call_site_find_chain_1, func_verify_no_selftailcall)
13867         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13868         std::vector, gdb::unique_xmalloc_ptr.
13869         (call_sitep): Remove typedef.
13870         (dwarf2_locexpr_baton_eval): Remove unused variable.
13871
13872 2017-01-10  Tom Tromey  <tom@tromey.com>
13873
13874         * python/python-internal.h (make_cleanup_py_decref)
13875         (make_cleanup_py_xdecref): Don't declare.
13876         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13877         (py_xdecref, make_cleanup_py_xdecref): Remove.
13878
13879 2017-01-10  Tom Tromey  <tom@tromey.com>
13880
13881         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13882         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13883
13884 2017-01-10  Tom Tromey  <tom@tromey.com>
13885
13886         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13887
13888 2017-01-10  Tom Tromey  <tom@tromey.com>
13889
13890         * python/py-utils.c (unicode_to_encoded_string)
13891         (python_string_to_target_string)
13892         (python_string_to_target_python_string)
13893         (python_string_to_host_string, gdbpy_obj_to_string)
13894         (get_addr_from_python): Use gdbpy_ref.
13895
13896 2017-01-10  Tom Tromey  <tom@tromey.com>
13897
13898         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13899         gdbpy_ref.
13900
13901 2017-01-10  Tom Tromey  <tom@tromey.com>
13902
13903         * python/python.c (eval_python_command, gdbpy_decode_line)
13904         (gdbpy_run_events, gdbpy_start_type_printers)
13905         (gdbpy_apply_type_printers): Use gdbpy_ref.
13906
13907 2017-01-10  Tom Tromey  <tom@tromey.com>
13908
13909         * python/py-param.c (get_doc_string, compute_enum_values): Use
13910         gdbpy_ref.
13911
13912 2017-01-10  Tom Tromey  <tom@tromey.com>
13913
13914         * python/py-inferior.c (find_thread_object, build_inferior_list):
13915         Use gdbpy_ref.
13916
13917 2017-01-10  Tom Tromey  <tom@tromey.com>
13918
13919         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13920
13921 2017-01-10  Tom Tromey  <tom@tromey.com>
13922
13923         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13924         gdbpy_ref.
13925
13926 2017-01-10  Tom Tromey  <tom@tromey.com>
13927
13928         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13929         extra incref.
13930         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13931         Use gdbpy_ref.
13932
13933 2017-01-10  Tom Tromey  <tom@tromey.com>
13934
13935         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13936         gdbpy_ref.
13937
13938 2017-01-10  Tom Tromey  <tom@tromey.com>
13939
13940         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13941         decref results of PyArg_ParseTupleAndKeywords.
13942
13943 2017-01-10  Tom Tromey  <tom@tromey.com>
13944
13945         * python/python.c (python_run_simple_file): Use
13946         unique_xmalloc_ptr, gdbpy_ref.
13947
13948 2017-01-10  Tom Tromey  <tom@tromey.com>
13949
13950         * python/py-prettyprint.c (print_stack_unless_memory_error)
13951         (print_string_repr, print_children): Use gdbpy_ref.
13952         (dummy_python_frame): New class.
13953         (dummy_python_frame::dummy_python_frame): Rename from
13954         push_dummy_python_frame.
13955         (py_restore_tstate): Remove.
13956
13957 2017-01-10  Tom Tromey  <tom@tromey.com>
13958
13959         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13960
13961 2017-01-10  Tom Tromey  <tom@tromey.com>
13962
13963         * python/python.c (ensure_python_env, restore_python_env):
13964         Remove.
13965         * python/python-internal.h (ensure_python_env): Don't declare.
13966         * varobj.h (varobj_ensure_python_env): Don't declare.
13967         * varobj.c (varobj_ensure_python_env): Remove.
13968
13969 2017-01-10  Tom Tromey  <tom@tromey.com>
13970
13971         * varobj.c (varobj_value_get_print_value): Use
13972         gdbpy_enter_varobj.
13973
13974 2017-01-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-prettyprint.c (print_string_repr, print_children):
13977         Update.
13978         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13979         of "encoding".
13980         * varobj.c (varobj_value_get_print_value): Update.
13981         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13982
13983 2017-01-10  Tom Tromey  <tom@tromey.com>
13984
13985         * varobj.c (varobj_get_display_hint)
13986         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13987         (varobj_set_visualizer, free_variable): Use
13988         gdbpy_enter_varobj.
13989
13990 2017-01-10  Tom Tromey  <tom@tromey.com>
13991
13992         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13993         (do_finish_initialization): New function.  Use gdbpy_ref.
13994         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13995         do_finish_initialization.
13996
13997 2017-01-10  Tom Tromey  <tom@tromey.com>
13998
13999         * python/py-param.c (get_set_value, get_show_value): Use
14000         gdbpy_enter, gdbpy_ref.
14001
14002 2017-01-10  Tom Tromey  <tom@tromey.com>
14003
14004         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14005
14006 2017-01-10  Tom Tromey  <tom@tromey.com>
14007
14008         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14009
14010 2017-01-10  Tom Tromey  <tom@tromey.com>
14011
14012         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14013         Use gdbpy_enter_varobj.
14014
14015 2017-01-10  Tom Tromey  <tom@tromey.com>
14016
14017         * varobj.c (gdbpy_enter_varobj): New constructor.
14018         * python/python-internal.h (gdbpy_enter_varobj): New class.
14019         * python/py-varobj.c (py_varobj_get_iterator): Use
14020         gdbpy_enter_varobj.
14021
14022 2017-01-10  Tom Tromey  <tom@tromey.com>
14023
14024         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14025         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14026         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14027         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14028         unique_xmalloc_ptr.
14029         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14030
14031 2017-01-10  Tom Tromey  <tom@tromey.com>
14032
14033         * python/py-xmethods.c (invoke_match_method): Use
14034         gdbpy_ref.
14035
14036 2017-01-10  Tom Tromey  <tom@tromey.com>
14037
14038         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14039         gdbpy_enter, gdbpy_ref.
14040
14041 2017-01-10  Tom Tromey  <tom@tromey.com>
14042
14043         * python/python.c (python_interactive_command): Use gdbpy_enter.
14044
14045 2017-01-10  Tom Tromey  <tom@tromey.com>
14046
14047         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14048         gdbpy_ref.
14049
14050 2017-01-10  Tom Tromey  <tom@tromey.com>
14051
14052         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14053         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14054
14055 2017-01-10  Tom Tromey  <tom@tromey.com>
14056
14057         * utils.h (htab_deleter): New struct.
14058         (htab_up): New typedef.
14059         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14060         gdbpy_enter, gdbpy_ref, htab_up.
14061
14062 2017-01-10  Tom Tromey  <tom@tromey.com>
14063
14064         * python/py-unwind.c (pending_frame_invalidate): Remove.
14065         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14066
14067 2017-01-10  Tom Tromey  <tom@tromey.com>
14068
14069         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14070         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14071
14072 2017-01-10  Tom Tromey  <tom@tromey.com>
14073
14074         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14075
14076 2017-01-10  Tom Tromey  <tom@tromey.com>
14077
14078         * python/python.c (gdbpy_eval_from_control_command)
14079         (gdbpy_source_script, gdbpy_run_events)
14080         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14081         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14082         gdbpy_enter.
14083
14084 2017-01-10  Tom Tromey  <tom@tromey.com>
14085
14086         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14087
14088 2017-01-10  Tom Tromey  <tom@tromey.com>
14089
14090         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14091
14092 2017-01-10  Tom Tromey  <tom@tromey.com>
14093
14094         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14095         (python_on_inferior_call_pre, python_on_inferior_call_post)
14096         (python_on_memory_change, python_on_register_change)
14097         (python_inferior_exit, python_new_objfile, add_thread_object)
14098         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14099
14100 2017-01-10  Tom Tromey  <tom@tromey.com>
14101
14102         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14103         (bpfinishpy_handle_exit): Use gdbpy_enter.
14104
14105 2017-01-10  Tom Tromey  <tom@tromey.com>
14106
14107         * python/py-cmd.c (cmdpy_destroyer)
14108         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14109         gdbpy_enter.
14110
14111 2017-01-10  Tom Tromey  <tom@tromey.com>
14112
14113         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14114         gdbpy_enter.
14115         (gdbpy_breakpoint_has_cond): Likewise.
14116
14117 2017-01-10  Tom Tromey  <tom@tromey.com>
14118
14119         * python/python.c (gdbpy_enter): New constructor.
14120         (~gdbpy_enter): New destructor.
14121         (restore_python_env, ensure_python_env): Rewrite.
14122         * python/python-internal.h (gdbpy_enter): New class.
14123
14124 2017-01-10  Tom Tromey  <tom@tromey.com>
14125
14126         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14127
14128 2017-01-10  Tom Tromey  <tom@tromey.com>
14129
14130         * python/py-value.c (value_has_field, get_field_flag)
14131         (get_field_type, valpy_getitem, convert_value_from_python): Use
14132         gdbpy_ref.
14133
14134 2017-01-10  Tom Tromey  <tom@tromey.com>
14135
14136         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14137         gdbpy_ref.
14138
14139 2017-01-10  Tom Tromey  <tom@tromey.com>
14140
14141         * python/py-prettyprint.c (search_pp_list)
14142         (find_pretty_printer_from_objfiles)
14143         (find_pretty_printer_from_progspace)
14144         (find_pretty_printer_from_gdb, find_pretty_printer)
14145         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14146         gdbpy_ref.
14147
14148 2017-01-10  Tom Tromey  <tom@tromey.com>
14149
14150         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14151
14152 2017-01-10  Tom Tromey  <tom@tromey.com>
14153
14154         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14155         (ltpy_get_all_source_lines): Use gdbpy_ref.
14156
14157 2017-01-10  Tom Tromey  <tom@tromey.com>
14158
14159         * python/py-framefilter.c (extract_sym, extract_value)
14160         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14161         gdbpy_ref.
14162
14163 2017-01-10  Tom Tromey  <tom@tromey.com>
14164
14165         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14166
14167 2017-01-10  Tom Tromey  <tom@tromey.com>
14168
14169         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14170
14171 2017-01-10  Tom Tromey  <tom@tromey.com>
14172
14173         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14174         gdbpy_ref.
14175
14176 2017-01-10  Tom Tromey  <tom@tromey.com>
14177
14178         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14179
14180 2017-01-10  Tom Tromey  <tom@tromey.com>
14181
14182         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14183         (typy_range): Use gdbpy_ref.
14184
14185 2017-01-10  Tom Tromey  <tom@tromey.com>
14186
14187         * python/py-threadevent.c (create_thread_event_object): Use
14188         gdbpy_ref.
14189         * python/py-stopevent.c (create_stop_event_object): Simplify.
14190         (emit_stop_event): Use gdbpy_ref.
14191         * python/py-signalevent.c (create_signal_event_object): Use
14192         gdbpy_ref.
14193         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14194         (emit_new_objfile_event, create_clear_objfiles_event_object)
14195         (emit_clear_objfiles_event): Use gdbpy_ref.
14196         * python/py-infevents.c (create_inferior_call_event_object)
14197         (create_register_changed_event_object)
14198         (create_memory_changed_event_object, emit_inferior_call_event)
14199         (emit_memory_changed_event, emit_register_changed_event): Use
14200         gdbpy_ref.
14201         * python/py-exitedevent.c (create_exited_event_object)
14202         (emit_exited_event): Use gdbpy_ref.
14203         * python/py-event.h (evpy_emit_event): Remove
14204         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14205         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14206         * python/py-continueevent.c (emit_continue_event): Use
14207         gdbpy_ref.
14208         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14209         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14210         gdbpy_ref.
14211         * python/py-bpevent.c (create_breakpoint_event_object): Use
14212         gdbpy_ref.
14213
14214 2017-01-10  Tom Tromey  <tom@tromey.com>
14215
14216         * python/py-ref.h: New file.
14217
14218 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14219
14220         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14221         void.
14222         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14223         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14224         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14225         * ui-out.c (ui_out::redirect): Likewise.
14226         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14227         * cli/cli-logging.c (set_logging_redirect): Update call site of
14228         ui_out::redirect.
14229         (handle_redirections): Likewise.
14230         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14231         * top.c (execute_command_to_string): Likewise.
14232         * utils.c (do_ui_out_redirect_pop): Likewise.
14233
14234 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14235
14236         * stack.c (_initialize_stack): Update "frame" command help message.
14237
14238 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14239
14240         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14241
14242 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14243
14244         * x86-linux-nat.h: Include gdb_proc_service.h.
14245
14246 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14247
14248         * ser-base.h: Include serial.h.
14249
14250 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14251
14252         * ppc-linux-tdep.h: Include ppc-tdep.h.
14253
14254 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14255
14256         * nat/amd64-linux-siginfo.h: Include signal.h.
14257
14258 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14259
14260         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14261
14262 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14263
14264         * mi/mi-parse.h: Include mi-cmds.h.
14265
14266 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14267
14268         * inf-loop.c: Don't include "target.h".
14269         * inf-loop.h: Include it here.
14270
14271 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14272
14273         * dfp.h: Include "dboulest.h" and "expression.h".
14274
14275 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14276
14277         * ax-gdb.h: Include "ax.h".
14278
14279 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14280
14281         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14282         with nat/gdb_ptrace.h.
14283
14284 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14285
14286         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14287         new line.
14288         (mips64_fbsd_sigframe_init): Likewise.
14289
14290 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14291
14292         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14293         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14294
14295 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14296
14297         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14298         * NEWS: Mention new FreeBSD/mips native configuration.
14299         * config/mips/fbsd.mh: New file.
14300         * configure.host: Add mips*-*-freebsd*.
14301         * mips-fbsd-nat.c: New file.
14302
14303 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14304
14305         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14306         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14307         * NEWS: Mention new FreeBSD/mips target.
14308         * configure.tgt: Add mips*-*-freebsd*.
14309         * mips-fbsd-tdep.c: New file.
14310         * mips-fbsd-tdep.h: New file.
14311
14312 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14313
14314         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14315         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14316
14317 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14318
14319         Update copyright year range in all GDB files.
14320
14321 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14322
14323         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14324
14325 For older changes see ChangeLog-2016.
14326 \f
14327 Local Variables:
14328 mode: change-log
14329 left-margin: 8
14330 fill-column: 74
14331 version-control: never
14332 coding: utf-8
14333 End: