Construct readonly regcache without address space
[external/binutils.git] / gdb / ChangeLog
1 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2
3         * frame.c (do_frame_register_read): Remove aspace.
4         * jit.c (jit_frame_sniffer): Likwise.
5         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
6         * regcache.c (regcache::regcache): Pass nullptr.
7         (regcache_print): Caller updated.
8         * regcache.h (regcache::regcache): Remove one constructor
9         parameter aspace.
10
11 2017-11-02  Yao Qi  <yao.qi@linaro.org>
12
13         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
14
15 2017-11-02  Yao Qi  <yao.qi@linaro.org>
16
17         * breakpoint.c (insert_single_step_breakpoints): Update.
18         * frame.c (struct frame_info) <aspace>: Add const.
19         (frame_save_as_regcache): Add const.
20         (get_frame_address_space): Return const address_space *.
21         * frame.h (get_frame_address_space): Update declaration.
22         * infrun.c (struct step_over_info) <aspace>: Add const.
23         (set_step_over_info): Make aspace const.
24         (displaced_step_prepare_throw): Change variable const.
25         (resume): Likewise.
26         (proceed): Likewise.
27         (adjust_pc_after_break): Likewise.
28         (save_waitstatus): Likewise.
29         (handle_signal_stop): Likewise.
30         (keep_going_pass_signal): Likewise.
31         * jit.c (jit_frame_sniffer): Add const.
32         * mips-tdep.c (mips_single_step_through_delay): Likewise.
33         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
34         * record-full.c (record_full_wait_1): Likewise.
35         * regcache.c (regcache::regcache): Change parameter to const.
36         * regcache.h (regcache::regcache): Likewise.
37         (regcache::aspace): Return const address_space *.
38         (regcache) <m_aspace>: Add const.
39
40 2017-11-02  Yao Qi  <yao.qi@linaro.org>
41
42         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
43         * frame.c (create_sentinel_frame): Likewise.
44         * infrun.c (displaced_step_prepare_throw): Likewise.
45         (resume): Likewise.
46         (thread_still_needs_step_over_bp): Likewise.
47         (proceed): Likewise.
48         (do_target_wait): Likewise.
49         (adjust_pc_after_break): Likewise.
50         (handle_syscall_event): Likewise.
51         (save_waitstatus): Likewise.
52         (handle_inferior_event_1): Likewise.
53         (handle_signal_stop): Likewise.
54         (keep_going_pass_signal): Likewise.
55         * linux-nat.c (status_callback): Likewise.
56         (save_stop_reason): Likewise.
57         (resume_stopped_resumed_lwps): Likewise.
58         * record-full.c (record_full_exec_insn): Likewise.
59         (record_full_wait_1): Likewise.
60         * regcache.c (get_regcache_aspace): Remove.
61         * regcache.h (get_regcache_aspace): Remove.
62
63 2017-11-02  Yao Qi  <yao.qi@linaro.org>
64
65         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
66         (init_regcache_descr): Use gdbarch_num_regs.
67         (regcache::regcache): Likewise.
68         (regcache::get_register_status): Likewise.
69         (regcache::assert_raw_regnum): Likewise.
70         (regcache::cooked_read): Likewise.
71         (regcache::cooked_read_value): Likewise.
72         (regcache::cooked_write): Likewise.
73         (regcache::dump): Likewise.
74         (regcache::num_raw_registers): New method.
75         * regcache.h (class regcache) <num_raw_registers>: New.
76
77 2017-11-02  Yao Qi  <yao.qi@linaro.org>
78
79         * regcache.c (regcache::assert_regnum): New method.
80         (regcache::invalidate): Call assert_regnum.
81         (regcache::raw_update): Likewise.
82         (regcache::raw_write): Likewise.
83         (regcache::raw_read_part): Likewise.
84         (regcache::raw_write_part): Likewise.
85         (regcache::raw_supply): Likewise.
86         (regcache::raw_supply_integer): Likewise.
87         (regcache::raw_supply_zeroed): Likewise.
88         (regcache::raw_collect): Likewise.
89         (regcache::raw_collect_integer): Likewise.
90         * regcache.h (regcache::assert_regnum): Declare.
91
92 2017-11-02  Yao Qi  <yao.qi@linaro.org>
93
94         * regcache.c (regcache::dump): Remove code.
95
96 2017-11-02  Yao Qi  <yao.qi@linaro.org>
97
98         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
99         Remove.
100         <sizeof_cooked_register_status>: Remove.
101         (init_regcache_descr): Update.
102         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
103         (regcache::save): Likewise.
104         (regcache::dump): Likewise.
105
106 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
107
108         * ft32-tdep.c (ft32_fetch_instruction): New function.
109         (ft32_analyze_prologue): Use ft32_fetch_instruction().
110
111 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
112
113         * cli/cli-script.c (execute_control_command): Rename to ...
114         (execute_control_command_1): ... this.
115         (execute_control_command): New function.
116
117 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
118
119         * tracepoint.c (tfind_command): Remove const_cast.
120
121 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
122
123         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
124
125 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
126
127         * common/common-utils.h (in_inclusive_range): New function.
128         * arm-tdep.c (arm_record_extension_space): Use
129         in_inclusive_range.
130         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
131         * cris-tdep.c (cris_spec_reg_applicable): Use
132         in_inclusive_range.
133
134 2017-10-30  Pedro Alves  <palves@redhat.com>
135             Simon Marchi <simon.marchi@ericsson.com>
136
137         * remote.c (remote_set_syscall_catchpoint): Build a std::string
138         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
139
140 2017-10-30  Pedro Alves  <palves@redhat.com>
141
142         * common/common-utils.c (string_appendf, string_vappendf): New
143         functions.
144         * common/common-utils.h (string_appendf, string_vappendf): New
145         declarations.
146         * unittests/common-utils-selftests.c (string_appendf_func)
147         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
148         (string_vappendf_tests): New functions.
149         (_initialize_common_utils_selftests): Register "string_appendf" and
150         "string_vappendf tests".
151
152 2017-10-30  Pedro Alves  <palves@redhat.com>
153
154         * unittests/common-utils-selftests.c (format_func): New typedef.
155         (string_printf_tests, string_vprintf_tests): Tests factored out
156         and merged to ...
157         (test_format_func): ... this new function.
158         (string_printf_tests, string_vprintf_tests): Reimplement on top of
159         test_format_func.
160
161 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
162
163         * darwin-nat.c: Remove include of gdb.h.
164
165 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
166
167         * xtensa-xtregs.c: Fix formatting issues.
168
169 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
170
171         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
172
173 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
174
175         PR python/21213
176         * python/py-infthread.c (thpy_get_inferior): Increment reference
177         of inferior before returning it.
178
179 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
180
181         * unittests/common-utils-selftests.c (format): Add
182         ATTRIBUTE_PRINTF.
183
184 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
185
186         * xml-syscall.c (struct syscall_desc): Add constructor.
187         <name>: Change type to std::string.
188         (syscall_desc_up): New typedef.
189         (syscall_desc_p): Remove typeder.
190         (DEF_VEC_P(syscall_desc_p)): Remove.
191         (struct syscall_group_desc): Add constructor.
192         <name>: Change type to std::string.
193         <syscalls>: Change type to std::vector.
194         (syscall_group_desc_up): New typedef.
195         (syscall_group_desc_p): Remove typedef.
196         (DEF_VEC_P(syscall_group_desc_p)): Remove.
197         (struct syscalls_info) <syscalls>: Change type to std::vector of
198         unique_ptr.
199         <groups>: Likewise.
200         <my_gdb_datadir>: Change type to std::string.
201         (syscalls_info_up): New typedef.
202         (allocate_syscalls_info): Remove.
203         (syscalls_info_free_syscalls_desc): Remove.
204         (syscalls_info_free_syscall_group_desc): Remove.
205         (free_syscalls_info): Remove.
206         (make_cleanup_free_syscalls_info): Remove.
207         (syscall_group_create_syscall_group_desc): Adjust.
208         (syscall_group_add_syscall): Adjust.
209         (syscall_create_syscall_desc): Adjust.
210         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
211         (init_syscalls_info): Adjust.
212         (syscall_group_get_group_by_name): Adjust.
213         (xml_get_syscall_number): Adjust.
214         (xml_get_syscall_name): Adjust.
215         (xml_list_of_syscalls): Adjust.
216         (xml_list_syscalls_by_group): Adjust.
217         (xml_list_of_groups): Adjust.
218
219 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
220
221         * probe.h: Don't include gdb_vecs.h.
222         (DEF_VEC_P (probe_p)): Remove.
223         (find_probes_in_objfile): Return an std::vector.
224         * probe.c (find_probes_in_objfile): Likewise.
225         * breakpoint.c (breakpoint_objfile_data)
226         <longjmp_probes>: Change type to std::vector.
227         <exception_probes>: Likewise.
228         (free_breakpoint_probes): Don't manually free vectors.
229         (create_longjmp_master_breakpoint): Adjust.
230         (create_exception_master_breakpoint): Adjust.
231         * solib-svr4.c (svr4_create_probe_breakpoints): Change
232         parameter type, adjust.
233         (svr4_create_solib_event_breakpoints): Adjust.
234
235 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
236
237         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
238         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
239         with new.
240         (free_breakpoint_probes): Rename to ...
241         (free_breakpoint_objfile_data): ... this, and call delete on
242         bp_objfile_data..
243
244 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
245
246         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
247         (loaded_script_ptr): Remove typedef.
248         (DEF_VEC_P (loaded_script_ptr)): Remove.
249         (struct collect_matching_scripts_data): Add constructor.
250         <scripts_p>: Change type to (pointer to) std::vector.
251         (collect_matching_scripts_data): Adjust.
252         (sort_scripts_by_name): Make suitable for std::sort.
253         (print_scripts): Don't sort vector, adjust to std::vector.
254         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
255
256 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
257
258         * symfile.c (filename_language): Make struct, not typedef.  Add
259         constructor.
260         <ext>: Change type to std::string.
261         (DEF_VEC_O (filename_language)): Remove.
262         (filename_language_table): Change type to std::vector.
263         (add_filename_language): Adjust.
264         (set_ext_lang_command): Adjust.
265         (info_ext_lang_command): Adjust.
266         (deduce_language_from_filename): Adjust.
267         (class scoped_restore_filename_language_table): Remove.
268         (test_filename_language): Use scoped_restore.
269         (test_set_ext_lang_command): Use scoped_restore, adjust to
270         std::vector change.
271
272 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
273
274         * symfile.c: Include selftest.h.
275         (class scoped_restore_filename_language_table): New.
276         (test_filename_language): New test.
277         (test_set_ext_lang_command): New test.
278         (_initialize_symfile): Register tests.
279
280 2017-10-27  Keith Seitz  <keiths@redhat.com>
281
282         * breakpoint.c (print_breakpoint_location): Use the symbol saved
283         in the bp_location, falling back to find_pc_sect_function when
284         needed.
285         (add_location_to_breakpoint): Save sal->symbol.
286         * breakpoint.h (struct bp_location) <symbol>: New field.
287         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
288         * symtab.h (struct symtab_and_line) <symbol>: New field.
289
290 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
291
292         PR gdb/13669
293         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
294         to rewind obstack.
295
296 2017-10-26  Pedro Alves  <palves@redhat.com>
297
298         * remote.c (remote_async_terminal_ours_p): Delete.
299         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
300         Remove references to 'remote_async_terminal_ours_p'.
301
302 2017-10-26  Yao Qi  <yao.qi@linaro.org>
303
304         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
305
306 2017-10-26  Yao Qi  <yao.qi@linaro.org>
307
308         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
309         aspace const.
310         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
311         Likewise.
312         * breakpoint.c (bpstat_check_location): Remove cast.
313         (breakpoint_hit_catch_fork): Make aspce const.
314         (breakpoint_hit_catch_solib): Likewise.
315         (breakpoint_hit_catch_exec): Likewise.
316         (breakpoint_hit_ranged_breakpoint): Likewise.
317         (breakpoint_hit_watchpoint): Likewise.
318         (base_breakpoint_breakpoint_hit): Likewise.
319         (bkpt_breakpoint_hit): Likewise.
320         (dprintf_breakpoint_hit): Likewise.
321         (tracepoint_breakpoint_hit): Likewise.
322         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
323
324 2017-10-26  Yao Qi  <yao.qi@linaro.org>
325
326         * breakpoint.c (breakpoint_location_address_match): Change
327         "struct address_space *" to "const address_space".
328         (breakpoint_location_address_range_overlap): Likewise.
329         (breakpoint_here_p): Likewise.
330         (breakpoint_in_range_p): Likewise.
331         (moribund_breakpoint_here_p): Likewise.
332         (bp_location_inserted_here_p): Likewise.
333         (software_breakpoint_inserted_here_p): Likewise.
334         (hardware_breakpoint_inserted_here_p): Likewise.
335         (hardware_watchpoint_inserted_in_range): Likewise.
336         (bpstat_check_location): Likewise.
337         (bpstat_stop_status): Likewise.
338         (breakpoint_address_match): Likewise.
339         (breakpoint_address_match_range): Likewise.
340         (breakpoint_location_address_match): Likewise.
341         (breakpoint_location_address_range_overlap): Likewise.
342         (insert_single_step_breakpoint): Likewise.
343         (breakpoint_has_location_inserted_here): Likewise.
344         (single_step_breakpoint_inserted_here_p): Likewise.
345         (pc_at_non_inline_function): Likewise.
346         * breakpoint.h (bpstat_stop_status): Update declaration.
347         (breakpoint_here_p): Likewise.
348         (breakpoint_in_range_p): Likewise.
349         (moribund_breakpoint_here_p): Likewise.
350         (breakpoint_inserted_here_p): Likewise.
351         (software_breakpoint_inserted_here_p): Likewise.
352         (hardware_breakpoint_inserted_here_p): Likewise.
353         (breakpoint_has_location_inserted_here): Likewise.
354         (single_step_breakpoint_inserted_here_p): Likewise.
355         (hardware_watchpoint_inserted_in_range): Likewise.
356         (breakpoint_address_match): Likewise.
357         (insert_single_step_breakpoint): Likewise.
358         (pc_at_non_inline_function): Likewise.
359         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
360         * record.c (record_check_stopped_by_breakpoint): Likewise.
361         * record.h (record_check_stopped_by_breakpoint): Likewise.
362         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
363
364 2017-10-25  Yao Qi  <yao.qi@linaro.org>
365
366         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
367         regcache->arch () instead get_regcache_arch.
368         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
369         Likewise.
370         (aarch64_fbsd_store_inferior_registers): Likewise.
371         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
372         (store_gregs_to_thread): Likewise.
373         (fetch_fpregs_from_thread): Likewise.
374         (store_fpregs_to_thread): Likewise.
375         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
376         (aarch64_store_return_value): Likewise.
377         (aarch64_software_single_step): Likewise.
378         * aix-thread.c (aix_thread_wait): Likewise.
379         (supply_reg32): Likewise.
380         (supply_sprs64): Likewise.
381         (supply_sprs32): Likewise.
382         (fill_gprs64): Likewise.
383         (fill_gprs32): Likewise.
384         (fill_sprs64): Likewise.
385         (fill_sprs32): Likewise.
386         (store_regs_user_thread): Likewise.
387         (store_regs_kernel_thread): Likewise.
388         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
389         (alphabsd_store_inferior_registers): Likewise.
390         * alpha-tdep.c (alpha_extract_return_value): Likewise.
391         (alpha_store_return_value): Likewise.
392         (alpha_deal_with_atomic_sequence): Likewise.
393         (alpha_next_pc): Likewise.
394         (alpha_software_single_step): Likewise.
395         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
396         (amd64bsd_store_inferior_registers): Likewise.
397         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
398         Likewise.
399         (amd64_linux_store_inferior_registers): Likewise.
400         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
401         (amd64_collect_native_gregset): Likewise.
402         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
403         (amd64obsd_collect_uthread): Likewise.
404         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
405         (amd64_collect_fpregset): Likewise.
406         (amd64_supply_fxsave): Likewise.
407         (amd64_supply_xsave): Likewise.
408         (amd64_collect_fxsave): Likewise.
409         (amd64_collect_xsave): Likewise.
410         * arc-tdep.c (arc_write_pc): Likewise.
411         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
412         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
413         (arm_fbsd_store_inferior_registers): Likewise.
414         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
415         (store_vfp_regs): Likewise.
416         (arm_linux_fetch_inferior_registers): Likewise.
417         (arm_linux_store_inferior_registers): Likewise.
418         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
419         (arm_linux_sigreturn_next_pc): Likewise.
420         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
421         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
422         (fetch_register): Likewise.
423         (store_register): Likewise.
424         * arm-tdep.c (arm_is_thumb): Likewise.
425         (displaced_in_arm_mode): Likewise.
426         (bx_write_pc): Likewise.
427         (arm_get_next_pcs_addr_bits_remove): Likewise.
428         (arm_software_single_step): Likewise.
429         (arm_extract_return_value): Likewise.
430         (arm_store_return_value): Likewise.
431         (arm_write_pc): Likewise.
432         * bfin-tdep.c (bfin_extract_return_value): Likewise.
433         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
434         (bsd_uthread_store_registers): Likewise.
435         * core-regset.c (fetch_core_registers): Likewise.
436         * corelow.c (get_core_registers): Likewise.
437         * cris-tdep.c (cris_store_return_value): Likewise.
438         (cris_extract_return_value): Likewise.
439         (find_step_target): Likewise.
440         (find_step_target): Likewise.
441         (cris_software_single_step): Likewise.
442         * ctf.c (ctf_fetch_registers): Likewise.
443         * darwin-nat.c (cancel_breakpoint): Likewise.
444         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
445         * frv-tdep.c (frv_extract_return_value): Likewise.
446         * ft32-tdep.c (ft32_store_return_value): Likewise.
447         (ft32_extract_return_value): Likewise.
448         * go32-nat.c (fetch_register): Likewise.
449         (go32_fetch_registers): Likewise.
450         (go32_store_registers): Likewise.
451         (store_register): Likewise.
452         * h8300-tdep.c (h8300_extract_return_value): Likewise.
453         (h8300_store_return_value): Likewise.
454         * hppa-linux-nat.c (fetch_register): Likewise.
455         (store_register): Likewise.
456         (hppa_linux_fetch_inferior_registers): Likewise.
457         (hppa_linux_store_inferior_registers): Likewise.
458         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
459         (i386_darwin_store_inferior_registers): Likewise.
460         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
461         (gnu_store_registers): Likewise.
462         * i386-linux-nat.c (fetch_register): Likewise.
463         (store_register): Likewise.
464         (supply_gregset): Likewise.
465         (fill_gregset): Likewise.
466         (i386_linux_fetch_inferior_registers): Likewise.
467         (i386_linux_store_inferior_registers): Likewise.
468         (i386_linux_resume): Likewise.
469         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
470         Likewise.
471         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
472         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
473         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
474         (i386obsd_collect_uthread): Likewise.
475         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
476         (i386_supply_gregset): Likewise.
477         (i386_collect_gregset): Likewise.
478         (i386_supply_fpregset): Likewise.
479         (i386_collect_fpregset): Likewise.
480         (i386_mpx_bd_base): Likewise.
481         * i386-v4-nat.c (supply_fpregset): Likewise.
482         (fill_fpregset): Likewise.
483         * i387-tdep.c (i387_supply_fsave): Likewise.
484         (i387_collect_fsave): Likewise.
485         (i387_supply_fxsave): Likewise.
486         (i387_collect_fxsave): Likewise.
487         (i387_supply_xsave): Likewise.
488         (i387_collect_xsave): Likewise.
489         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
490         (ia64_linux_store_registers): Likewise.
491         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
492         (ia64_extract_return_value): Likewise.
493         (ia64_store_return_value): Likewise.
494         (find_func_descr): Likewise.
495         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
496         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
497         (inf_ptrace_store_registers): Likewise.
498         * infrun.c (use_displaced_stepping): Likewise.
499         (displaced_step_prepare_throw): Likewise.
500         (resume): Likewise.
501         (proceed): Likewise.
502         (do_target_wait): Likewise.
503         (adjust_pc_after_break): Likewise.
504         (handle_inferior_event_1): Likewise.
505         (handle_signal_stop): Likewise.
506         (save_infcall_suspend_state): Likewise.
507         (restore_infcall_suspend_state): Likewise.
508         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
509         * jit.c (jit_frame_prev_register): Likewise.
510         * linux-nat.c (save_stop_reason): Likewise.
511         (linux_nat_wait_1): Likewise.
512         (resume_stopped_resumed_lwps): Likewise.
513         * linux-record.c (record_linux_sockaddr): Likewise.
514         (record_linux_msghdr): Likewise.
515         (record_linux_system_call): Likewise.
516         * linux-tdep.c (linux_collect_thread_registers): Likewise.
517         * lm32-tdep.c (lm32_extract_return_value): Likewise.
518         (lm32_store_return_value): Likewise.
519         * m32c-tdep.c (m32c_read_flg): Likewise.
520         (m32c_pseudo_register_read): Likewise.
521         (m32c_pseudo_register_write): Likewise.
522         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
523         (m32r_linux_collect_gregset): Likewise.
524         * m32r-tdep.c (m32r_store_return_value): Likewise.
525         (m32r_extract_return_value): Likewise.
526         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
527         (m68kbsd_collect_fpregset): Likewise.
528         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
529         * m68k-linux-nat.c (fetch_register): Likewise.
530         (old_fetch_inferior_registers): Likewise.
531         (old_store_inferior_registers): Likewise.
532         (store_regs): Likewise.
533         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
534         (m68k_svr4_store_return_value): Likewise.
535         * m88k-tdep.c (m88k_store_arguments): Likewise.
536         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
537         (mi_cmd_data_write_register_values): Likewise.
538         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
539         (mips_fbsd_store_inferior_registers): Likewise.
540         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
541         (mips_fbsd_supply_gregs): Likewise.
542         (mips_fbsd_collect_fpregs): Likewise.
543         (mips_fbsd_collect_gregs): Likewise.
544         (mips_fbsd_supply_fpregset): Likewise.
545         (mips_fbsd_collect_fpregset): Likewise.
546         (mips_fbsd_supply_gregset): Likewise.
547         (mips_fbsd_collect_gregset): Likewise.
548         * mips-linux-nat.c (supply_gregset): Likewise.
549         (fill_gregset): Likewise.
550         (supply_fpregset): Likewise.
551         (fill_fpregset): Likewise.
552         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
553         (mips_fill_gregset): Likewise.
554         (mips_supply_fpregset): Likewise.
555         (mips_fill_fpregset): Likewise.
556         (mips64_supply_gregset): Likewise.
557         (micromips_linux_sigframe_validate): Likewise.
558         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
559         (mipsnbsd_fetch_inferior_registers): Likewise.
560         (mipsnbsd_store_inferior_registers): Likewise.
561         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
562         (mipsnbsd_supply_gregset): Likewise.
563         (mipsnbsd_iterate_over_regset_sections): Likewise.
564         (mipsnbsd_supply_reg): Likewise.
565         (mipsnbsd_supply_fpreg): Likewise.
566         * mips-tdep.c (mips_in_frame_stub): Likewise.
567         (mips_dummy_id): Likewise.
568         (is_octeon_bbit_op): Likewise.
569         (micromips_bc1_pc): Likewise.
570         (extended_mips16_next_pc): Likewise.
571         (mips16_next_pc): Likewise.
572         (deal_with_atomic_sequence): Likewise.
573         * moxie-tdep.c (moxie_process_readu): Likewise.
574         * nios2-tdep.c (nios2_get_next_pc): Likewise.
575         * nto-procfs.c (procfs_store_registers): Likewise.
576         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
577         (ppcfbsd_store_inferior_registers): Likewise.
578         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
579         (fetch_altivec_register): Likewise.
580         (get_spe_registers): Likewise.
581         (fetch_spe_register): Likewise.
582         (fetch_altivec_registers): Likewise.
583         (fetch_all_gp_regs): Likewise.
584         (fetch_all_fp_regs): Likewise.
585         (store_vsx_register): Likewise.
586         (store_altivec_register): Likewise.
587         (set_spe_registers): Likewise.
588         (store_spe_register): Likewise.
589         (store_altivec_registers): Likewise.
590         (store_all_gp_regs): Likewise.
591         (store_all_fp_regs): Likewise.
592         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
593         (ppc_linux_collect_gregset): Likewise.
594         (ppc_canonicalize_syscall): Likewise.
595         (ppc_linux_record_signal): Likewise.
596         (ppu2spu_prev_register): Likewise.
597         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
598         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
599         (ppcobsd_store_registers): Likewise.
600         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
601         Likewise.
602         (ppc_ravenscar_generic_store_registers): Likewise.
603         * procfs.c (procfs_fetch_registers): Likewise.
604         (procfs_store_registers): Likewise.
605         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
606         (ravenscar_store_registers): Likewise.
607         (ravenscar_prepare_to_store): Likewise.
608         * record-btrace.c (record_btrace_fetch_registers): Likewise.
609         * record-full.c (record_full_wait_1): Likewise.
610         (record_full_registers_change): Likewise.
611         (record_full_store_registers): Likewise.
612         (record_full_core_fetch_registers): Likewise.
613         (record_full_save): Likewise.
614         (record_full_goto_insn): Likewise.
615         * regcache.c (regcache_register_size): Likewise.
616         (get_regcache_arch): Remove.
617         (regcache_read_pc): Likewise.
618         * regcache.h (get_regcache_arch): Remove.
619         * remote-sim.c (gdbsim_fetch_register): Likewise.
620         (gdbsim_store_register): Likewise.
621         * remote.c (fetch_register_using_p): Likewise.
622         (send_g_packet): Likewise.
623         (remote_prepare_to_store): Likewise.
624         (store_registers_using_G): Likewise.
625         * reverse.c (save_bookmark_command): Likewise.
626         (goto_bookmark_command): Likewise.
627         * rs6000-aix-tdep.c (branch_dest): Likewise.
628         * rs6000-nat.c (rs6000_ptrace64): Likewise.
629         (fetch_register): Likewise.
630         * rs6000-tdep.c (ppc_supply_reg): Likewise.
631         (ppc_collect_reg): Likewise.
632         (ppc_collect_gregset): Likewise.
633         (ppc_collect_fpregset): Likewise.
634         (ppc_collect_vsxregset): Likewise.
635         (ppc_collect_vrregset): Likewise.
636         (ppc_displaced_step_hw_singlestep): Likewise.
637         (rs6000_pseudo_register_read): Likewise.
638         (rs6000_pseudo_register_write): Likewise.
639         * s390-linux-nat.c (supply_gregset): Likewise.
640         (fill_gregset): Likewise.
641         (s390_linux_fetch_inferior_registers): Likewise.
642         * s390-linux-tdep.c (s390_write_pc): Likewise.
643         (s390_software_single_step): Likewise.
644         (s390_all_but_pc_registers_record): Likewise.
645         (s390_linux_syscall_record): Likewise.
646         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
647         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
648         (shnbsd_store_inferior_registers): Likewise.
649         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
650         (sh_extract_return_value_fpu): Likewise.
651         (sh_store_return_value_nofpu): Likewise.
652         (sh_corefile_supply_regset): Likewise.
653         (sh_corefile_collect_regset): Likewise.
654         * sh64-tdep.c (sh64_extract_return_value): Likewise.
655         (sh64_store_return_value): Likewise.
656         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
657         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
658         (sparc_store_inferior_registers): Likewise.
659         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
660         (sparc_ravenscar_prepare_to_store): Likewise.
661         * sparc-tdep.c (sparc32_store_arguments): Likewise.
662         (sparc_analyze_control_transfer): Likewise.
663         (sparc_step_trap): Likewise.
664         (sparc_software_single_step): Likewise.
665         (sparc32_gdbarch_init): Likewise.
666         (sparc_supply_rwindow): Likewise.
667         (sparc_collect_rwindow): Likewise.
668         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
669         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
670         (sparc64nbsd_collect_gregset): Likewise.
671         (sparc64nbsd_supply_fpregset): Likewise.
672         (sparc64nbsd_collect_fpregset): Likewise.
673         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
674         (sparc64_supply_gregset): Likewise.
675         (sparc64_collect_gregset): Likewise.
676         (sparc64_supply_fpregset): Likewise.
677         (sparc64_collect_fpregset): Likewise.
678         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
679         * spu-tdep.c (spu_unwind_sp): Likewise.
680         (spu2ppu_prev_register): Likewise.
681         (spu_memory_remove_breakpoint): Likewise.
682         * stack.c (return_command): Likewise.
683         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
684         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
685         * tracefile.c (trace_save_ctf): Likewise.
686         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
687         (do_windows_store_inferior_registers): Likewise.
688         (windows_resume): Likewise.
689         * xtensa-linux-nat.c (fill_gregset): Likewise.
690         (supply_gregset_reg): Likewise.
691         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
692         (xtensa_register_read_masked): Likewise.
693         (xtensa_supply_gregset): Likewise.
694         (xtensa_extract_return_value): Likewise.
695         (xtensa_store_return_value): Likewise.
696
697 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
698
699         * doublest.c (floatformat_from_string): New function.
700         * doublest.h (floatformat_from_string): Add prototype.
701
702         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
703         (OP_FLOAT): ... this.
704         * expression.h: Do not include "doublest.h".
705         (union exp_element): Replace doubleconst and decfloatconst by
706         new element floatconst.
707         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
708         (ada_evaluate_subexp): Likewise.
709         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
710         OP_DOUBLE and OP_DECFLOAT.
711         * expprint.c (print_subexp_standard): Likewise.
712         (dump_subexp_body_standard): Likewise.
713         * breakpoint.c (watchpoint_exp_is_const): Likewise.
714
715         * parse.c: Include "dfp.h".
716         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
717         (write_exp_elt_floatcst): New function.
718         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
719         and OP_DECFLOAT.
720         (operator_check_standard): Likewise.
721         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
722         Return target format buffer instead of host DOUBLEST.
723         Use floatformat_from_string and decimal_from_string to parse
724         either binary or decimal floating-point types.
725         (parse_c_float): Remove.
726         * parser-defs.h: Do not include "doublest.h".
727         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
728         (write_exp_elt_floatcst): Add prototype.
729         (parse_float): Update prototype.
730         (parse_c_float): Remove.
731
732         * c-exp.y: Do not include "dfp.h".
733         (typed_val_float): Use byte buffer instead of DOUBLEST.
734         (typed_val_decfloat): Remove.
735         (DECFLOAT): Remove.
736         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
737         (parse_number): Update to new parse_float interface.
738         Parse suffixes and determine type before calling parse_float.
739         Handle decimal and binary FP types the same way.
740
741         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
742         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
743         (parse_number): Update to new parse_float interface.
744         Parse suffixes and determine type before calling parse_float.
745
746         * f-exp.y: Replace dval by typed_val_float.
747         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
748         (parse_number): Use parse_float instead of atof.
749
750         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
751         (parse_go_float): Remove.
752         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
753         (parse_number): Call parse_float instead of parse_go_float.
754         Parse suffixes and determine type before calling parse_float.
755
756         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
757         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
758         (parse_number): Update to new parse_float interface.
759         Parse suffixes and determine type before calling parse_float.
760
761         * m2-exp.y: Replace dval by byte buffer val.
762         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
763         (parse_number): Call parse_float instead of atof.
764
765         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
766         (lex_number): Call parse_float instead of strtod.
767         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
768         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
769         Use write_exp_elt_floatcst.
770         (unit_testing): Remove static variable.
771         (rust_type): Do not check unit_testing.
772         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
773
774         * ada-exp.y (type_float, type_double): Remove.
775         (typed_val_float): Use byte buffer instead of DOUBLEST.
776         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
777         * ada-lex.l (processReal): Use parse_float instead of sscanf.
778
779 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
780
781         * aarch64-tdep.h (enum aarch64_regnum): Remove.
782         * arch/aarch64.h: New file.
783
784 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
785
786         * dfp.h (decimal_from_string): Use const reference for argument.
787         * dfp.c (decimal_from_string): Likewise.
788
789 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
790
791         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
792         * sh64-tdep.c (sh64_do_fp_register): Likewise.
793         * mips-tdep.c (mips_print_fp_register): Likewise.
794
795 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
796
797         * common/format.h (enum argclass): Replace decfloat_arg by
798         dec32float_arg, dec64float_arg, and dec128float_arg.
799         * common/format.c (parse_format_string): Update to return
800         new decimal float argument classes.
801
802         * printcmd.c (printf_decfloat): Rename to ...
803         (printf_floating): ... this.  Add argclass argument, and use it
804         instead of parsing the format string again.  Add support for
805         binary floating-point values, using floatformat_to_string.
806         Convert value to the target format if it doesn't already match.
807         (ui_printf): Call printf_floating instead of printf_decfloat,
808         also for double_arg / long_double_arg.  Pass argclass.
809
810         * dfp.c (decimal_to_string): Add format string argument.
811         * dfp.h (decimal_to_string): Likewise.
812
813         * doublest.c (floatformat_to_string): Add format string argument.
814         * doublest.h (floatformat_to_string): Likewise.
815
816 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
817
818         * doublest.c (floatformat_precision): New routine.
819         (floatformat_to_string): Likewise.
820         * doublest.c (floatformat_to_string): Add prototype.
821
822         * printcmd.c (print_scalar_formatted): Only call print_floating
823         on floating-point types.
824         * valprint.c: Do not include "floatformat.h".
825         (generic_val_print_decfloat): Remove.
826         (generic_val_print): Call generic_val_print_float for both
827         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
828         (print_floating): Use floatformat_to_string.  Handle decimal float.
829         (print_decimal_floating): Remove, merge into floatformat_to_string.
830         * value.h (print_decimal_floating): Remove.
831
832         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
833
834 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
835
836         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
837
838 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
839
840         * memattr.h: Don't include vec.h.
841         (struct mem_attrib): Initialize fields.
842         <unknown>: New static method.
843         (struct mem_region): Add constructors, operator<, initialize
844         fields.
845         * memattr.c: Include algorithm.
846         (default_mem_attrib, unknown_mem_attrib): Remove.
847         (user_mem_region_list): New global.
848         (target_mem_region_list, mem_region_list): Change type to
849         std::vector<mem_region>.
850         (mem_use_target): Now a function.
851         (target_mem_regions_valid): Change type to bool.
852         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
853         (require_user_regions): Adjust.
854         (require_target_regions): Adjust.
855         (create_mem_region): Adjust.
856         (lookup_mem_region): Adjust.
857         (invalidate_target_mem_regions): Adjust.
858         (mem_clear): Rename to...
859         (user_mem_clear): ... this, and adjust.
860         (mem_command): Adjust.
861         (info_mem_command): Adjust.
862         (mem_enable, enable_mem_command, mem_disable,
863         disable_mem_command): Adjust.
864         (mem_delete): Adjust.
865         (delete_mem_command): Adjust.
866         * memory-map.h (parse_memory_map): Return an std::vector.
867         * memory-map.c (parse_memory_map): Likewise.
868         (struct memory_map_parsing_data): Add constructor.
869         <memory_map>: Point to std::vector.
870         (memory_map_start_memory): Adjust.
871         (memory_map_end_memory): Adjust.
872         (memory_map_end_property): Adjust.
873         (clear_result): Remove.
874         * remote.c (remote_memory_map): Return an std::vector.
875         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
876         Remove.
877         (target_debug_print_mem_region_vector): New.
878         * target-delegates.c: Regenerate.
879         * target.h (mem_region_vector): New typedef.
880         (to_memory_map): Return mem_region_vector.
881         (target_memory_map): Return an std::vector.
882         * target.c (target_memory_map): Return an std::vector.
883         (flash_erase_command): Adjust.
884
885 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
886
887         * memory-map.c (struct memory_map_parsing_data) <property_name>:
888         Change type to std::string.
889         (memory_map_start_property): Adjust.
890         (memory_map_end_property): Adjust.
891
892 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
893
894         * infrun.h: Include common/byte-vector.h.
895         (struct displaced_step_closure): New struct.
896         (struct buf_displaced_step_closure): New struct.
897         * infrun.c (displaced_step_closure::~displaced_step_closure):
898         Provide default implementation.
899         (displaced_step_clear): Deallocate step closure with delete.
900         * aarch64-tdep.c (displaced_step_closure): Rename to ...
901         (aarch64_displaced_step_closure): ... this, extend
902         displaced_step_closure.
903         (aarch64_displaced_step_data) <dsc>: Change type to
904         aarch64_displaced_step_closure.
905         (aarch64_displaced_step_copy_insn): Adjust to type change, use
906         unique_ptr.
907         (aarch64_displaced_step_fixup): Add cast for displaced step
908         closure.
909         * amd64-tdep.c (displaced_step_closure): Rename to ...
910         (amd64_displaced_step_closure): ... this, extend
911         displaced_step_closure.
912         <insn_buf>: Change type to std::vector<gdb_byte>.
913         <max_len>: Remove.
914         (fixup_riprel): Change type of DSC parameter, adjust to type
915         change of insn_buf.
916         (fixup_displaced_copy): Change type of DSC parameter.
917         (amd64_displaced_step_copy_insn): Instantiate
918         amd64_displaced_step_closure.
919         (amd64_displaced_step_fixup): Add cast for closure type, adjust
920         to type change of insn_buf.
921         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
922         parameter DSC.
923         (arm_linux_copy_svc): Likewise.
924         (cleanup_kernel_helper_return): Likewise.
925         (arm_catch_kernel_helper_return): Likewise.
926         (arm_linux_displaced_step_copy_insn): Instantiate
927         arm_displaced_step_closure.
928         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
929         (displaced_read_reg): Change type of parameter DSC.
930         (branch_write_pc): Likewise.
931         (load_write_pc): Likewise.
932         (alu_write_pc): Likewise.
933         (displaced_write_reg): Likewise.
934         (arm_copy_unmodified): Likewise.
935         (thumb_copy_unmodified_32bit): Likewise.
936         (thumb_copy_unmodified_16bit): Likewise.
937         (cleanup_preload): Likewise.
938         (install_preload): Likewise.
939         (arm_copy_preload): Likewise.
940         (thumb2_copy_preload): Likewise.
941         (install_preload_reg): Likewise.
942         (arm_copy_preload_reg): Likewise.
943         (cleanup_copro_load_store): Likewise.
944         (install_copro_load_store): Likewise.
945         (arm_copy_copro_load_store) Likewise.
946         (thumb2_copy_copro_load_store): Likewise.
947         (cleanup_branch): Likewise.
948         (install_b_bl_blx): Likewise.
949         (arm_copy_b_bl_blx): Likewise.
950         (thumb2_copy_b_bl_blx): Likewise.
951         (thumb_copy_b): Likewise.
952         (install_bx_blx_reg): Likewise.
953         (arm_copy_bx_blx_reg): Likewise.
954         (thumb_copy_bx_blx_reg): Likewise.
955         (cleanup_alu_imm): Likewise.
956         (arm_copy_alu_imm): Likewise.
957         (thumb2_copy_alu_imm): Likewise.
958         (cleanup_alu_reg): Likewise.
959         (install_alu_reg): Likewise.
960         (arm_copy_alu_reg): Likewise.
961         (thumb_copy_alu_reg): Likewise.
962         (cleanup_alu_shifted_reg): Likewise.
963         (install_alu_shifted_reg): Likewise.
964         (arm_copy_alu_shifted_reg): Likewise.
965         (cleanup_load): Likewise.
966         (cleanup_store): Likewise.
967         (arm_copy_extra_ld_st): Likewise.
968         (install_load_store): Likewise.
969         (thumb2_copy_load_literal): Likewise.
970         (thumb2_copy_load_reg_imm): Likewise.
971         (arm_copy_ldr_str_ldrb_strb): Likewise.
972         (cleanup_block_load_all): Likewise.
973         (cleanup_block_store_pc): Likewise.
974         (cleanup_block_load_pc): Likewise.
975         (arm_copy_block_xfer): Likewise.
976         (thumb2_copy_block_xfer): Likewise.
977         (cleanup_svc): Likewise.
978         (install_svc): Likewise.
979         (arm_copy_svc): Likewise.
980         (thumb_copy_svc): Likewise.
981         (arm_copy_undef): Likewise.
982         (thumb_32bit_copy_undef): Likewise.
983         (arm_copy_unpred): Likewise.
984         (arm_decode_misc_memhint_neon): Likewise.
985         (arm_decode_unconditional): Likewise.
986         (arm_decode_miscellaneous): Likewise.
987         (arm_decode_dp_misc): Likewise.
988         (arm_decode_ld_st_word_ubyte): Likewise.
989         (arm_decode_media): Likewise.
990         (arm_decode_b_bl_ldmstm): Likewise.
991         (arm_decode_ext_reg_ld_st): Likewise.
992         (thumb2_decode_dp_shift_reg): Likewise.
993         (thumb2_decode_ext_reg_ld_st): Likewise.
994         (arm_decode_svc_copro): Likewise.
995         (thumb2_decode_svc_copro): Likewise.
996         (install_pc_relative): Likewise.
997         (thumb_copy_pc_relative_16bit): Likewise.
998         (thumb_decode_pc_relative_16bit): Likewise.
999         (thumb_copy_pc_relative_32bit): Likewise.
1000         (thumb_copy_16bit_ldr_literal): Likewise.
1001         (thumb_copy_cbnz_cbz): Likewise.
1002         (thumb2_copy_table_branch): Likewise.
1003         (cleanup_pop_pc_16bit_all): Likewise.
1004         (thumb_copy_pop_pc_16bit): Likewise.
1005         (thumb_process_displaced_16bit_insn): Likewise.
1006         (decode_thumb_32bit_ld_mem_hints): Likewise.
1007         (thumb_process_displaced_32bit_insn): Likewise.
1008         (thumb_process_displaced_insn): Likewise.
1009         (arm_process_displaced_insn): Likewise.
1010         (arm_displaced_init_closure): Likewise.
1011         (arm_displaced_step_fixup): Add cast for closure.
1012         * arm-tdep.h: Include infrun.h.
1013         (displaced_step_closure): Rename to ...
1014         (arm_displaced_step_closure): ... this, extend
1015         displaced_step_closure.
1016         <u::svc::copy_svc_os>: Change type of parameter DSC.
1017         <cleanup>: Likewise.
1018         (arm_process_displaced_insn): Likewise.
1019         (arm_displaced_init_closure): Likewise.
1020         (displaced_read_reg): Likewise.
1021         (displaced_write_reg): Likewise.
1022         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1023         Adjust.
1024         * i386-tdep.h: Include infrun.h.
1025         (i386_displaced_step_closure): New typedef.
1026         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1027         i386_displaced_step_closure.
1028         (i386_displaced_step_fixup): Adjust.
1029         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1030         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1031         and unique_ptr.
1032         (ppc_displaced_step_fixup): Adjust.
1033         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1034         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1035         and unique_ptr.
1036         (s390_displaced_step_fixup): Adjust.
1037
1038 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1039
1040         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1041         Remove declarations.
1042
1043 2017-10-20  Tom Tromey  <tom@tromey.com>
1044
1045         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1046         std::vector.
1047         (gdb_bfd_record_inclusion): Update.
1048         (bfdp): Remove typedef.
1049
1050 2017-10-20  Tom Tromey  <tom@tromey.com>
1051
1052         * gdb_bfd.c (gdb_bfd_ref): Use new.
1053         (struct gdb_bfd_data): Add constructor, destructor, and member
1054         initializers.
1055         (gdb_bfd_unref): Use delete.
1056
1057 2017-10-20  Tom Tromey  <tom@tromey.com>
1058
1059         * exec.c (exec_file_attach): Use new_bfd_ref.
1060         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1061         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1062         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1063         new_bfd_ref.
1064         * gdb_bfd.h (new_bfd_ref): New function.
1065
1066 2017-10-20  Pedro Alves  <palves@redhat.com>
1067
1068         * main.c (captured_command_loop): Add attribute noinline.
1069
1070 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1071
1072         * interps.c (struct interp_factory): Add constructor.
1073         (interp_factory_p): Remove typedef.
1074         (DEF_VEC_P(interp_factory_p)): Remove.
1075         (interpreter_factories): Change type to std::vector.
1076         (interp_factory_register): Adjust.
1077         (interp_lookup): Adjust.
1078         (interpreter_completer): Adjust.
1079
1080 2017-10-19  Tom Tromey  <tom@tromey.com>
1081
1082         * break-catch-syscall.c (catch_syscall_completer): Use
1083         std::string, gdb::unique_xmalloc_ptr.
1084
1085 2017-10-19  Tom Tromey  <tom@tromey.com>
1086
1087         * infcall.c (call_function_by_hand_dummy): Use std::string.
1088
1089 2017-10-19  Tom Tromey  <tom@tromey.com>
1090
1091         * mi/mi-main.c (mi_cmd_execute): Update.
1092         * top.h (prepare_execute_command): Return scoped_value_mark.
1093         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1094         Add move constructor.
1095         * top.c (prepare_execute_command): Return scoped_value_mark.
1096         (execute_command): Update.
1097
1098 2017-10-19  Pedro Alves  <palves@redhat.com>
1099
1100         * xml-support.c (xml_fetch_content_from_file): Check fread's
1101         return.
1102
1103 2017-10-19  Pedro Alves  <palves@redhat.com>
1104
1105         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1106         async.
1107         (handle_error_fd): New function.
1108         (ser_base_async): Add/delete an event loop file handler for
1109         error_fd.
1110
1111 2017-10-19  Pedro Alves  <palves@redhat.com>
1112
1113         * xml-support.c (xml_fetch_content_from_file): Don't read in
1114         chunks.  Instead use fseek to determine the file's size, and read
1115         it in one go.
1116
1117 2017-11-18  Keith Seitz  <keiths@redhat.com>
1118
1119         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1120         types.
1121         Add whitespace to front of type name.
1122
1123 2017-10-18  Keith Seitz  <keiths@redhat.com>
1124
1125         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1126         DW_AT_accessibility.
1127
1128 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1129
1130         * features/tic6x-c62x-linux.c: Remove.
1131
1132 2017-10-17  Tom Tromey  <tom@tromey.com>
1133
1134         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1135         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1136         (do_mixed_source_and_assembly): Likewise.
1137
1138 2017-10-17  Tom Tromey  <tom@tromey.com>
1139
1140         * regcache.c (regcache::xfer_part): Remove assertion.
1141
1142 2017-10-17  Pedro Alves  <palves@redhat.com>
1143
1144         * xml-support.c (xml_fetch_content_from_file): Call
1145         unique_ptr::release() instead unique_ptr::get() when passing
1146         through xrealloc.
1147
1148 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1149
1150         * regcache.c (regcache::xfer_part): Remove parameters read and
1151         write, add parameter is_raw.  All callers are updated.
1152
1153 2017-10-16  Keith Seitz  <keiths@redhat.com>
1154
1155         * c-typeprint.c (enum access_specifier): Moved here from
1156         c_type_print_base.
1157         (output_access_specifier): New function.
1158         (c_type_print_base): Consider typedefs when assessing
1159         whether access labels are needed.
1160         Use output_access_specifier as needed.
1161         Output access specifier for typedefs, if needed.
1162         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1163         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1164         fields.
1165         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1166         accessor macros.
1167
1168 2017-10-16  Tom Tromey  <tom@tromey.com>
1169
1170         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1171         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1172         * target.c (target_fileio_read_stralloc): Update.
1173         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1174         * target.h (target_fileio_read_stralloc): Return
1175         unique_xmalloc_ptr.
1176
1177 2017-10-16  Tom Tromey  <tom@tromey.com>
1178
1179         * xml-syscall.c (xml_init_syscalls_info): Update.
1180         * xml-support.c (xinclude_start_include): Update.
1181         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1182         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1183         (xml_fetch_content_from_file): Likewise.
1184         * osdata.c (get_osdata): Update.
1185         * target.h (target_read_stralloc, target_get_osdata): Return
1186         unique_xmalloc_ptr.
1187         * solib-aix.c (solib_aix_get_library_list): Update.
1188         * solib-target.c (solib_target_current_sos): Update.
1189         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1190         * xml-tdesc.c (fetch_available_features_from_target): Update.
1191         (target_fetch_description_xml): Update.
1192         (file_read_description_xml): Update.
1193         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1194         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1195         (remote_pid_to_exec_file): Update.
1196         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1197         (target_get_osdata): Likewise.
1198
1199 2017-10-16  Tom Tromey  <tom@tromey.com>
1200
1201         * remote.c (remote_register_number_and_offset): Use std::vector.
1202         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1203         (putpkt_binary): Use gdb::def_vector.
1204         (compare_sections_command): Use gdb::byte_vector.
1205
1206 2017-10-16  Tom Tromey  <tom@tromey.com>
1207
1208         * ppc-linux-nat.c (hwdebug_insert_point): Use
1209         gdb::unique_xmalloc_ptr, XDUP.
1210
1211 2017-10-16  Tom Tromey  <tom@tromey.com>
1212
1213         * probe.c (parse_probes): Use std::string.
1214         (info_probes_for_ops, enable_probes_command)
1215         (disable_probes_command): Remove cleanups.
1216
1217 2017-10-16  Tom Tromey  <tom@tromey.com>
1218
1219         * buildsym.c (block_compar): Remove.
1220         (end_symtab_get_static_block): Use std::vector.
1221
1222 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1223
1224         * memrange.h (struct mem_range): Define operator< and operator==.
1225         (mem_range_s): Remove.
1226         (DEF_VEC_O (mem_range_s)): Remove.
1227         (normalize_mem_ranges): Change parameter type to std::vector.
1228         * memrange.c (compare_mem_ranges): Remove.
1229         (normalize_mem_ranges): Change parameter type to std::vector,
1230         adjust to vector change.
1231         * exec.c (section_table_available_memory): Return vector, remove
1232         parameter.
1233         (section_table_read_available_memory): Adjust to std::vector
1234         change.
1235         * remote.c (remote_read_bytes): Adjust to std::vector
1236         change.
1237         * tracepoint.h (traceframe_available_memory): Change parameter
1238         type to std::vector.
1239         * tracepoint.c (traceframe_available_memory): Change parameter
1240         type to std::vector, adjust.
1241         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1242         std::vector change.
1243         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1244         unittests/memrange-selftests.c.
1245         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1246         * gdb/unittests/memrange-selftests.c: New file.
1247
1248 2017-10-16  Pedro Alves  <palves@redhat.com>
1249
1250         * elfread.c (probe_key_free): Rename range-for variable.
1251         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1252         (find_probe_by_pc, collect_probes): Rename range-for variable.
1253
1254 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1255
1256         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1257         * features/tic6x-c62x.c: Remove.
1258         * features/tic6x-c64x-linux.c: Remove.
1259         * features/tic6x-c64x.c: Remove.
1260         * features/tic6x-c64xp-linux.c: Remove.
1261         * features/tic6x-c64xp.c: Remove.
1262         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1263         initialize_tdesc_tic6x_*_linux functions.
1264         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1265         initialize_tdesc_tic6x_* functions.
1266
1267 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1268
1269         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1270         tic6x-c62x.
1271         * regformats/tic6x-c62x.dat: Remove.
1272         * regformats/tic6x-c64x.dat: Remove.
1273         * regformats/tic6x-c64xp.dat: Remove.
1274
1275 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1276
1277         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1278         (the !HAVE_LIBEXPAT version).
1279
1280 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1281
1282         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1283         const.
1284
1285 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1286
1287         * target.h: Include tracepoint.h.
1288         (enum trace_find_type): Move to tracepoint.h.
1289         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1290         * tracepoint.h: Don't include target.h
1291         (enum trace_find_type): Move from target.h.
1292         (parse_traceframe_info): Return a unique ptr.
1293         * tracepoint.c (current_traceframe_info): Change type to unique
1294         ptr.
1295         (free_traceframe_info): Remove.
1296         (clear_traceframe_info): Don't manually free
1297         current_traceframe_info.
1298         (free_result): Remove.
1299         (parse_traceframe_info): Return a unique ptr.
1300         (get_traceframe_info): Adjust to unique ptr.
1301         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1302         * remote.c (remote_traceframe_info): Return a unique ptr.
1303         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1304         ptr.
1305         * target-debug.h (target_debug_print_traceframe_info_up): New
1306         macro.
1307         * target-delegates.c: Regenerate.
1308
1309 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1310
1311         * memrange.h (struct mem_range): Add constructors.
1312         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1313         std::vector<mem_range>.
1314         * tracepoint.c (free_traceframe_info): Don't manually free
1315         vector.
1316         (traceframe_info_start_memory): Adjust to vector change.
1317         (traceframe_available_memory): Likewise.
1318         * tracefile-tfile.c (build_traceframe_info): Likewise.
1319         * ctf.c (ctf_traceframe_info): Likewise.
1320
1321 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1322
1323         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1324         std::vector<int>.
1325         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1326         (traceframe_info_start_tvar): Adjust to vector change.
1327         (parse_traceframe_info): Allocate with new.
1328         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1329         vector change.
1330         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1331         change.
1332         tfile_traceframe_info): Allocate with new.
1333         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1334         change.
1335
1336 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1337
1338         * tracepoint.c (traceframe_info): Rename to...
1339         (current_traceframe_info): ...this.
1340         (clear_traceframe_info): Adjust.
1341         (get_traceframe_info): Adjust.
1342
1343 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1344
1345         * nat/linux-osdata.c: Include algorithm.
1346         (compare_processes): Remove.
1347         (struct pid_pgid_entry): New struct.
1348         (linux_xfer_osdata_processgroups): Use std::vector instead of
1349         XNEWVEC.
1350
1351 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1352
1353         * objfiles.h: Don't include symfile.h.
1354         (struct partial_symbol): Remove forward-declaration.
1355         (struct objfile) <global_psymbols, static_psymbols>: Change type
1356         to std::vector<partial_symbol *>.
1357         * objfiles.c (objfile::objfile): Don't memset those fields.
1358         (objfile::~objfile): Don't free those fields.
1359         * psympriv.h (struct psymbol_allocation_list): Remove
1360         forward-declaration.
1361         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1362         to std::vector.
1363         (start_psymtab_common): Change parameters to std::vector.
1364         * psymtab.c: Include algorithm.
1365         (require_partial_symbols): Call shrink_to_fit.
1366         (find_pc_sect_psymbol): Adjust to vector change.
1367         (match_partial_symbol): Likewise.
1368         (lookup_partial_symbol): Likewise.
1369         (psym_relocate): Likewise.
1370         (dump_psymtab): Likewise.
1371         (recursively_search_psymtabs): Likewise.
1372         (compare_psymbols): Remove.
1373         (sort_pst_symbols): Adjust to vector change.
1374         (start_psymtab_common): Likewise.
1375         (end_psymtab_common): Likewise.
1376         (psymbol_bcache_full): De-constify return value.
1377         (add_psymbol_to_bcache): Likewise.
1378         (extend_psymbol_list): Remove.
1379         (append_psymbol_to_list): Adjust to vector change.
1380         (add_psymbol_to_list): Likewise.
1381         (init_psymbol_list): Likewise.
1382         (maintenance_info_psymtabs): Likewise.
1383         (maintenance_check_psymtabs): Likewise.
1384         * symfile.h (struct psymbol_allocation_list): Remove.
1385         * symfile.c (reread_symbols): Adjust to vector change.
1386         * dbxread.c (start_psymtab): Change type of parameters.
1387         (dbx_symfile_read): Adjust to vector change.
1388         (read_dbx_symtab): Likewise.
1389         (start_psymtab): Change type of parameters.
1390         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1391         (create_partial_symtab): Likewise.
1392         (add_partial_symbol): Likewise.
1393         (write_one_signatured_type): Likewise.
1394         (recursively_write_psymbols): Likewise.
1395         * mdebugread.c (parse_partial_symbols): Likewise.
1396         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1397         (scan_xcoff_symtab): Adjust to vector change.
1398         (xcoff_initial_scan): Likewise.
1399
1400 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1401
1402         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1403
1404 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1405
1406         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1407         Remove s390x-*-expedite, add s390x-expedite.
1408
1409 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1410
1411         * features/s390-gs-linux64.c: Regenerated.
1412         * features/s390x-gs-linux64.c: Regenerated.
1413
1414 2017-10-13  Tom Tromey  <tom@tromey.com>
1415
1416         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1417         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1418         delete.
1419         * symfile.c (symbol_file_add_with_addrs): Use new.
1420         (symbol_file_add_separate): Update comment.
1421         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1422         * jit.c (jit_object_close_impl): Use new.
1423         (jit_unregister_code): Use delete.
1424         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1425         (~objfile): Rename from free_objfile.
1426         (free_objfile_separate_debug, do_free_objfile_cleanup)
1427         (free_all_objfiles, objfile_purge_solibs): Use delete.
1428         * objfiles.h (struct objfile): Add constructor and destructor.
1429         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1430         (allocate_objfile, free_objfile): Don't declare.
1431         (struct objstats): Add initializers.
1432
1433 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1434
1435         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1436         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1437         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1438         * gdbarch.h: Regenerate.
1439         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1440         Adjust comment.
1441         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1442         (i386_displaced_step_fixup): Adjust comment.
1443         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1444
1445 2017-10-12  Tom Tromey  <tom@tromey.com>
1446
1447         * prologue-value.h (pv_area::store_would_trash): Return bool.
1448         (pv_area::find_reg): Likewise.
1449         * prologue-value.c (pv_area::store_would_trash): Return bool.
1450         (pv_area::find_reg): Likewise.
1451
1452 2017-10-12  Tom Tromey  <tom@tromey.com>
1453
1454         * s390-linux-tdep.c (s390_store, s390_load)
1455         (s390_check_for_saved, s390_analyze_prologue): Update.
1456         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1457         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1458         * prologue-value.h (class pv_area): Move from prologue-value.c.
1459         Change names of members.  Add constructor, destructor, member
1460         functions.
1461         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1462         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1463         (pv_area_fetch, pv_area_scan): Don't declare.
1464         * prologue-value.c (struct pv_area::area_entry): Now member of
1465         pv_area.
1466         (struct pv_area): Move to prologue-value.h.
1467         (pv_area::pv_area): Rename from make_pv_area.
1468         (pv_area::~pv_area): Rename from free_pv_area.
1469         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1470         (clear_entries, find_entry, overlaps, store_would_trash, store)
1471         (fetch, find_reg, scan): Now member of pv_area.
1472         Remove "area" argument.  Update.
1473         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1474         Update.
1475         * mn10300-tdep.c (push_reg, check_for_saved)
1476         (mn10300_analyze_prologue): Update.
1477         * mep-tdep.c (is_arg_spill, check_for_saved)
1478         (mep_analyze_prologue): Update.
1479         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1480         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1481         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1482         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1483         Update.
1484         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1485         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1486
1487 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1488
1489         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1490         * linux-nat.c (linux_nat_delete_thread): New variable.
1491         (lwp_free): Invoke linux_nat_delete_thread if set.
1492         (linux_nat_set_delete_thread): New function.
1493         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1494         thread delete callback.
1495         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1496         (_initialize_arm_linux_nat): Assign thread delete callback.
1497         * s390-linux-nat.c (s390_delete_thread): New function.
1498         (_initialize_s390_nat): Assign thread delete callback.
1499         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1500         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1501         function.
1502         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1503         declaration.
1504         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1505         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1506
1507 2017-10-09  Tom Tromey  <tom@tromey.com>
1508
1509         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1510         std::string.
1511         * tui/tui-layout.c (enum tui_status): Use std::string.
1512
1513 2017-10-11  Tom Tromey  <tom@tromey.com>
1514
1515         * gdbthread.h (thread_command): Constify.
1516         * inferior.h (detach_command): Constify.
1517         * top.h (set_history, show_history): Constify.
1518         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1519         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1520         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1521         * printcmd.c (set_command): Constify.
1522         (non_const_set_command): New function.
1523         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1524         * breakpoint.c (enable_command, disable_command, delete_command)
1525         (catch_command, tcatch_command, set_breakpoint_cmd)
1526         (show_breakpoint_cmd): Constify.
1527         * macrocmd.c (macro_command): Constify.
1528         * infcmd.c (unset_command, kill_command, detach_command)
1529         (info_proc_cmd): Constify.
1530         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1531         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1532         (info_auto_load_cmd): Constify.
1533         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1534         (unset_tdesc_cmd): Constify.
1535         * ada-lang.c (set_ada_command, show_ada_command)
1536         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1537         * guile/guile.c (set_guile_command, show_guile_command)
1538         (info_guile_command): Constify.
1539         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1540         Constify.
1541         * skip.c (skip_command): Constify.
1542         * compile/compile.c (_initialize_compile): Constify.
1543         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1544         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1545         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1546         (maint_btrace_pt_show_cmd): Constify.
1547         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1548         Constify.
1549         * python/python.c (user_show_python, user_set_python): Constify.
1550         * mips-tdep.c (set_mips_command, show_mips_command)
1551         (set_mipsfpu_command): Constify.
1552         * record-btrace.c (cmd_record_btrace_start)
1553         (cmd_set_record_btrace, cmd_show_record_btrace)
1554         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1555         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1556         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1557         Constify.
1558         * symfile.c (overlay_command): Constify.
1559         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1560         * cli/cli-logging.c (set_logging_command, show_logging_command):
1561         Constify.
1562         * cli/cli-dump.c (dump_command, append_command)
1563         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1564         (tekhex_dump_command, binary_dump_command)
1565         (binary_append_command): Constify.
1566         * cli/cli-decode.c (struct cmd_list_element): Change type of
1567         "fun".
1568         * cli/cli-cmds.c (info_command, show_command, set_debug)
1569         (show_debug): Constify.
1570         (show_command): Add non-const overload.
1571         * top.c (set_history, show_history): Constify.
1572         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1573         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1574         * target.c (target_command): Constify.
1575         * sparc64-tdep.c (info_adi_command): Constify.
1576         * record-full.c (cmd_record_full_start): Constify.
1577         (set_record_full_command): Constify.  Fix typo.
1578         (show_record_full_command): Constify.
1579         * thread.c (thread_command, thread_apply_command): Constify.
1580         * memattr.c (dummy_cmd): Constify.
1581         * value.c (function_command): Constify.
1582         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1583         * probe.c (info_probes_command): Constify.
1584         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1585         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1586         (show_thread_cmd, set_thread_default_cmd)
1587         (show_thread_default_cmd): Constify.
1588         (check_empty): Constify.
1589         * tracepoint.c (tfind_command): Constify.
1590         * cp-support.c (maint_cplus_command): Constify.
1591         * windows-tdep.c (info_w32_command): Constify.
1592         * record.c (cmd_record_start, set_record_command)
1593         (show_record_command, info_record_command, cmd_record_goto):
1594         Constify.
1595         * ravenscar-thread.c (set_ravenscar_command)
1596         (show_ravenscar_command): Constify.
1597         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1598         Constify.
1599         (add_internal_problem_command): Remove casts.
1600         * arc-tdep.c (maintenance_print_arc_command): Constify.
1601         * valprint.c (set_print, show_print, set_print_raw)
1602         (show_print_raw): Constify.
1603         * maint.c (maintenance_command, maintenance_info_command)
1604         (maintenance_print_command, maintenance_set_cmd)
1605         (maintenance_show_cmd, set_per_command_cmd)
1606         (show_per_command_cmd, maintenance_check_command): Constify.
1607         * language.c (set_check, show_check): Constify.
1608         * typeprint.c (show_print_type, set_print_type): Constify.
1609         * go32-nat.c (go32_info_dos_command): Constify.
1610
1611 2017-10-11  Tom Tromey  <tom@tromey.com>
1612
1613         * breakpoint.c (prepare_re_set_context): Remove.
1614         (breakpoint_re_set_one): Update.  Don't use cleanups.
1615         (breakpoint_re_set): Use scoped_restore, std::string, and
1616         scoped_restore_current_language.
1617
1618 2017-10-11  Tom Tromey  <tom@tromey.com>
1619
1620         * breakpoint.c (commands_command_1): Use std::string.
1621         (cleanup_executing_breakpoints): Remove.
1622         (bpstat_do_actions_1): Use scoped_restore.
1623         (bpstat_check_watchpoint): Use std::string.
1624         (decode_static_tracepoint_spec): Likewise.
1625         (break_range_command): Likewise.
1626         (watch_command_1): Likewise.
1627         (compare_breakpoints): Change argument types.
1628         (clear_command): Use std::vector.
1629         (cleanup_executing_breakpoints): Remove.
1630         (update_global_location_list): Use unique_xmalloc_ptr.
1631         (strace_command): Remove unused declaration.
1632
1633 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1634
1635         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1636         * NEWS: Mention new FreeBSD/arm native configuration.
1637         * configure.host: Add arm*-*-freebsd*.
1638         * configure.nat: Likewise.
1639         * arm-fbsd-nat.c: New file.
1640
1641 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1642
1643         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1644         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1645         * NEWS: Mention new FreeBSD/arm target.
1646         * configure.tgt: Add arm*-*-freebsd*.
1647         * arm-fbsd-tdep.c: New file.
1648         * arm-fbsd-tdep.h: New file.
1649
1650 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1651
1652         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1653         `gdbarch_elfcore_write_linux_prpsinfo'.
1654         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1655         method.
1656         (elf_internal_linux_prpsinfo): Remove declaration.
1657         * gdbarch.h: Regenerate.
1658         * gdbarch.c: Regenerate.
1659
1660 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1661
1662         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1663         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1664
1665 2017-10-11  Pedro Alves  <palves@redhat.com>
1666
1667         * breakpoint.c (reattach_breakpoints): Delete.
1668         * breakpoint.h (reattach_breakpoints): Delete.
1669
1670 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1671
1672         * symfile.c (registered_sym_fns): Make struct, not typedef.
1673         (DEF_VEC_O (registered_sym_fns)): Remove.
1674         (symtab_fns): Change type to std::vector.
1675         (add_symtab_fns): Adjust.
1676         (find_sym_fns): Adjust.
1677
1678 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1679
1680         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1681         * arc-tdep.h (arc_arch_is_em): New function.
1682         (arc_arch_is_hs): Likewise.
1683
1684 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1685
1686         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1687         parentheses in the declaration.
1688         (macro_lookup_inclusion): Likewise.
1689         (macro_lookup_definition): Likewise.
1690         * p-lang.h (pascal_builtin_types): Likewise.
1691         * tui/tui-data.c (tui_win_list): Likewise.
1692         * tui/tui-data.h (tui_win_list): Likewise.
1693         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1694
1695 2017-10-11  Mark Rages  <markrages@gmail.com>
1696
1697         * target-memory.c (block_boundaries): Fix for block address not
1698         aligned on block size.
1699
1700 2017-10-10  Pedro Alves <palves@redhat.com>
1701             Tom Tromey  <tom@tromey.com>
1702
1703         * breakpoint.c (struct captured_breakpoint_query_args)
1704         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1705         (print_breakpoint): New.
1706         * breakpoint.h (print_breakpoint): Declare.
1707         * common/common-exceptions.h (enum return_reason): Remove
1708         references to catch_exceptions.
1709         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1710         Delete.
1711         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1712         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1713         * gdb.h: Delete.
1714         * gdbthread.h (thread_select): Declare.
1715         * mi/mi-cmd-break.c: Don't include gdb.h.
1716         (breakpoint_notify): Use print_breakpoint.
1717         * mi/mi-cmd-catch.c: Don't include gdb.h.
1718         * mi/mi-interp.c: Don't include gdb.h.
1719         (mi_print_breakpoint_for_event): New.
1720         (mi_breakpoint_created, mi_breakpoint_modified): Use
1721         mi_print_breakpoint_for_event.
1722         * mi/mi-main.c: Don't include gdb.h.
1723         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1724         thread_select instead of gdb_thread_select.
1725         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1726         of using gdb_list_thread_ids.
1727         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1728         FILEIO_ENOSYS here.
1729         (remote_fileio_request): Use TRY/CATCH instead of
1730         catch_exceptions.
1731         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1732         (symbol_file_add_from_memory_wrapper): Delete.
1733         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1734         * thread.c: Don't include gdb.h.
1735         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1736         (thread_alive): Use thread_select.
1737         (do_captured_thread_select): Delete, parts salvaged as ...
1738         (thread_select): ... this new function.
1739         (gdb_thread_select): Delete.
1740
1741 2017-10-10  Pedro Alves  <palves@redhat.com>
1742             Tom Tromey  <tom@tromey.com>
1743
1744         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1745         and reverse logic.
1746         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1747         No longer macros.  Instead ...
1748         (enum wp_check_result): They're now values of this new
1749         enumeration.
1750         (watchpoint_check): Change return type to wp_check_result and
1751         parameter type to bpstat.
1752         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1753         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1754         catch_errors.  Reverse logic of watchpoint_check call.
1755         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1756         pointer as parameter.
1757         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1758         * common/common-exceptions.c (throw_exception_sjlj): Update
1759         comments to avoid mentioning catch_errors.
1760         * exceptions.c (catch_errors): Delete.
1761         * exceptions.h: Update comments to avoid mentioning catch_errors.
1762         (catch_errors_ftype, catch_errors): Delete.
1763         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1764         (hook_stop_stub): Delete.
1765         (restore_selected_frame): Change return type to void, and
1766         parameter type to const frame_id &.
1767         (restore_infcall_control_state): Use TRY/CATCH instead of
1768         catch_errors.
1769         * main.c (captured_command_loop): Return void and remove
1770         parameter.  Remove references to catch_errors.
1771         (captured_main): Use TRY/CATCH instead of catch_errors.
1772         * objc-lang.c (objc_submethod_helper_data)
1773         (find_objc_msgcall_submethod_helper): Delete.
1774         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1775         catch_errors.
1776         * record-full.c (record_full_message): Return void.
1777         (record_full_message_args, record_full_message_wrapper): Delete.
1778         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1779         instead of catch_errors.
1780         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1781         parameter type to int.
1782         * solib-darwin.c (open_symbol_file_object): Ditto.
1783         * solib-dsbt.c (open_symbol_file_object): Ditto.
1784         * solib-frv.c (open_symbol_file_object): Ditto.
1785         * solib-svr4.c (open_symbol_file_object): Ditto.
1786         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1787         * solib.c (update_solib_list): Use TRY/CATCH instead of
1788         catch_errors.
1789         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1790         Change type.
1791         * symmisc.c (struct print_symbol_args): Remove.
1792         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1793         (print_symbol): Change type.
1794         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1795         and remove parameters.
1796         (catch_errors): New.
1797         (get_windows_debug_event): Adjust.
1798
1799 2017-10-09  Tom Tromey  <tom@tromey.com>
1800
1801         * mi/mi-main.c (free_splay_tree): Remove.
1802         (list_available_thread_groups): Use splay_tree_up.
1803         * common/gdb_splay_tree.h: New file.
1804
1805 2017-10-09  Tom Tromey  <tom@tromey.com>
1806
1807         * mi/mi-main.c (do_nothing): Remove.
1808         (list_available_thread_groups): Update.
1809
1810 2017-10-09  Pedro Alves  <palves@redhat.com>
1811
1812         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1813         reading registers when switching context.
1814
1815 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1816
1817         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1818         (fbsd_convert_siginfo): Likewise.
1819         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1820
1821 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1822
1823         * configure.ac (try_guile_versions): Remove guile-2.2.
1824         * configure: Regenerate.
1825
1826 2017-10-09  Tom Tromey  <tom@tromey.com>
1827
1828         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1829         (COMPILE.pre): Use $(CXX).
1830
1831 2017-10-09  Pedro Alves  <palves@redhat.com>
1832
1833         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1834         Use bool.
1835         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1836         * cp-support.h (cp_remove_params): Now returns a
1837         gdb::unique_xmalloc_ptr.
1838         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1839         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1840         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1841         returning a gdb::unique_xmalloc_ptr.
1842         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1843         * stack.c (find_frame_funname): Adjust to cp_remove_params
1844         returning a gdb::unique_xmalloc_ptr.
1845
1846 2017-10-08  Tom Tromey  <tom@tromey.com>
1847
1848         * dwarf2read.c (dwarf2_get_dwz_file): Use
1849         gdb::unique_xmalloc_ptr.
1850         (find_slot_in_mapped_hash): Likewise.
1851         (dwarf2_physname): Likewise.
1852         (create_dwo_unit_in_dwp_v1): Use std::string.
1853         (create_dwo_unit_in_dwp_v2): Likewise.
1854         (lookup_dwo_cutu): Likewise.
1855         (inherit_abstract_dies): Use std::vector.
1856         (read_array_type): Likewise.
1857         (dwarf_decode_macros): Remove unused declaration.
1858         (unsigned_int_compar): Remove.
1859         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1860         (psymtabs_addrmap_cleanup): Remove.
1861
1862 2017-10-08  Tom Tromey  <tom@tromey.com>
1863
1864         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1865         * frame.h (frame_cleanup_after_sniffer): Declare.
1866         (frame_prepare_for_sniffer): Return void.
1867         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1868         type of argument.
1869         (frame_prepare_for_sniffer): Return void.
1870
1871 2017-10-08  Tom Tromey  <tom@tromey.com>
1872
1873         * utils.h (make_cleanup_value_free): Remove.
1874         * utils.c (do_value_free, struct cleanup): Remove.
1875         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1876         Use gdb_value_up.
1877         * value.h (struct value_deleter): New.
1878         (gdb_value_up): New typedef.
1879
1880 2017-10-08  Tom Tromey  <tom@tromey.com>
1881
1882         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1883         (make_cleanup_free_search_symbols): Remove.
1884         (search_symbols): Return std::vector.
1885         (symbol_search::compare_search_syms): Now member of
1886         symbol_search.  Change arguments.
1887         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1888         (symtab_symbol_info, rbreak_command): Update.
1889         * symtab.h (struct symbol_search) <next>: Remove.
1890         Add constructors.
1891         (symbol_search::operator<): New function.
1892         (symbol_search::operator==): New function.
1893         (search_symbols): Remove std::vector.
1894         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1895         (symbol_search::compare_search_syms): Declare.
1896
1897 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1898
1899         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1900         arch/aarch64-insn.o.
1901         Remove one rule.
1902         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1903
1904 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1905
1906         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1907         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1908         arch/arm-linux.o respectively.
1909         * configure.tgt: Likewise.
1910
1911 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1912
1913         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1914         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1915
1916 2017-10-06  Pedro Alves  <palves@redhat.com>
1917
1918         * windows-nat.c: Include <algorithm>.
1919
1920 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1921
1922         * configure.tgt (i386_tobjs): New variable.
1923         (amd64_tobjs): New variable.
1924         Set $cpu_obs and $os_obs.
1925
1926 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1927
1928         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1929         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1930         (clean): Remove object files and dependency files.
1931         (distclean): Remove the directory.
1932         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1933         * configure: Re-generated.
1934         * configure.tgt: Replace amd64.o with arch/amd64.o.
1935
1936 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1937
1938         PR build/22188
1939         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1940         and SETEND.
1941
1942 2017-10-05  Pedro Alves  <palves@redhat.com>
1943
1944         * linux-nat.c (linux_child_follow_fork): When following the parent
1945         and detaching the child, consult the parent thread's architecture
1946         instead of the child's.
1947
1948 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1949
1950         * ax.h: Do not include "doublest.h".
1951         (union agent_val): Remove.
1952
1953 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1954
1955         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1956         (decimal_to_string): Return std::string object.
1957         (decimal_from_string): Accept std::string object.  Return bool.
1958         (decimal_from_integral, decimal_from_doublest): Remove.
1959         (decimal_from_longest): Add prototype.
1960         (decimal_from_ulongest): Likewise.
1961         (decimal_to_longest): Likewise.
1962         (decimal_from_doublest): Likewise.
1963         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1964         (MAX_DECIMAL_STRING): Move here.
1965         (decimal_to_string): Return std::string object.
1966         (decimal_from_string): Accept std::string object.  Return bool.
1967         (decimal_from_integral): Remove, replace by ...
1968         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1969         (decimal_to_longest): New function.
1970         (decimal_from_floating): Remove, replace by ...
1971         (decimal_from_doublest): ... this new function.
1972         (decimal_to_doublest): Update to new decimal_to_string interface.
1973
1974         * value.c (unpack_long): Use decimal_to_longest.
1975         * valops.c (value_cast): Use decimal_from_doublest instead of
1976         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1977         decimal_from_integral.
1978         * valarith.c (value_args_as_decimal): Likewise.
1979         * valprint.c (print_decimal_floating): Update to new
1980         decimal_to_string interface.
1981         * printcmd.c (printf_decfloat): Likewise.
1982         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1983
1984 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1985
1986         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1987         * gdbtypes.c: Include "floatformat.h".
1988         * value.c: Likewise.
1989         * m68k-tdep.c: Likewise.
1990
1991         * findvar.c: Do not include "floatformat.h".
1992         * amd64-darwin-tdep.c: Likewise.
1993         * arm-linux-tdep.c: Likewise.
1994         * i386-darwin-tdep.c: Likewise.
1995         * i387-tdep.c: Likewise.
1996         * m68k-linux-tdep.c: Likewise.
1997         * mep-tdep.c: Likewise.
1998         * mips-tdep.c: Likewise.
1999         * nios2-tdep.c: Likewise.
2000         * s390-linux-tdep.c: Likewise.
2001         * sparc-obsd-tdep.c: Likewise.
2002         * sparc-tdep.c: Likewise.
2003         * sparc64-tdep.c: Likewise.
2004         * spu-tdep.c: Likewise.
2005         * tic6x-tdep.c: Likewise.
2006         * tilegx-tdep.c: Likewise.
2007         * vax-tdep.c: Likewise.
2008         * xstormy16-tdep.c: Likewise.
2009         * xtensa-tdep.c: Likewise.
2010
2011         * top.c: Do not include "doublest.h".
2012         * aarch64-tdep.c: Likewise.
2013         * alpha-tdep.c: Likewise.
2014         * arm-linux-tdep.c: Likewise.
2015         * m68k-linux-tdep.c: Likewise.
2016         * tilegx-tdep.c: Likewise.
2017         * xstormy16-tdep.c: Likewise.
2018
2019 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2020
2021         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2022         (mipsn32_fbsd_sigframe): Define.
2023         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2024         for FreeBSD/mipsn32.
2025
2026 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2027
2028         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2029         AT_HWCAP.
2030
2031 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2032
2033         * MAINTAINERS (Misc): Update my email address.
2034
2035 2017-10-04  Pedro Alves  <palves@redhat.com>
2036
2037         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2038         it instead of target_gdbarch.
2039         (get_remote_state, get_remote_packet_size): Adjust
2040         get_remote_arch_state calls, passing down target_gdbarch
2041         explicitly.
2042         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2043         'gdbarch' and use it instead of target_gdbarch.
2044         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2045         passing down target_gdbarch explicitly.
2046         (struct stop_reply) <arch>: New field.
2047         (remote_parse_stop_reply): Use the stopped thread's architecture,
2048         not the current inferior's.  Save the architecture in the
2049         stop_reply.
2050         (process_stop_reply): Use the stop reply's architecture.
2051         (process_g_packet, remote_fetch_registers)
2052         (remote_prepare_to_store, store_registers_using_G)
2053         (remote_store_registers): Adjust get_remote_arch_state calls,
2054         using the regcache's architecture.
2055         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2056         passing down target_gdbarch explicitly.
2057         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2058         beneath instead of calling target_gdbarch.
2059         * target.c (default_thread_architecture): Use the specified
2060         inferior's architecture, instead of the current inferior's
2061         architecture (via target_gdbarch).
2062
2063 2017-10-04  Pedro Alves  <palves@redhat.com>
2064
2065         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2066         case.
2067         (regcache_print): Handle !target_has_registers here instead.
2068
2069 2017-10-04  Pedro Alves  <palves@redhat.com>
2070
2071         * frame.c (create_test_frame): Delete.
2072         * frame.h (create_test_frame): Delete.
2073         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2074         (class regcache_test): Delete.
2075         (test_target_has_registers, test_target_has_stack)
2076         (test_target_has_memory, test_target_prepare_to_store)
2077         (test_target_store_registers): New functions.
2078         (test_target_ops): New class.
2079         (register_to_value_test): Error out if there's already a
2080         process_stratum (or higher) target pushed.  Create a fuller mock
2081         environment, with mock target_ops, inferior, address space, thread
2082         and inferior_ptid.
2083         * progspace.c (struct address_space): Move to ...
2084         * progspace.h (struct address_space): ... here.
2085         * regcache.h (regcache::~regcache, regcache::raw_write)
2086         [GDB_SELF_TEST]: No longer virtual.
2087
2088 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2089
2090         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2091
2092 2017-10-04  Pedro Alves  <palves@redhat.com>
2093
2094         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2095         out of 'between TRY and CATCH'.
2096
2097 2017-10-04  Pedro Alves  <palves@redhat.com>
2098
2099         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2100         * common/common-exceptions.h (TRY): Open an outermost scope.
2101         Expand intro comment.
2102         (CATCH): Reindent.
2103         (END_CATCH): Close the outermost scope.
2104         * completer.c (complete_line_internal): Add missing END_CATCH.
2105
2106 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2107
2108         * NEWS (Changes since GDB 8.0): Add entry about new
2109         'set-cwd-on-gdbserver' feature.
2110         (New remote packets): Add entry for QSetWorkingDir.
2111         * common/common-inferior.h (set_inferior_cwd): New prototype.
2112         * infcmd.c (set_inferior_cwd): Remove "static".
2113         (show_cwd_command): Expand text to include remote debugging.
2114         * remote.c: Add PACKET_QSetWorkingDir.
2115         (remote_protocol_features) <QSetWorkingDir>: New entry for
2116         PACKET_QSetWorkingDir.
2117         (extended_remote_set_inferior_cwd): New function.
2118         (extended_remote_create_inferior): Call
2119         "extended_remote_set_inferior_cwd".
2120         (_initialize_remote): Call "add_packet_config_cmd" for
2121         QSetWorkingDir.
2122
2123 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2124
2125         * NEWS (New commands): Mention "set/show cwd".
2126         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2127         "cd" command's help text.
2128         * common/common-inferior.h (get_inferior_cwd): New prototype.
2129         * infcmd.c (inferior_cwd_scratch): New global variable.
2130         (set_inferior_cwd): New function.
2131         (get_inferior_cwd): Likewise.
2132         (set_cwd_command): Likewise.
2133         (show_cwd_command): Likewise.
2134         (_initialize_infcmd): Add "set/show cwd" commands.
2135         * inferior.h (class inferior) <cwd>: New field.
2136         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2137         (fork_inferior): Change inferior's cwd before its execution.
2138         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2139         to CreateProcess.
2140
2141 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2142
2143         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2144         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2145         (COMMON_OBS): Add gdb_tilde_expand.o.
2146         * common/gdb_tilde_expand.c: New file.
2147         * common/gdb_tilde_expand.h: Likewise.
2148
2149 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2150
2151         * gdbarch.sh (objfile): Remove duplicate declaration.
2152         * gdbarch.h: Regenerate.
2153
2154 2017-10-03  Tom Tromey  <tom@tromey.com>
2155
2156         * utils.c (internal_vproblem): Use string_vprintf.
2157
2158 2017-10-03  Tom Tromey  <tom@tromey.com>
2159
2160         * printcmd.c (info_symbol_command): Use std::string.
2161
2162 2017-10-03  Tom Tromey  <tom@tromey.com>
2163
2164         * top.c (gdb_safe_append_history): Use std::string.
2165
2166 2017-10-03  Tom Tromey  <tom@tromey.com>
2167
2168         * event-top.c (stdin_event_handler): Update.
2169         * main.c (captured_main_1): Update.
2170         * top.h (make_delete_ui_cleanup): Remove.
2171         (struct ui): Add constructor and destructor.
2172         (new_ui, delete_ui): Remove.
2173         * top.c (make_delete_ui_cleanup): Remove.
2174         (new_ui_command): Use std::unique_ptr.
2175         (delete_ui_cleanup): Remove.
2176         (ui::ui): Rename from new_ui.  Update.
2177         (free_ui): Remove.
2178         (ui::~ui): Rename from delete_ui.  Update.
2179
2180 2017-10-03  Tom Tromey  <tom@tromey.com>
2181
2182         * symfile.c (load_progress): Use gdb::byte_vector.
2183
2184 2017-10-03  Tom Tromey  <tom@tromey.com>
2185
2186         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2187         declaration.
2188         * printcmd.c (x_command): Remove unused declaration.
2189         * symfile.c (symbol_file_command): Remove unused declaration.
2190
2191 2017-10-03  Tom Tromey  <tom@tromey.com>
2192
2193         * utils.c (internal_vproblem): Use std::string.
2194         (defaulted_query): Likewise.
2195
2196 2017-10-03  Tom Tromey  <tom@tromey.com>
2197
2198         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2199         * top.c (execute_command_to_string): Update.
2200         * utils.c (make_cleanup_restore_page_info): Remove.
2201         (do_restore_page_info_cleanup): Remove.
2202         (set_batch_flag_and_restore_page_info):
2203         New.
2204         (make_cleanup_restore_page_info): Remove.
2205         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2206         (~set_batch_flag_and_restore_page_info): New
2207         (make_cleanup_restore_uinteger): Remove.
2208         (make_cleanup_restore_integer): Remove.
2209         (struct restore_integer_closure): Remove.
2210         (restore_integer): Remove.
2211         * utils.h (struct set_batch_flag_and_restore_page_info): New
2212         class.
2213         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2214         (make_cleanup_restore_page_info): Remove.
2215         (make_cleanup_restore_uinteger) Remove.
2216         (make_cleanup_restore_integer) Remove.
2217
2218 2017-10-03  Tom Tromey  <tom@tromey.com>
2219
2220         * record-full.h (record_full_gdb_operation_disable_set): Return
2221         scoped_restore_tmpl<int>.
2222         * infrun.c (adjust_pc_after_break): Update.
2223         (handle_signal_stop): Update.
2224         * record-full.c (record_full_gdb_operation_disable_set): Return
2225         scoped_restore_tmpl<int>.
2226         (record_full_wait_1, record_full_insert_breakpoint)
2227         (record_full_remove_breakpoint, record_full_save)
2228         (record_full_goto_insn): Update.
2229
2230 2017-10-02  Tom Tromey  <tom@tromey.com>
2231
2232         PR rust/22236:
2233         * rust-lang.c (rust_val_print_str): New function.
2234         (val_print_struct): Call it.
2235         (rust_subscript): Preserve name of slice type.
2236
2237 2017-10-02  Tom Tromey  <tom@tromey.com>
2238
2239         * rust-lang.c (rust_subscript): Handle slices in
2240         EVAL_AVOID_SIDE_EFFECTS case.
2241
2242 2017-10-02  Tom Tromey  <tom@tromey.com>
2243
2244         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2245
2246 2017-10-02  Tom Tromey  <tom@tromey.com>
2247
2248         * rust-lang.h (rust_slice_type): Add "extern".
2249
2250 2017-10-02  Tom Tromey  <tom@tromey.com>
2251             Pedro Alves  <palves@redhat.com>
2252
2253         * ada-lang.h (ada_exc_info::operator<): Make const.
2254         (ada_exc_info::operator==): Make const.
2255         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2256         Make const.
2257
2258 2017-09-29  Tom Tromey  <tom@tromey.com>
2259
2260         * target.c (read_whatever_is_readable): Change type of "result".
2261         Update.
2262         (free_memory_read_result_vector): Remove.
2263         (read_memory_robust): Change return type.  Update.
2264         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2265         bin2hex, std::string.
2266         * target.h (memory_read_result_s): Remove typedef.
2267         (free_memory_read_result_vector): Remove.
2268         (read_memory_robust): Return std::vector.
2269
2270 2017-09-29  Tom Tromey  <tom@tromey.com>
2271
2272         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2273
2274 2017-09-29  Tom Tromey  <tom@tromey.com>
2275
2276         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2277         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2278         operator< and operator==.
2279         (ada_exceptions_list): Return a std::vector.
2280         * ada-lang.c (ada_exc_info::operator<): Rename from
2281         compare_ada_exception_info.
2282         (ada_exc_info::operator==): New.
2283         (sort_remove_dups_ada_exceptions_list): Change type of
2284         "exceptions".
2285         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2286         (ada_add_global_exceptions): Likewise.
2287         (ada_exceptions_list_1): Return a std::vector.
2288         (ada_exceptions_list): Likewise.
2289
2290 2017-09-29  Tom Tromey  <tom@tromey.com>
2291
2292         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2293         'std::set *'.
2294         (print_one_inferior): Update.
2295         (free_vector_of_ints): Remove.
2296         (list_available_thread_groups): Change "ids" to std::set.
2297         (mi_cmd_list_thread_groups): Update.
2298         (struct collect_cores_data) <core>: Now a std::set.
2299         (collect_cores): Update.
2300         (unique): Remove.
2301         (print_one_inferior): Update.
2302
2303 2017-09-29  Tom Tromey  <tom@tromey.com>
2304
2305         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2306         (mi_execute_async_cli_command): Likewise.
2307         (mi_cmd_trace_frame_collected): Use field_fmt.
2308
2309 2017-09-29  Tom Tromey  <tom@tromey.com>
2310
2311         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2312         gdb::byte_vector.
2313
2314 2017-09-29  Tom Tromey  <tom@tromey.com>
2315
2316         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2317
2318 2017-09-29  Tom Tromey  <tom@tromey.com>
2319
2320         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2321
2322 2017-09-29  Tom Tromey  <tom@tromey.com>
2323
2324         * varobj.h (varobj_gen_name): Return std::string.
2325         * varobj.c (varobj_gen_name): Return std::string.
2326         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2327         (mi_cmd_var_delete): Don't copy "name".
2328
2329 2017-09-29  Tom Tromey  <tom@tromey.com>
2330
2331         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2332         (mi_cmd_break_insert_1): Update.
2333
2334 2017-09-29  Tom Tromey  <tom@tromey.com>
2335
2336         * target.h (make_scoped_defer_target_commit_resume): Update.
2337         * target.c (make_scoped_defer_target_commit_resume): Rename from
2338         make_cleanup_defer_target_commit_resume.  Return a
2339         scoped_restore.
2340         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2341
2342 2017-09-29  Tom Tromey  <tom@tromey.com>
2343
2344         * main.c (captured_main_1): Remove unused declaration.
2345         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2346
2347 2017-09-29  Tom Tromey  <tom@tromey.com>
2348
2349         * symtab.c (search_symbols): Remove unused outer cleanup.
2350         (make_source_files_completion_list): Remove unused declaration.
2351
2352 2017-09-29  Tom Tromey  <tom@tromey.com>
2353
2354         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2355
2356 2017-09-29  Tom Tromey  <tom@tromey.com>
2357
2358         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2359         gdb::byte_vector.
2360
2361 2017-09-29  Tom Tromey  <tom@tromey.com>
2362
2363         * complaints.c (vcomplaint): Use std::string.
2364
2365 2017-09-29  Tom Tromey  <tom@tromey.com>
2366
2367         * tracepoint.c (trace_variable_command): Use std::string.
2368         (encode_actions_1): Remove unused declarations.
2369         (create_tsv_from_upload): Use std::string.
2370
2371 2017-09-29  Tom Tromey  <tom@tromey.com>
2372
2373         * cp-support.c (gdb_demangle): Use std::string.
2374
2375 2017-09-29  Tom Tromey  <tom@tromey.com>
2376
2377         * stack.c (parse_frame_specification): Use std::string
2378         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2379
2380 2017-09-29  Tom Tromey  <tom@tromey.com>
2381
2382         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2383
2384 2017-09-29  Tom Tromey  <tom@tromey.com>
2385
2386         * utils.c (vfprintf_maybe_filtered): Use std::string.
2387         (vfprintf_unfiltered): Likewise.
2388
2389 2017-09-29  Tom Tromey  <tom@tromey.com>
2390
2391         * event-top.c (top_level_prompt): Return std::string.
2392         (display_gdb_prompt): Update.
2393
2394 2017-09-29  Tom Tromey  <tom@tromey.com>
2395
2396         * unittests/common-utils-selftests.c (format): New function.
2397         (string_vprintf_tests): New function.
2398         (_initialize_common_utils_selftests): Register new tests.
2399         * common/common-utils.c (string_vprintf): New function.
2400         * common/common-utils.h (string_vprintf): Declare.
2401
2402 2017-09-29  Pedro Alves  <palves@redhat.com>
2403
2404         * common/rsp-low.c (unpack_varlen_hex): Constify.
2405         * common/rsp-low.h (unpack_varlen_hex): Constify.
2406         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2407         Constify.
2408         * remote.c (remote_set_permissions, read_ptid)
2409         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2410         (remote_static_tracepoint_marker_at)
2411         (remote_static_tracepoint_markers_by_strid)
2412         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2413         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2414         (parse_tracepoint_definition, parse_tsv_definition)
2415         (parse_static_tracepoint_marker_definition): Constify.
2416         * tracepoint.h (parse_static_tracepoint_marker_definition)
2417         (parse_trace_status, parse_tracepoint_status)
2418         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2419
2420 2017-09-29  Pedro Alves  <palves@redhat.com>
2421
2422         * remote.c (target_buf, target_buf_size): Delete.
2423         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2424         Use the connection's packet buffer instead.
2425         All callers adjusted.
2426         (_initialize_remote): Remove references to target_buf and
2427         target_buf_size.
2428
2429 2017-09-28  Pedro Alves  <palves@redhat.com>
2430
2431         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2432         unittests/common-utils-selftests.c.
2433         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2434         (COMMON_OBS): Remove utils-selftests.o.
2435         * utils-selftests.c: Move to ...
2436         * unittests/common-utils-selftests.c: ... here and rename self
2437         test to "string_printf".
2438
2439 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2440
2441         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2442         having NULL cus or tus.
2443
2444 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2445
2446         * arm-tdep.c: (convert_from_extended): Remove.
2447         (convert_to_extended): Likewise.
2448         (arm_extract_return_value): Use convert_typed_floating.
2449         (arm_store_return_value): Likewise.
2450
2451         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2452         * sh-tdep.c: Do not include "floatformat.h".
2453         (sh_littlebyte_bigword_type): New function.
2454         (sh_register_convert_to_virtual): Use convert_typed_floating.
2455         (sh_register_convert_to_raw): Likewise.
2456         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2457         (sh64_littlebyte_bigword_type): New function.
2458         (sh64_extract_return_value): Use convert_typed_floating.
2459         (sh64_register_convert_to_virtual): Likewise.
2460         (sh64_register_convert_to_raw): Likewise.
2461
2462 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2463
2464         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2465         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2466
2467         * gdbtypes.h (union type_specific): Make field floatformat hold
2468         just a single struct floatformat, not an array.
2469         (floatformat_from_type): Move here.
2470         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2471         changed TYPE_FLOATFORMAT definition.
2472         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2473         (recursive_dump_type): Likewise.
2474         (init_float_type): Install correct floatformat for byte order.
2475         (arch_float_type): Likewise.
2476
2477 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2478
2479         * gdbtypes.c (init_type): Change incoming argument from
2480         length-in-bytes to length-in-bits.  Assert length is a
2481         multiple of TARGET_CHAR_BITS.
2482         (arch_type, arch_flags_type): Likewise.
2483         (init_integer_type): Update call to init_type.
2484         (init_character_type): Likewise.
2485         (init_boolean_type): Likewise.
2486         (init_float_type): Likewise.
2487         (init_decfloat_type): Likewise.
2488         (init_complex_type): Likewise.
2489         (init_pointer_type): Likewise.
2490         (objfile_type): Likewise.
2491         (arch_integer_type): Update call to arch_type.
2492         (arch_character_type): Likewise.
2493         (arch_boolean_type): Likewise.
2494         (arch_float_type): Likewise.
2495         (arch_decfloat_type): Likewise.
2496         (arch_complex_type): Likewise.
2497         (arch_pointer_type): Likewise.
2498         (gdbtypes_post_init): Likewise.
2499
2500         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2501         (read_base_type): Likewise.
2502         * mdebugread.c (basic_type): Likewise.
2503         * stabsread.c (dbx_init_float_type): Likewise.
2504         (rs6000_builtin_type): Likewise.
2505         (read_range_type): Likewise.  Also, fix call to init_integer_type
2506         with erroneous length argument.
2507
2508         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2509         * d-lang.c (build_d_types): Likewise.
2510         * f-lang.c (build_fortran_types): Likewise.
2511         * go-lang.c (build_go_types): Likewise.
2512         * opencl-lang.c (build_opencl_types): Likewise.
2513         * jit.c (finalize_symtab): Likewise.
2514         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2515         (build_std_type_info_type): Likewise.
2516         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2517         update call to arch_flags_type.
2518
2519         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2520         arch_type.
2521         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2522         * windows-tdep.c (windows_get_tlb_type): Likewise.
2523
2524         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2525         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2526         * m32c-tdep.c (make_types): Likewise.
2527         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2528         (rl78_psw_type): Update call to arch_flags_type.
2529         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2530         * rx-tdep.c (rx_psw_type): Likewise.
2531         (rx_fpsw_type): Likewise.
2532         * sparc-tdep.c (sparc_psr_type): Likewise.
2533         (sparc_fsr_type): Likewise.
2534         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2535         (sparc64_ccr_type): Likewise.
2536         (sparc64_fsr_type): Likewise.
2537         (sparc64_fprs_type): Likewise.
2538
2539 2017-09-27  Tom Tromey  <tom@tromey.com>
2540
2541         * findcmd.c (find_command): Constify.
2542
2543 2017-09-27  Tom Tromey  <tom@tromey.com>
2544
2545         * ada-tasks.c (task_command_1, task_command): Constify.
2546
2547 2017-09-27  Tom Tromey  <tom@tromey.com>
2548
2549         * symtab.c (maintenance_print_symbol_cache)
2550         (maintenance_flush_symbol_cache)
2551         (maintenance_print_symbol_cache_statistics): Constify.
2552
2553 2017-09-27  Tom Tromey  <tom@tromey.com>
2554
2555         * inferior.c (detach_inferior_command, kill_inferior_command)
2556         (inferior_command): Constify.
2557
2558 2017-09-27  Tom Tromey  <tom@tromey.com>
2559
2560         * regcache.c (regcache_print, maintenance_print_registers)
2561         (maintenance_print_raw_registers)
2562         (maintenance_print_cooked_registers)
2563         (maintenance_print_register_groups)
2564         (maintenance_print_remote_registers): Constify.
2565
2566 2017-09-27  Tom Tromey  <tom@tromey.com>
2567
2568         * printcmd.c (map_display_numbers, undisplay_command)
2569         (enable_disable_display_command, enable_display_command)
2570         (disable_display_command): Constify.
2571
2572 2017-09-27  Tom Tromey  <tom@tromey.com>
2573
2574         * breakpoint.h (delete_command): Don't declare.
2575         * breakpoint.c (delete_command, enable_once_command)
2576         (enable_count_command, enable_delete_command, breakpoint_1)
2577         (maintenance_info_breakpoints, stopin_command, stopat_command)
2578         (delete_command, delete_trace_command, save_breakpoints)
2579         (save_breakpoints_command, save_tracepoints_command): Constify.
2580
2581 2017-09-27  Tom Tromey  <tom@tromey.com>
2582
2583         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2584         (skip_ws, extract_identifier, macro_define_command)
2585         (macro_undef_command, macro_list_command): Constify.
2586
2587 2017-09-27  Tom Tromey  <tom@tromey.com>
2588
2589         * infcmd.c (environment_info, set_environment_command)
2590         (unset_environment_command, path_info, info_proc_cmd_1)
2591         (info_proc_cmd_mappings, info_proc_cmd_stat)
2592         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2593         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2594
2595 2017-09-27  Tom Tromey  <tom@tromey.com>
2596
2597         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2598         Constify.
2599
2600 2017-09-27  Tom Tromey  <tom@tromey.com>
2601
2602         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2603
2604 2017-09-27  Tom Tromey  <tom@tromey.com>
2605
2606         * demangle.c (demangle_command): Constify.
2607
2608 2017-09-27  Tom Tromey  <tom@tromey.com>
2609
2610         * progspace.c (maintenance_info_program_spaces_command):
2611         Constify.
2612
2613 2017-09-27  Tom Tromey  <tom@tromey.com>
2614
2615         * compile/compile.c (check_raw_argument, compile_file_command)
2616         (compile_code_command, compile_print_command): Constify.
2617
2618 2017-09-27  Tom Tromey  <tom@tromey.com>
2619
2620         * reggroups.c (maintenance_print_reggroups): Constify.
2621
2622 2017-09-27  Tom Tromey  <tom@tromey.com>
2623
2624         * dwarf2read.c (save_gdb_index_command): Constify.
2625
2626 2017-09-27  Tom Tromey  <tom@tromey.com>
2627
2628         * stap-probe.c (info_probes_stap_command): Constify.
2629
2630 2017-09-27  Tom Tromey  <tom@tromey.com>
2631
2632         * fork-child.c (unset_exec_wrapper_command): Constify.
2633
2634 2017-09-27  Tom Tromey  <tom@tromey.com>
2635
2636         * btrace.c (get_uint, get_context_size, no_chunk)
2637         (maint_btrace_packet_history_cmd)
2638         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2639         (maint_info_btrace_cmd): Constify.
2640
2641 2017-09-27  Tom Tromey  <tom@tromey.com>
2642
2643         * reverse.c (delete_bookmark_command): Constify.
2644
2645 2017-09-27  Tom Tromey  <tom@tromey.com>
2646
2647         * remote.c (set_memory_packet_size)
2648         (set_memory_write_packet_size, show_memory_write_packet_size)
2649         (set_memory_read_packet_size, show_memory_read_packet_size)
2650         (compare_sections_command, packet_command, remote_put_command)
2651         (remote_get_command, remote_delete_command): Constify.
2652
2653 2017-09-27  Tom Tromey  <tom@tromey.com>
2654
2655         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2656         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2657         (set_mipsfpu_auto_command): Constify.
2658
2659 2017-09-27  Tom Tromey  <tom@tromey.com>
2660
2661         * cli/cli-cmds.h (cd_command): Constify.
2662         * cli/cli-cmds.c (cd_command): Constify.
2663
2664 2017-09-27  Tom Tromey  <tom@tromey.com>
2665
2666         * thread.c (thread_name_command, thread_find_command): Constify.
2667
2668 2017-09-27  Tom Tromey  <tom@tromey.com>
2669
2670         * probe.c (enable_probes_command, disable_probes_command):
2671         Constify.
2672
2673 2017-09-27  Tom Tromey  <tom@tromey.com>
2674
2675         * symfile.c (symbol_file_command): Constify.
2676         * gdbcore.h (deprecated_file_changed_hook): Constify.
2677         * exec.c (deprecated_file_changed_hook, exec_file_command)
2678         (file_command): Constify.
2679         * defs.h (symbol_file_command): Constify.
2680
2681 2017-09-27  Tom Tromey  <tom@tromey.com>
2682
2683         * remote-fileio.c (set_system_call_allowed)
2684         (show_system_call_allowed): Constify.
2685
2686 2017-09-27  Tom Tromey  <tom@tromey.com>
2687
2688         * tracepoint.c (delete_trace_variable_command)
2689         (tfind_end_command, tfind_start_command, tfind_pc_command)
2690         (tfind_tracepoint_command, tfind_line_command)
2691         (tfind_range_command, tfind_outside_command): Constify.
2692
2693 2017-09-27  Tom Tromey  <tom@tromey.com>
2694
2695         * ax-gdb.c (maint_agent_printf_command, agent_command)
2696         (agent_eval_command): Constify.
2697
2698 2017-09-27  Tom Tromey  <tom@tromey.com>
2699
2700         * tracepoint.c (info_scope_command): Constify.
2701         * python/python.c (gdbpy_decode_line): Constify.
2702         * python/py-breakpoint.c (bppy_init): Constify.
2703         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2704         * location.h: (new_linespec_location)
2705         (string_to_event_location_basic, string_to_event_location):
2706         Constify.
2707         * location.c (new_linespec_location)
2708         (string_to_event_location_basic, string_to_event_location):
2709         Constify.
2710         * linespec.h (decode_line_with_current_source)
2711         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2712         * linespec.c (linespec_lex_to_end)
2713         (decode_line_with_current_source)
2714         (decode_line_with_last_displayed): Constify.
2715         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2716         Constify.
2717         * cli/cli-cmds.c (edit_command, list_command): Constify.
2718         * breakpoint.h (until_break_command, watch_command_wrapper)
2719         (awatch_command_wrapper, rwatch_command_wrapper)
2720         (init_ada_exception_breakpoint): Constify.
2721         * breakpoint.c (break_command_1, dprintf_command)
2722         (break_range_command, watch_command_wrapper)
2723         (rwatch_command_wrapper, awatch_command_wrapper)
2724         (until_break_command, init_ada_exception_breakpoint)
2725         (strace_marker_create_sals_from_location, trace_command)
2726         (ftrace_command, strace_command, struct tracepoint): Constify.
2727         * ax-gdb.c (agent_command_1): Constify.
2728         * ada-lang.c (ada_exception_sal): Constify.
2729
2730 2017-09-27  Tom Tromey  <tom@tromey.com>
2731
2732         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2733         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2734         (get_context_size, no_chunk, get_insn_history_modifiers)
2735         (cmd_record_insn_history, get_call_history_modifiers)
2736         (cmd_record_call_history): Constify.
2737
2738 2017-09-27  Tom Tromey  <tom@tromey.com>
2739
2740         * source.c (show_substitute_path_command)
2741         (unset_substitute_path_command, set_substitute_path_command):
2742         Constify.
2743
2744 2017-09-27  Tom Tromey  <tom@tromey.com>
2745
2746         * typeprint.c (maintenance_print_type): Constify.
2747         * maint.c (maintenance_dump_me, maintenance_demangle)
2748         (maintenance_time_display, maintenance_info_sections)
2749         (maintenance_print_statistics, maintenance_deprecate)
2750         (maintenance_undeprecate): Constify.
2751         (maintenance_do_deprecate): Constify.  Use std::string.
2752         (maintenance_selftest): Constify.
2753         * gdbtypes.h (maintenance_print_type): Constify.
2754
2755 2017-09-27  Tom Tromey  <tom@tromey.com>
2756
2757         * hppa-tdep.c (unwind_command): Constify.
2758
2759 2017-09-27  Tom Tromey  <tom@tromey.com>
2760
2761         * target-descriptions.c (unset_tdesc_filename_cmd)
2762         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2763         Constify.
2764
2765 2017-09-27  Tom Tromey  <tom@tromey.com>
2766
2767         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2768
2769 2017-09-27  Tom Tromey  <tom@tromey.com>
2770
2771         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2772
2773 2017-09-27  Tom Tromey  <tom@tromey.com>
2774
2775         * tui/tui-regs.c (tui_reg_command): Constify.
2776
2777 2017-09-27  Tom Tromey  <tom@tromey.com>
2778
2779         * skip.c (skip_file_command, skip_function_command)
2780         (skip_enable_command, skip_disable_command, skip_delete_command):
2781         Constify.
2782
2783 2017-09-27  Tom Tromey  <tom@tromey.com>
2784
2785         * record-btrace.c (cmd_record_btrace_bts_start)
2786         (cmd_record_btrace_pt_start): Constify.
2787
2788 2017-09-27  Tom Tromey  <tom@tromey.com>
2789
2790         * symmisc.c (maintenance_print_symbols)
2791         (maintenance_print_msymbols, maintenance_print_objfiles)
2792         (maintenance_info_symtabs, maintenance_check_symtabs)
2793         (maintenance_expand_symtabs, maintenance_info_line_tables):
2794         Constify.
2795
2796 2017-09-27  Tom Tromey  <tom@tromey.com>
2797
2798         * top.c (new_ui_command): Constify.
2799
2800 2017-09-27  Tom Tromey  <tom@tromey.com>
2801
2802         * symfile.c (add_symbol_file_command)
2803         (remove_symbol_file_command, list_overlays_command)
2804         (map_overlay_command, unmap_overlay_command)
2805         (overlay_auto_command, overlay_manual_command)
2806         (overlay_off_command, overlay_load_command): Constify.
2807
2808 2017-09-27  Tom Tromey  <tom@tromey.com>
2809
2810         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2811         (info_spu_mailbox_command, info_spu_dma_command)
2812         (info_spu_proxydma_command): Constify.
2813
2814 2017-09-27  Tom Tromey  <tom@tromey.com>
2815
2816         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2817
2818 2017-09-27  Tom Tromey  <tom@tromey.com>
2819
2820         * cli/cli-script.c (user_defined_command): Constify.
2821
2822 2017-09-27  Tom Tromey  <tom@tromey.com>
2823
2824         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2825         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2826         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2827         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2828         (dump_binary_value, append_binary_memory, append_binary_value):
2829         Constify.
2830         (struct dump_context) <func>: Constify.
2831         (add_dump_command): Update.
2832
2833 2017-09-27  Tom Tromey  <tom@tromey.com>
2834
2835         * cli/cli-cmds.c (show_version, show_configuration)
2836         (source_command, show_user): Constify.
2837
2838 2017-09-27  Tom Tromey  <tom@tromey.com>
2839
2840         * target.c (maintenance_print_target_stack): Constify.
2841
2842 2017-09-27  Tom Tromey  <tom@tromey.com>
2843
2844         * interps.c (interpreter_exec_cmd): Constify.
2845
2846 2017-09-27  Tom Tromey  <tom@tromey.com>
2847
2848         * record-full.c (cmd_record_full_restore): Constify.
2849
2850 2017-09-27  Tom Tromey  <tom@tromey.com>
2851
2852         * memattr.c (enable_mem_command, disable_mem_command)
2853         (delete_mem_command): Constify.
2854
2855 2017-09-27  Tom Tromey  <tom@tromey.com>
2856
2857         * value.c (show_convenience): Constify.
2858
2859 2017-09-27  Tom Tromey  <tom@tromey.com>
2860
2861         * gdbcore.h (core_file_command): Update.
2862         * corefile.c (core_file_command): Constify.
2863
2864 2017-09-27  Tom Tromey  <tom@tromey.com>
2865
2866         * user-regs.c (maintenance_print_user_registers): Constify.
2867
2868 2017-09-27  Tom Tromey  <tom@tromey.com>
2869
2870         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2871
2872 2017-09-27  Tom Tromey  <tom@tromey.com>
2873
2874         * cp-support.c (first_component_command): Constify.
2875
2876 2017-09-27  Tom Tromey  <tom@tromey.com>
2877
2878         * psymtab.c (maintenance_print_psymbols)
2879         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2880         Constify.
2881
2882 2017-09-27  Tom Tromey  <tom@tromey.com>
2883
2884         * windows-tdep.c (display_tib): Constify.
2885
2886 2017-09-27  Tom Tromey  <tom@tromey.com>
2887
2888         * linux-fork.c (delete_checkpoint_command)
2889         (detach_checkpoint_command): Constify.
2890
2891 2017-09-27  Tom Tromey  <tom@tromey.com>
2892
2893         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2894
2895 2017-09-27  Tom Tromey  <tom@tromey.com>
2896
2897         * arc-tdep.c (dump_arc_instruction_command): Constify.
2898
2899 2017-09-27  Tom Tromey  <tom@tromey.com>
2900
2901         * valprint.c (set_radix, show_radix): Constify.
2902
2903 2017-09-27  Tom Tromey  <tom@tromey.com>
2904
2905         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2906
2907 2017-09-27  Tom Tromey  <tom@tromey.com>
2908
2909         * command.h (not_just_help_class_command): Update.
2910         * cli/cli-decode.h (not_just_help_class_command): Update.
2911         * cli/cli-decode.c (not_just_help_class_command): Constify.
2912
2913 2017-09-27  Tom Tromey  <tom@tromey.com>
2914
2915         * gdb_bfd.c (maintenance_info_bfds): Constify.
2916
2917 2017-09-27  Tom Tromey  <tom@tromey.com>
2918
2919         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2920         overloads.
2921         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2922         (do_const_cfunc): New function.
2923         (cmd_cfunc_eq): New overload.
2924         (cli_user_command_p): Check do_const_cfunc.
2925         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2926         const_cfunc.
2927         * command.h (add_cmd): Add const overload and no-function
2928         overload.
2929         (set_cmd_cfunc): Add const overload.
2930         (cmd_const_cfunc_ftype): Declare.
2931         (cmd_cfunc_eq): Add const overload.
2932         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2933         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2934         overload.
2935
2936 2017-09-27  Tom Tromey  <tom@tromey.com>
2937
2938         * macroexp.c (get_next_token_for_substitution): New function.
2939         (substitute_args): Call it.  Check for __VA_OPT__.
2940
2941 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2942             Pedro Alves <palves@redhat.com>
2943
2944         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2945         producer_is_icc_lt_14.
2946         (producer_is_icc_lt_14): New function.
2947         (check_producer): Add code for checking version of ICC.
2948         (producer_is_icc): Move to producer.c.
2949         (read_structure_type): Restrict ICC workaround to ICC<14.
2950         * producer.c: Include selftest.h.
2951         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2952         New functions.
2953         * producer.h (producer_is_icc): New declaration.
2954
2955 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2956
2957         * Makefile.in (SFILES): Add producer.c.
2958         (COMMON_OBS): Add producer.o
2959         * amd64-tdep.c (producer.h): Add new include.
2960         * dwarf2read.c (producer.h): Add new include.
2961         * producer.c: New file.
2962         * producer.h: New file.
2963         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2964         producer.c.
2965         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2966         producer.h.
2967
2968 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2969
2970         * configure.ac: Search ncursesw before ncurses.
2971         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2972         * gdb_curses.h: Include <ncursesw/ncurses.h>
2973         * config.in, configure: Regenerate.
2974
2975 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2976
2977         PR gdb/22185
2978         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2979         obsolete.
2980         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2981         Remove i386sol2 support.
2982         * configure.nat <i386sol2>: Remove.
2983         <sol2-64>: Fold into ...
2984         <sol2>: ... this.
2985         Move common settings to default section.
2986         Add sol-thread.o.
2987         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2988         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2989         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2990         <i[34567]86-*-solaris*>: Remove.
2991         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2992
2993         * configure.ac: Remove wctype in libw check.
2994         (_MSE_INT_H): Don't define on Solaris 7-9.
2995         <solaris*>: Remove libthread_db.so.1 check.
2996         * configure: Regenerate.
2997         * config.in: Regenerate.
2998
2999         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3000         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3001         (gdb_ps_size_t): Remove.
3002         Use base types in users.
3003         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3004
3005         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3006
3007 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3008
3009         PR build/22206
3010         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3011         (adi_is_addr_mapped): Likewise.
3012         (PSR_ICC): Don't redefine.
3013         (PSR_IMPL): Likewise.
3014
3015 2017-09-25  Tom Tromey  <tom@tromey.com>
3016
3017         * regcache.c (regcache::dump): Use string_printf.
3018
3019 2017-09-25  Tom Tromey  <tom@tromey.com>
3020
3021         * regcache.c (class regcache_invalidator): New.
3022         (struct register_to_invalidate): Remove.
3023         (make_cleanup_regcache_invalidate): Remove.
3024         (regcache::raw_write): Use regcache_invalidator.
3025
3026 2017-09-25  Tom Tromey  <tom@tromey.com>
3027
3028         * spu-tdep.c (spu2ppu_sniffer): Update.
3029         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3030         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3031         Remove.
3032         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3033         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3034         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3035         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3036         (frame_pop): Update.
3037
3038 2017-09-25  Tom Tromey  <tom@tromey.com>
3039
3040         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3041         * regcache.h (regcache_xfree): Don't declare.
3042         * regcache.c (regcache_xfree): Remove.
3043         (do_regcache_xfree): Use delete.
3044         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3045         * linux-fork.c (free_fork): Use delete.
3046         (fork_save_infrun_state): Likewise.
3047         * jit.c (jit_dealloc_cache): Use delete.
3048         * infrun.c (discard_infcall_suspend_state): Use delete.
3049
3050 2017-09-25  Tom Tromey  <tom@tromey.com>
3051
3052         * regcache.h (regcache_xmalloc): Don't declare.
3053         (regcache_raw_set_cached_value): Update comment.
3054         * regcache.c (regcache_xmalloc): Remove.
3055         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3056         * jit.c (jit_frame_sniffer): Use new.
3057         * frame.c (frame_save_as_regcache): Use new.
3058
3059 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3060
3061         * NEWS: Advertise support for guarded-storage registers on IBM z.
3062
3063 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3064
3065         * s390-linux-nat.c (have_regset_gs): New static variable.
3066         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3067         control block and guarded-storage broadcast control regsets.
3068         (s390_read_description): Detect whether the target has
3069         guarded-storage support, return appropriate tdesc.
3070         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3071         (features/s390x-gs-linux64.c): Likewise.
3072         (struct gdbarch_tdep) <have_gs>: New field.
3073         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3074         (s390_gsbc_regset): New variables.
3075         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3076         and s390_gsbc_regset, if applicable.
3077         (s390_core_read_description): Check whether core file was from a
3078         target with guarded-storage support; include appropriate regsets.
3079         (s390_gdbarch_init): Add registers for guarded-storage support.
3080         (_initialize_s390_tdep): Initialize new target descriptions that
3081         include registers for guarded-storage support.
3082         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3083         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3084         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3085         (S390_NUM_REGS): Adjust macro definition.
3086         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3087         (tdesc_s390x_gs_linux64): New declarations.
3088
3089 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3090
3091         * features/s390-gs-linux64.xml: New file.
3092         * features/s390-gs.xml: New file.
3093         * features/s390-gsbc.xml: New file.
3094         * features/s390x-gs-linux64.xml: New file.
3095         * features/Makefile (WHICH): Add s390-gs-linux64 and
3096         s390x-gs-linux64.
3097         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3098         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3099         * features/s390-gs-linux64.c: New generated file.
3100         * features/s390x-gs-linux64.c: New file.
3101         * regformats/s390-gs-linux64.dat: New file.
3102         * regformats/s390x-gs-linux64.dat: New file.
3103
3104 2017-09-23  Tom Tromey  <tom@tromey.com>
3105
3106         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3107
3108 2017-09-22  Tom Tromey  <tom@tromey.com>
3109
3110         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3111         type to scoped_restore_tmpl.
3112         <scoped_input_handler>: Initialize m_quit_handler directly.
3113
3114 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3115
3116         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3117         (cd_command): Likewise.  Free "current_directory" before
3118         assigning to it.
3119         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3120         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3121         * top.c (gdb_dirbuf): Remove global declaration.
3122         * top.h (gdb_dirbuf): Likewise.
3123
3124 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3125
3126         * gnulib/aclocal.m4: Regenerate.
3127         * gnulib/config.in: Regenerate.
3128         * gnulib/configure: Regenerate.
3129         * gnulib/import/Makefile.am: Regenerate.
3130         * gnulib/import/Makefile.in: Regenerate.
3131         * gnulib/import/assure.h: New file.
3132         * gnulib/import/at-func.c: Likewise
3133         * gnulib/import/chdir-long.c: New file.
3134         * gnulib/import/chdir-long.h: New file.
3135         * gnulib/import/cloexec.c: New file.
3136         * gnulib/import/cloexec.h: New file.
3137         * gnulib/import/close.c: New file.
3138         * gnulib/import/closedir.c: New file.
3139         * gnulib/import/dirent-private.h: New file.
3140         * gnulib/import/dup-safer.c: New file.
3141         * gnulib/import/dup.c: New file.
3142         * gnulib/import/dup2.c: New file.
3143         * gnulib/import/error.c: New file.
3144         * gnulib/import/error.h: New file.
3145         * gnulib/import/exitfail.c: New file.
3146         * gnulib/import/exitfail.h: New file.
3147         * gnulib/import/fchdir.c: New file.
3148         * gnulib/import/fcntl.c: New file.
3149         * gnulib/import/fcntl.in.h: New file.
3150         * gnulib/import/fd-hook.c: New file.
3151         * gnulib/import/fd-hook.h: New file.
3152         * gnulib/import/fd-safer.c: New file.
3153         * gnulib/import/fdopendir.c: New file.
3154         * gnulib/import/filename.h: New file.
3155         * gnulib/import/filenamecat-lgpl.c: New file.
3156         * gnulib/import/filenamecat.h: New file.
3157         * gnulib/import/fstat.c: New file.
3158         * gnulib/import/fstatat.c: New file.
3159         * gnulib/import/getcwd-lgpl.c: New file.
3160         * gnulib/import/getcwd.c: New file.
3161         * gnulib/import/getdtablesize.c: New file.
3162         * gnulib/import/getlogin_r.c: New file.
3163         * gnulib/import/getprogname.c: New file.
3164         * gnulib/import/getprogname.h: New file.
3165         * gnulib/import/gettext.h: New file.
3166         * gnulib/import/glob-libc.h: New file.
3167         * gnulib/import/glob.c: New file.
3168         * gnulib/import/glob.in.h: New file.
3169         * gnulib/import/intprops.h: New file.
3170         * gnulib/import/m4/chdir-long.m4: New file.
3171         * gnulib/import/m4/close.m4: New file.
3172         * gnulib/import/m4/closedir.m4: New file.
3173         * gnulib/import/m4/d-ino.m4: New file.
3174         * gnulib/import/m4/d-type.m4: New file.
3175         * gnulib/import/m4/dup.m4: New file.
3176         * gnulib/import/m4/dup2.m4: New file.
3177         * gnulib/import/m4/error.m4: New file.
3178         * gnulib/import/m4/fchdir.m4: New file.
3179         * gnulib/import/m4/fcntl.m4: New file.
3180         * gnulib/import/m4/fcntl_h.m4: New file.
3181         * gnulib/import/m4/fdopendir.m4: New file.
3182         * gnulib/import/m4/filenamecat.m4: New file.
3183         * gnulib/import/m4/fstat.m4: New file.
3184         * gnulib/import/m4/fstatat.m4: New file.
3185         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3186         * gnulib/import/m4/getcwd-path-max.m4: New file.
3187         * gnulib/import/m4/getcwd.m4: New file.
3188         * gnulib/import/m4/getdtablesize.m4: New file.
3189         * gnulib/import/m4/getlogin_r.m4: New file.
3190         * gnulib/import/m4/getprogname.m4: New file.
3191         * gnulib/import/m4/glob.m4: New file.
3192         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3193         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3194         * gnulib/import/m4/mempcpy.m4: New file.
3195         * gnulib/import/m4/memrchr.m4: New file.
3196         * gnulib/import/m4/mode_t.m4: New file.
3197         * gnulib/import/m4/msvc-inval.m4: New file.
3198         * gnulib/import/m4/msvc-nothrow.m4: New file.
3199         * gnulib/import/m4/open.m4: New file.
3200         * gnulib/import/m4/openat.m4: New file.
3201         * gnulib/import/m4/opendir.m4: New file.
3202         * gnulib/import/m4/readdir.m4: New file.
3203         * gnulib/import/m4/realloc.m4: New file.
3204         * gnulib/import/m4/rewinddir.m4: New file.
3205         * gnulib/import/m4/save-cwd.m4: New file.
3206         * gnulib/import/m4/strdup.m4: New file.
3207         * gnulib/import/m4/strerror.m4: New file.
3208         * gnulib/import/m4/unistd-safer.m4: New file.
3209         * gnulib/import/mempcpy.c: New file.
3210         * gnulib/import/memrchr.c: New file.
3211         * gnulib/import/msvc-inval.c: New file.
3212         * gnulib/import/msvc-inval.h: New file.
3213         * gnulib/import/msvc-nothrow.c: New file.
3214         * gnulib/import/msvc-nothrow.h: New file.
3215         * gnulib/import/open.c: New file.
3216         * gnulib/import/openat-die.c: New file.
3217         * gnulib/import/openat-priv.h: New file.
3218         * gnulib/import/openat-proc.c: New file.
3219         * gnulib/import/openat.c: New file.
3220         * gnulib/import/openat.h: New file.
3221         * gnulib/import/opendir.c: New file.
3222         * gnulib/import/pipe-safer.c: New file.
3223         * gnulib/import/readdir.c: New file.
3224         * gnulib/import/realloc.c: New file.
3225         * gnulib/import/rewinddir.c: New file.
3226         * gnulib/import/save-cwd.c: New file.
3227         * gnulib/import/save-cwd.h: New file.
3228         * gnulib/import/strdup.c: New file.
3229         * gnulib/import/strerror-override.c: New file.
3230         * gnulib/import/strerror-override.h: New file.
3231         * gnulib/import/strerror.c: New file.
3232         * gnulib/import/unistd--.h: New file.
3233         * gnulib/import/unistd-safer.h: New file.
3234         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3235         "getcwd" and "glob".
3236         * ser-tcp.c: Undefine "close" before redefining it.
3237
3238 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3239
3240         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3241         get rid of res_val.
3242
3243 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3244
3245         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3246         <sol2,sparc>: Likewise.
3247         <sol2-64,i386>: Likewise.
3248
3249         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3250         -Wdeprecated-declarations on *-*-solaris*.
3251         * configure: Regenerate.
3252
3253         * procfs.c: Include "nat/inferior.h".
3254         (procfs_info_proc): Fix typo.
3255
3256 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3257
3258         * remote.c (vector): Include.
3259         (struct private_thread_info): Add field, thread_handle.
3260         (free_private_thread_info): Deallocate storage associated with
3261         thread handle.
3262         (get_private_info_thread): Initialize `thread_handle' field.
3263         (struct thread_item): Add field, thread_handle.
3264         (clear_threads_listing_context): Deallocate storage associated
3265         with thread handle.
3266         (start_thread): Add support for "handle" attribute.
3267         (thread_attributes): Add "handle".
3268         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3269         field.
3270         (remote_update_thread_list): Update thread_handle.
3271         (remote_thread_handle_to_thread_info): New function.
3272         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3273
3274 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3275
3276         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3277         function.
3278         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3279         * python/python-internal.h (thread_object_type): Declare.
3280
3281 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3282
3283         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3284         (target_thread_handle_to_thread_info): Declare.
3285         * target.c (target_thread_handle_to_thread_info): New function.
3286         * target-delegates.c: Regenerate.
3287         * gdbthread.h (find_thread_by_handle): Declare.
3288         * thread.c (find_thread_by_handle): New function.
3289         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3290         function.
3291         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3292
3293 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3294
3295         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3296
3297 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3298
3299         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3300
3301 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3302
3303         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3304         to gdb_target_obs.
3305
3306 2017-09-20  Tom Tromey  <tom@tromey.com>
3307
3308         * breakpoint.c (struct counted_command_line): Remove.
3309         (breakpoint_commands): Update.
3310         (alloc_counted_command_line, incref_counted_command_line)
3311         (decref_counted_command_line, do_cleanup_counted_command_line)
3312         (make_cleanup_decref_counted_command_line): Remove.
3313         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3314         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3315         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3316         (save_breakpoints): Update.
3317         * breakpoint.h (counted_command_line): Now a typedef to
3318         shared_ptr.
3319         (struct breakpoint) <commands>: Now a counted_command_line.
3320         (struct bpstats) <command>: Likewise.
3321
3322 2017-09-20  Tom Tromey  <tom@tromey.com>
3323
3324         * breakpoint.c (struct commands_info, do_map_commands_command):
3325         Remove.
3326         (commands_command_1): Update.
3327         (iterate_over_related_breakpoints): Take a function_view.
3328         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3329         (delete_command): Update.
3330         (map_breakpoint_numbers): Take a function_view.
3331         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3332         (disable_command): Update.
3333         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3334         (enable_command): Update.
3335         (struct disp_data, do_enable_breakpoint_disp)
3336         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3337         (do_map_enable_delete_breakpoint): Remove.
3338         (enable_once_command, enable_count_command, enable_delete_command)
3339         (delete_trace_variable_command): Update.
3340
3341 2017-09-20  Tom Tromey  <tom@tromey.com>
3342
3343         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3344         (bpstat_clear): Use delete.
3345         (bpstats): New constructors.
3346         (bpstat_copy, bpstat_stop_status): Use new.
3347         (dprintf_after_condition_true): Update.
3348         * breakpoint.h (bpstats::bpstats): Add constructors.
3349         (bpstats::~bpstats): Add destructor.
3350
3351 2017-09-20  Pedro Alves  <palves@redhat.com>
3352
3353         * eval.c (make_params): Delete, refactored as ...
3354         (class fake_method): ... this new type's ctor.
3355         (fake_method::~fake_method): New.
3356         (evaluate_subexp_standard): Use 'fake_method'.
3357
3358 2017-09-20  Tom Tromey  <tom@tromey.com>
3359
3360         * windows-nat.c (get_windows_debug_event, windows_wait)
3361         (do_initial_windows_stuff, windows_attach): Update.
3362         * utils.c (vwarning, internal_vproblem): Update.
3363         (ui_unregister_input_event_handler_cleanup)
3364         (prepare_to_handle_input): Remove.
3365         (class scoped_input_handler): New.
3366         (defaulted_query, prompt_for_continue): Update.
3367         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3368         Update.
3369         * top.c (undo_terminal_modifications_before_exit): Update.
3370         * target/target.h (target_terminal_init, target_terminal_inferior)
3371         (target_terminal_ours): Don't declare.
3372         (class target_terminal): New.
3373         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3374         (target_terminal_ours_for_output)
3375         (make_cleanup_restore_target_terminal): Don't declare.
3376         (target_terminal_info): Remove.
3377         * target.c (enum terminal_state, terminal_state): Remove.
3378         (target_terminal::terminal_state): Define.
3379         (target_terminal::init): Rename from target_terminal_init.
3380         (target_terminal::inferior): Rename from
3381         target_terminal_inferior.
3382         (target_terminal::ours): Rename from target_terminal_ours.
3383         (target_terminal::ours_for_output): Rename from
3384         target_terminal_ours_for_output.
3385         (target_terminal::info): New method.
3386         (cleanup_restore_target_terminal)
3387         (make_cleanup_restore_target_terminal): Remove.
3388         * solib.c (handle_solib_event): Update.
3389         * remote.c (remote_serial_quit_handler): Update.
3390         (remote_terminal_inferior, remote_wait_as): Update.
3391         * record-full.c (record_full_wait_1): Update.
3392         * nto-procfs.c (procfs_create_inferior): Update.
3393         * nat/fork-inferior.c (startup_inferior): Update.
3394         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3395         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3396         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3397         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3398         (mi_breakpoint_created, mi_breakpoint_deleted)
3399         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3400         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3401         (mi_user_selected_context_changed, report_initial_inferior):
3402         Update.
3403         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3404         (linux_nat_terminal_inferior): Update.
3405         * infrun.c (follow_fork_inferior)
3406         (handle_vfork_child_exec_or_exit, do_target_resume)
3407         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3408         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3409         Update.
3410         * inflow.c (child_terminal_init, info_terminal_command): Update.
3411         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3412         (attach_command): Update.
3413         * infcall.c (call_thread_fsm_should_stop): Update.
3414         * gnu-nat.c (gnu_attach): Update.
3415         * extension.c (struct active_ext_lang_state)
3416         (restore_active_ext_lang): Update.
3417         * exceptions.c (print_flush): Update.
3418         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3419         (struct quit_handler_cleanup_data, restore_quit_handler)
3420         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3421         Remove.
3422         * cp-support.c (gdb_demangle): Update.
3423         * breakpoint.c (update_inserted_breakpoint_locations)
3424         (insert_breakpoint_locations, handle_jit_event)
3425         (disable_breakpoints_in_unloaded_shlib): Update.
3426         * annotate.c (annotate_breakpoints_invalid)
3427         (annotate_frames_invalid): Update.
3428
3429 2017-09-20  Tom Tromey  <tom@tromey.com>
3430
3431         * main.c (catch_command_errors): Rename from
3432         catch_command_errors_const.
3433         (captured_main_1): Update.
3434
3435 2017-09-20  Pedro Alves  <palves@redhat.com>
3436
3437         * cli/cli-cmds.c (list_command): Use print_sal_location.
3438         (print_sal_location): New function.
3439         (ambiguous_line_spec): Use print_sal_location.
3440         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3441         * symtab.c (find_function_start_sal): Likewise.
3442         * symtab.h (symtab_and_line::symbol): New field.
3443
3444 2017-09-20  Pedro Alves  <palves@redhat.com>
3445
3446         * linespec.c (minsym_found): Handle non-text minsyms.
3447         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3448
3449 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3450
3451         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3452         backslash.
3453
3454 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3455
3456         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3457         vmovups instead vmovaps.
3458         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3459
3460 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3461
3462         * NEWS (Changes since GDB 8.0): Add starti.
3463         * infcmd.c (enum run_break): New.
3464         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3465         case.
3466         (run_command): Use enum run_how.
3467         (start_command): Likewise.
3468         (starti_command): New function.
3469         (RUN_ARGS_HELP): New macro.
3470         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3471         commands.  Add starti command.
3472
3473 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3474
3475         * Makefile.in (monitor.o): Remove the rule.
3476
3477 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3478
3479         * annotate.h (struct annotate_arg_emitter): Use
3480         DISABLE_COPY_AND_ASSIGN.
3481         * common/refcounted-object.h (refcounted_object): Likewise.
3482         * completer.h (struct completion_result): Likewise.
3483         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3484         * filename-seen-cache.h (filename_seen_cache): Likewise.
3485         * gdbcore.h (thread_section_name): Likewise.
3486         * gdb_regex.h (compiled_regex): Likewise.
3487         * gdbthread.h (scoped_restore_current_thread): Likewise.
3488         * inferior.h (scoped_restore_current_inferior): Likewise.
3489         * jit.c (jit_reader): Likewise.
3490         * linespec.h (struct linespec_result): Likewise.
3491         * mi/mi-parse.h (struct mi_parse): Likewise.
3492         * nat/fork-inferior.c (execv_argv): Likewise.
3493         * progspace.h (scoped_restore_current_program_space): Likewise.
3494         * python/python-internal.h (class gdbpy_enter): Likewise.
3495         * regcache.h (regcache): Likewise.
3496         * target-descriptions.c (struct tdesc_reg): Likewise.
3497         (struct tdesc_type): Likewise.
3498         (struct tdesc_feature): Likewise.
3499         * ui-out.h (ui_out_emit_type): Likewise.
3500
3501 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3502
3503         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3504         label abort_expression.
3505
3506 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3507
3508         * common/buffer.c (buffer_xml_printf): Adjust.
3509         * common/xml-utils.c (xml_escape_text): Change return type to
3510         std::string, update code accordingly.
3511         * common/xml-utils.h (xml_escape_text): Change return type to
3512         std::string.
3513         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3514         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3515         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3516         Adjust.
3517
3518 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3519
3520         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3521         (SUBDIR_UNITTESTS_OBS): Add new object file.
3522         * unittests/xml-utils-selftests.c: New file.
3523
3524 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3525
3526         * common/selftest.h (selftest): New struct/interface.
3527         (register_test): Add name parameter, add new overload.
3528         (run_tests): Add filter parameter.
3529         (for_each_selftest_ftype): New typedef.
3530         (for_each_selftest): New declaration.
3531         * common/selftest.c (tests): Change type to
3532         map<string, unique_ptr<selftest>>.
3533         (simple_selftest): New struct.
3534         (register_test): New function.
3535         (register_test): Add name parameter and use it.
3536         (run_tests): Add filter parameter and use it.  Add prints.
3537         Adjust to vector -> map change.
3538         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3539         registering selftests.
3540         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3541         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3542         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3543         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3544         * findvar.c (_initialize_findvar): Likewise.
3545         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3546         * maint.c (maintenance_selftest): Update call to run_tests.
3547         (maintenance_info_selftests): New function.
3548         (_initialize_maint_cmds): Register "maintenance info selftests"
3549         command.  Update "maintenance selftest" doc.
3550         * regcache.c (_initialize_regcache): Add names when registering
3551         selftests.
3552         * rust-exp.y (_initialize_rust_exp): Likewise.
3553         * selftest-arch.c (gdbarch_selftest): New struct.
3554         (gdbarch_tests): Remove.
3555         (register_test_foreach_arch): Add name parameter.  Call
3556         register_test.
3557         (tests_with_arch): Remove, move most content to
3558         gdbarch_selftest::operator().
3559         (_initialize_selftests_foreach_arch): Remove.
3560         * selftest-arch.h (register_test_foreach_arch): Add name
3561         parameter.
3562         (run_tests_with_arch): New declaration.
3563         * utils-selftests.c (_initialize_utils_selftests): Add names
3564         when registering selftests.
3565         * utils.c (_initialize_utils): Likewise.
3566         * unittests/array-view-selftests.c
3567         (_initialize_array_view_selftests): Likewise.
3568         * unittests/environ-selftests.c (_initialize_environ_selftests):
3569         Likewise.
3570         * unittests/function-view-selftests.c
3571         (_initialize_function_view_selftests): Likewise.
3572         * unittests/offset-type-selftests.c
3573         (_initialize_offset_type_selftests): Likewise.
3574         * unittests/optional-selftests.c
3575         (_initialize_optional_selftests): Likewise.
3576         * unittests/scoped_restore-selftests.c
3577         (_initialize_scoped_restore_selftests): Likewise.
3578         * NEWS: Document "maintenance selftest" and "maint info
3579         selftests".
3580
3581 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3582
3583         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3584         scoped_restore.
3585
3586 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3587
3588         * mi/mi-main.c (mi_load_progress): Make uiout variable
3589         a unique_ptr.
3590
3591 2017-09-15  Pedro Alves  <palves@redhat.com>
3592
3593         * compile/compile-c-types.c (convert_enum, convert_int)
3594         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3595
3596 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3597
3598         * dwarf2read.c (copy_string): Remove.
3599         (parse_macro_definition): Replace copy_string with savestring.
3600
3601 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3602
3603         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3604         gdb_target_obs.
3605         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3606         Likewise.
3607         (i[34567]86-*-linux*): Likewise.
3608
3609 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3610
3611         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3612         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3613         <stack>: Change type to std::vector.
3614         <stack_len, stack_allocated>: Remove.
3615         <grow_stack>: Remove.
3616         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3617         (dwarf_expr_context::~dwarf_expr_context): Remove.
3618         (dwarf_expr_context::grow_stack): Remove.
3619         (dwarf_expr_context::push): Adjust.
3620         (dwarf_expr_context::pop): Adjust.
3621         (dwarf_expr_context::fetch): Adjust.
3622         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3623         (dwarf_expr_context::stack_empty_p): Adjust.
3624         (dwarf_expr_context::execute_stack_op): Adjust.
3625
3626 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3627
3628         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3629         return type to bool.
3630         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3631
3632 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3633
3634         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3635         Change type to bool.
3636         (dwarf_stack_value) <in_stack_memory>: Likewise.
3637         (dwarf_expr_context) <push_address>: Change parameter type to
3638         bool.
3639         <fetch_in_stack_memory>: Change return type to bool.
3640         <push>: Change parameter type to bool.
3641         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3642         to bool.
3643         (dwarf_expr_context::push_address): Likewise.
3644         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3645         to bool.
3646         (dwarf_expr_context::execute_stack_op): Adjust.
3647         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3648
3649 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3650
3651         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3652         (struct dwarf_expr_context) <n_pieces>: Remove.
3653         <pieces>: Change type to std::vector.
3654         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3655         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3656         pieces.
3657         (dwarf_expr_context::add_piece): Adjust.
3658         * dwarf2loc.c (struct piece_closure): Initialize fields.
3659         <n_pieces>: Remove.
3660         <pieces>: Change type to std::vector.
3661         (allocate_piece_closure): Adjust, change parameter to
3662         std::vector rvalue and std::move it to piece_closure.
3663         (rw_pieced_value): Adjust.
3664         (check_pieced_synthetic_pointer): Adjust.
3665         (indirect_synthetic_pointer): Adjust.
3666         (coerce_pieced_ref): Adjust.
3667         (free_pieced_value_closure):  Adjust.  Use delete to free
3668         piece_closure.
3669         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3670         to allocate_piece_closure.
3671         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3672
3673 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3674
3675         * probe.h (probe_ops_cp): Remove typedef.
3676         (DEF_VEC_P (probe_ops_cp)): Remove.
3677         (all_probe_ops): Change type to std::vector.
3678         * probe.c (info_probes_for_ops): Adjust to vector change.
3679         (probe_linespec_to_ops): Likewise.
3680         (all_probe_ops): Change type to std::vector.
3681         (_initialize_probe): Adjust to vector change.
3682         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3683         * elfread.c (elf_get_probes): Likewise.
3684         * stap-probe.c (_initialize_stap_probe): Likewise.
3685
3686 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3687
3688         * probe.h (struct bound_probe): Define constructors.
3689         * probe.c (bound_probe_s): Remove typedef.
3690         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3691         (collect_probes): Change return type to std::vector, remove
3692         cleanup.
3693         (compare_probes): Return bool, change parameter type.  Change
3694         semantic to "less than".
3695         (gen_ui_out_table_header_info): Change parameter to std::vector
3696         and update.
3697         (exists_probe_with_pops): Likewise.
3698         (info_probes_for_ops): Update to std::vector change.
3699         (enable_probes_command): Likewise.
3700         (disable_probes_command): Likewise.
3701
3702 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3703
3704         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3705         vec to std::vector.
3706         * probe.c (parse_probes_in_pspace): Update.
3707         (find_probes_in_objfile): Update.
3708         (find_probe_by_pc): Update.
3709         (collect_probes): Update.
3710         (probe_any_get_probes): Update.
3711         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3712         return type to reference to std::vector.
3713         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3714         std::vector and update.
3715         (dtrace_process_dof): Likewise.
3716         (dtrace_get_probes): Likewise.
3717         * elfread.c (elf_get_probes): Change return type to std::vector,
3718         store an std::vector in bfd_data.
3719         (probe_key_free): Update to std::vector.
3720         * stap-probe.c (handle_stap_probe): Change parameter to
3721         std::vector and update.
3722         (stap_get_probes): Likewise.
3723         * symfile-debug.c (debug_sym_get_probes): Change return type to
3724         std::vector and update.
3725
3726 2017-09-11  Tom Tromey  <tom@tromey.com>
3727
3728         * breakpoint.c (program_breakpoint_here_p): Update.
3729         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3730         from make_show_memory_breakpoints_cleanup.  Return a
3731         scoped_restore_tmpl<int>.
3732         (restore_show_memory_breakpoints): Remove.
3733         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3734         * mem-break.c (memory_validate_breakpoint): Update.
3735         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3736         (ia64_memory_remove_breakpoint): Update.
3737         (ia64_breakpoint_from_pc): Update.
3738         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3739         from make_show_memory_breakpoints_cleanup.
3740
3741 2017-09-11  Tom Tromey  <tom@tromey.com>
3742
3743         * d-namespace.c (d_lookup_symbol): Use std::string.
3744         (find_symbol_in_baseclass): Likewise.
3745
3746 2017-09-11  Tom Tromey  <tom@tromey.com>
3747
3748         * ctf.c (ctf_start): Use std::string.
3749
3750 2017-09-11  Tom Tromey  <tom@tromey.com>
3751
3752         * ada-lang.c (is_known_support_routine): Update.
3753         (ada_unhandled_exception_name_addr_from_raise): Update.
3754         * guile/scm-frame.c (gdbscm_frame_name): Update.
3755         * python/py-frame.c (frapy_name): Update.
3756         (frapy_function): Update.
3757         * stack.h (find_frame_funname): Update.
3758         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3759         (print_frame): Update.
3760
3761 2017-09-11  Tom Tromey  <tom@tromey.com>
3762
3763         * findcmd.c (put_bits): Take a gdb::byte_vector.
3764         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3765         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3766         cleanups.
3767         (find_command): Update.
3768
3769 2017-09-11  Tom Tromey  <tom@tromey.com>
3770
3771         * cli/cli-script.c (class scoped_restore_hook_in): New.
3772         (clear_hook_in_cleanup): Remove.
3773         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3774         scoped_restore_hook_in.
3775
3776 2017-09-11  Tom Tromey  <tom@tromey.com>
3777
3778         * cli/cli-script.c (restore_interp): Remove.
3779         (read_command_lines): Use scoped_restore_interp.
3780         * interps.c (scoped_restore_interp::set_temp): Rename from
3781         interp_set_temp.
3782         * interps.h (class scoped_restore_interp): New.
3783         (interp_set_temp): Remove.
3784
3785 2017-09-11  Tom Tromey  <tom@tromey.com>
3786
3787         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3788         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3789         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3790         scoped_restore.
3791         (mi_cmd_break_insert_1): Update.
3792         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3793         scoped_restore.
3794
3795 2017-09-11  Tom Tromey  <tom@tromey.com>
3796
3797         * demangle.c (demangle_command): Update.
3798         * breakpoint.c (disable_command): Update.
3799         (enable_command): Update.
3800         (find_location_by_number): Make "number" const.  Use
3801         get_number_trailer.
3802         * cli/cli-utils.c (extract_arg): Return std::string.
3803         * probe.c (parse_probe_linespec): Update.  Change types.
3804         (collect_probes): Take string arguments.
3805         (parse_probe_linespec): Likewise.
3806         (info_probes_for_ops): Update.
3807         (enable_probes_command): Update.
3808         (disable_probes_command): Update.
3809         * break-catch-sig.c (catch_signal_split_args): Update.
3810         * mi/mi-parse.c (mi_parse): Update.
3811
3812 2017-09-11  Tom Tromey  <tom@tromey.com>
3813
3814         * language.h (language_enum): Make argument const.
3815         * language.c (language_enum): Make argument const.
3816
3817 2017-09-11  Tom Tromey  <tom@tromey.com>
3818
3819         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3820         as function.
3821         (skip_to_space): Rename from skip_to_space_const.
3822         * common/common-utils.c (skip_to_space): New function.
3823         (skip_to_space): Rename from skip_to_space_const.
3824         * cli/cli-utils.h (get_number): Rename from get_number_const.
3825         (extract_arg): Rename from extract_arg_const.
3826         * cli/cli-utils.c (get_number): Rename from get_number_const.
3827         (extract_arg): Rename from extract_arg_const.
3828         (number_or_range_parser::get_number): Use ::get_number.
3829         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3830         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3831         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3832         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3833         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3834         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3835         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3836         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3837
3838 2017-09-11  Tom Tromey  <tom@tromey.com>
3839
3840         * python/python.c (do_start_initialization): Use
3841         py-event-types.def to initialize types.
3842         Define all object type structures.
3843         * python/python-internal.h: Don't declare event initialization
3844         functions.
3845         * python/py-threadevent.c (thread_event_object_type): Don't
3846         define.
3847         * python/py-stopevent.c (stop_event_object_type): Don't define.
3848         * python/py-signalevent.c (signal_event_object_type): Don't
3849         declare or define.
3850         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3851         (clear_objfiles_event_object_type): Don't declare or define.
3852         * python/py-infevents.c (inferior_call_pre_event_object_type)
3853         (inferior_call_post_event_object_type)
3854         (register_changed_event_object_type)
3855         (memory_changed_event_object_type): Don't declare or define.
3856         * python/py-inferior.c (new_thread_event_object_type)
3857         (new_inferior_event_object_type)
3858         (inferior_deleted_event_object_type): Don't declare or define.
3859         * python/py-exitedevent.c (exited_event_object_type): Don't
3860         declare or define.
3861         * python/py-evts.c (gdbpy_initialize_py_events): Use
3862         py-all-events.def.
3863         * python/py-events.h (thread_event_object_type): Don't declare.
3864         (events_object): Use py-all-events.def.
3865         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3866         py-event-types.def.
3867         * python/py-event-types.def: New file.
3868         * python/py-continueevent.c (create_continue_event_object): Don't
3869         declare or define.
3870         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3871         declare or define.
3872         * python/py-all-events.def: New file.
3873
3874 2017-09-11  Tom Tromey  <tom@tromey.com>
3875
3876         * python/py-threadevent.c (create_thread_event_object): Return
3877         gdbpy_ref.
3878         * python/py-stopevent.h (create_stop_event_object)
3879         (create_breakpoint_event_object, create_signal_event_object):
3880         Update.
3881         * python/py-stopevent.c (create_stop_event_object): Return
3882         gdbpy_ref.
3883         (emit_stop_event): Update.
3884         * python/py-signalevent.c (create_signal_event_object): Return
3885         gdbpy_ref.
3886         * python/py-infevents.c (create_inferior_call_event_object):
3887         Update.
3888         * python/py-event.h (create_event_object)
3889         (create_thread_event_object): Update.
3890         * python/py-event.c (create_event_object): Return gdbpy_ref.
3891         * python/py-continueevent.c: Return gdbpy_ref.
3892         * python/py-bpevent.c (create_breakpoint_event_object): Return
3893         gdbpy_ref.
3894
3895 2017-09-11  Tom Tromey  <tom@tromey.com>
3896
3897         PR python/15622:
3898         * NEWS: Add entry.
3899         * python/python.c (do_start_initialization): Initialize new event
3900         types.
3901         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3902         (gdbpy_initialize_inferior_deleted_event)
3903         (gdbpy_initialize_new_thread_event): Declare.
3904         * python/py-threadevent.c (create_thread_event_object): Add option
3905         "thread" parameter.
3906         * python/py-inferior.c (new_thread_event_object_type)
3907         (new_inferior_event_object_type)
3908         (inferior_deleted_event_object_type): Declare.
3909         (python_new_inferior, python_inferior_deleted): New functions.
3910         (add_thread_object): Emit new_thread event.
3911         (gdbpy_initialize_inferior): Attach new functions to corresponding
3912         observers.
3913         (new_thread, new_inferior, inferior_deleted): Define new event
3914         types.
3915         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3916         registries.
3917         * python/py-events.h (events_object) <new_inferior,
3918         inferior_deleted, new_thread>: New fields.
3919         * python/py-event.h (create_thread_event_breakpoint): Add optional
3920         "thread" parameter.
3921
3922 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3923
3924         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3925         check current_ui instead.
3926         (internal_vproblem): Likewise.
3927
3928 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3929
3930         * thread.c (print_thread_info_1): Remove unnecessary calls to
3931         uiout->is_mi_like_p.
3932
3933 2017-09-09  Tom Tromey  <tom@tromey.com>
3934
3935         * namespace.h (add_using_directive): Update.
3936         * namespace.c (add_using_directive): Change type of excludes to
3937         std::vector.
3938         * dwarf2read.c (read_import_statement): Use std::vector.
3939         (read_namespace): Update.
3940         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3941
3942 2017-09-09  Tom Tromey  <tom@tromey.com>
3943
3944         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3945
3946 2017-09-09  Tom Tromey  <tom@tromey.com>
3947
3948         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3949
3950 2017-09-09  Tom Tromey  <tom@tromey.com>
3951
3952         * stack.c (func_command): Use gdb::def_vector.
3953
3954 2017-09-09  Tom Tromey  <tom@tromey.com>
3955
3956         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3957         ui_out_emit_list, ui_out_emit_tuple.
3958         (mi_cmd_var_update): Likewise.
3959
3960 2017-09-09  Tom Tromey  <tom@tromey.com>
3961
3962         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3963         ui_out_redirect_pop.
3964         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3965         ui_out_redirect_pop.
3966         * utils.c (do_ui_out_redirect_pop)
3967         (make_cleanup_ui_out_redirect_pop): Remove.
3968         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3969         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3970         * ui-out.h (ui_out_redirect_pop): New class.
3971
3972 2017-09-09  Tom Tromey  <tom@tromey.com>
3973
3974         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3975         (list_available_thread_groups, mi_cmd_list_thread_groups)
3976         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3977         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3978         Likewise.
3979
3980 2017-09-09  Tom Tromey  <tom@tromey.com>
3981
3982         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3983         ui_out_emit_tuple.
3984
3985 2017-09-09  Tom Tromey  <tom@tromey.com>
3986
3987         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3988         * stack.c (print_frame): Use ui_out_emit_tuple.
3989         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3990         (info_spu_mailbox_command, info_spu_dma_command)
3991         (info_spu_proxydma_command): Likewise.
3992         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3993         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3994         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3995         ui_out_emit_tuple.
3996         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3997
3998 2017-09-09  Tom Tromey  <tom@tromey.com>
3999
4000         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4001         (class ui_out_emit_table): Update comment.
4002         * ui-out.c (do_cleanup_table_end)
4003         (make_cleanup_ui_out_table_begin_end): Remove.
4004         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4005         (info_spu_dma_cmdlist): Likewise.
4006         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4007         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4008         ui_out_emit_table.
4009
4010 2017-09-09  Tom Tromey  <tom@tromey.com>
4011
4012         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4013         ui_out_emit_list, gdb::optional.
4014
4015 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4016
4017         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4018         prototype.
4019         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4020         prototype.
4021         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4022         prototype.
4023         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4024         * ada-exp.y: Remove _initialize_ada_exp prototype.
4025         * ada-lang.c: Remove _initialize_ada_language prototype.
4026         * ada-tasks.c: Remove _initialize_tasks prototype.
4027         * addrmap.c: Remove _initialize_addrmap prototype.
4028         * agent.c: Remove _initialize_agent prototype.
4029         * aix-thread.c: Remove _initialize_aix_thread prototype.
4030         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4031         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4032         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4033         prototype.
4034         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4035         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4036         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4037         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4038         prototype.
4039         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4040         prototype.
4041         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4042         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4043         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4044         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4045         prototype.
4046         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4047         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4048         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4049         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4050         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4051         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4052         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4053         prototype.
4054         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4055         prototype.
4056         * annotate.c: Remove _initialize_annotate prototype.
4057         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4058         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4059         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4060         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4061         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4062         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4063         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4064         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4065         prototype.
4066         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4067         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4068         * auto-load.c: Remove _initialize_auto_load prototype.
4069         * auxv.c: Remove _initialize_auxv prototype.
4070         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4071         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4072         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4073         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4074         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4075         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4076         prototype.
4077         * break-catch-throw.c: Remove _initialize_break_catch_throw
4078         prototype.
4079         * breakpoint.c: Remove _initialize_breakpoint prototype.
4080         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4081         * btrace.c: Remove _initialize_btrace prototype.
4082         * charset.c: Remove _initialize_charset prototype.
4083         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4084         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4085         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4086         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4087         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4088         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4089         * coffread.c: Remove _initialize_coffread prototype.
4090         * compile/compile.c: Remove _initialize_compile prototype.
4091         * complaints.c: Remove _initialize_complaints prototype.
4092         * completer.c: Remove _initialize_completer prototype.
4093         * copying.awk: Remove _initialize_copying prototype.
4094         * copying.c: Regenerate.
4095         * core-regset.c: Remove _initialize_core_regset prototype.
4096         * corefile.c: Remove _initialize_core prototype.
4097         * corelow.c: Remove _initialize_corelow prototype.
4098         * cp-abi.c: Remove _initialize_cp_abi prototype.
4099         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4100         * cp-support.c: Remove _initialize_cp_support prototype.
4101         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4102         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4103         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4104         * ctf.c: Remove _initialize_ctf prototype.
4105         * d-lang.c: Remove _initialize_d_language prototype.
4106         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4107         prototype.
4108         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4109         * dbxread.c: Remove _initialize_dbxread prototype.
4110         * dcache.c: Remove _initialize_dcache prototype.
4111         * demangle.c: Remove _initialize_demangler prototype.
4112         * disasm-selftests.c: Remove _initialize_disasm_selftests
4113         prototype.
4114         * disasm.c: Remove _initialize_disasm prototype.
4115         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4116         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4117         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4118         prototype.
4119         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4120         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4121         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4122         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4123         * elfread.c: Remove _initialize_elfread prototype.
4124         * exec.c: Remove _initialize_exec prototype.
4125         * extension.c: Remove _initialize_extension prototype.
4126         * f-lang.c: Remove _initialize_f_language prototype.
4127         * f-valprint.c: Remove _initialize_f_valprint prototype.
4128         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4129         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4130         * filesystem.c: Remove _initialize_filesystem prototype.
4131         * findcmd.c: Remove _initialize_mem_search prototype.
4132         * fork-child.c: Remove _initialize_fork_child prototype.
4133         * frame-base.c: Remove _initialize_frame_base prototype.
4134         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4135         * frame.c: Remove _initialize_frame prototype.
4136         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4137         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4138         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4139         * gcore.c: Remove _initialize_gcore prototype.
4140         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4141         * gdbarch.c: Regenerate.
4142         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4143         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4144         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4145         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4146         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4147         * go-lang.c: Remove _initialize_go_language prototype.
4148         * go32-nat.c: Remove _initialize_go32_nat prototype.
4149         * guile/guile.c: Remove _initialize_guile prototype.
4150         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4151         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4152         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4153         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4154         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4155         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4156         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4157         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4158         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4159         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4160         prototype.
4161         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4162         prototype.
4163         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4164         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4165         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4166         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4167         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4168         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4169         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4170         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4171         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4172         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4173         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4174         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4175         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4176         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4177         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4178         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4179         prototype.
4180         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4181         prototype.
4182         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4183         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4184         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4185         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4186         * infcall.c: Remove _initialize_infcall prototype.
4187         * infcmd.c: Remove _initialize_infcmd prototype.
4188         * inferior.c: Remove _initialize_inferiors prototype.
4189         * inflow.c: Remove _initialize_inflow prototype.
4190         * infrun.c: Remove _initialize_infrun prototype.
4191         * interps.c: Remove _initialize_interpreter prototype.
4192         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4193         * jit.c: Remove _initialize_jit prototype.
4194         * language.c: Remove _initialize_language prototype.
4195         * linux-fork.c: Remove _initialize_linux_fork prototype.
4196         * linux-nat.c: Remove _initialize_linux_nat prototype.
4197         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4198         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4199         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4200         * m2-lang.c: Remove _initialize_m2_language prototype.
4201         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4202         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4203         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4204         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4205         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4206         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4207         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4208         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4209         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4210         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4211         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4212         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4213         * machoread.c: Remove _initialize_machoread prototype.
4214         * macrocmd.c: Remove _initialize_macrocmd prototype.
4215         * macroscope.c: Remove _initialize_macroscope prototype.
4216         * maint.c: Remove _initialize_maint_cmds prototype.
4217         * mdebugread.c: Remove _initialize_mdebugread prototype.
4218         * memattr.c: Remove _initialize_mem prototype.
4219         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4220         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4221         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4222         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4223         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4224         * microblaze-linux-tdep.c: Remove
4225         _initialize_microblaze_linux_tdep prototype.
4226         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4227         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4228         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4229         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4230         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4231         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4232         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4233         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4234         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4235         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4236         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4237         prototype.
4238         * mipsread.c: Remove _initialize_mipsread prototype.
4239         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4240         prototype.
4241         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4242         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4243         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4244         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4245         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4246         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4247         prototype.
4248         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4249         * nto-procfs.c: Remove _initialize_procfs prototype.
4250         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4251         * objc-lang.c: Remove _initialize_objc_language prototype.
4252         * objfiles.c: Remove _initialize_objfiles prototype.
4253         * observer.c: Remove observer_test_first_notification_function,
4254         observer_test_second_notification_function,
4255         observer_test_third_notification_function, and
4256         _initialize_observer prototypes.
4257         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4258         * osabi.c: Remove _initialize_gdb_osabi prototype.
4259         * osdata.c: Remove _initialize_osdata prototype.
4260         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4261         * parse.c: Remove _initialize_parse prototype.
4262         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4263         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4264         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4265         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4266         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4267         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4268         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4269         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4270         * printcmd.c: Remove _initialize_printcmd prototype.
4271         * probe.c: Remove _initialize_probe prototype.
4272         * proc-api.c: Remove _initialize_proc_api prototype.
4273         * proc-events.c: Remove _initialize_proc_events prototype.
4274         * proc-service.c: Remove _initialize_proc_service prototype.
4275         * procfs.c: Remove _initialize_procfs prototype.
4276         * psymtab.c: Remove _initialize_psymtab prototype.
4277         * python/python.c: Remove _initialize_python prototype.
4278         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4279         * record-btrace.c: Remove _initialize_record_btrace prototype.
4280         * record-full.c: Remove _initialize_record_full prototype.
4281         * record.c: Remove _initialize_record prototype.
4282         * regcache.c: Remove _initialize_regcache prototype.
4283         * reggroups.c: Remove _initialize_reggroup prototype.
4284         * remote-notif.c: Remove _initialize_notif prototype.
4285         * remote-sim.c: Remove _initialize_remote_sim prototype.
4286         * remote.c: Remove _initialize_remote prototype.
4287         * reverse.c: Remove _initialize_reverse prototype.
4288         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4289         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4290         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4291         prototype.
4292         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4293         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4294         * rust-exp.y: Remove _initialize_rust_exp prototype.
4295         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4296         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4297         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4298         * score-tdep.c: Remove _initialize_score_tdep prototype.
4299         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4300         prototype.
4301         * ser-go32.c: Remove _initialize_ser_dos prototype.
4302         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4303         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4304         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4305         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4306         * serial.c: Remove _initialize_serial prototype.
4307         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4308         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4309         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4310         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4311         * skip.c: Remove _initialize_step_skip prototype.
4312         * sol-thread.c: Remove _initialize_sol_thread prototype.
4313         * solib-aix.c: Remove _initialize_solib_aix prototype.
4314         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4315         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4316         * solib-frv.c: Remove _initialize_frv_solib prototype.
4317         * solib-spu.c: Remove _initialize_spu_solib prototype.
4318         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4319         * solib-target.c: Remove _initialize_solib_target prototype.
4320         * solib.c: Remove _initialize_solib prototype.
4321         * source.c: Remove _initialize_source prototype.
4322         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4323         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4324         prototype.
4325         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4326         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4327         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4328         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4329         prototype.
4330         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4331         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4332         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4333         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4334         prototype.
4335         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4336         prototype.
4337         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4338         prototype.
4339         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4340         prototype.
4341         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4342         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4343         prototype.
4344         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4345         prototype.
4346         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4347         prototype.
4348         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4349         prototype.
4350         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4351         prototype.
4352         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4353         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4354         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4355         * stabsread.c: Remove _initialize_stabsread prototype.
4356         * stack.c: Remove _initialize_stack prototype.
4357         * stap-probe.c: Remove _initialize_stap_probe prototype.
4358         * std-regs.c: Remove _initialize_frame_reg prototype.
4359         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4360         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4361         * symfile.c: Remove _initialize_symfile prototype.
4362         * symmisc.c: Remove _initialize_symmisc prototype.
4363         * symtab.c: Remove _initialize_symtab prototype.
4364         * target-dcache.c: Remove _initialize_target_dcache prototype.
4365         * target-descriptions.c: Remove _initialize_target_descriptions
4366         prototype.
4367         * thread.c: Remove _initialize_thread prototype.
4368         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4369         prototype.
4370         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4371         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4372         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4373         prototype.
4374         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4375         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4376         * tracefile.c: Remove _initialize_tracefile prototype.
4377         * tracepoint.c: Remove _initialize_tracepoint prototype.
4378         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4379         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4380         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4381         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4382         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4383         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4384         * tui/tui.c: Remove _initialize_tui prototype.
4385         * typeprint.c: Remove _initialize_typeprint prototype.
4386         * user-regs.c: Remove _initialize_user_regs prototype.
4387         * utils.c: Remove _initialize_utils prototype.
4388         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4389         * valarith.c: Remove _initialize_valarith prototype.
4390         * valops.c: Remove _initialize_valops prototype.
4391         * valprint.c: Remove _initialize_valprint prototype.
4392         * value.c: Remove _initialize_values prototype.
4393         * varobj.c: Remove _initialize_varobj prototype.
4394         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4395         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4396         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4397         * windows-nat.c: Remove _initialize_windows_nat,
4398         _initialize_check_for_gdb_ini, and _initialize_loadable
4399         prototypes.
4400         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4401         * xcoffread.c: Remove _initialize_xcoffread prototype.
4402         * xml-support.c: Remove _initialize_xml_support prototype.
4403         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4404         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4405         prototype.
4406         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4407         prototype.
4408         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4409
4410 2017-09-08  Keith Seitz  <keiths@redhat.com>
4411
4412         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4413         field.
4414
4415 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4416
4417         * f-valprint.c (f_val_print): Remove check for one byte
4418         sized integers. Remove printing of character type.
4419
4420 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4421             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4422             Bernhard Heckel  <bernhard.heckel@intel.com>
4423
4424         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4425         to maintain proper indentation when printing pointers/refs.
4426
4427 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4428
4429         GDB 8.0.1 released.
4430
4431 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4432
4433         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4434
4435 2017-09-05  Tom Tromey  <tom@tromey.com>
4436
4437         * parse.c (funcall_chain): Now a std::vector.
4438         (start_arglist, end_arglist): Simplify.
4439         (free_funcalls): Remove.
4440         (parse_exp_in_context_1): Remove cleanup.
4441
4442 2017-09-05  Tom Tromey  <tom@tromey.com>
4443
4444         * go-exp.y (go_parse): Don't create a cleanup.
4445
4446 2017-09-05  Tom Tromey  <tom@tromey.com>
4447
4448         * d-exp.y (PrimaryExpression): Use std::string.
4449         (d_parse): Don't create a cleanup.
4450
4451 2017-09-05  Tom Tromey  <tom@tromey.com>
4452
4453         * utils.c (do_clear_parser_state): Remove.
4454         (make_cleanup_clear_parser_state): Remove.
4455         * p-exp.y (pascal_parse): Use scoped_restore.
4456         * m2-exp.y (m2_parse): Use scoped_restore.
4457         * f-exp.y (f_parse): Use scoped_restore.
4458         * d-exp.y (d_parse): Use scoped_restore.
4459         * c-exp.y (c_parse): Use scoped_restore.
4460         * ada-exp.y (ada_parse): Use scoped_restore.
4461         * utils.h (make_cleanup_clear_parser_state): Remove.
4462
4463 2017-09-06  Keith Seitz  <keiths@redhat.com>
4464
4465         * dwarf2read.c (dw2_linkage_name_attr): New function.
4466         (dw2_linkage_name): New function.
4467         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4468         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4469         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4470
4471 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4472
4473         * config/djgpp/djconfig.sh: Correct shell portability issue.
4474
4475 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4476
4477         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4478
4479 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4480
4481         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4482         * NEWS: Mention new FreeBSD/mips native configuration.
4483         * configure.host: Add aarch64*-*-freebsd*.
4484         * configure.nat: Likewise.
4485         * aarch64-fbsd-nat.c: New file.
4486
4487 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4488
4489         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4490         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4491         * NEWS: Mention new FreeBSD/aarch64 target.
4492         * configure.tgt: Add aarch64*-*-freebsd*.
4493         * aarch64-fbsd-tdep.c: New file.
4494         * aarch64-fbsd-tdep.h: New file.
4495
4496 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4497
4498         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4499
4500 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4501
4502         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4503         of TLS symbols.
4504
4505 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4506
4507         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4508         call.
4509
4510 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4511
4512         * infrun.c (follow_exec): Call add_thread after
4513         target_find_description.
4514
4515 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4516
4517         * infrun.c (handle_inferior_event_1): When exec'ing, read
4518         stop_pc after follow_exec.
4519
4520 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4521
4522         * remote.c (process_g_packet): Update error message.
4523
4524 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4525
4526         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4527         targets.
4528
4529 2017-09-05  Pedro Alves  <palves@redhat.com>
4530
4531         * eval.c (eval_call, evaluate_funcall): New functions, factored
4532         out from ...
4533         (evaluate_subexp_standard): ... this.
4534
4535 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4536
4537         * amd64-tdep.c (amd64_target_description): Create target
4538         descriptions.
4539         (_initialize_amd64_tdep): Don't call functions
4540         initialize_tdesc_amd64_*.  Add self tests.
4541         * arch/amd64.c (amd64_create_target_description): Add parameter
4542         is_linux.  Call set_tdesc_osabi if is_linux is true.
4543         * arch/amd64.h (amd64_create_target_description): Update the
4544         declaration.
4545         * arch/i386.c (i386_create_target_description): Add parameter
4546         is_linux.  Call set_tdesc_osabi if is_linux is true.
4547         * arch/i386.h (i386_create_target_description): Update
4548         declaration.
4549         * configure.tgt: Add i386.o to gdb_target_obs.
4550         * features/Makefile (XMLTOC): Remove i386/*.xml.
4551         * features/i386/amd64-avx-avx512.c: Remove.
4552         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4553         * features/i386/amd64-avx-mpx.c: Remove.
4554         * features/i386/amd64-avx.c: Remove.
4555         * features/i386/amd64-mpx.c: Remove.
4556         * features/i386/amd64.c: Remove.
4557         * features/i386/i386-avx-avx512.c: Remove.
4558         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4559         * features/i386/i386-avx-mpx.c: Remove.
4560         * features/i386/i386-avx.c: Remove.
4561         * features/i386/i386-mmx.c: Remove.
4562         * features/i386/i386-mpx.c: Remove.
4563         * features/i386/i386.c: Remove.
4564         * i386-tdep.c: Don't include features/i386/i386*.c., include
4565         target-descriptions.h and arch/i386.h.
4566         (i386_target_description): Create target descriptions.
4567         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4568         functions.  Do self tests.
4569
4570 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4571
4572         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4573         * features/i386/amd64-avx-avx512-linux.c: Removed.
4574         * features/i386/amd64-avx-linux.c: Removed.
4575         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4576         * features/i386/amd64-avx-mpx-linux.c: Removed.
4577         * features/i386/amd64-linux.c: Removed.
4578         * features/i386/amd64-mpx-linux.c: Removed.
4579         * features/i386/x32-avx-avx512-linux.c: Removed.
4580         * features/i386/x32-avx-linux.c: Removed.
4581         * features/i386/x32-linux.c: Removed.
4582
4583 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4584
4585         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4586         features/i386/*.c.
4587         (amd64_linux_read_description): Call
4588         amd64_create_target_description.
4589         * arch/amd64.c: New file.
4590         * arch/amd64.h: New file.
4591         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4592         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4593
4594 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4595
4596         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4597         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4598         (amd64_linux_read_description): Create target descriptions.
4599         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4600         functions.  Add unit tests.
4601         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4602         x32-core.xml.
4603         * features/i386/64bit-avx.c: Generated.
4604         * features/i386/64bit-avx512.c: Generated.
4605         * features/i386/64bit-core.c: Generated.
4606         * features/i386/64bit-linux.c: Generated.
4607         * features/i386/64bit-mpx.c: Generated.
4608         * features/i386/64bit-pkeys.c: Generated.
4609         * features/i386/64bit-segments.c: Generated.
4610         * features/i386/64bit-sse.c: Generated.
4611         * features/i386/x32-core.c: Generated.
4612         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4613         c files for amd64-linux and x32-linux.
4614
4615 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4616
4617         * amd64-linux-tdep.c (amd64_linux_read_description): New
4618         function.
4619         (amd64_linux_core_read_description): Call
4620         amd64_linux_read_description.
4621         (amd64_linux_init_abi): Likewise.
4622         (amd64_x32_linux_init_abi): Likewise.
4623         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4624         * x86-linux-nat.c (x86_linux_read_description): Call
4625         amd64_linux_read_description.
4626
4627 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4628
4629         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4630         comments.
4631
4632 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4633
4634         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4635         * features/i386/i386-avx-avx512-linux.c: Remove.
4636         * features/i386/i386-avx-linux.c: Remove.
4637         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4638         * features/i386/i386-avx-mpx-linux.c: Remove.
4639         * features/i386/i386-linux.c: Remove.
4640         * features/i386/i386-mmx-linux.c: Remove.
4641         * features/i386/i386-mpx-linux.c: Remove.
4642
4643 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4644
4645         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4646         (SFILES): Add arch/i386.c.
4647         (HFILES_NO_SRCDIR): Add arch/i386.h.
4648         * arch/i386.c: New file.
4649         * arch/i386.h: New file.
4650         * arch/tdesc.h (allocate_target_description): Declare.
4651         (set_tdesc_architecture): Declare.
4652         (set_tdesc_osabi): Declare.
4653         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4654         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4655         include arch/i386.h.
4656         (i386_linux_read_description): Remove code and call
4657         i386_create_target_description.
4658         (set_tdesc_architecture): New function.
4659         (set_tdesc_osabi): New function.
4660         * target-descriptions.h (allocate_target_description): Remove.
4661
4662 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4663
4664         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4665         * target-descriptions.c (tdesc_create_feature): Likewise, and
4666         adjust code.
4667         * features/i386/32bit-avx.c: Re-generated.
4668         * features/i386/32bit-avx512.c: Re-generated.
4669         * features/i386/32bit-core.c: Re-generated.
4670         * features/i386/32bit-linux.c: Re-generated.
4671         * features/i386/32bit-mpx.c: Re-generated.
4672         * features/i386/32bit-pkeys.c: Re-generated.
4673         * features/i386/32bit-sse.c: Re-generated.
4674
4675 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4676
4677         * regformats/regdef.h (struct reg): Override operator == and !=.
4678
4679 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4680
4681         * arch/tdesc.h: New file.
4682         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4683         * target-descriptions.c: Update comments.
4684         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4685         declarations.
4686         * features/i386/32bit-avx.c: Re-generated.
4687         * features/i386/32bit-avx512.c: Re-generated.
4688         * features/i386/32bit-core.c: Re-generated.
4689         * features/i386/32bit-linux.c: Re-generated.
4690         * features/i386/32bit-mpx.c: Re-generated.
4691         * features/i386/32bit-pkeys.c: Re-generated.
4692         * features/i386/32bit-sse.c: Re-generated.
4693
4694 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4695
4696         * regformats/regdat.sh: Update generated code.
4697
4698 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4699
4700         * regformats/regdat.sh: Adjust code order.
4701
4702 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4703
4704         * expprint.c (dump_subexp_body_standard): Use constant format
4705         string in fprintf_filtered call.
4706
4707 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4708
4709         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4710         NetBSD/i386.
4711         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4712
4713 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4714
4715         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4716
4717 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4718
4719         * bsd-kvm.o: Define _KMEMUSER.
4720         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4721         * configure: Regenerate.
4722
4723 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4724
4725         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4726         * i386-fbsd-nat.c: Likewise.
4727
4728 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4729
4730         * unittests/array-view-selftests.c: Add include of <array>.
4731
4732 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4733
4734         * spu-tdep.c (flush_ea_cache): Add missing argument to
4735         call_function_by_hand.
4736
4737 2017-09-04  Pedro Alves  <palves@redhat.com>
4738
4739         * NEWS (Safer support for debugging with no debug info): New.
4740
4741 2017-09-04  Pedro Alves  <palves@redhat.com>
4742
4743         * c-exp.y (function_method, function_method_void): Add current
4744         instance flags to TYPE_INSTANCE.
4745         * dwarf2read.c (check_modifier): New.
4746         (compute_delayed_physnames): Assert that only C++ adds delayed
4747         physnames.  Mark fn_fields as const/volatile depending on
4748         physname.
4749         * eval.c (make_params): New type_instance_flags parameter.  Use
4750         it as the new type's instance flags.
4751         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4752         flags element and pass it to make_params.
4753         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4754         instance flags element.
4755         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4756         * gdbtypes.h: Include "enum-flags.h".
4757         (type_instance_flags): New enum-flags type.
4758         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4759         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4760         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4761         (follow_type_instance_flags): New function.
4762         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4763         * parser-defs.h (follow_type_instance_flags): Declare.
4764         * valops.c (value_struct_elt_for_reference): const/volatile must
4765         match too.
4766
4767 2017-09-04  Pedro Alves  <palves@redhat.com>
4768
4769         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4770         function/method scopes; lookup the nested name as a function local
4771         static variable.
4772
4773 2017-09-04  Pedro Alves  <palves@redhat.com>
4774
4775         (%type <voidval>): Add function_method.
4776         * c-exp.y (exp): New production for calls with no arguments.
4777         (function_method, function_method_void_or_typelist): New
4778         productions.
4779         (exp): New production for "method()::static_var".
4780         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4781         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4782         Handle OP_FUNC_STATIC_VAR.
4783         * parse.c (operator_length_standard):
4784         Handle OP_FUNC_STATIC_VAR.
4785
4786 2017-09-04  Pedro Alves  <palves@redhat.com>
4787
4788         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4789         handling.
4790         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4791         Ditto.
4792         * parse.c (operator_length_standard, operator_check_standard):
4793         Ditto.
4794         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4795
4796 2017-09-04  Pedro Alves  <palves@redhat.com>
4797
4798         * ax-gdb.c: Include "typeprint.h".
4799         (gen_expr_for_cast): New function.
4800         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4801         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4802         type is unknown.
4803         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4804         nodebug_data_symbol.
4805         * eval.c: Include "typeprint.h".
4806         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4807         Error out if symbol has unknown type.
4808         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4809         evaluate_subexp_for_cast.
4810         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4811         OP_VAR_MSYM_VALUE.
4812         (evaluate_subexp_for_cast): New function.
4813         * gdbtypes.c (init_nodebug_var_type): New function.
4814         (objfile_type): Use it to initialize types of variables with no
4815         debug info.
4816         * typeprint.c (error_unknown_type): New.
4817         * typeprint.h (error_unknown_type): New declaration.
4818         * compile/compile-c-types.c (convert_type_basic): Handle
4819         TYPE_CODE_ERROR; warn and fallback to int for variables with
4820         unknown type.
4821
4822 2017-09-04  Pedro Alves  <palves@redhat.com>
4823
4824         * eval.c (evaluate_var_value): New function, factored out from ...
4825         (evaluate_subexp_standard): ... here.
4826
4827 2017-09-04  Pedro Alves  <palves@redhat.com>
4828
4829         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4830         Remove useless assignments to 'op'.
4831
4832 2017-09-04  Pedro Alves  <palves@redhat.com>
4833
4834         * eval.c (eval_skip_value): New function.
4835         (evaluate_subexp_standard): Use it.
4836
4837 2017-09-04  Pedro Alves  <palves@redhat.com>
4838
4839         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4840         function name from symbol/minsym and pass it to
4841         error_call_unknown_return_type.
4842
4843 2017-09-04  Pedro Alves  <palves@redhat.com>
4844
4845         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4846         * ax-gdb.c (gen_msym_var_ref): New function.
4847         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4848         * eval.c (evaluate_var_msym_value): New function.
4849         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4850         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4851         to call_function_by_hand.
4852         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4853         Handle OP_VAR_MSYM_VALUE.
4854         (union exp_element) <msymbol>: New field.
4855         * minsyms.h (struct type): Forward declare.
4856         (find_minsym_type_and_address): Declare.
4857         * parse.c (write_exp_elt_msym): New function.
4858         (write_exp_msymbol): Delete, refactored as ...
4859         (find_minsym_type_and_address): ... this new function.
4860         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4861         (operator_length_standard, operator_check_standard): Handle
4862         OP_VAR_MSYM_VALUE.
4863         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4864
4865 2017-09-04  Pedro Alves  <palves@redhat.com>
4866
4867         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4868         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4869         unknown.
4870         * ada-typeprint.c (print_func_type): Handle functions with unknown
4871         return type.
4872         * c-typeprint.c (c_type_print_base): Handle functions and methods
4873         with unknown return type.
4874         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4875         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4876         * compile/compile-c-types.c: Include "objfiles.h".
4877         (convert_func): For functions with unknown return type, warn and
4878         default to int.
4879         * compile/compile-object-run.c (compile_object_run): Adjust call
4880         to call_function_by_hand_dummy.
4881         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4882         call_function_by_hand.
4883         * eval.c (evaluate_subexp_standard): Adjust calls to
4884         call_function_by_hand.  Handle functions and methods with unknown
4885         return type.  Pass expect_type to call_function_by_hand.
4886         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4887         return type.
4888         * gcore.c (call_target_sbrk): Adjust call to
4889         call_function_by_hand.
4890         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4891         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4892         an integer address type instead of nodebug.
4893         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4894         call_function_by_hand.
4895         * infcall.c (error_call_unknown_return_type): New function.
4896         (call_function_by_hand): New "default_return_type" parameter.
4897         Pass it down.
4898         (call_function_by_hand_dummy): New "default_return_type"
4899         parameter.  Use it instead of defaulting to int.  If there's no
4900         default and the return type is unknown, throw an error.  If
4901         there's a default return type, and the called function has no
4902         debug info, then assume the function is prototyped.
4903         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4904         New "default_return_type" parameter.
4905         (error_call_unknown_return_type): New declaration.
4906         * linux-fork.c (call_lseek): Cast return type of lseek.
4907         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4908         call_function_by_hand.
4909         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4910         calls to call_function_by_hand.
4911         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4912         return type.
4913         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4914         (value_nsstring, print_object_command): Adjust calls to
4915         call_function_by_hand.
4916         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4917         functions with unknown return type.
4918         (pascal_type_print_func_varspec_suffix): New function.
4919         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4920         TYPE_CODE_METHOD>: Use it.
4921         * python/py-value.c (valpy_call): Adjust call to
4922         call_function_by_hand.
4923         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4924         call_function_by_hand.
4925         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4926         call_function_by_hand.
4927         * valops.c (value_allocate_space_in_inferior): Adjust call to
4928         call_function_by_hand.
4929         * typeprint.c (type_print_unknown_return_type): New function.
4930         * typeprint.h (type_print_unknown_return_type): New declaration.
4931
4932 2017-09-04  Pedro Alves  <palves@redhat.com>
4933
4934         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4935         types with more than one parameter as prototyped.
4936
4937 2017-09-04  Pedro Alves  <palves@redhat.com>
4938
4939         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4940         (disassemble_command): Use gdb_disassembly_flags instead of bare
4941         int.
4942         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4943         (dump_insns, do_mixed_source_and_assembly_deprecated)
4944         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4945         Use gdb_disassembly_flags instead of bare int.
4946         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4947         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4948         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4949         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4950         (enum gdb_disassembly_flag): ... values of this new enumeration.
4951         (gdb_disassembly_flags): Define.
4952         (gdb_disassembly)
4953         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4954         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4955         gdb_disassembly_flags instead of bare int.
4956         * record-btrace.c (btrace_insn_history)
4957         (record_btrace_insn_history, record_btrace_insn_history_range)
4958         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4959         instead of bare int.
4960         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4961         Use gdb_disassembly_flags instead of bare int.
4962         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4963         Define.
4964         * target-delegates.c: Regenerate.
4965         * target.c (target_insn_history, target_insn_history_from)
4966         (target_insn_history_range): Use gdb_disassembly_flags instead of
4967         bare int.
4968         * target.h: Include "disasm.h".
4969         (struct target_ops) <to_insn_history, to_insn_history_from,
4970         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4971         int.
4972         (target_insn_history, target_insn_history_from)
4973         (target_insn_history_range): Use gdb_disassembly_flags instead of
4974         bare int.
4975
4976 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4977
4978         * cli/cli-script.c (build_command_line): For if/while commands,
4979         check whether args is empty.
4980
4981 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4982
4983         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4984         (enum command_control_type): Likewise.
4985         (struct command_line): Likewise.
4986         (free_command_lines): Likewise.
4987         (struct command_lines_deleter): Likewise.
4988         (command_line_up): Likewise.
4989         (read_command_lines): Likewise.
4990         (read_command_lines_1): Likewise.
4991         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4992         (enum command_control_type): Likewise.
4993         (struct command_line): Likewise.
4994         (free_command_lines): Likewise.
4995         (struct command_lines_deleter): Likewise.
4996         (command_line_up): Likewise.
4997         (read_command_lines): Likewise.
4998         (read_command_lines_1): Likewise.
4999         * breakpoint.h: Include cli/cli-script.h.
5000         * extension-priv.h: Likewise.
5001         * gdbcmd.h: Likewise.
5002
5003 2017-09-04  Pedro Alves  <palves@redhat.com>
5004
5005         * ada-lang.c (is_known_support_routine): Move sal declaration to
5006         where it is initialized.
5007         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5008         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5009         (clear_command, update_static_tracepoint): Remove init_sal
5010         references.  Move declarations closer to initializations.
5011         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5012         initializations.
5013         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5014         references.  Move sal declarations closer to initializations.
5015         * frame.c (find_frame_sal): Return a symtab_and_line via function
5016         return instead of output parameter.  Remove init_sal references.
5017         * frame.h (find_frame_sal): Return a symtab_and_line via function
5018         return instead of output parameter.
5019         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5020         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5021         instead of memset.
5022         (gdbscm_find_pc_line): Remove init_sal reference.
5023         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5024         references.  Move declarations closer to initializations.
5025         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5026         initializations.
5027         (finish_backward): Remove init_sal references.  Move declarations
5028         closer to initializations.
5029         * infrun.c (process_event_stop_test, handle_step_into_function)
5030         (insert_hp_step_resume_breakpoint_at_frame)
5031         (insert_step_resume_breakpoint_at_caller): Likewise.
5032         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5033         (symbol_to_sal): Likewise.
5034         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5035         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5036         to its initialization.
5037         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5038         init_sal references.  Move declarations closer to initializations.
5039         * source.c (get_current_source_symtab_and_line): Remove brace
5040         initialization.
5041         (set_current_source_symtab_and_line): Now takes the sal by const
5042         reference.  Remove brace initialization.
5043         (line_info): Remove init_sal reference.
5044         * source.h (set_current_source_symtab_and_line): Now takes a
5045         symtab_and_line via const reference.
5046         * stack.c (set_current_sal_from_frame): Adjust.
5047         (print_frame_info): Adjust.
5048         (get_last_displayed_sal): Return the sal via function return
5049         instead of via output parameter.  Simplify.
5050         (frame_info): Adjust.
5051         * stack.h (get_last_displayed_sal): Return the sal via function
5052         return instead of via output parameter.
5053         * symtab.c (init_sal): Delete.
5054         (find_pc_sect_line): Remove init_sal references.  Move
5055         declarations closer to initializations.
5056         (find_function_start_sal): Remove init_sal references.  Move
5057         declarations closer to initializations.
5058         * symtab.h (struct symtab_and_line): In-class initialize all
5059         fields.
5060         * tracepoint.c (set_traceframe_context)
5061         (print_one_static_tracepoint_marker): Remove init_sal references.
5062         Move declarations closer to initializations.
5063         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5064         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5065         declarations closer to initializations.
5066         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5067         init_sal references.  Adjust.
5068
5069 2017-09-04  Pedro Alves  <palves@redhat.com>
5070
5071         * ax-gdb.c (agent_command_1): Use range-for.
5072         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5073         * breakpoint.c: Include "common/array-view.h".
5074         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5075         parameter from struct symtabs_and_lines to
5076         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5077         (breakpoint_sals_to_pc): Change sals parameter from struct
5078         symtabs_and_lines to std::vector reference.
5079         (check_fast_tracepoint_sals): Change sals parameter from struct
5080         symtabs_and_lines to std::array_view.  Use range-for.
5081         (decode_static_tracepoint_spec): Return a std::vector instead of
5082         symtabs_and_lines.  Update.
5083         (create_breakpoint): Update.
5084         (break_range_command, until_break_command, clear_command): Update.
5085         (base_breakpoint_decode_location, bkpt_decode_location)
5086         (bkpt_probe_create_sals_from_location)
5087         (bkpt_probe_decode_location, tracepoint_decode_location)
5088         (tracepoint_probe_decode_location)
5089         (strace_marker_create_sals_from_location): Return a std::vector
5090         instead of symtabs_and_lines.
5091         (strace_marker_create_breakpoints_sal): Update.
5092         (strace_marker_decode_location): Return a std::vector instead of
5093         symtabs_and_lines.  Update.
5094         (update_breakpoint_locations): Change struct symtabs_and_lines
5095         parameters to gdb::array_view.  Adjust.
5096         (location_to_sals): Return a std::vector instead of
5097         symtabs_and_lines.  Update.
5098         (breakpoint_re_set_default): Use std::vector instead of struct
5099         symtabs_and_lines.
5100         (decode_location_default): Return a std::vector instead of
5101         symtabs_and_lines.  Update.
5102         * breakpoint.h: Include "common/array-view.h".
5103         (struct breakpoint_ops) <decode_location>: Now returns a
5104         std::vector instead of returning a symtabs_and_lines via output
5105         parameter.
5106         (update_breakpoint_locations): Change sals parameters to use
5107         gdb::array_view.
5108         * cli/cli-cmds.c (edit_command, list_command): Update to use
5109         std::vector and gdb::array_view.
5110         (ambiguous_line_spec): Adjust to use gdb::array_view and
5111         range-for.
5112         (compare_symtabs): Rename to ...
5113         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5114         const reference and adjust.
5115         (filter_sals): Rewrite using std::vector and standard algorithms.
5116         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5117         (jump_command): Update to use std::vector.
5118         * linespec.c (struct linespec_state) <canonical_names>: Update
5119         comment.
5120         (add_sal_to_sals_basic): Delete.
5121         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5122         (decode_line_2, create_sals_line_offset)
5123         (convert_address_location_to_sals, convert_linespec_to_sals)
5124         (convert_explicit_location_to_sals, parse_linespec)
5125         (event_location_to_sals, decode_line_full, decode_line_1)
5126         (decode_line_with_current_source)
5127         (decode_line_with_last_displayed, decode_objc)
5128         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5129         (linespec_result::~linespec_result): Adjust to use std::vector
5130         instead of symtabs_and_lines.
5131         * linespec.h (linespec_sals::sals): Now a std::vector.
5132         (struct linespec_result): Use std::vector, bool, and in-class
5133         initialization.
5134         (decode_line_1, decode_line_with_current_source)
5135         (decode_line_with_last_displayed): Return std::vector.
5136         * macrocmd.c (info_macros_command): Use std::vector.
5137         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5138         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5139         std::vector.
5140         * probe.h (parse_probes): Return a std::vector.
5141         * python/python.c (gdbpy_decode_line): Use std::vector and
5142         gdb::array_view.
5143         * source.c (select_source_symtab, line_info): Use std::vector.
5144         * stack.c (func_command): Use std::vector.
5145         * symtab.h (struct symtabs_and_lines): Delete.
5146         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5147
5148 2017-09-04  Pedro Alves  <palves@redhat.com>
5149
5150         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5151         unittests/array-view-selftests.c.
5152         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5153         * common/array-view.h: New file.
5154         * unittests/array-view-selftests.c: New file.
5155
5156 2017-09-04  Pedro Alves  <palves@redhat.com>
5157
5158         * cli/cli-cmds.c (edit_command): Pass message to
5159         ambiguous_line_spec.
5160         (list_command): Pass message to ambiguous_line_spec.  Say
5161         "first"/"last" instead of "start" and "end" to be consistent with
5162         the manual.
5163         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5164         them to print formatted message.
5165
5166 2017-09-04  Pedro Alves  <palves@redhat.com>
5167
5168         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5169         ftrace_update_insns by reference instead of pointer.
5170
5171 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5172
5173         * i386-go32-tdep.c: Include x86-xstate.h.
5174         (i386_go32_init_abi): Call i386_target_description.
5175         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5176         if xcr0 is X86_XSTATE_X87_MASK.
5177         * i386-tdep.h (tdesc_i386): Remove the declaration.
5178         (tdesc_i386_mmx): Likewise.
5179
5180 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5181
5182         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5183         X86_XSTATE_SSE_MASK instead of 0.
5184
5185 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5186
5187         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5188         i386_target_description.
5189         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5190         i386_target_description.
5191         * i386-tdep.c (i386_gdbarch_init): Likewise.
5192
5193 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5194
5195         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5196         (x86_darwin_init_abi_64): Call amd64_target_description.
5197         * amd64-dicos-tdep.c: Likewise.
5198         * amd64-fbsd-nat.c: Likewise.
5199         * amd64-fbsd-tdep.c: Likewise.
5200         * amd64-nbsd-tdep.c: Likewise.
5201         * amd64-obsd-tdep.c: Likewise.
5202         * amd64-sol2-tdep.c: Likewise.
5203         * amd64-windows-tdep.c: Likewise.
5204         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5205
5206 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5207
5208         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5209         (btrace_function) <insn>: Change type to use std::vector.
5210         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5211         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5212         ftrace_update_insns, ftrace_compute_global_level_offset,
5213         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5214         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5215         change to std::vector.
5216         (ftrace_update_insns): Adjust to change to std::vector, change
5217         type of INSN parameter.
5218         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5219         * record-btrace.c (btrace_call_history_insn_range,
5220         btrace_compute_src_line_range,
5221         record_btrace_frame_prev_register): Adjust to change to
5222         std::vector.
5223         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5224         to change to std::vector.
5225
5226 2017-09-03  Tom Tromey  <tom@tromey.com>
5227
5228         * corefile.c (reopen_exec_file): Use std::string.
5229
5230 2017-09-03  Tom Tromey  <tom@tromey.com>
5231
5232         * compile/compile.c (compile_register_name_mangled): Return
5233         std::string.
5234         * compile/compile-loc2c.c (pushf_register_address): Update.
5235         (pushf_register): Update.
5236         * compile/compile-c-types.c (convert_array): Update.
5237         * compile/compile-c-symbols.c (generate_vla_size): Update.
5238         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5239         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5240         (convert_one_symbol): Update.
5241         (generate_c_for_for_one_variable): Update.
5242         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5243         std::string.
5244         (generate_register_struct): Update.
5245         * compile/compile-internal.h (c_get_range_decl_name): Return a
5246         std::string.
5247         (compile_register_name_mangled): Return std::string.
5248
5249 2017-09-03  Tom Tromey  <tom@tromey.com>
5250
5251         * utils.c (perror_string): Return a std::string.
5252         (throw_perror_with_name, perror_warning_with_name): Update.
5253
5254 2017-09-03  Tom Tromey  <tom@tromey.com>
5255
5256         * demangle.c (demangle_command): Use std::string,
5257         unique_xmalloc_ptr.
5258
5259 2017-09-03  Tom Tromey  <tom@tromey.com>
5260
5261         * cli/cli-setshow.c (do_set_command): Use std::string.
5262
5263 2017-09-03  Tom Tromey  <tom@tromey.com>
5264
5265         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5266
5267 2017-09-03  Tom Tromey  <tom@tromey.com>
5268
5269         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5270
5271 2017-09-03  Tom Tromey  <tom@tromey.com>
5272
5273         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5274         gdb::unique_xmalloc_ptr.
5275
5276 2017-09-03  Tom Tromey  <tom@tromey.com>
5277
5278         * thread.c (print_thread_info_1): Use string_printf.
5279         (thread_apply_command, thread_apply_all_command): Use
5280         std::string.
5281
5282 2017-09-03  Tom Tromey  <tom@tromey.com>
5283
5284         * valprint.c (val_print_string): Update.
5285         * gdbcore.h (memory_error_message): Return std::string.
5286         * corefile.c (memory_error_message): Return std::string.
5287         (memory_error): Update.
5288         * breakpoint.c (insert_bp_location): Update.
5289
5290 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5291
5292         * target/waitstatus.h (target_waitstatus_to_string): Change
5293         return type to std::string.
5294         * target/waitstatus.c (target_waitstatus_to_string): Return
5295         std::string.
5296         * target.h (target_waitstatus_to_string): Remove declaration.
5297         * infrun.c (resume, clear_proceed_status_thread,
5298         print_target_wait_results, do_target_wait, save_waitstatus,
5299         stop_all_threads): Adjust.
5300         * record-btrace.c (record_btrace_wait): Adjust.
5301         * target-debug.h
5302         (target_debug_print_struct_target_waitstatus_p): Adjust.
5303
5304 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5305
5306         PR gdb/22046
5307         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5308         detection.
5309
5310 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5311
5312         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5313         for setting/unsetting environment variables on the remote target.
5314         (New remote packets): Add entries for QEnvironmentHexEncoded,
5315         QEnvironmentUnset and QEnvironmentReset.
5316         * common/environ.c (gdb_environ::operator=): Extend method to
5317         handle m_user_set_env_list and m_user_unset_env_list.
5318         (gdb_environ::clear): Likewise.
5319         (match_var_in_string): Change type of first parameter from 'char
5320         *' to 'const char *'.
5321         (gdb_environ::set): Extend method to handle
5322         m_user_set_env_list and m_user_unset_env_list.
5323         (gdb_environ::unset): Likewise.
5324         (gdb_environ::clear_user_set_env): New method.
5325         (gdb_environ::user_set_envp): Likewise.
5326         (gdb_environ::user_unset_envp): Likewise.
5327         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5328         m_user_unset_env_list on move constructor/assignment.
5329         (unset): Add new default parameter 'update_unset_list = true'.
5330         (clear_user_set_env): New method.
5331         (user_set_envp): Likewise.
5332         (user_unset_envp): Likewise.
5333         (m_user_set_env_list): New std::set.
5334         (m_user_unset_env_list): Likewise.
5335         * common/rsp-low.c (hex2str): New function.
5336         (bin2hex): New overload for bin2hex function.
5337         * common/rsp-low.c (hex2str): New prototype.
5338         (str2hex): New overload prototype.
5339         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5340         QEnvironmentUnset and QEnvironmentReset.
5341         (remote_protocol_features): Add QEnvironmentHexEncoded,
5342         QEnvironmentUnset and QEnvironmentReset packets.
5343         (send_environment_packet): New function.
5344         (extended_remote_environment_support): Likewise.
5345         (extended_remote_create_inferior): Call
5346         extended_remote_environment_support.
5347         (_initialize_remote): Add QEnvironmentHexEncoded,
5348         QEnvironmentUnset and QEnvironmentReset packet configs.
5349         * unittests/environ-selftests.c (gdb_selftest_env_var):
5350         New variable.
5351         (test_vector_initialization): New function.
5352         (test_init_from_host_environ): Likewise.
5353         (test_reinit_from_host_environ): Likewise.
5354         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5355         Likewise.
5356         (test_unset_set_empty_vector): Likewise.
5357         (test_vector_clear): Likewise.
5358         (test_std_move): Likewise.
5359         (test_move_constructor):
5360         (test_self_move): Likewise.
5361         (test_set_unset_reset): Likewise.
5362         (run_tests): Rewrite in terms of the functions above.
5363
5364 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5365
5366         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5367         (adi_available): Use a temp variable of type CORE_ADDR as argument
5368         3 when calling target_auxv_search.
5369         (adi_normalize_address): Use masks and xor operators to calculate
5370         normalized address.
5371         (adi_read_versions, adi_write_versions, adi_print_versions)
5372         (do_examine, do_assign): Use paddress.
5373
5374 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5375
5376         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5377         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5378         out of loop and add supply of FIR.
5379         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5380         add collect of FIR.
5381
5382 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5383
5384         PR gdb/21827
5385         * cli/cli-script.c (define_command): Don't convert command name
5386         to lower case.
5387
5388 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5389
5390         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5391         Update all callers accordingly. Remove all code blocks handling
5392         the case where DISPP is not NULL.
5393
5394 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5395
5396         PR symtab/22003
5397         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5398         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5399         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5400
5401 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5402
5403         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5404         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5405         (read_comp_units_from_section): New parameter abbrev_section, use
5406         read_and_check_comp_unit_head, allocate signatured_type if needed.
5407         (create_all_comp_units): Update read_comp_units_from_section caller.
5408
5409 2017-08-23  Pedro Alves  <palves@redhat.com>
5410
5411         PR remote/21852
5412         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5413         to null_ptid and switch to thread without reading the registers
5414         after adding the inferior.
5415
5416 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5417
5418         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5419         compile-gcc.
5420         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5421         (compile_to_object): Implement compile_gcc.
5422         (_initialize_compile): Install "set compile-gcc".  Initialize
5423         compile_gcc.
5424
5425 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5426
5427         * compile/compile.c (compile_to_object): Conditionally call
5428         set_verbose.  Conditionally call compile or compile_v0.
5429
5430 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5431
5432         * sparc64-tdep.h: (adi_normalize_address): New export.
5433         * sparc-nat.h: (open_adi_tag_fd): New export.
5434         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5435         * sparc64-linux-tdep.c:
5436         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5437         (sparc64_linux_handle_segmentation_fault): New function.
5438         (sparc64_linux_init_abi): Register
5439         sparc64_linux_handle_segmentation_fault
5440         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5441         (sparc64_addr_bits_remove): New function.
5442         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5443         (MAX_PROC_NAME_SIZE): New macro.
5444         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5445         (sparc64adilist): New variable.
5446         (adi_proc_list): New variable.
5447         (find_adi_info): New function.
5448         (add_adi_info): New function.
5449         (get_adi_info_proc): New function.
5450         (get_adi_info): New function.
5451         (info_adi_command): New function.
5452         (read_maps_entry): New function.
5453         (adi_available): New function.
5454         (adi_normalize_address): New function.
5455         (adi_align_address): New function.
5456         (adi_convert_byte_count): New function.
5457         (adi_tag_fd): New function.
5458         (adi_is_addr_mapped): New function.
5459         (adi_read_versions): New function.
5460         (adi_write_versions): New function.
5461         (adi_print_versions): New function.
5462         (do_examine): New function.
5463         (do_assign): New function.
5464         (adi_examine_command): New function.
5465         (adi_assign_command): New function.
5466         (_initialize_sparc64_adi_tdep): New function.
5467
5468 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5469
5470         * breakpoint.c (breakpoints_info): Rename to ...
5471         (info_breakpoints_command): ... this.
5472         (watchpoints_info): Rename to ...
5473         (info_watchpoints_command): ... this.
5474         (tracepoints_info): Rename to ...
5475         (info_tracepoints_command): ... this.
5476         (_initialize_breakpoint): Adjust.
5477         * dcache.c (dcache_info): Rename to ...
5478         (info_display_command): ... this.
5479         (_initialize_dcache): Adjust.
5480         * frame.h (args_info): Rename to ...
5481         (info_args_command): ... this.
5482         (locals_info): Rename to ...
5483         (info_locals_command): ... this.
5484         * infcmd.c (nofp_registers_info): Rename to ...
5485         (info_registers_command): ... this.
5486         (float_info): Rename to ...
5487         (info_float_command): ... this.
5488         (program_info): Rename to ...
5489         (info_program_command): ... this.
5490         (all_registers_info): Rename to ...
5491         (info_all_registers_command): ... this.
5492         (vector_info): Rename to ...
5493         (info_vector_command): ... this.
5494         (float_info): Rename to ...
5495         (info_float_command): ... this.
5496         (_initialize_infcmd): Adjust.
5497         * inferior.h (term_info): Rename to ...
5498         (info_terminal_command): ... this.
5499         * inflow.c (term_info): Rename to ...
5500         (info_terminal_command): ... this.
5501         (_initialize_inflow): Adjust.
5502         * infrun.c (signals_info): Rename to ...
5503         (info_signals_command): ... this.
5504         (_initialize_infrun): Adjust.
5505         * objc-lang.c (classes_info): Rename to ...
5506         (info_classes_command): ... this.
5507         (selectors_info): Rename to ...
5508         (info_selectors_command): ... this.
5509         (_initialize_objc_language): Adjust.
5510         * printcmd.c (sym_info): Rename to ...
5511         (info_symbol_command): ... this.
5512         (address_info): Rename to ...
5513         (info_address_command): ... this.
5514         (display_info): Rename to ...
5515         (info_display_command): ... this.
5516         (_initialize_printcmd): Adjust.
5517         * reverse.c (bookmarks_info): Rename to ...
5518         (info_breakpoints_command): ... this.
5519         (_initialize_reverse): Adjust.
5520         * ser-go32.c (dos_info): Rename to ...
5521         (info_serial_command): ... this.
5522         (_initialize_ser_dos): Adjust.
5523         * skip.c (skip_info): Rename to ...
5524         (info_skip_command): ... this.
5525         (_initialize_step_skip): Adjust.
5526         * source.c (line_info): Rename to ...
5527         (info_line_command): ... this.
5528         (source_info): Rename to ...
5529         (info_source_command)
5530         * stack.c (frame_info): Rename to ...
5531         (info_frame_command): ... this.
5532         (locals_info): Rename to ...
5533         (info_locals_command): ... this.
5534         (args_info): Rename to ...
5535         (info_args_command): ... this.
5536         (_initialize_stack): Adjust.
5537         * symtab.c (sources_info): Rename to ...
5538         (info_sources_command): ... this.
5539         (variables_info): Rename to ...
5540         (info_variables_command): ... this.
5541         (functions_info): Rename to ...
5542         (info_functions_command): ... this.
5543         (types_info): Rename to ...
5544         (info_types_command): ... this.
5545         (_initialize_symtab): Adjust.
5546         * target.c (target_info): Rename to ...
5547         (info_target_command): ... this.
5548         (initialize_targets): Adjust.
5549         * tracepoint.c (tvariables_info): Rename to ...
5550         (info_tvariables_command): ... this.
5551         (scope_info): Rename to ...
5552         (info_scope_command): ... this.
5553         (trace_dump_actions): Adjust.
5554         (_initialize_tracepoint): Adjust.
5555
5556 2017-08-22  Tom Tromey  <tom@tromey.com>
5557
5558         * breakpoint.h (install_breakpoint): Update.
5559         * breakpoint.c (add_solib_catchpoint): Update.
5560         (install_breakpoint): Change argument to a std::unique_ptr.
5561         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5562         (create_breakpoint_sal, create_breakpoint): Update.
5563         (watch_command_1, catch_exec_command_1)
5564         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5565         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5566         Return the breakpoint.
5567         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5568         (new_single_step_breakpoint): Update.
5569         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5570         std::unique_ptr.
5571         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5572         std::unique_ptr.
5573         * break-catch-sig.c (create_signal_catchpoint): Use
5574         std::unique_ptr.
5575         * ada-lang.c (create_ada_exception_catchpoint): Use
5576         std::unique_ptr.
5577
5578 2017-08-22  Tom Tromey  <tom@tromey.com>
5579
5580         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5581
5582 2017-08-22  Tom Tromey  <tom@tromey.com>
5583
5584         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5585         (lookup_partial_symbol): Update.
5586
5587 2017-08-22  Tom Tromey  <tom@tromey.com>
5588
5589         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5590         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5591         (find_and_open_source, symtab_to_fullname): Update.
5592         * psymtab.c (psymtab_to_fullname): Update.
5593
5594 2017-08-22  Tom Tromey  <tom@tromey.com>
5595
5596         * exec.c (exec_file_attach): Update.
5597         * linux-thread-db.c (try_thread_db_load): Update.
5598         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5599         * utils.c (gdb_realpath): Change return type.
5600         (gdb_realpath_keepfile): Update.
5601         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5602         (_initialize_utils): Register the new self test.
5603         * source.c (openp): Update.
5604         (find_and_open_source): Update.
5605         * nto-tdep.c (nto_find_and_open_solib): Update.
5606         * main.c (set_gdb_data_directory): Update.
5607         (captured_main_1): Update.
5608         * dwarf2read.c (dwarf2_get_dwz_file): Update
5609         (dw2_map_symbol_filenames): Update.
5610         * auto-load.c (auto_load_safe_path_vec_update): Update.
5611         (filename_is_in_auto_load_safe_path_vec): Change type of
5612         "filename_realp".
5613         (auto_load_objfile_script): Update.
5614         (file_is_auto_load_safe): Update.  Use std::string.
5615         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5616
5617 2017-08-22  Tom Tromey  <tom@tromey.com>
5618
5619         * utils.c (gdb_realpath_keepfile): Return a
5620         gdb::unique_xmalloc_ptr.
5621         * exec.c (exec_file_attach): Update.
5622         * utils.h (gdb_realpath_keepfile): Return a
5623         gdb::unique_xmalloc_ptr.
5624
5625 2017-08-22  Tom Tromey  <tom@tromey.com>
5626
5627         * compile/compile.c (compile_file_command): Use
5628         gdb::unique_xmalloc_ptr, std::string.
5629         * utils.c (gdb_abspath): Change return type.
5630         * source.c (openp): Update.
5631         * objfiles.c (allocate_objfile): Update.
5632         * main.c (set_gdb_data_directory): Update.
5633         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5634
5635 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5636
5637         * cli-cmds.c (list_commands): List actual code around more than
5638         one location.
5639
5640 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5641
5642         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5643
5644 2017-08-21  Pedro Alves  <palves@redhat.com>
5645
5646         PR gdb/19487
5647         * c-exp.y (variable production): Handle function aliases.
5648         * minsyms.c (msymbol_is_text): New function.
5649         * minsyms.h (msymbol_is_text): Declare.
5650         * symtab.c (find_function_alias_target): New function.
5651         * symtab.h (find_function_alias_target): Declare.
5652
5653 2017-08-21  Pedro Alves  <palves@redhat.com>
5654
5655         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5656         typedefs.
5657         * typeprint.c (whatis_exp): If handling "whatis", and expression
5658         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5659         typedefs here.
5660         * valops.c (value_cast): Save "to" type before resolving
5661         stubs/typedefs.  Use that type as resulting value's type.
5662
5663 2017-08-18  Tom Tromey  <tom@tromey.com>
5664             Pedro Alves  <palves@redhat.com>
5665
5666         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5667         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5668         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5669         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5670         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5671         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5672         (linux_get_siginfo_data): Add "thread" argument.  Use
5673         scoped_restore.
5674         * linux-nat.c (linux_child_follow_fork)
5675         (check_stopped_by_watchpoint): Use scoped_restore.
5676         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5677         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5678         (restore_inferior_ptid, save_inferior_ptid): Remove.
5679         * btrace.c (btrace_fetch): Use scoped_restore.
5680         * bsd-uthread.c (bsd_uthread_fetch_registers)
5681         (bsd_uthread_store_registers): Use scoped_restore.
5682         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5683         scoped_restore.
5684         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5685         (aix_thread_xfer_partial): Use scoped_restore.
5686         * inferior.h (save_inferior_ptid): Remove.
5687
5688 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5689
5690         PR tdep/21818
5691         * arm-tdep.c (gdb_print_insn_arm): Mark
5692         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5693
5694 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5695
5696         * NEWS: Mention GDBserver's new option "--selftest".
5697         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5698         * selftest.c: Move it to common/selftest.c.
5699         * selftest.h: Move it to common/selftest.h.
5700         * selftest-arch.c (reset): New function.
5701         (tests_with_arch): Call reset.
5702
5703 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5704
5705         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5706         instead of exception_fprintf and printf_filtered.
5707
5708 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5709
5710         * selftest.c (register_self_test): Rename it to
5711         selftests::register_test.
5712         (run_self_tests): selftest::run_tests.
5713         * selftest.h: Update declarations.
5714         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5715         selftests::register_test_foreach_arch.
5716         * selftest-arch.h: Update declaration.
5717         * aarch64-tdep.c: Update.
5718         * arm-tdep.c: Likewise.
5719         * disasm-selftests.c: Likewise.
5720         * dwarf2loc.c: Likewise.
5721         * dwarf2-frame.c: Likewise.
5722         * findvar.c: Likewise.
5723         * gdbarch-selftests.c: Likewise.
5724         * maint.c (maintenance_selftest): Likewise.
5725         * regcache.c: Likewise.
5726         * rust-exp.y: Likewise.
5727         * selftest-arch.c: Likewise.
5728         * unittests/environ-selftests.c: Likewise.
5729         * unittests/function-view-selftests.c: Likewise.
5730         * unittests/offset-type-selftests.c: Likewise.
5731         * unittests/optional-selftests.c: Likewise.
5732         * unittests/scoped_restore-selftests.c: Likewise.
5733         * utils-selftests.c: Likewise.
5734
5735 2017-08-17  Pedro Alves  <palves@redhat.com>
5736
5737         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5738         local.
5739
5740 2017-08-17  Pedro Alves  <palves@redhat.com>
5741
5742         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5743         field.
5744         (reset_die_in_process): Delete, replaced by ...
5745         (process_die_scope): ... this new class.  Make it responsible for
5746         freeing cu->line_header too.
5747         (process_die): Use process_die_scope.
5748         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5749         cu->line_header_die_owner.  Don't release the line header if it's
5750         owned by the CU.
5751         (setup_type_unit_groups): Make the CU/DIE own the line header.
5752         Don't release the line header here.
5753
5754 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5755
5756         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5757
5758 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5759
5760         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5761         Single-Key mode
5762
5763 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5764
5765         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5766         mode command list.
5767
5768 2017-08-15  Stafford Horne  <shorne@gmail.com>
5769
5770         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5771
5772 2017-08-15  Stafford Horne  <shorne@gmail.com>
5773
5774         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5775
5776 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5777
5778         PR gdb/21954
5779         * infcmd.c (unset_environment_command): Use the 'clear' method on
5780         the environment instead of resetting it.
5781
5782 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5783
5784         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5785         platforms.
5786
5787 2017-08-14  Tom Tromey  <tom@tromey.com>
5788
5789         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5790         (print_binary_chars): Likewise.
5791         (BITS_IN_BYTES): Remove.
5792
5793 2017-08-14  Tom Tromey  <tom@tromey.com>
5794
5795         PR gdb/21675
5796         * valprint.c (LOW_ZERO): Change value to 034.
5797         (print_octal_chars): Add static_asserts for octal constants.
5798         * printcmd.c (print_scalar_formatted): Add 'd' case.
5799
5800 2017-08-11  Tom Tromey  <tom@tromey.com>
5801
5802         * symfile.c (add_symbol_file_command): Use std::vector.
5803
5804 2017-08-14  Tom Tromey  <tom@tromey.com>
5805
5806         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5807         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5808         std::move.
5809         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5810
5811 2017-08-11  Pedro Alves  <palves@redhat.com>
5812
5813         * infrun.c (process_event_stop_test): Adjust
5814         function_name_is_marked_for_skip call.
5815         * skip.c: Include <list>.
5816         (skiplist_entry): Make it a class with private fields, and
5817         getters/setters.
5818         (skiplist_entry_chain): Delete.
5819         (skiplist_entries): New.
5820         (skiplist_entry_count): Delete.
5821         (highest_skiplist_entry_num): New.
5822         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5823         (add_skiplist_entry): Delete.
5824         (skiplist_entry::skiplist_entry): New.
5825         (skiplist_entry::add_entry): New.
5826         (skip_file_command, skip_function): Adjust.
5827         (compile_skip_regexp): Delete.
5828         (skip_command): Don't compile regexp here.  Adjust to use
5829         skiplist_entry::add_entry.
5830         (skip_info): Adjust to use range-for and getters.
5831         (skip_enable_command, skip_disable_command): Adjust to use
5832         range-for and setters.
5833         (skip_delete_command): Adjust to use std::list.
5834         (add_skiplist_entry): Delete.
5835         (skip_file_p): Delete, refactored as ...
5836         (skiplist_entry::do_skip_file_p): ... this new method.
5837         (skip_gfile_p): Delete, refactored as ...
5838         (skiplist_entry::do_gskip_file_p): ... this new method.
5839         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5840         (skiplist_entry::skip_function_p): ... this new method.
5841         (function_name_is_marked_for_skip): Now returns bool, and takes
5842         the function sal by const reference.  Adjust to use range-for and
5843         skiplist_entry methods.
5844         (_initialize_step_skip): Remove references to
5845         skiplist_entry_chain, skiplist_entry_count.
5846         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5847         takes the function sal by const reference.
5848
5849 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5850
5851         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5852         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5853         (dwarf2_frame_cache):
5854         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5855         RETURN_MASK_ALL and set *this_case to NULL.
5856         * frame-unwind.h: Update comments.
5857
5858 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5859
5860         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5861         (dwarf2_frame_state_copy_regs): Remove.
5862         (dwarf2_frame_state_free_regs): Remove.
5863         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5864         (dwarf2_restore_rule): Call method .alloc_regs instead of
5865         dwarf2_frame_state_alloc_regs.
5866         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5867         constructor.  Call std::move.
5868         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5869         (dwarf2_frame_cache): Likewise.
5870
5871         [GDB_SELF_TEST]: Include selftest.h and
5872         selftest-arch.h.
5873         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5874         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5875         execute_cfa_program_test.
5876
5877         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5878         copy ctor, assignment operator, move assignment.
5879         <alloc_regs>: New method.
5880         <swap>: New method.
5881         (struct dwarf2_frame_state): Delete dtor.
5882         (dwarf2_frame_state_alloc_regs): Remove declaration.
5883         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5884         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5885
5886 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5887
5888         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5889         (dwarf2_frame_state::dwarf2_frame_state): New.
5890         (dwarf2_frame_state::~dwarf2_frame_state): New.
5891         (dwarf2_fetch_cfa_info): Update.
5892         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5893         rather than a pointer.  Update code.
5894         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5895         dtor.
5896         <data_align, code_align, retaddr_column>: Change them to const.
5897         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5898         to bool.
5899
5900 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5901
5902         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5903         <loc.exp>: New field.
5904         * dwarf2-frame.c (execute_cfa_program): Update.
5905         (dwarf2_frame_prev_register): Update.
5906
5907 2017-08-10  Pedro Alves  <palves@redhat.com>
5908
5909         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5910
5911 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5912
5913         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5914         (fbsd_pending_children): Use std::list.
5915         (fbsd_remember_child): Likewise.
5916         (fbsd_is_child_pending): Likewise.
5917         (fbsd_pending_vfork_done): Use std::forward_list.
5918         (fbsd_add_vfork_done): Likewise.
5919         (fbsd_is_vfork_done_pending): Likewise.
5920         (fbsd_next_vfork_done): Likewise.
5921
5922 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5923
5924         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5925         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5926         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5927         for `mapfilename'.
5928         (fbsd_xfer_partial): Use gdb::byte_vector.
5929         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5930
5931 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5932
5933         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5934         "filestuff.h".
5935         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5936
5937 2017-08-09  Tom Tromey  <tom@tromey.com>
5938
5939         * skip.c (skiplist_entry): New constructor.
5940         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5941         (skiplist_entry::file_is_glob): Now bool.
5942         (skiplist_entry::file, skiplist_entry::function): Now
5943         std::string.
5944         (make_skip_entry): Return a unique_ptr.  Use new.
5945         (free_skiplist_entry, free_skiplist_entry_cleanup)
5946         (make_free_skiplist_entry_cleanup): Remove.
5947         (skip_command, skip_disable_command, add_skiplist_entry)
5948         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5949         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5950         (function_name_is_marked_for_skip): Update.
5951         (skip_delete_command): Update.  Use delete.
5952
5953 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5954
5955         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5956         (aarch64_linux_core_read_description): New function.
5957         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5958
5959 2017-08-09  Pedro Alves  <palves@redhat.com>
5960
5961         * cp-name-parser.y (cp_comp_to_string): Return a
5962         gdb::unique_xmalloc_ptr<char>.
5963         * cp-support.c (replace_typedefs_qualified_name)
5964         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5965         (cp_canonicalize_string_full): Use op= instead of explicit
5966         convertion.
5967         (cp_class_name_from_physname, method_name_from_physname)
5968         (cp_func_name, cp_remove_params): Adjust to use
5969         gdb::unique_xmalloc_ptr<char>.
5970         * cp-support.h (cp_comp_to_string): Return a
5971         gdb::unique_xmalloc_ptr<char>.
5972         * python/py-type.c (typy_lookup_type): Adjust to use
5973         gdb::unique_xmalloc_ptr<char>.
5974
5975 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5976
5977         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5978
5979 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5980             Yao Qi  <yao.qi@linaro.org>
5981
5982         * cp-support.c (cp_canonicalize_string_full): Use
5983         gdb::unique_xmalloc_ptr<char>.
5984         (cp_canonicalize_string): Likewise.
5985
5986 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5987
5988         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5989         * regformats/i386/amd64-avx-avx512.dat: Remove.
5990         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5991         * regformats/i386/amd64-avx-mpx.dat:Remove.
5992         * regformats/i386/amd64-avx.dat: Remove.
5993         * regformats/i386/amd64-mpx.dat: Remove.
5994         * regformats/i386/i386-avx-avx512.dat: Remove.
5995         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5996         * regformats/i386/i386-avx-mpx.dat: Remove.
5997         * regformats/i386/i386-mmx.dat: Remove.
5998         * regformats/i386/i386-mpx.dat: Remove.
5999
6000 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6001
6002         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6003         * amd64-tdep.c: Don't include features/i386/x32*.c.
6004         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6005         functions.
6006         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6007         and i386/x32-avx-avx512.
6008         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6009         and i386/x32.xml.
6010         * features/i386/x32-avx-avx512.c: Removed.
6011         * features/i386/x32-avx-avx512.xml: Removed.
6012         * features/i386/x32-avx.c: Removed.
6013         * features/i386/x32-avx.xml: Removed.
6014         * features/i386/x32.c: Removed.
6015         * features/i386/x32.xml: Removed.
6016         * regformats/i386/x32-avx-avx512.dat: Removed.
6017         * regformats/i386/x32-avx.dat: Removed.
6018         * regformats/i386/x32.dat: Removed.
6019
6020 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6021
6022         PR breakpoints/21886
6023         * mem-break.c (default_memory_insert_breakpoint): Use
6024         `->placed_address' rather than `->reqstd_address' for the
6025         breakpoint location.
6026
6027 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6028
6029         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6030         assertions.
6031
6032 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6033
6034         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6035         a union of `tdep_info', `tdesc_data' and `id'.
6036         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6037         rather than `info.tdep_info'.
6038         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6039         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6040         * i386-tdep.c (i386_gdbarch_init): Likewise.
6041         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6042         * mips-tdep.c (mips_gdbarch_init): Likewise.
6043         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6044         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6045         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6046         `info.tdep_info'.
6047         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6048         `info.tdep_info'.
6049         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6050         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6051         `info.tdep_info'.
6052         * spu-tdep.c (spu_gdbarch_init): Likewise.
6053         * gdbarch.h: Regenerate.
6054
6055 2017-08-07  Leszek Swirski  <leszeks@google.com>
6056
6057         PR symtab/20899
6058         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6059
6060 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6061
6062         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6063         (gdbsim_open): Rename gdb_argv args object to argv.
6064
6065 2017-08-05  Tom Tromey  <tom@tromey.com>
6066
6067         * compile/compile-object-load.c (compile_object_load): Use
6068         gdb::unique_xmalloc_ptr.
6069         * cli/cli-dump.c (scan_filename): Rename from
6070         scan_filename_with_cleanup.  Change return type.
6071         (scan_expression): Rename from scan_expression_with_cleanup.
6072         Change return type.
6073         (dump_memory_to_file, dump_value_to_file, restore_command):
6074         Use gdb::unique_xmalloc_ptr.  Update.
6075         * cli/cli-cmds.c (find_and_open_script): Use
6076         gdb::unique_xmalloc_ptr.
6077         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6078         * symmisc.c (maintenance_print_symbols)
6079         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6080         * symfile.c (symfile_bfd_open, generic_load)
6081         (add_symbol_file_command, remove_symbol_file_command): Use
6082         gdb::unique_xmalloc_ptr.
6083         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6084         * psymtab.c (maintenance_print_psymbols): Use
6085         gdb::unique_xmalloc_ptr.
6086         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6087         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6088         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6089         (reload_shared_libraries_1): Likewise.
6090
6091 2017-08-05  Tom Tromey  <tom@tromey.com>
6092
6093         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6094         (rust_op_vector, rust_set_vector): New typedefs.
6095         (current_parser): New global.
6096         (work_obstack): Change to pointer type.  Update all users.
6097         (rust_ast, pstate): Remove globals.
6098         (struct rust_parser): New.
6099         (%union) <params, field_inits>: Change type.
6100         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6101         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6102         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6103         (convert_params_to_types, convert_params_to_expression): Change
6104         type of "params".
6105         (ast_string): Change type of "fields".
6106         (rust_parse): Make a rust_parser.  Remove cleanups.
6107         (rust_lex_tests): Make and install an auto_obstack.
6108
6109 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6110
6111         * configure.srv (ipa_x32_linux_regobj): New.
6112         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6113         instead of X86_TDESC_AVX512.
6114         (initialize_low_tracepoint): Call
6115         init_registers_x32_avx_avx512_linux.
6116
6117 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6118
6119         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6120
6121 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6122
6123         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6124
6125 2017-08-03  Tom Tromey  <tom@tromey.com>
6126
6127         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6128         Remove.
6129         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6130
6131 2017-08-03  Tom Tromey  <tom@tromey.com>
6132
6133         * python/py-param.c (compute_enum_values): Use gdb_argv.
6134
6135 2017-08-03  Tom Tromey  <tom@tromey.com>
6136
6137         * utils.h (struct gdb_argv_deleter): New.
6138         (gdb_argv): New class.
6139         * utils.c (gdb_argv::reset): New method.
6140         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6141         * tracefile.c (tsave_command): Use gdb_argv.
6142         * top.c (new_ui_command): Use gdb_argv.
6143         * symmisc.c (maintenance_print_symbols)
6144         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6145         * symfile.c (symbol_file_command, generic_load)
6146         (remove_symbol_file_command): Use gdb_argv.
6147         * stack.c (backtrace_command): Use gdb_argv.
6148         * source.c (add_path, show_substitute_path_command)
6149         (unset_substitute_path_command, set_substitute_path_command):
6150         Use gdb_argv.
6151         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6152         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6153         * remote.c (extended_remote_run, remote_put_command)
6154         (remote_get_command, remote_delete_command): Use gdb_argv.
6155         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6156         (gdbsim_open): Use gdb_argv.
6157         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6158         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6159         * procfs.c (procfs_info_proc): Use gdb_argv.
6160         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6161         * infrun.c (handle_command): Use gdb_argv.
6162         * inferior.c (add_inferior_command, clone_inferior_command):
6163         Use gdb_argv.
6164         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6165         * exec.c (exec_file_command): Use gdb_argv.
6166         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6167         * compile/compile.c (build_argc_argv): Use gdb_argv.
6168
6169 2017-08-03  Tom Tromey  <tom@tromey.com>
6170
6171         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6172
6173 2017-08-03  Tom Tromey  <tom@tromey.com>
6174
6175         * python/python.c (compute_python_string): Return std::string.
6176         (gdbpy_eval_from_control_command): Update.
6177         (do_start_initialization): Use std::string.
6178         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6179         xstrprintf.
6180         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6181         xstrprintf.
6182
6183 2017-08-03  Tom Tromey  <tom@tromey.com>
6184
6185         * top.h (do_restore_instream_cleanup): Remove.
6186         * top.c (do_restore_instream_cleanup): Remove.
6187         (read_command_file): Use scoped_restore.
6188         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6189
6190 2017-08-03  Tom Tromey  <tom@tromey.com>
6191
6192         * cli/cli-script.c (execute_user_command)
6193         (execute_control_command): Use scoped_restore.
6194
6195 2017-08-03  Tom Tromey  <tom@tromey.com>
6196
6197         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6198         (execute_user_command): Remove user_call_depth; use
6199         user_args_stack's size instead.
6200
6201 2017-08-03  Tom Tromey  <tom@tromey.com>
6202
6203         * top.h (in_user_command): Remove.
6204         * top.c (in_user_command): Remove.
6205         * cli/cli-script.c (do_restore_user_call_depth)
6206         (execute_user_command): Update.
6207
6208 2017-08-03  Tom Tromey  <tom@tromey.com>
6209
6210         * valops.c (search_struct_method): Use gdb::byte_vector.
6211         * valarith.c (value_concat): Use std::vector.
6212         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6213         (simple_search_memory): Likewise.
6214         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6215         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6216         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6217         * elfread.c (elf_rel_plt_read): Use std::string.
6218         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6219         * cli/cli-dump.c (restore_section_callback): Use
6220         gdb::byte_vector.
6221
6222 2017-08-03  Tom Tromey  <tom@tromey.com>
6223
6224         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6225
6226 2017-08-03  Tom Tromey  <tom@tromey.com>
6227
6228         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6229         (tui_register_format): Use scoped_restore.
6230
6231 2017-08-03  Tom Tromey  <tom@tromey.com>
6232
6233         * reverse.c (exec_direction_default): Remove.
6234         (exec_reverse_once): Use scoped_restore.
6235         * remote.c (restore_remote_timeout): Remove.
6236         (remote_flash_erase, remote_flash_write, remote_flash_done)
6237         (readchar, remote_serial_write): Use scoped_restore.
6238         * cli/cli-script.c (struct source_cleanup_lines_args)
6239         (source_cleanup_lines): Remove.
6240         (script_from_file): Use scoped_restore.
6241         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6242         (source_command): Use scoped_restore.
6243
6244 2017-08-03  Tom Tromey  <tom@tromey.com>
6245
6246         * utils.h (make_cleanup_free_so): Remove.
6247         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6248         * solist.h (struct so_deleter): New.
6249         (so_list_up): New typedef.
6250         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6251
6252 2017-08-03  Tom Tromey  <tom@tromey.com>
6253
6254         * utils.h (make_cleanup_restore_current_language): Remove.
6255         * utils.c (do_restore_current_language)
6256         (make_cleanup_restore_current_language): Remove.
6257         * parse.c (parse_exp_in_context_1)
6258         (parse_expression_with_language): Use
6259         scoped_restore_current_language.
6260         * mi/mi-main.c (mi_cmd_execute): Use
6261         scoped_restore_current_language.
6262         * language.h (scoped_restore_current_language): New class.
6263
6264 2017-08-03  Tom Tromey  <tom@tromey.com>
6265
6266         * compile/compile.c (cleanup_unlink_file): Remove.
6267         (compile_to_object): Use gdb::unlinker.
6268         (eval_compile_command): Likewise.
6269
6270 2017-08-03  Tom Tromey  <tom@tromey.com>
6271
6272         * utils.h (make_cleanup_fclose): Remove.
6273         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6274
6275 2017-08-03  Tom Tromey  <tom@tromey.com>
6276
6277         * top.c (open_terminal_stream): Return gdb_file_up.
6278         (new_ui_command): Update.
6279
6280 2017-08-03  Tom Tromey  <tom@tromey.com>
6281
6282         * source.c (print_source_lines_base, forward_search_command)
6283         (reverse_search_command): Use gdb_file_up.
6284
6285 2017-08-03  Tom Tromey  <tom@tromey.com>
6286
6287         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6288
6289 2017-08-03  Tom Tromey  <tom@tromey.com>
6290
6291         * cli/cli-cmds.c (find_and_open_script): Change return type.
6292         Remove "streamp" and "full_path" parameters.
6293         (source_script_with_search): Update.
6294         * auto-load.c (source_script_file): Update.
6295         * cli/cli-cmds.h (find_and_open_script): Change type.
6296         (open_script): New struct.
6297
6298 2017-08-03  Tom Tromey  <tom@tromey.com>
6299
6300         * xml-support.c (xml_fetch_content_from_file): Update.
6301         * ui-file.c (stdio_file::open): Update.
6302         * tracefile-tfile.c (tfile_start): Update.
6303         * remote.c (remote_file_put, remote_file_get): Update.
6304         * nat/linux-procfs.c (linux_proc_get_int)
6305         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6306         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6307         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6308         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6309         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6310         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6311         * linux-nat.c (linux_proc_pending_signals): Update.
6312         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6313         (file_closer): Remove.
6314         * compile/compile.c (compile_to_object): Update.
6315         * common/filestuff.h (struct gdb_file_deleter): New.
6316         (gdb_file_up): New typedef.
6317         (gdb_fopen_cloexec): Change return type.
6318         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6319         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6320         (dump_binary_file, restore_binary_file): Update.
6321         * auto-load.c (auto_load_objfile_script_1): Update.
6322
6323 2017-08-03  Tom Tromey  <tom@tromey.com>
6324
6325         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6326         (info_static_tracepoint_markers_command): Likewise.
6327         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6328         * skip.c (skip_info): Use ui_out_emit_table.
6329         * progspace.c (print_program_space): Use ui_out_emit_table.
6330         * osdata.c (info_osdata): Use ui_out_emit_table.
6331         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6332         ui_out_emit_table.
6333         * linux-thread-db.c (info_auto_load_libthread_db): Use
6334         ui_out_emit_table.
6335         * inferior.c (print_inferior): Use ui_out_emit_table.
6336         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6337         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6338         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6339         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6340         * ui-out.h (class ui_out_emit_table): New.
6341
6342 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6343
6344         * mips-tdep.c (mips_fpu_type_str): New function.
6345         (mips_dump_tdep): Call it.
6346
6347 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6348
6349         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6350         `->mips_fpu_type'.
6351
6352 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6353
6354         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6355
6356 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6357
6358         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6359
6360 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6361
6362         * cli/cli-cmds.c (maintenancechecklist): New variable.
6363         * gdbcmd.h (maintenancechecklist): Declare it.
6364         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6365         Call i386_linux_read_description with different masks.
6366         * maint.c (maintenance_check_command): New function.
6367         (_initialize_maint_cmds): Call add_prefix_cmd.
6368         * target-descriptions.c (tdesc_reg): override operator != and ==.
6369         (tdesc_type): Likewise.
6370         (tdesc_feature): Likewise.
6371         (target_desc): Likewise.
6372         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6373         (maintenance_check_xml_descriptions): New function.
6374         (_initialize_target_descriptions) Add command "xml-descriptions".
6375         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6376
6377 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6378
6379         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6380         Include features/i386/32bit-*.c.
6381         (i386_linux_read_description): Generate target description if it
6382         doesn't exist.
6383         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6384         functions.
6385         * features/i386/32bit-linux.c: Re-generated.
6386         * features/i386/32bit-sse.c: Likewise.
6387         * target-descriptions.c (print_c_feature::visit): Print code to
6388         set register number if needed.
6389         (print_c_feature) <m_next_regnum>: New field.
6390
6391 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6392
6393         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6394         (FEATURE_XMLFILES): New.
6395         (FEATURE_CFILES): New.
6396         New rules.
6397         (clean-cfiles): Remove generated c files.
6398         * features/i386/32bit-avx.c: Generated.
6399         * features/i386/32bit-avx512.c: Generated.
6400         * features/i386/32bit-core.c: Generated.
6401         * features/i386/32bit-linux.c: Generated.
6402         * features/i386/32bit-mpx.c: Generated.
6403         * features/i386/32bit-pkeys.c: Generated.
6404         * features/i386/32bit-sse.c: Generated.
6405         * target-descriptions.c: Include algorithm.
6406         (tdesc_element_visitor): Add method visit_end.
6407         (print_c_tdesc): Implement visit_end.
6408         (print_c_tdesc:: m_filename_after_features): Move it to
6409         protected.
6410         (print_c_feature): New class.
6411         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6412         name starts with "i386/32bit-".
6413
6414 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6415
6416         * target-descriptions.c (tdesc_element_visitor): New class.
6417         (tdesc_element): New class.
6418         (tdesc_reg): Inherit from tdesc_element.
6419         (tdesc_reg::accept): New function.
6420         (tdesc_type): Inherit from tdesc_element.
6421         (tdesc_type::accept): New function.
6422         (tdesc_feature): Inherit from tdesc_element.
6423         (tdesc_feature::accept): New function.
6424         (target_desc): Inherit from tdesc_element.
6425         (target_desc::target_desc): New.
6426         (target_desc::~target_desc): New.
6427         (target_desc::accept): New.
6428         (allocate_target_description): Use new.
6429         (free_target_description): Use delete.
6430         (print_c_tdesc): New class.
6431         (maint_print_c_tdesc_cmd): Adjust.
6432
6433         * features/aarch64.c: Re-generated.
6434         * features/arc-arcompact.c: Re-generated.
6435         * features/arc-v2.c: Re-generated.
6436         * features/arm/arm-with-iwmmxt.c: Re-generated.
6437         * features/arm/arm-with-m.c: Re-generated.
6438         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6439         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6440         * features/arm/arm-with-neon.c: Re-generated.
6441         * features/arm/arm-with-vfpv2.c: Re-generated.
6442         * features/arm/arm-with-vfpv3.c: Re-generated.
6443         * features/i386/amd64-avx-avx512.c: Re-generated.
6444         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6445         * features/i386/amd64-avx.c: Re-generated.
6446         * features/i386/amd64-avx-linux.c: Re-generated.
6447         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6448         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6449         * features/i386/amd64-avx-mpx.c: Re-generated.
6450         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6451         * features/i386/amd64.c: Re-generated.
6452         * features/i386/amd64-linux.c: Re-generated.
6453         * features/i386/amd64-mpx.c: Re-generated.
6454         * features/i386/amd64-mpx-linux.c: Re-generated.
6455         * features/i386/i386-avx-avx512.c: Re-generated.
6456         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6457         * features/i386/i386-avx.c: Re-generated.
6458         * features/i386/i386-avx-linux.c: Re-generated.
6459         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6460         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6461         * features/i386/i386-avx-mpx.c: Re-generated.
6462         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6463         * features/i386/i386.c: Re-generated.
6464         * features/i386/i386-linux.c: Re-generated.
6465         * features/i386/i386-mmx.c: Re-generated.
6466         * features/i386/i386-mmx-linux.c: Re-generated.
6467         * features/i386/i386-mpx.c: Re-generated.
6468         * features/i386/i386-mpx-linux.c: Re-generated.
6469         * features/i386/x32-avx-avx512.c: Re-generated.
6470         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6471         * features/i386/x32-avx.c: Re-generated.
6472         * features/i386/x32-avx-linux.c: Re-generated.
6473         * features/i386/x32.c: Re-generated.
6474         * features/i386/x32-linux.c: Re-generated.
6475         * features/microblaze.c: Re-generated.
6476         * features/microblaze-with-stack-protect.c: Re-generated.
6477         * features/mips64-dsp-linux.c: Re-generated.
6478         * features/mips64-linux.c: Re-generated.
6479         * features/mips-dsp-linux.c: Re-generated.
6480         * features/mips-linux.c: Re-generated.
6481         * features/nds32.c: Re-generated.
6482         * features/nios2.c: Re-generated.
6483         * features/nios2-linux.c: Re-generated.
6484         * features/rs6000/powerpc-32.c: Re-generated.
6485         * features/rs6000/powerpc-32l.c: Re-generated.
6486         * features/rs6000/powerpc-403.c: Re-generated.
6487         * features/rs6000/powerpc-403gc.c : Re-generated.
6488         * features/rs6000/powerpc-405.c: Re-generated.
6489         * features/rs6000/powerpc-505.c: Re-generated.
6490         * features/rs6000/powerpc-601.c: Re-generated.
6491         * features/rs6000/powerpc-602.c: Re-generated.
6492         * features/rs6000/powerpc-603.c: Re-generated.
6493         * features/rs6000/powerpc-604.c: Re-generated.
6494         * features/rs6000/powerpc-64.c: Re-generated.
6495         * features/rs6000/powerpc-64l.c: Re-generated.
6496         * features/rs6000/powerpc-7400.c: Re-generated.
6497         * features/rs6000/powerpc-750.c: Re-generated.
6498         * features/rs6000/powerpc-860.c: Re-generated.
6499         * features/rs6000/powerpc-altivec32.c: Re-generated.
6500         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6501         * features/rs6000/powerpc-altivec64.c: Re-generated.
6502         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6503         * features/rs6000/powerpc-cell32l.c: Re-generated.
6504         * features/rs6000/powerpc-cell64l.c: Re-generated.
6505         * features/rs6000/powerpc-e500.c: Re-generated.
6506         * features/rs6000/powerpc-e500l.c: Re-generated.
6507         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6508         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6509         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6510         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6511         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6512         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6513         * features/rs6000/powerpc-vsx32.c: Re-generated.
6514         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6515         * features/rs6000/powerpc-vsx64.c: Re-generated.
6516         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6517         * features/rs6000/rs6000.c: Re-generated.
6518         * features/s390-linux32.c: Re-generated.
6519         * features/s390-linux32v1.c: Re-generated.
6520         * features/s390-linux32v2.c: Re-generated.
6521         * features/s390-linux64.c: Re-generated.
6522         * features/s390-linux64v1.c: Re-generated.
6523         * features/s390-linux64v2.c: Re-generated.
6524         * features/s390-te-linux64.c: Re-generated.
6525         * features/s390-tevx-linux64.c: Re-generated.
6526         * features/s390-vx-linux64.c: Re-generated.
6527         * features/s390x-linux64.c: Re-generated.
6528         * features/s390x-linux64v1.c: Re-generated.
6529         * features/s390x-linux64v2.c: Re-generated.
6530         * features/s390x-te-linux64.c: Re-generated.
6531         * features/s390x-tevx-linux64.c: Re-generated.
6532         * features/s390x-vx-linux64.c: Re-generated.
6533         * features/sparc/sparc32-solaris.c: Re-generated.
6534         * features/sparc/sparc64-solaris.c: Re-generated.
6535         * features/tic6x-c62x.c: Re-generated.
6536         * features/tic6x-c62x-linux.c: Re-generated.
6537         * features/tic6x-c64x.c: Re-generated.
6538         * features/tic6x-c64x-linux.c: Re-generated.
6539         * features/tic6x-c64xp.c: Re-generated.
6540         * features/tic6x-c64xp-linux.c: Re-generated.
6541
6542 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6543
6544         * i386-linux-tdep.c (i386_linux_read_description): New function.
6545         (i386_linux_core_read_description): Call
6546         i386_linux_read_description.
6547         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6548         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6549         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6550         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6551         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6552         * x86-linux-nat.c (x86_linux_read_description): Call
6553         i386_linux_read_description.
6554
6555 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6556
6557         * NEWS: Mention it.
6558         * features/Makefile (%.c: %.xml): Pass the xml file name to
6559         command "maint print c-tdesc".
6560         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6561         name from 'arg'.
6562
6563 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6564
6565         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6566         in-class initialization.
6567         (tdesc_create_feature): Call new instead of XCNEW.
6568         (free_target_description): Ue delete.
6569
6570 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6571
6572         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6573
6574 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6575
6576         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6577         constant.
6578         (amd64_x32_init_abi): Likewise.
6579         * amd64-tdep.h (amd64_init_abi): Update declaration.
6580         (amd64_x32_init_abi): Likewise.
6581
6582 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6583
6584         PR tdep/21717
6585         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6586         condition for FPSCR.
6587         (arm_linux_store_inferior_registers): Likewise.
6588
6589 2017-07-22  Tom Tromey  <tom@tromey.com>
6590
6591         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6592         <syscalls_counts>: Now a std::vector.
6593         (get_catch_syscall_inferior_data): Use "new".
6594         (catch_syscall_inferior_data_cleanup): Use "delete".
6595         (insert_catch_syscall, remove_catch_syscall)
6596         (clear_syscall_counts): Update.
6597
6598 2017-07-22  Tom Tromey  <tom@tromey.com>
6599
6600         * break-catch-syscall.c (syscall_catchpoint)
6601         <syscalls_to_be_caught>: Now a std::vector<int>
6602         (~syscall_catchpoint): Remove.
6603         (insert_catch_syscall, remove_catch_syscall)
6604         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6605         (print_mention_catch_syscall, print_recreate_catch_syscall):
6606         Update.
6607         (create_syscall_event_catchpoint): Change type of "filter"
6608         parameter.
6609         (catch_syscall_split_args): Return a std::vector.
6610         (catch_syscall_command_1, catching_syscall_number_1): Update.
6611
6612 2017-07-22  Tom Tromey  <tom@tromey.com>
6613
6614         * break-catch-throw.c (struct exception_catchpoint)
6615         <exception_rx>: Now a std::string.
6616         (~exception_catchpoint): Remove.
6617         (print_one_detail_exception_catchpoint): Update.
6618         (handle_gnu_v3_exceptions): Change type of except_rx.
6619         (extract_exception_regexp): Return a std::string.
6620         (catch_exception_command_1): Update.
6621
6622 2017-07-22  Tom Tromey  <tom@tromey.com>
6623
6624         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6625         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6626         std::vector.
6627         <catch_all>: Now a bool.
6628         (~signal_catchpoint): Remove.
6629         (signal_catchpoint_insert_location)
6630         (signal_catchpoint_remove_location)
6631         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6632         (signal_catchpoint_print_mention)
6633         (signal_catchpoint_print_recreate)
6634         (signal_catchpoint_explains_signal): Update.
6635         (create_signal_catchpoint): Change type of "filter" and
6636         "catch_all".
6637         (catch_signal_split_args): Return a std::vector.  Change type of
6638         "catch_all".
6639         (catch_signal_command): Update.
6640
6641 2017-07-20  Pedro Alves  <palves@redhat.com>
6642
6643         * ada-lang.c (ada_language_defn): Make extern.
6644         (_initialize_ada_language): Remove add_language call.
6645         * c-lang.c (c_language_defn, cplus_language_defn)
6646         (asm_language_defn, minimal_language_defn): Make extern.
6647         (_initialize_c_language): Delete.
6648         * completer.c (compare_cstrings): Delete, moved to utils.h.
6649         * d-lang.c (d_language_defn): Make extern.
6650         (_initialize_d_language): Remove add_language calls.
6651         * defs.h (enum language): Add comment.
6652         * f-lang.c (f_language_defn): Make extern.
6653         (_initialize_f_language): Remove add_language call.
6654         * go-lang.c (go_language_defn): Make extern.
6655         (_initialize_go_language): Remove add_language call.
6656         * language.c: Include <algorithm>.
6657         (languages): Redefine as const array.
6658         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6659         (set_language_command): Handle "local".  Use for-range loop.
6660         (set_language): Remove loop.
6661         (language_enum): Rewrite.
6662         (language_def, language_str): Remove loops.
6663         (add_language): Delete.
6664         (add_set_language_command): New, based on add_languages.
6665         (skip_language_trampoline): Adjust.
6666         (local_language_defn): Delete.
6667         (language_gdbarch_post_init): Adjust.
6668         (_initialize_language): Remove add_language calls.  Call
6669         add_set_language_command.
6670         * language.h (add_language): Delete.
6671         (auto_language_defn)
6672         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6673         (asm_language_defn, c_language_defn, cplus_language_defn)
6674         (d_language_defn, f_language_defn, go_language_defn)
6675         (m2_language_defn, objc_language_defn, opencl_language_defn)
6676         (pascal_language_defn, rust_language_defn): Declare.
6677         * m2-lang.c (m2_language_defn): Make extern.
6678         (_initialize_m2_language): Remove add_language call.
6679         * objc-lang.c (objc_language_defn): Make extern.
6680         (_initialize_objc_language): Remove add_language call.
6681         * opencl-lang.c (opencl_language_defn): Make extern.
6682         (_initialize_opencl_language): Remove add_language call.
6683         * p-lang.c (pascal_language_defn): Make extern.
6684         (_initialize_pascal_language): Delete.
6685         * rust-lang.c (rust_language_defn): Make extern.
6686         (_initialize_rust_language): Delete.
6687         * utils.h (compare_cstrings): New static inline function.
6688
6689 2017-07-20  Pedro Alves  <palves@redhat.com>
6690
6691         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6692         (get_var_value): Constify parameters.
6693         (get_int_var_value): Change prototype.
6694         (to_fixed_range_type): Adjust.
6695         * ada-lang.h (get_int_var_value): Change prototype.
6696
6697 2017-07-20  Pedro Alves  <palves@redhat.com>
6698
6699         * dwarf2read.c (dw2_lookup_symbol): Use
6700         SYMBOL_MATCHES_SEARCH_NAME.
6701         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6702
6703 2017-07-20  Pedro Alves  <palves@redhat.com>
6704
6705         * block.c (block_iter_name_step, block_iter_name_first)
6706         (block_iter_name_next): Delete.
6707         (block_lookup_symbol_primary): Adjust to use
6708         dict_iter_match_first/dict_iter_match_next.
6709         * block.h (block_iter_name_first, block_iter_name_next): Delete
6710         declarations.
6711         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6712         dict_iter_match_first/dict_iter_match_next.
6713
6714 2017-07-20  Pedro Alves  <palves@redhat.com>
6715
6716         * cp-support.c (cp_find_first_component_aux): Add missing case for
6717         end of string.
6718
6719 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6720
6721         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6722         of dwo_cu's dwo_file.
6723
6724 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6725
6726         * remote.c (store_registers_using_G): Remove one line comment.
6727
6728 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6729
6730         * regcache.c (regcache_cpy): Simplify it.
6731         (regcache::cpy_no_passthrough): Remove it.
6732         * regcache.h (cpy_no_passthrough): Remove it.
6733         (regcache_dup, regcache_cpy): Update comments.
6734
6735 2017-07-18  Pedro Alves  <palves@redhat.com>
6736
6737         * remote-sim.c (sim_command_completer): Adjust to work with a
6738         completion_tracker instead of a VEC.
6739
6740 2017-07-17  Pedro Alves  <palves@redhat.com>
6741
6742         * completer.c (complete_source_filenames): New function.
6743         (complete_address_and_linespec_locations): New function.
6744         (location_completer): Use complete_address_and_linespec_locations.
6745         (completion_tracker::build_completion_result): Honor the tracker's
6746         request to suppress append.
6747         * completer.h (completion_tracker::suppress_append_ws)
6748         (completion_tracker::set_suppress_append_ws): New methods.
6749         (completion_tracker::m_suppress_append_ws): New field.
6750         (complete_source_filenames): New declaration.
6751         * linespec.c (linespec_complete_what): New.
6752         (struct ls_parser) <complete_what, completion_word,
6753         completion_quote_char, completion_quote_end, completion_tracker>:
6754         New fields.
6755         (string_find_incomplete_keyword_at_end): New.
6756         (linespec_lexer_lex_string): Record quote char.  If in completion
6757         mode, don't throw.
6758         (linespec_lexer_consume_token): Advance the completion word point.
6759         (linespec_lexer_peek_token): Save/restore completion info.
6760         (save_stream_and_consume_token): New.
6761         (set_completion_after_number): New.
6762         (linespec_parse_basic): Set what to complete next depending on
6763         token.  Handle function and label completions specially.
6764         (parse_linespec): Disable objc shortcut in completion mode.  Set
6765         what to complete next depending on token type.  Skip keyword if in
6766         completion mode.
6767         (complete_linespec_component, linespec_complete): New.
6768         * linespec.h (linespec_complete): Declare.
6769
6770 2017-07-17  Pedro Alves  <palves@redhat.com>
6771
6772         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6773         Handle 'operator<' / 'operator<<'.
6774
6775 2017-07-17  Pedro Alves  <palves@redhat.com>
6776
6777         * completer.c (collect_explicit_location_matches): Handle
6778         MATCH_LABEL.
6779         (convert_explicit_location_to_linespec): New, factored out from
6780         ...
6781         (convert_explicit_location_to_sals): ... this.
6782         (complete_label): New.
6783         (linespec_complete_label, find_label_symbols_in_block): New.
6784         (find_label_symbols): Add completion_mode parameter and adjust to
6785         call find_label_symbols_in_block.
6786         * linespec.h (linespec_complete_label): Declare.
6787
6788 2017-07-17  Pedro Alves  <palves@redhat.com>
6789
6790         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6791         complete_symbol_mode parameter.
6792         * cli/cli-cmds.c (complete_command): Get the completion result out
6793         of the handle_brkchars tracker if used a custom word point.
6794         * completer.c: Include "linespec.h".
6795         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6796         (advance_to_expression_complete_word_point): New.
6797         (completion_tracker::completes_to_completion_word): New.
6798         (complete_files_symbols): Pass down
6799         complete_symbol_mode::EXPRESSION.
6800         (explicit_options, probe_options): New.
6801         (collect_explicit_location_matches): Complete on the
6802         explictit_loc->foo instead of word.  Use
6803         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6804         keyword and options completions.
6805         (backup_text_ptr): Delete.
6806         (skip_keyword): New.
6807         (complete_explicit_location): Remove 'word' parameter.  Add
6808         language, quoted_arg_start and quoted_arg_end parameters.
6809         Rewrite, parsing left to right.
6810         (location_completer): Rewrite.
6811         (location_completer_handle_brkchars): New function.
6812         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6813         (enum complete_line_internal_reason): Adjust comments.
6814         (completion_tracker::discard_completions): New.
6815         (completer_handle_brkchars_func_for_completer): Handle
6816         location_completer.
6817         (gdb_custom_word_point_brkchars)
6818         (gdb_org_rl_basic_quote_characters): New.
6819         (gdb_completion_word_break_characters_throw)
6820         (completion_find_completion_word): Handle trackers that use a
6821         custom word point.
6822         (completion_tracker::advance_custom_word_point_by): New.
6823         (completion_tracker::build_completion_result): Don't rely on
6824         readline appending the quote char.
6825         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6826         use a custom word point.
6827         (gdb_rl_attempted_completion_function): Restore
6828         rl_basic_quote_characters.
6829         * completer.h (class completion_tracker): Extend intro comment.
6830         (completion_tracker::set_quote_char)
6831         (completion_tracker::quote_char)
6832         (completion_tracker::set_use_custom_word_point)
6833         (completion_tracker::use_custom_word_point)
6834         (completion_tracker::custom_word_point)
6835         (completion_tracker::set_custom_word_point)
6836         (completion_tracker::advance_custom_word_point_by)
6837         (completion_tracker::completes_to_completion_word)
6838         (completion_tracker::discard_completions): New methods.
6839         (completion_tracker::m_quote_char)
6840         (completion_tracker::m_use_custom_word_point)
6841         (completion_tracker::m_custom_word_point): New fields.
6842         (advance_to_expression_complete_word_point): Declare.
6843         * f-lang.c (f_collect_symbol_completion_matches): Add
6844         complete_symbol_mode parameter.
6845         * language.h (struct language_defn)
6846         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6847         parameter.
6848         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6849         (linespec_complete_function): New function.
6850         (linespec_lexer_lex_keyword): Adjust.
6851         * linespec.h (linespec_keywords, linespec_complete_function): New
6852         declarations.
6853         * location.c (find_end_quote): New function.
6854         (explicit_location_lex_one): Add explicit_completion_info
6855         parameter.  Save quoting info.  Don't throw if being called for
6856         completion.  Don't handle Ada operators here.
6857         (is_cp_operator, skip_op_false_positives, first_of)
6858         (explicit_location_lex_one_function): New function.
6859         (string_to_explicit_location): Replace 'dont_throw' parameter with
6860         an explicit_completion_info pointer parameter.  Handle it.  Don't
6861         use explicit_location_lex_one to lex function names.  Use
6862         explicit_location_lex_one_function instead.
6863         * location.h (struct explicit_completion_info): New.
6864         (string_to_explicit_location): Replace 'dont_throw' parameter with
6865         an explicit_completion_info pointer parameter.
6866         * symtab.c (default_collect_symbol_completion_matches_break_on):
6867         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6868         (default_collect_symbol_completion_matches)
6869         (collect_symbol_completion_matches): Add complete_symbol_mode
6870         parameter.
6871         (collect_symbol_completion_matches_type): Pass down
6872         complete_symbol_mode::EXPRESSION.
6873         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6874         parameter.  Handle LINESPEC mode.
6875         * symtab.h (complete_symbol_mode): New.
6876         (default_collect_symbol_completion_matches_break_on)
6877         (default_collect_symbol_completion_matches)
6878         (collect_symbol_completion_matches)
6879         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6880         parameter.
6881
6882 2017-07-17  Pedro Alves  <palves@redhat.com>
6883
6884         * utils.c (enum class strncmp_iw_mode): New.
6885         (strcmp_iw): Rename to ...
6886         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6887         parameters.  Handle them.
6888         (strncmp_iw): New.
6889         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6890         * utils.h (strncmp_iw): Declare.
6891         (strcmp_iw): Move describing comments here.
6892
6893 2017-07-17  Pedro Alves  <palves@redhat.com>
6894
6895         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6896         CP_OPERATOR_STR.
6897         * c-typeprint.c (is_type_conversion_operator): Use
6898         CP_OPERATOR_STR.
6899         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6900         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6901         CP_OPERATOR_LEN.
6902         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6903         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6904         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6905         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6906         CP_OPERATOR_STR.
6907         * location.c: Include "cp-support.h".
6908         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6909         CP_OPERATOR_STR.
6910         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6911         CP_OPERATOR_LEN.
6912
6913 2017-07-17  Pedro Alves  <palves@redhat.com>
6914
6915         * cli/cli-cmds.c (complete_command): Use a completion tracker
6916         along with completion_find_completion_word for handle_brkchars
6917         phase.
6918         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6919         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6920         (struct gdb_rl_completion_word_info): New.
6921         (gdb_rl_find_completion_word): New.
6922         (completion_find_completion_word): New.
6923         * completer.h (completion_find_completion_word): Declare.
6924
6925 2017-07-17  Pedro Alves  <palves@redhat.com>
6926
6927         * ada-lang.c (symbol_completion_match): Adjust comments.
6928         (symbol_completion_add): Replace vector parameter with
6929         completion_tracker parameter.  Use it.
6930         (ada_make_symbol_completion_list): Rename to...
6931         (ada_collect_symbol_completion_matches): ... this.  Add
6932         completion_tracker parameter and use it.
6933         (ada_language_defn): Adjust.
6934         * break-catch-syscall.c (catch_syscall_completer): Adjust
6935         prototype and work with completion_tracker instead of VEC.
6936         * breakpoint.c (condition_completer): Adjust prototype and work
6937         with completion_tracker instead of VEC.
6938         * c-lang.c (c_language_defn, cplus_language_defn)
6939         (asm_language_defn, minimal_language_defn): Adjust to renames.
6940         * cli/cli-cmds.c (complete_command): Rework using
6941         completion_tracker.  Catch exceptions when completing.
6942         * cli/cli-decode.c (integer_unlimited_completer)
6943         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6944         with completion_tracker instead of VEC.
6945         * command.h (struct completion_tracker): Forward declare.
6946         (completer_ftype, completer_handle_brkchars_ftype): Change
6947         types.
6948         (complete_on_cmdlist, complete_on_enum): Adjust.
6949         * completer.c: Include <algorithm>.
6950         (struct gdb_completer_state): New.
6951         (current_completion): New global.
6952         (readline_line_completion_function): Delete.
6953         (noop_completer, filename_completer)
6954         (filename_completer_handle_brkchars, complete_files_symbols)
6955         (linespec_location_completer): Adjust to work with a
6956         completion_tracker instead of a VEC.
6957         (string_or_empty): New.
6958         (collect_explicit_location_matches): Adjust to work with a
6959         completion_tracker instead of a VEC.
6960         (explicit_location_completer): Rename to ...
6961         (complete_explicit_location): ... this and adjust to work with a
6962         completion_tracker instead of a VEC.
6963         (location_completer): Adjust to work with a completion_tracker
6964         instead of a VEC.
6965         (add_struct_fields): Adjust to work with a completion_list instead
6966         of VEC.
6967         (expression_completer): Rename to ...
6968         (complete_expression): ... this and adjust to work with a
6969         completion_tracker instead of a VEC.  Use complete_files_symbols.
6970         (expression_completer): Reimplement on top of complete_expression.
6971         (symbol_completer): Adjust to work with a completion_tracker
6972         instead of a VEC.
6973         (enum complete_line_internal_reason): Add describing comments.
6974         (complete_line_internal_normal_command): Adjust to work with a
6975         completion_tracker instead of a VEC.
6976         (complete_line_internal): Rename to ...
6977         (complete_line_internal_1): ... this and adjust to work with a
6978         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6979         handle_brkchars phase.
6980         (new_completion_tracker): Delete.
6981         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6982         complete_line_internal_1.
6983         (free_completion_tracker): Delete.
6984         (INITIAL_COMPLETION_HTAB_SIZE): New.
6985         (completion_tracker::completion_tracker)
6986         (completion_tracker::~completion_tracker): New.
6987         (maybe_add_completion): Delete.
6988         (completion_tracker::maybe_add_completion)
6989         (completion_tracker::add_completion)
6990         (completion_tracker::add_completions): New.
6991         (throw_max_completions_reached_error): Delete.
6992         (complete_line): Adjust to work with a completion_tracker instead
6993         of a VEC.  Don't create a completion_tracker_t or check for max
6994         completions here.
6995         (command_completer, command_completer_handle_brkchars)
6996         (signal_completer, reg_or_group_completer_1)
6997         (reg_or_group_completer, default_completer_handle_brkchars):
6998         Adjust to work with a completion_tracker.
6999         (gdb_completion_word_break_characters_throw): New.
7000         (gdb_completion_word_break_characters): Reimplement.
7001         (line_completion_function): Delete.
7002         (completion_tracker::recompute_lowest_common_denominator)
7003         (expand_preserving_ws)
7004         (completion_tracker::build_completion_result)
7005         (completion_result::completion_result)
7006         (completion_result::completion_result)
7007         (completion_result::~completion_result)
7008         (completion_result::completion_result)
7009         (completion_result::release_match_list, compare_cstrings)
7010         (completion_result::sort_match_list)
7011         (completion_result::reset_match_list)
7012         (gdb_rl_attempted_completion_function_throw)
7013         (gdb_rl_attempted_completion_function): New.
7014         * completer.h (completion_list, struct completion_result)
7015         (class completion_tracker): New.
7016         (complete_line): Add completion_tracker parameter.
7017         (readline_line_completion_function): Delete.
7018         (gdb_rl_attempted_completion_function): New.
7019         (noop_completer, filename_completer, expression_completer)
7020         (location_completer, symbol_completer, command_completer)
7021         (signal_completer, reg_or_group_completer): Update prototypes.
7022         (completion_tracker_t, new_completion_tracker)
7023         (make_cleanup_free_completion_tracker): Delete.
7024         (enum maybe_add_completion_enum): Delete.
7025         (maybe_add_completion): Delete.
7026         (throw_max_completions_reached_error): Delete.
7027         * corefile.c (complete_set_gnutarget): Adjust to work with a
7028         completion_tracker instead of a VEC.
7029         * cp-abi.c (cp_abi_completer): Adjust to work with a
7030         completion_tracker instead of a VEC.
7031         * d-lang.c (d_language_defn): Adjust.
7032         * disasm.c (disassembler_options_completer): Adjust to work with a
7033         completion_tracker instead of a VEC.
7034         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7035         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7036         with a completion_tracker instead of a VEC.
7037         (f_language_defn): Adjust.
7038         * go-lang.c (go_language_defn): Adjust.
7039         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7040         Adjust to work with a completion_tracker instead of a VEC.
7041         * infrun.c (handle_completer): Likewise.
7042         * interps.c (interpreter_completer): Likewise.
7043         * interps.h (interpreter_completer): Likewise.
7044         * language.c (unknown_language_defn, auto_language_defn)
7045         (local_language_defn): Adjust.
7046         * language.h (language_defn::la_make_symbol_completion_list):
7047         Rename to ...
7048         (language_defn::la_collect_symbol_completion_matches): ... this
7049         and adjust to work with a completion_tracker instead of a VEC.
7050         * m2-lang.c (m2_language_defn): Adjust.
7051         * objc-lang.c (objc_language_defn): Adjust.
7052         * opencl-lang.c (opencl_language_defn): Adjust.
7053         * p-lang.c (pascal_language_defn): Adjust.
7054         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7055         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7056         with a completion_tracker.
7057         * rust-lang.c (rust_language_defn): Adjust.
7058         * symtab.c (free_completion_list, do_free_completion_list)
7059         (return_val, completion_tracker): Delete.
7060         (completion_list_add_name, completion_list_add_symbol)
7061         (completion_list_add_msymbol, completion_list_objc_symbol)
7062         (completion_list_add_fields, add_symtab_completions): Add
7063         completion_tracker parameter and use it.
7064         (default_make_symbol_completion_list_break_on_1): Rename to...
7065         (default_collect_symbol_completion_matches_break_on): ... this.
7066         Add completion_tracker parameter and use it instead of allocating
7067         a completion tracker here.
7068         (default_make_symbol_completion_list_break_on): Delete old
7069         implementation.
7070         (default_make_symbol_completion_list): Delete.
7071         (default_collect_symbol_completion_matches): New.
7072         (make_symbol_completion_list): Delete.
7073         (collect_symbol_completion_matches): New.
7074         (make_symbol_completion_type): Rename to ...
7075         (collect_symbol_completion_matches_type): ... this.  Add
7076         completion_tracker parameter and use it instead of VEC.
7077         (make_file_symbol_completion_list_1): Rename to...
7078         (collect_file_symbol_completion_matches): ... this.  Add
7079         completion_tracker parameter and use it instead of VEC.
7080         (make_file_symbol_completion_list): Delete.
7081         (add_filename_to_list): Use completion_list instead of a VEC.
7082         (add_partial_filename_data::list): Now a completion_list.
7083         (make_source_files_completion_list): Work with a completion_list
7084         instead of a VEC.
7085         * symtab.h: Include "completer.h".
7086         (default_make_symbol_completion_list_break_on)
7087         (default_make_symbol_completion_list, make_symbol_completion_list)
7088         (make_symbol_completion_type, make_file_symbol_completion_list)
7089         (make_source_files_completion_list): Delete.
7090         (default_collect_symbol_completion_matches_break_on)
7091         (default_collect_symbol_completion_matches)
7092         (collect_symbol_completion_matches)
7093         (collect_symbol_completion_matches_type)
7094         (collect_file_symbol_completion_matches)
7095         (make_source_files_completion_list): New.
7096         * top.c (init_main): Don't install a rl_completion_entry_function
7097         hook.  Install a rl_attempted_completion_function hook instead.
7098         * tui/tui-layout.c (layout_completer): Adjust to work with a
7099         completion_tracker.
7100         * tui/tui-regs.c (tui_reggroup_completer):
7101         * tui/tui-win.c (window_name_completer, focus_completer)
7102         (winheight_completer): Adjust to work with a completion_tracker.
7103         * value.c: Include "completer.h".
7104         (complete_internalvar): Adjust to work with a completion_tracker.
7105         * value.h (complete_internalvar): Likewise.
7106
7107 2017-07-17  Pedro Alves  <palves@redhat.com>
7108
7109         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7110         renames.
7111         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7112         comments to completer_ftype's declaration.
7113         <completer_handle_brkchars>: Change type to
7114         completer_handle_brkchars_ftype.
7115         * command.h (completer_ftype): Add describing comment and give
7116         names to parameters.
7117         (completer_ftype_void): Rename to ...
7118         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7119         (set_cmd_completer_handle_brkchars): Adjust.
7120         * completer.c (filename_completer_handle_brkchars): New function.
7121         (complete_line_internal_normal_command): New function, factored
7122         out from ...
7123         (complete_line_internal): ... here.
7124         (command_completer_handle_brkchars)
7125         (default_completer_handle_brkchars)
7126         (completer_handle_brkchars_func_for_completer): New functions.
7127         * completer.h (set_gdb_completion_word_break_characters): Delete
7128         declaration.
7129         (completer_handle_brkchars_func_for_completer): New declaration.
7130         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7131         completer_handle_brkchars_func_for_completer.
7132
7133 2017-07-17  Pedro Alves  <palves@redhat.com>
7134
7135         * completer.c (symbol_completer): New function, based on
7136         make_symbol_completion_list_fn.
7137         * completer.h (symbol_completer): New declaration.
7138         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7139         * python/py-cmd.c (completers): Adjust.
7140         * symtab.c (make_symbol_completion_list_fn): Delete.
7141         * symtab.h (make_symbol_completion_list_fn): Delete.
7142         * cli/cli-decode.c (add_cmd): Adjust.
7143
7144 2017-07-17  Pedro Alves  <palves@redhat.com>
7145
7146         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7147         * dwarf2read.c: Include "filename-seen-cache.h".
7148         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7149         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7150         * filename-seen-cache.c: New file.
7151         * filename-seen-cache.h: New file.
7152         * symtab.c: Include "filename-seen-cache.h".
7153         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7154         (create_filename_seen_cache, clear_filename_seen_cache)
7155         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7156         to filename-seen-cache.h/filename-seen-cache.c.
7157         (output_source_filename, sources_info)
7158         (maybe_add_partial_symtab_filename)
7159         (make_source_files_completion_list): Adjust to use
7160         filename_seen_cache.
7161
7162 2017-07-17  Pedro Alves  <palves@redhat.com>
7163
7164         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7165         fields.
7166         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7167         dwarf2_debug_sections*)): New.
7168         (dwarf2_per_objfile::dwarf2_per_objfile(const
7169         dwarf2_per_objfile&)): Declare as deleted.
7170         (dwarf2_per_objfile::operator=): Declare as deleted.
7171         (dwarf2_per_objfile::dwarf2_per_objfile)
7172         (dwarf2_per_objfile::~dwarf2_per_objfile)
7173         (dwarf2_per_objfile::free_cached_comp_units): New.
7174         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7175         ctor.  Call dwarf2_per_objfile's ctor manually.
7176         (dwarf2_locate_sections): Deleted/refactored as ...
7177         (dwarf2_per_objfile::locate_sections): ... this new method.
7178         (free_cached_comp_units): Defer to
7179         dwarf2_per_objfile::free_cached_comp_units.
7180         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7181
7182 2017-07-14  Tom Tromey  <tom@tromey.com>
7183
7184         PR rust/21764:
7185         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7186         parameter.
7187         <UNOP_SIZEOF>: Split into separate case.
7188         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7189
7190 2017-07-14  Tom Tromey  <tom@tromey.com>
7191
7192         PR rust/21763:
7193         * symtab.c (symbol_matches_domain): Add language_rust to special
7194         case.
7195         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7196         treat LOC_TYPEDEF symbols as variables.
7197
7198 2017-07-14  Pedro Alves  <palves@redhat.com>
7199
7200         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7201         symtabs matching all symtabs with SRCFILE as file name instead of
7202         only considering the first hit, with lookup_symtab.
7203
7204 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7205
7206         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7207         operator_name parameters.
7208         (gen_expr): Update function call.
7209
7210 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7211
7212         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7213         parameter.
7214         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7215         Likewise.
7216         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7217         parameter, use agent_expr::gdbarch instead, update function
7218         calls.
7219         (locexpr_tracepoint_var_ref): Likewise.
7220         (loclist_tracepoint_var_ref): Likewise.
7221         * ax-gdb.c (gen_trace_static_fields): Likewise.
7222         (gen_traced_pop): Likewise.
7223         (gen_frame_args_address): Likewise.
7224         (gen_frame_locals_address): Likewise.
7225         (gen_var_ref): Likewise.
7226         (gen_struct_ref_recursive): Likewise.
7227         (gen_static_field): Likewise.
7228         (gen_maybe_namespace_elt): Likewise.
7229         (gen_expr): Likewise.
7230         (gen_trace_for_var): Likewise.
7231         (gen_trace_for_expr): Likewise.
7232         (gen_trace_for_return_address): Likewise.
7233
7234 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7235
7236         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7237         parameter.
7238         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7239
7240 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7241
7242         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7243         from ax, update calls.
7244         (gen_usual_arithmetic): Likewise.
7245         (gen_integral_promotions): Likewise.
7246         (gen_bitfield_ref): Likewise.
7247         (gen_primitive_field): Likewise.
7248         (gen_struct_ref_recursive): Likewise.
7249         (gen_struct_ref): Likewise.
7250         (gen_maybe_namespace_elt): Likewise.
7251         (gen_struct_elt_for_reference): Likewise.
7252         (gen_namespace_elt): Likewise.
7253         (gen_aggregate_elt_ref): Likewise.
7254         (gen_expr): Get gdbarch from ax, update calls.
7255         (gen_expr_binop_rest): Likewise.
7256
7257 2017-07-13  Pedro Alves  <palves@redhat.com>
7258
7259         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7260         as default tdesc.
7261         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7262         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7263         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7264         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7265         tdep.
7266         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7267         Get final tdesc from the tdep.
7268         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7269         default tdesc.
7270         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7271         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7272         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7273         Use it as default tdesc.
7274         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7275         down to amd_init_abi.  No longer handle fallback tdesc here.
7276         * amd64-tdep.h (tdesc_x32): Declare.
7277         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7278         parameter.
7279         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7280         as default tdesc.
7281
7282 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7283
7284         * s390-linux-tdep.c (s390_process_record): Add support for
7285         instructions new in arch12.
7286
7287 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7288
7289         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7290         PT_GETFSBASE and PT_GETGSBASE.
7291         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7292         PT_SETGSBASE.
7293
7294 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7295
7296         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7297         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7298         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7299         those rules.
7300         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7301         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7302         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7303         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7304         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7305         * features/i386/amd64.xml: Add 64bit-segments.xml.
7306         * features/i386/amd64-avx-avx512.c: Regenerated.
7307         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7308         * features/i386/amd64-avx-mpx.c: Regenerated.
7309         * features/i386/amd64-avx.c: Regenerated.
7310         * features/i386/amd64-mpx.c: Regenerated.
7311         * features/i386/amd64.c: Regenerated.
7312         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7313         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7314         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7315         * regformats/i386/amd64-avx.dat: Regenerated.
7316         * regformats/i386/amd64-mpx.dat: Regenerated.
7317         * regformats/i386/amd64.dat: Regenerated.
7318
7319 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7320
7321         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7322         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7323
7324 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7325
7326         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7327         unsetenv.
7328         * gnulib/aclocal.m4: Regenerate.
7329         * gnulib/config.in: Regenerate.
7330         * gnulib/configure: Regenerate.
7331         * gnulib/import/Makefile.am: Regenerate.
7332         * gnulib/import/Makefile.in: Regenerate.
7333         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7334         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7335         * gnulib/import/m4/environ.m4: New file.
7336         * gnulib/import/m4/setenv.m4: New file.
7337         * gnulib/import/setenv.c: New file.
7338         * gnulib/import/unsetenv.c: New file.
7339
7340 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7341
7342         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7343         address when op is DW_OP_addr.
7344
7345 2017-07-09  Tom Tromey  <tom@tromey.com>
7346
7347         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7348         check and apply to outer type.
7349
7350 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7351
7352         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7353         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7354         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7355         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7356
7357 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7358
7359         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7360
7361 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7362
7363         * corelow.c (get_core_siginfo): Remove.
7364         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7365         instead of get_core_siginfo.
7366         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7367         * gdbarch.h: Re-generate.
7368         * gdbarch.c: Re-generate.
7369         * linux-tdep.c (linux_core_xfer_siginfo): New.
7370         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7371
7372 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7373
7374         * corelow.c (thread_section_name): Move to ...
7375         * gdbcore.h (thread_section_name): ... here.
7376
7377 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7378
7379         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7380         (struct siginfo32): New.
7381         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7382         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7383         via ptrace(PT_LWPINFO).
7384
7385 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7386
7387         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7388         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7389         (fbsd_get_siginfo_type): New.
7390         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7391         (_initialize_fbsd_tdep): New.
7392
7393 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7394
7395         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7396         a singular dwo_unit*) to support multiple CUs in the same way that
7397         multiple TUs are supported.
7398         (create_cus_hash_table): Replace create_dwo_cu with a function for
7399         parsing multiple CUs from a DWO file.
7400         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7401         create_dwo_cu.
7402         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7403         htab_find, rather than comparing the signature to a singleton CU in
7404         the dwo_file.
7405
7406 2017-07-06  Pedro Alves  <palves@redhat.com>
7407
7408         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7409
7410 2017-07-04  Pedro Alves  <palves@redhat.com>
7411
7412         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7413         * gdbtypes.h (TYPE_STATIC): Delete.
7414         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7415         is_synchronized, is_native>: Delete.
7416         <dummy>: Bump.
7417         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7418         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7419         (TYPE_FN_FIELD_ABSTRACT): Delete.
7420
7421 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * buffer.h (buffer_finish): Fix spelling mistakes.
7424
7425 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7426
7427         * .dir-locals.el: Automatically switch to C-style comments in
7428         versions of Emacs that support the feature.
7429
7430 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7431             Pedro Alves  <palves@redhat.com>
7432
7433         PR cli/21688
7434         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7435         (process_next_line): New variable 'inline_cmd'.
7436         Adjust 'if' clauses for "python", "compile" and "guile" to use
7437         'command_name_equals' and check for '!inline_cmd'.
7438
7439 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7440
7441         PR cli/21688
7442         * cli/cli-script.c (command_name_equals_not_inline): New function.
7443         (process_next_line): Adjust 'if' clauses for "python", "compile"
7444         and "guile" to use command_name_equals_not_inline.
7445
7446 2017-06-29  Pedro Alves  <palves@redhat.com>
7447
7448         * completer.c (expression_completer): Call
7449         linespec_location_completer instead of location_completer.
7450
7451 2017-06-29  Pedro Alves  <palves@redhat.com>
7452
7453         * completer.c (expression_completer): Remove code that recomputes
7454         'text' from 'word'.
7455
7456 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7457
7458         * regformats/regdat.sh: Generate code with
7459         "ifndef IN_PROCESS_AGENT".
7460
7461 2017-06-28  Pedro Alves  <palves@redhat.com>
7462
7463         * command.h: Include "common/scoped_restore.h".
7464
7465 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7466
7467         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7468         instead of obstack_grow.
7469
7470 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7471
7472         PR gdb/21337
7473         * symfile.c (reread_symbols): Call objfiles_changed just before
7474         read_symbols.
7475
7476 2017-06-27  Pedro Alves  <palves@redhat.com>
7477
7478         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7479         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7480         (completion_list_add_symbol, completion_list_add_msymbol):
7481         ... these new functions.
7482         (add_symtab_completions)
7483         (default_make_symbol_completion_list_break_on_1): Adjust.
7484
7485 2017-06-27  Pedro Alves  <palves@redhat.com>
7486
7487         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7488         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7489         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7490         dtor.
7491         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7492         'storage_obstack' field an auto_obstack.  In-class initialize all
7493         non-bitfield fields.  Make minsyms_read bool.
7494         * symfile.c (read_symbols): Adjust.
7495
7496 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7497
7498         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7499         (gdbsim_store_register): Likewise.
7500
7501 2017-06-27  Pedro Alves  <palves@redhat.com>
7502
7503         * c-exp.y (name_obstack): Now an auto_obstack.
7504         (yylex): Use auto_obstack::clear.
7505         (c_parse): Use auto_obstack::clear instead of reinitializing and
7506         freeing the obstack.
7507         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7508         * d-exp.y (name_obstack): Now an auto_obstack.
7509         (yylex): Use auto_obstack::clear.
7510         (d_parse): Use auto_obstack::clear instead of reinitializing and
7511         freeing the obstack.
7512         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7513         auto_obstack.
7514         * dwarf2read.c (create_addrmap_from_index)
7515         (dwarf2_build_psymtabs_hard)
7516         (update_enumeration_type_from_children): Likewise.
7517         * gdb_obstack.h (auto_obstack): New type.
7518         * go-exp.y (name_obstack): Now an auto_obstack.
7519         (build_packaged_name): Use auto_obstack::clear.
7520         (go_parse): Use auto_obstack::clear instead of reinitializing and
7521         freeing the obstack.
7522         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7523         auto_obstack.
7524         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7525         * rust-exp.y (work_obstack): Now an auto_obstack.
7526         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7527         reinitializing and freeing the obstack.
7528         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7529         (host_char_to_target): Use auto_obstack.
7530         * utils.h (make_cleanup_obstack_free): Delete declaration.
7531         * valprint.c (generic_emit_char, generic_printstr): Use
7532         auto_obstack.
7533
7534 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7535
7536         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7537         thread.
7538         (darwin_init_thread_list): Don't update dummy thread.
7539         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7540
7541 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7542
7543         * record-full.c (netorder16): Remove.
7544
7545 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7546
7547         * common/diagnostics.h: Define macros for GCC.
7548         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7549         * common/vec.h: Include diagnostics.h.
7550         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7551         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7552         warning.
7553
7554 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7555
7556         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7557         New macro.
7558         * ada-lex.l: Ignore deprecated register warnings.
7559
7560 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7561
7562         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7563         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7564
7565 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7566
7567         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7568         its own line.
7569
7570 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7571
7572         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7573
7574 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7575
7576         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7577         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7578         (xtensa_register_read_masked): Likewise.
7579
7580 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7581
7582         * common/environ.c (gdb_environ::unset): Update comment.
7583
7584 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7585
7586         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7587         registers.
7588
7589 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7590
7591         * record-full.c (record_full_exec_insn): Use byte_vector.
7592
7593 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7594
7595         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7596         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7597
7598 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7599
7600         * remote.c (cached_reg): Move from here...
7601         * regcache.h (cached_reg): ...to here.
7602         * python/py-unwind.c (struct reg_info): Remove.
7603         (cached_frame_info): Use cached_reg_t.
7604         (pyuw_prev_register): Likewise.
7605         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7606         (pyuw_dealloc_cache): Free all registers.
7607
7608 2017-06-22  Pedro Alves  <palves@redhat.com>
7609             Simon Marchi  <simon.marchi@ericsson.com>
7610
7611         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7612         warning.
7613         * common/diagnostics.h: New file.
7614
7615 2017-06-22  Pedro Alves  <palves@redhat.com>
7616
7617         * common/agent.h: Add include guards.
7618
7619 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7620
7621         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7622         talk about addressable units instead of bytes.
7623
7624 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7625
7626         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7627         of '::const_iterator'.
7628
7629 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7630
7631         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7632         'unittests/environ-selftests.c'.
7633         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7634         * charset.c (find_charset_names): Declare object 'iconv_env'.
7635         Update code to use 'iconv_env' object.  Remove call to
7636         'free_environ'.
7637         * common/environ.c: Include <utility>.
7638         (make_environ): Delete function.
7639         (free_environ): Delete function.
7640         (gdb_environ::clear): New function.
7641         (gdb_environ::operator=): New function.
7642         (gdb_environ::get): Likewise.
7643         (environ_vector): Delete function.
7644         (set_in_environ): Delete function.
7645         (gdb_environ::set): New function.
7646         (unset_in_environ): Delete function.
7647         (gdb_environ::unset): New function.
7648         (gdb_environ::envp): Likewise.
7649         * common/environ.h: Include <vector>.
7650         (struct gdb_environ): Delete; transform into...
7651         (class gdb_environ): ... this class.
7652         (free_environ): Delete prototype.
7653         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7654         environ_vector): Likewise.
7655         * infcmd.c (run_command_1): Update code to call
7656         'envp' from 'gdb_environ' class.
7657         (environment_info): Update code to call methods from 'gdb_environ'
7658         class.
7659         (unset_environment_command): Likewise.
7660         (path_info): Likewise.
7661         (path_command): Likewise.
7662         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7663         (inferior::inferior): Initialize 'environment' using the host's
7664         information.
7665         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7666         Include "environ.h".
7667         (class inferior) <environment>: Change type from 'struct
7668         gdb_environ' to 'gdb_environ'.
7669         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7670         methods from 'gdb_environ' class.
7671         * solib.c (solib_find_1): Likewise
7672         * unittests/environ-selftests.c: New file.
7673
7674 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7675
7676         * features/i386/i386-linux.xml: Exchange the order of including
7677         32bit-linux.xml and 32bit-sse.xml.
7678         * features/i386/i386-linux.c: Regenerated.
7679
7680 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7681
7682         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7683         Delete copy ctor and assignment operator.
7684         (tdesc_type): Likewise.
7685         (tdesc_feature): Likewise.
7686         (tdesc_free_reg): Remove.
7687         (tdesc_create_reg): Use new.
7688         (tdesc_free_type): Remove.
7689         (tdesc_create_vector): Use new.
7690         (tdesc_create_union): Likewise.
7691         (tdesc_create_flags): Likewise.
7692         (tdesc_create_enum): Likewise.
7693         (tdesc_free_feature): Delete.
7694         (free_target_description): Use delete.
7695
7696 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7697
7698         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7699         registers.
7700
7701 2017-06-19  Pedro Alves  <palves@redhat.com>
7702
7703         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7704         after gdb::unlinker.
7705
7706 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7707
7708         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7709         gdb_environ to access an environment variable.
7710
7711 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7712
7713         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7714         gdb_byte*.
7715
7716 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7717
7718         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7719
7720 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7721
7722         * configure: Re-generate.
7723         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7724
7725 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7726
7727         * configure: Re-generate.
7728         * warning.m4: Pass -Werror to compiler when checking for
7729         supported warning flags.
7730
7731 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7732
7733         * Makefile.in (COMPILE.pre): Add "-x c++".
7734
7735 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7736             Pedro Alves  <palves@redhat.com>
7737             Yao Qi  <yao.qi@linaro.org>
7738
7739         * defs.h (RequireLongest): New.
7740         (extract_integer): Declare function template.
7741         (extract_signed_integer): Remove the declaration, but define it
7742         static inline.
7743         (extract_unsigned_integer): Likewise.
7744         (store_integer): Declare function template.
7745         (store_signed_integer): Remove the declaration, but define it
7746         static inline.
7747         (store_unsigned_integer): Likewise.
7748         * findvar.c (extract_integer): New function template.
7749         (extract_signed_integer): Remove.
7750         (extract_unsigned_integer): Remove.
7751         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7752         instantiations.
7753         (store_integer): New function template.
7754         (store_signed_integer): Remove.
7755         (store_unsigned_integer): Remove.
7756         (store_integer): Explicit instantiations.
7757         * regcache.c (regcache_raw_read_signed): Update.
7758         (regcache::raw_read): New function.
7759         (regcache::raw_read_signed): Remove.
7760         (regcache::raw_read_unsigned): Remove.
7761         (regcache_raw_read_unsigned): Update.
7762         (regcache_raw_write_unsigned): Update.
7763         (regcache::raw_write_signed): Remove.
7764         (regcache::raw_write): New function.
7765         (regcache_cooked_read_signed): Update.
7766         (regcache::raw_write_unsigned): Remove.
7767         (regcache::cooked_read_signed): Remove.
7768         (regcache_cooked_read_unsigned): Update.
7769         (regcache::cooked_read_unsigned): Remove.
7770         (regcache_cooked_write_signed): Update.
7771         (regcache_cooked_write_unsigned): Update.
7772         * regcache.h (regcache) <raw_read_signed>: Remove.
7773         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7774         <raw_read, raw_write>: New.
7775         <cooked_read_signed, cooked_write_signed>: Remove.
7776         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7777         <cooked_read, cooked_write>: New.
7778         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7779         (sh64_pseudo_register_write): Update.
7780
7781 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7782
7783         * arc-tdep.c (arc_disassembler_options): New variable.
7784         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7785         of default_print_insn.
7786         (arc_delayed_print_insn): Set info->section when needed,
7787         use default_print_insn to retrieve a disassembler.
7788
7789 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7790
7791         PR gdb/21574
7792         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7793         to mention $SHELL and startup-with-shell.
7794
7795 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7796
7797         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7798
7799 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7800
7801         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7802         default_print_insn instead of print_insn_aarch64.
7803         * arm-tdep.c (gdb_print_insn_arm): Call
7804         default_print_insn instead of print_insn_big_arm
7805         and print_insn_little_arm.
7806         * i386-tdep.c (i386_print_insn): Call default_print_insn
7807         instead of print_insn_i386.
7808         * ia64-tdep.c (ia64_print_insn): Call
7809         default_print_insn instead of print_insn_ia64.
7810         * mips-tdep.c (gdb_print_insn_mips): Call
7811         default_print_insn instead of print_insn_big_mips
7812         and print_insn_little_mips.
7813         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7814         instead of print_insn_spu.
7815
7816 2017-06-14  Pedro Alves  <palves@redhat.com>
7817
7818         * ada-lang.c: Include "common/byte-vector.h".
7819         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7820         * charset.c (wchar_iterator::iterate): Resize the vector instead
7821         of reserving it.
7822         * common/byte-vector.h: Include "common/def-vector.h".
7823         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7824         * cli/cli-dump.c: Include "common/byte-vector.h".
7825         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7826         * common/byte-vector.h: New file.
7827         * common/def-vector.h: New file.
7828         * common/default-init-alloc.h: New file.
7829         * dwarf2loc.c: Include "common/byte-vector.h".
7830         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7831         instead of reserving it.
7832         * dwarf2read.c: Include "common/byte-vector.h".
7833         (data_buf::m_vec): Now a gdb::byte_vector.
7834         * gdb_regex.c: Include "common/def-vector.h".
7835         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7836         * mi/mi-main.c: Include "common/byte-vector.h".
7837         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7838         * printcmd.c: Include "common/byte-vector.h".
7839         (print_scalar_formatted): Use gdb::byte_vector.
7840         * valprint.c: Include "common/byte-vector.h".
7841         (maybe_negate_by_bytes, print_decimal_chars): Use
7842         gdb::byte_vector.
7843
7844 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7845
7846         * darwin-nat.c: Include "nat/fork-inferior.h".
7847
7848 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7849
7850         * configure.nat: Factor out Darwin bits that are not
7851         architecture-specific.  Add fork-inferior.o.
7852
7853 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7854
7855         * configure.nat: Factor out AIX bits that are not
7856         architecture-specific.  Add fork-inferior.o.
7857
7858 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7859
7860         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7861         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7862         wrappers that just call rw_pieced_value.
7863
7864 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7865
7866         * dwarf2loc.c (write_pieced_value): When writing the data for a
7867         memory piece, use write_memory_with_notification instead of
7868         write_memory.
7869
7870 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7871
7872         * valops.c (read_value_memory): Change embedded_offset to
7873         represent a bit offset instead of a byte offset.
7874         * value.h (read_value_memory): Adjust comment.
7875
7876 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7877
7878         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7879         dest_offset_bits and source_offset_bits.
7880         (write_pieced_value): Likewise.
7881
7882 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7883
7884         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7885         given by DW_OP_bit_piece.
7886         (write_pieced_value): Likewise.
7887
7888 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7889
7890         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7891         some other preparations to the places where sufficient information
7892         is available.
7893         (write_pieced_value): Likewise.
7894
7895 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7896
7897         * dwarf2loc.c (bits_to_bytes): New function.
7898         (read_pieced_value): Fix offset calculations for register pieces
7899         on big-endian targets.
7900         (write_pieced_value): Likewise.
7901
7902 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7903
7904         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7905         (write_pieced_value): Likewise.
7906
7907 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7908
7909         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7910         transfer the source value's least significant bits, instead of its
7911         lowest-addressed ones.  Rename type_len to max_offset.
7912         (read_pieced_value): Mirror above changes to write_pieced_value as
7913         applicable.
7914
7915 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7916
7917         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7918         truncate full bytes from dest_offset_bits before using it as an
7919         offset into the buffer.
7920
7921 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7922
7923         * dwarf2loc.c (write_pieced_value): Include transfer size in
7924         byte-wise check.
7925
7926 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7927
7928         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7929         calculation of this_size.
7930
7931 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7932
7933         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7934         when targeting a bit-field.
7935         (write_pieced_value): Likewise.
7936
7937 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7938
7939         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7940         (allocate_piece_closure): Drop addr_size parameter.
7941         (dwarf2_evaluate_loc_desc_full): Adjust call to
7942         allocate_piece_closure.
7943
7944 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7945
7946         PR gdb/21226
7947         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7948         the LSB end, independent of endianness.
7949
7950 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7951
7952         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7953         size capping.
7954
7955 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7956
7957         * mips-linux-nat.c: Move include features/mips*-linux.c to
7958         mips-linux-tdep.c.
7959         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7960         to mips-linux-tdep.c.
7961         * mips-linux-tdep.c: Include features/mips*-linux.c
7962         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7963         functions.
7964         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7965         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7966         (tdesc_mips64_dsp_linux): Declare.
7967
7968 2017-06-12  Tom Tromey  <tom@tromey.com>
7969
7970         * valprint.h (val_print_type_code_int): Remove.
7971         * valprint.c (generic_val_print_int): Always call
7972         val_print_scalar_formatted.
7973         (val_print_type_code_int): Remove.
7974         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7975         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7976         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7977         * ada-valprint.c (ada_val_print_num): Use
7978         val_print_scalar_formatted.
7979
7980 2017-06-12  Tom Tromey  <tom@tromey.com>
7981
7982         * printcmd.c (print_scalar_formatted): Unify the two switches.
7983         Don't convert scalars to LONGEST.
7984
7985 2017-06-12  Tom Tromey  <tom@tromey.com>
7986
7987         PR exp/16225:
7988         * valprint.h (print_decimal_chars): Update.
7989         * valprint.c (maybe_negate_by_bytes): New function.
7990         (print_decimal_chars): Add "is_signed" argument.
7991         * printcmd.c (print_scalar_formatted): Update.
7992
7993 2017-06-12  Tom Tromey  <tom@tromey.com>
7994
7995         PR exp/16225:
7996         * valprint.h (print_binary_chars, print_hex_chars): Update.
7997         * valprint.c (val_print_type_code_int): Update.
7998         (print_binary_chars): Add "zero_pad" argument.
7999         (emit_octal_digit): New function.
8000         (print_octal_chars): Don't zero-pad.
8001         (print_decimal_chars): Likewise.
8002         (print_hex_chars): Add "zero_pad" argument.
8003         * sh64-tdep.c (sh64_do_fp_register): Update.
8004         * regcache.c (regcache::dump): Update.
8005         * printcmd.c (print_scalar_formatted): Update.
8006         * infcmd.c (default_print_one_register_info): Update.
8007
8008 2017-06-12  Pedro Alves  <palves@redhat.com>
8009             Alan Hayward  <alan.hayward@arm.com>
8010
8011         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8012         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8013         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8014         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8015         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8016
8017 2017-06-12  Pedro Alves  <palves@redhat.com>
8018
8019         * dwarf2read.c (mapped_symtab::data): Now a vector of
8020         symtab_index_entry instead of vector of
8021         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8022         whether an element's name is NULL instead of checking whether the
8023         element itself is NULL.
8024         (find_slot): Change return type.  Adjust.
8025         (hash_expand, , add_index_entry, uniquify_cu_indices)
8026         (write_hash_table): Adjust.
8027
8028 2017-06-12  Pedro Alves  <palves@redhat.com>
8029
8030         * dwarf2read.c (recursively_count_psymbols): New function.
8031         (write_psymtabs_to_index): Call it to compute number of psyms and
8032         pass estimate size of psyms_seen to unordered_set's ctor.
8033
8034 2017-06-12  Pedro Alves  <palves@redhat.com>
8035
8036         * dwarf2read.c (write_hash_table): Check if key already exists
8037         before emplacing.
8038
8039 2017-06-12  Pedro Alves  <palves@redhat.com>
8040
8041         * dwarf2read.c (data_buf::append_space): Rename to...
8042         (data_buf::grow): ... this, and make private.  Adjust all callers.
8043         (data_buf::append_uint): New method.
8044         (add_address_entry, write_one_signatured_type)
8045         (write_psymtabs_to_index): Use it.
8046
8047 2017-06-12  Pedro Alves  <palves@redhat.com>
8048
8049         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8050         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8051         (data_buf::file_write): Call ::fwrite directly.
8052
8053 2017-06-12  Pedro Alves  <palves@redhat.com>
8054
8055         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8056         std::vector::erase.
8057
8058 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8059
8060         Code cleanup: C++ify .gdb_index producer.
8061         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8062         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8063         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8064         (create_strtab, add_string): Remove.
8065         (file_write, data_buf): New.
8066         (struct symtab_index_entry): Use std::vector for cu_indices.
8067         (struct mapped_symtab): Use std::vector for data.
8068         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8069         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8070         Remove.
8071         (find_slot): Change return type.  Update it to the new data structures.
8072         (hash_expand, add_index_entry): Update it to the new data structures.
8073         (offset_type_compare): Remove.
8074         (uniquify_cu_indices): Update it to the new data structures.
8075         (c_str_view, c_str_view_hasher, vector_hasher): New.
8076         (add_indices_to_cpool): Remove.
8077         (write_hash_table): Update it to the new data structures.
8078         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8079         (eq_psymtab_cu_index): Remove.
8080         (psym_index_map): New typedef.
8081         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8082         reference and std::unordered_map for cu_index_htab.
8083         (add_address_entry, add_address_entry_worker, write_address_map)
8084         (write_psymbols): Update it to the new data structures.
8085         (write_obstack): Remove.
8086         (struct signatured_type_index_data): Change types_list to a data_buf
8087         reference and psyms_seen to a std::unordered_set reference.
8088         (write_one_signatured_type, recursively_write_psymbols)
8089         (write_psymtabs_to_index): Update it to the new data structures.
8090
8091 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8092
8093         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8094         separate-debug-file commands.
8095         * symfile.h (separate_debug_file_debug): New global.
8096         * symfile.c (separate_debug_file_debug): New global.
8097         (separate_debug_file_exists, find_separate_debug_file): Add
8098         debug output.
8099         (_initialize_symfile): Add "set debug separate-debug-file"
8100         command.
8101         * build-id.c (build_id_to_debug_bfd,
8102         find_separate_debug_file_by_buildid): Add debug output.
8103
8104 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8105
8106         * gdbarch.sh (displaced_step_free_closure): Remove.
8107         * gdbarch.h, gdbarch.c: Re-generate.
8108         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8109         displaced_step_free_closure.
8110         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8111         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8112         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8113         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8114         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8115         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8116         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8117         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8118         * infrun.c (displaced_step_clear): Call xfree instead of
8119         gdbarch_displaced_step_free_closure.
8120
8121 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8122
8123         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8124         NULL".
8125
8126 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8127
8128         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8129         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8130         (mn10300_push_dummy_call): Likewise.
8131
8132 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8133
8134         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8135
8136 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8137
8138         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8139
8140 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8141
8142         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8143         able to start inferiors using a shell.
8144         (New remote packets): Announce new packet "QStartupWithShell".
8145         * remote.c: Add PACKET_QStartupWithShell.
8146         (extended_remote_create_inferior): Handle new
8147         PACKET_QStartupWithShell.
8148         (remote_protocol_features) <QStartupWithShell>: New entry for
8149         PACKET_QStartupWithShell.
8150         (_initialize_remote): Call "add_packet_config_cmd" for
8151         QStartupShell.
8152
8153 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8154             Pedro Alves  <palves@redhat.com>
8155
8156         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8157         and "nat/fork-inferior.h".
8158         * common/common-inferior.h: New file, with contents from
8159         "gdb/inferior.h".
8160         * commom/common-utils.c: Include "common-utils.h".
8161         (stringify_argv): New function.
8162         * common/common-utils.h (stringify_argv): New prototype.
8163         * configure.nat: Add "fork-inferior.o" as a dependency for
8164         "*linux*", "fbsd*" and "nbsd*" hosts.
8165         * corefile.c (get_exec_file): Update comment.
8166         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8167         instead of "startup_inferior".
8168         (darwin_create_inferior): Call "add_thread_silent" after
8169         "fork_inferior".
8170         * fork-child.c: Cleanup unnecessary includes.
8171         (SHELL_FILE): Move to "common/common-fork-child.c".
8172         (environ): Likewise.
8173         (exec_wrapper): Initialize.
8174         (get_exec_wrapper): New function.
8175         (breakup_args): Move to "common/common-fork-child.c"; rename to
8176         "breakup_args_for_exec".
8177         (escape_bang_in_quoted_argument): Move to
8178         "common/common-fork-child.c".
8179         (saved_ui): New variable.
8180         (prefork_hook): New function.
8181         (postfork_hook): Likewise.
8182         (postfork_child_hook): Likewise.
8183         (gdb_startup_inferior): Likewise.
8184         (fork_inferior): Move to "common/common-fork-child.c".  Update
8185         function to support gdbserver.
8186         (startup_inferior): Likewise.
8187         * gdbcore.h (get_exec_file): Remove declaration.
8188         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8189         instead of "startup_inferior".  Call "add_thread_silent" after
8190         "fork_inferior".
8191         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8192         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8193         instead of "startup_inferior".  Call "add_thread_silent" after
8194         "fork_inferior".
8195         * inferior.h: Include "common-inferior.h".
8196         (trace_start_error): Move to "common/common-utils.h".
8197         (trace_start_error_with_name): Likewise.
8198         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8199         (startup_inferior): Likewise.
8200         (gdb_startup_inferior): New prototype.
8201         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8202         * nat/fork-inferior.h: New file.
8203         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8204         instead of "startup_inferior".  Call "add_thread_silent" after
8205         "fork_inferior".
8206         * target.h (target_terminal_init): Move prototype to
8207         "target/target.h".
8208         (target_terminal_inferior): Likewise.
8209         (target_terminal_ours): Likewise.
8210         * target/target.h (target_terminal_init): New prototype, moved
8211         from "target.h".
8212         (target_terminal_inferior): Likewise.
8213         (target_terminal_ours): Likewise.
8214         * utils.c (gdb_flush_out_err): New function.
8215
8216 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8217
8218         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8219         * common/common-gdbthread.h: New file, with parts from
8220         "gdb/gdbthread.h".
8221         * gdbthread.h: Include "common-gdbthread.h".
8222         (switch_to_thread): Moved to "common/common-gdbthread.h".
8223
8224 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8225
8226         * Makefile.in (SFILES): Add "common/job-control.c".
8227         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8228         (COMMON_OBS): Add "job-control.o".
8229         * common/job-control.c: New file, with contents from
8230         "gdb/inflow.c".
8231         * common/job-control.h: New file, with contents from "terminal.h".
8232         * fork-child.c: Include "job-control.h".
8233         * inflow.c: Include "job-control.h".
8234         (gdb_setpgid): Move to "common/common-inflow.c".
8235         (_initialize_inflow): Move setting of "job_control" to
8236         "handle_job_control".
8237         * terminal.h (job_control): Moved to "common/common-terminal.h".
8238         (gdb_setpgid): Likewise.
8239         * top.c: Include "job_control.h".
8240         * utils.c: Likewise.
8241         (job_control): Moved to "job-control.c".
8242
8243 2017-06-07  Pedro Alves  <palves@redhat.com>
8244
8245         * Makefile.in (SFILES): Add gdb_regex.c.
8246         (COMMON_OBS): Add gdb_regex.o.
8247         * ada-lang.c (ada_add_standard_exceptions)
8248         (ada_add_exceptions_from_frame, name_matches_regex)
8249         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8250         parameter type to compiled_regex.  Adjust.
8251         (ada_exceptions_list): Use compiled_regex.
8252         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8253         std::unique_ptr<compiled_regex>.
8254         (exception_catchpoint::~exception_catchpoint): Remove regfree
8255         call.
8256         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8257         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8258         * breakpoint.c (solib_catchpoint::compiled): Now a
8259         std::unique_ptr<compiled_regex>.
8260         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8261         (check_status_catch_solib): Adjust to use compiled_regex.
8262         (add_solib_catchpoint): Adjust to use compiled_regex.
8263         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8264         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8265         compiled_regex reference.  Adjust to use it.
8266         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8267         declaration.  Include "gdb_regex.h".
8268         (apropos_cmd): Change regex parameter to compiled_regex reference.
8269         * gdb_regex.c: New file.
8270         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8271         declarations.
8272         (class compiled_regex): New.
8273         * linux-tdep.c: Include "common/gdb_optional.h".
8274         (struct mapping_regexes): New, factored out from
8275         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8276         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8277         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8278         * probe.c: Include "common/gdb_optional.h".
8279         (collect_probes): Use compiled_regex and gdb::optional and remove
8280         cleanups.
8281         * skip.c: Include "common/gdb_optional.h".
8282         (skiplist_entry::compiled_function_regexp): Now a
8283         gdb::optional<compiled_regex>.
8284         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8285         (free_skiplist_entry): Remove regfree call.
8286         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8287         compiled_regex and gdb::optional.
8288         * symtab.c: Include "common/gdb_optional.h".
8289         (search_symbols): Use compiled_regex and gdb::optional.
8290         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8291         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8292         to gdb_regex.c.
8293
8294 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8295
8296         * regcache.c (regcache::save): Avoid buffer use.
8297         (regcache::dump): Likewise.
8298
8299 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8300
8301         * sh-tdep.c (sh_pseudo_register_read): Remove
8302         MAX_REGISTER_SIZE.
8303         (sh_pseudo_register_write): Likewise.
8304         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8305         (sh64_pseudo_register_write): Likewise
8306
8307 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8308
8309         * aarch64-tdep.c (aarch64_store_return_value): Use
8310         V_REGISTER_SIZE.
8311         (aarch64_pseudo_read_value): Likewise.
8312         (aarch64_pseudo_write): Likewise.
8313
8314 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8315
8316         * regformats/regdef.h (set_register_cache): Remove the
8317         declaration.
8318
8319 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8320
8321         * frame.c (frame_unwind_register_signed): Use
8322         frame_unwind_register_value.
8323
8324 2017-06-06  Pedro Alves  <palves@redhat.com>
8325
8326         PR breakpoints/21553
8327         * breakpoint.c (create_breakpoints_sal_default)
8328         (init_breakpoint_sal, create_breakpoint_sal): Use
8329         gdb::unique_xmalloc_ptr for string parameters.
8330         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8331         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8332         (base_breakpoint_create_breakpoints_sal)
8333         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8334         (strace_marker_create_breakpoints_sal)
8335         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8336         string parameters.
8337         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8338         gdb::unique_xmalloc_ptr for string parameters.
8339         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8340         parameters.
8341
8342 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8343
8344         * alpha-tdep.c (alpha_register_to_value): Use
8345         get_frame_register_value.
8346         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8347
8348 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8349
8350         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8351         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8352         (ia64_value_to_register): Likewise.
8353         (ia64_extract_return_value): Likewise.
8354         (ia64_store_return_value): Likewise.
8355         (ia64_push_dummy_call): Likewise.
8356
8357 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8358
8359         GDB 8.0 released.
8360
8361 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8362
8363         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8364
8365 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8366
8367         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8368         parameter.
8369         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8370
8371 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8372
8373         * event-loop.c (poll_timers): Unallocate timer using delete
8374         instead of xfree.
8375
8376 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8377
8378         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8379         (struct breakpoint) <~breakpoint>: New.
8380         (struct watchpoint): Inherit from breakpoint.
8381         <~watchpoint>: New.
8382         <base>: Remove.
8383         (struct tracepoint): Inherit from breakpoint.
8384         <base>: Remove.
8385         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8386         (struct longjmp_breakpoint): Inherit from breakpoint.
8387         <~longjmp_breakpoint>: New.
8388         <base>: Remove.
8389         (new_breakpoint_from_type): Remove casts.
8390         (watchpoint_in_thread_scope): Remove reference to base field.
8391         (watchpoint_del_at_next_stop): Likewise.
8392         (update_watchpoint): Likewise.
8393         (watchpoint_check): Likewise.
8394         (bpstat_check_watchpoint): Likewise.
8395         (set_longjmp_breakpoint): Likewise.
8396         (struct fork_catchpoint): Inherit from breakpoint.
8397         <base>: Remove.
8398         (struct solib_catchpoint): Inherit from breakpoint.
8399         <~solib_catchpoint>: New.
8400         <base>: Remove.
8401         (dtor_catch_solib): Change to ...
8402         (solib_catchpoint::~solib_catchpoint): ... this.
8403         (breakpoint_hit_catch_solib): Remove reference to base field.
8404         (add_solib_catchpoint): Likewise.
8405         (create_fork_vfork_event_catchpoint): Likewise.
8406         (struct exec_catchpoint): Inherit from breakpoint.
8407         <~exec_catchpoint>: New.
8408         <base>: Remove.
8409         (dtor_catch_exec): Change to ...
8410         (exec_catchpoint::~exec_catchpoint): ... this.
8411         (dtor_watchpoint): Change to ...
8412         (watchpoint::~watchpoint): ... this.
8413         (watch_command_1): Remove reference to base field.
8414         (catch_exec_command_1): Likewise.
8415         (base_breakpoint_dtor): Change to ...
8416         (breakpoint::~breakpoint): ... this.
8417         (base_breakpoint_ops): Remove dtor field value.
8418         (longjmp_bkpt_dtor): Change to ...
8419         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8420         (strace_marker_create_breakpoints_sal): Remove reference to base
8421         field.
8422         (delete_breakpoint): Don't manually call breakpoint destructor.
8423         (create_tracepoint_from_upload): Remove reference to base field.
8424         (trace_pass_set_count): Likewise.
8425         (initialize_breakpoint_ops): Don't initialize
8426         momentary_breakpoint_ops, don't set dtors.
8427         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8428         <~ada_catchpoint>: New.
8429         <base>: Remove.
8430         (create_excep_cond_exprs): Remove reference to base field.
8431         (dtor_exception): Change to ...
8432         (ada_catchpoint::~ada_catchpoint): ... this.
8433         (dtor_catch_exception): Remove.
8434         (dtor_catch_exception_unhandled): Remove.
8435         (dtor_catch_assert): Remove.
8436         (create_ada_exception_catchpoint): Remove reference to base
8437         field.
8438         (initialize_ada_catchpoint_ops): Don't set dtors.
8439         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8440         breakpoint.
8441         <~signal_catchpoint>: New.
8442         <base>: Remove.
8443         (signal_catchpoint_dtor): Change to ...
8444         (signal_catchpoint::~signal_catchpoint): ... this.
8445         (create_signal_catchpoint): Remove reference to base field.
8446         (initialize_signal_catchpoint_ops): Don't set dtor.
8447         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8448         from breakpoint.
8449         <~syscall_catchpoint>: New.
8450         <base>: Remove.
8451         (dtor_catch_syscall): Change to ...
8452         (syscall_catchpoint::~syscall_catchpoint): ... this.
8453         (create_syscall_event_catchpoint): Remove reference to base
8454         field.
8455         (initialize_syscall_catchpoint_ops): Don't set dtor.
8456         * break-catch-throw.c (struct exception_catchpoint): Inherit
8457         from breakpoint.
8458         <~exception_catchpoint>: New.
8459         <base>: Remove.
8460         (dtor_exception_catchpoint): Change to ...
8461         (exception_catchpoint::~exception_catchpoint): ... this.
8462         (handle_gnu_v3_exceptions): Remove reference to base field.
8463         (initialize_throw_catchpoint_ops): Don't set dtor.
8464         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8465         field.
8466         * remote.c (remote_get_tracepoint_status): Likewise.
8467         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8468         * tracefile.c (tracefile_fetch_registers): Likewise.
8469         * tracepoint.c (actions_command): Likewise.
8470         (validate_actionline): Likewise.
8471         (tfind_1): Likewise.
8472         (get_traceframe_location): Likewise.
8473         (find_matching_tracepoint_location): Likewise.
8474         (parse_tracepoint_status): Likewise.
8475         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8476
8477 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8478
8479         * breakpoint.c (struct longjmp_breakpoint): New struct.
8480         (is_tracepoint_type): Change return type to bool.
8481         (is_longjmp_type): New function.
8482         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8483         (set_raw_breakpoint_without_location): Use
8484         new_breakpoint_from_type.
8485         (set_raw_breakpoint): Likewise.
8486
8487 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8488
8489         * breakpoint.c (new_breakpoint_from_type): New function.
8490         (create_breakpoint_sal): Use new_breakpoint_from_type and
8491         unique_ptr.
8492         (create_breakpoint): Likewise.
8493
8494 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8495
8496         * memattr.c (mem_info_command): Rename to ...
8497         (info_mem_command): ... this.
8498         (mem_enable_command): Rename to ...
8499         (enable_mem_command): ... this.
8500         (mem_disable_command): Rename to ...
8501         (disable_mem_command): ... this.
8502         (mem_delete_command): Rename to ...
8503         (delete_mem_command): ... this.
8504         (_initialize_mem): Adjust function names.
8505
8506 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8507
8508         * btrace.c (handle_pt_insn_events): New.
8509         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8510         STATUS.  Split into this and ...
8511         (handle_pt_insn_event_flags): ... this.
8512
8513 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8514
8515         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8516         and struct pt_insn.resynced.
8517         * configure: Regenerated.
8518         * config.in: Regenerated.
8519
8520 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8521
8522         * btrace.c (ftrace_find_call_by_number): New function.
8523         (ftrace_new_function): Store objects, not pointers.
8524         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8525         ftrace_new_gap, ftrace_update_function,
8526         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8527         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8528         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8529         btrace_ends_with_single_insn, btrace_call_get): Account for
8530         btrace_thread_info::functions now storing objects.
8531         * btrace.h (struct btrace_thread_info): Add constructor.
8532         (struct btrace_thread_info) <functions>: Make std::vector.
8533         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8534         Initialize with default values.
8535         * record-btrace.c (record_btrace_frame_sniffer): Account for
8536         btrace_thread_info::functions now storing objects.
8537
8538 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8539
8540         * btrace.c: Remove typedef bfun_s.
8541         (ftrace_new_gap): Directly add gaps to the list of gaps.
8542         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8543         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8544         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8545         instead of gdb VEC.
8546
8547 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8548
8549         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8550         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8551         with btrace_thread_info::next_segment and
8552         btrace_thread_info::prev_segment.
8553         * btrace.h: Remove struct btrace_func_link.
8554         (struct btrace_function): Replace pair of function segment pointers
8555         with pair of indices.
8556         * python/py-record-btrace.c (btpy_call_prev_sibling,
8557         btpy_call_next_sibling): Replace references to
8558         btrace_thread_info::segment with btrace_thread_info::next_segment and
8559         btrace_thread_info::prev_segment.
8560         * record-btrace.c (record_btrace_frame_this_id): Use
8561         btrace_find_call_by_number.
8562
8563 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8564
8565         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8566         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8567         btrace_insn_next, btrace_insn_prev): Remove references to
8568         btrace_thread_info::flow.
8569         * btrace.h (struct btrace_function): Remove FLOW.
8570
8571 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8572
8573         * btrace.c (ftrace_find_call_by_number): New function.
8574         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8575         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8576         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8577         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8578         index.
8579         * btrace.h (struct btrace_function): Turn UP into an index.
8580         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8581         as an index.
8582         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8583         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8584         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
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, ftrace_compute_global_level_offset,
8591         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8592         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8593         btrace_insn_end, btrace_is_empty): Remove references to
8594         btrace_thread_info::begin and btrace_thread_info::end.
8595         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8596         (struct btrace_thread_info) <functions>: Adjust comment.
8597         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8598         btrace_thread_info::begin.
8599
8600 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8601
8602         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8603         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8604         ftrace_update_function): Remove arguments that implicitly were always
8605         BTINFO->END.
8606         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8607         Don't pass BTINFO->END.
8608
8609 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8610
8611         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8612         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8613         btrace_find_insn_by_number): Replace function segment pointer with
8614         index.
8615         (btrace_insn_cmp): Simplify.
8616         * btrace.h: (struct btrace_insn_iterator) Rename index to
8617         insn_index.  Replace function segment pointer with index into function
8618         segment vector.
8619         * record-btrace.c (record_btrace_call_history): Replace function
8620         segment pointer use with index.
8621         (record_btrace_frame_sniffer): Retrieve function call segment through
8622         vector.
8623         (record_btrace_set_replay): Remove defunc't safety check.
8624
8625 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8626
8627         * btrace.c (btrace_ends_with_single_insn): New function.
8628         (btrace_call_get, btrace_call_number, btrace_call_begin,
8629         btrace_call_end, btrace_call_next, btrace_call_prev,
8630         btrace_find_call_by_number): Use index into call segment vector
8631         instead of pointer.
8632         (btrace_call_cmp): Simplify.
8633         * btrace.h (struct btrace_call_iterator): Replace function call segment
8634         pointer with index into vector.
8635         * record-btrace.c (record_btrace_call_history): Use index instead of
8636         pointer.
8637
8638 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8639
8640         * btrace.c (btrace_insn_begin, btrace_insn_end,
8641         btrace_find_insn_by_number): Add btinfo to iterator.
8642         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8643
8644 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8645
8646         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8647         and save pointers directly.
8648         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8649         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8650         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8651         changed signature of functions.
8652         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8653         (btrace_fetch): Remove code that adds btrace_function pointers to
8654         vector of btrace_functions.
8655         (btrace_clear): Simplify freeing vector of btrace_functions.
8656
8657 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8658
8659         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8660         Replace VEC_* with std::vector functions.
8661         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8662         (struct btrace_thread_info)<functions>: Change type to std::vector.
8663
8664 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8665
8666         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8667         "Removed targets and native configurations" up.  Merge duplicate
8668         "New commands" sub-sections.  Add "New options" sub-sections.
8669
8670 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8671
8672         * defs.h (copy_integer_to_size): New declaration.
8673         * findvar.c (copy_integer_to_size): New function.
8674         (do_cint_test): New selftest function.
8675         (copy_integer_to_size_test): Likewise.
8676         (_initialize_findvar): Likewise.
8677         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8678         (mips_fbsd_collect_reg): Use raw_collect_integer.
8679         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8680         (mips64_fill_gregset): Use raw_collect_integer
8681         (mips64_fill_fpregset): Use raw_supply_integer.
8682         * regcache.c (regcache::raw_supply_integer): New function.
8683         (regcache::raw_collect_integer): Likewise.
8684         * regcache.h: (regcache::raw_supply_integer): New declaration.
8685         (regcache::raw_collect_integer): Likewise.
8686
8687 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8688
8689         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8690         (COMMON_OBS): Add gdbarch-selftests.o.
8691         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8692         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8693         * gdbarch-selftests.c: New file.
8694         * regcache.h (regcache) <~regcache>: Mark it virtual if
8695         GDB_SELF_TEST.
8696         <raw_write>: Likewise.
8697
8698 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8699
8700         * regcache.c (current_regcache): Change it to
8701         regcache::current_regcache.
8702         (regcache_observer_target_changed): Update.
8703         (regcache_thread_ptid_changed): Make it a regcache static
8704         method.
8705         (regcache_thread_ptid_changed): Update.
8706         (class regcache_access): New.
8707         (current_regcache_test): Update.
8708         (_initialize_regcache): Update.
8709         * regcache.h: Include forward_list.
8710         (regcache): Declare regcache_thread_ptid_changed and declare
8711         registers_changed_ptid as friend.
8712
8713 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8714
8715         * i387-tdep.c (i387_register_to_value): Use register_size
8716         instead of TYPE_LENGTH.
8717         * m68k-tdep.c (m68k_register_to_value): Likewise.
8718
8719 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8720
8721         * i387-tdep.c (i387_convert_register_p): Return false if type
8722         code isn't TYPE_CODE_FLT.
8723
8724 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8725
8726         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8727         length is 4.
8728         (alpha_register_to_value): Remove type length check.
8729         (alpha_value_to_register): Likewise.
8730
8731 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8732
8733         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8734         TYPE_CODE_FLT.
8735
8736 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8737
8738         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8739         TYPE_CODE_FLT or not.
8740
8741 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8742
8743         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8744         * avr-tdep.c (avr_gdbarch_init): Likewise.
8745         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8746         * cris-tdep.c (cris_gdbarch_init): Likewise.
8747         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8748         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8749         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8750         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8751         * mep-tdep.c (mep_gdbarch_init): Likewise.
8752         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8753         * mips-tdep.c (mips_gdbarch_init): Likewise.
8754         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8755         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8756         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8757         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8758         * v850-tdep.c (v850_gdbarch_init): Likewise.
8759
8760 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8761
8762         * selftest-arch.c (tests_with_arch): Call registers_changed
8763         and reinit_frame_cache.
8764         * selftest.c (run_self_tests): Likewise.
8765
8766 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8767
8768         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8769         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8770
8771 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8772
8773         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8774         set_gdbarch_print_insn.
8775
8776 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8777
8778         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8779         set_gdbarch_print_insn.
8780
8781 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8782
8783         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8784         set_gdbarch_print_insn.
8785         * arc-tdep.c (arc_gdbarch_init): Likewise.
8786         * arch-utils.c: include dis-asm.h.
8787         (default_print_insn): New function.
8788         * arch-utils.h (default_print_insn): Declare.
8789         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8790         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8791         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8792         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8793         * frv-tdep.c (frv_gdbarch_init): Likewise.
8794         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8795         * gdbarch.sh (print_insn): Use default_print_insn.
8796         * gdbarch.c: Regenerated.
8797         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8798         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8799         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8800         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8801         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8802         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8803         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8804         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8805         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8806         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8807         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8808         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8809         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8810         * mt-tdep.c (mt_gdbarch_init): Likewise.
8811         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8812         * nios2-tdep.c (nios2_print_insn): Remove.
8813         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8814         * rx-tdep.c (rx_gdbarch_init): Likewise.
8815         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8816         * score-tdep.c (score_print_insn): Remove.
8817         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8818         * sh-tdep.c (sh_gdbarch_init): Likewise.
8819         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8820         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8821         * tic6x-tdep.c (tic6x_print_insn): Remove.
8822         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8823         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8824         * v850-tdep.c (v850_gdbarch_init): Likewise.
8825         * vax-tdep.c (vax_gdbarch_init): Likewise.
8826         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8827         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8828
8829 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8830
8831         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8832         (MIPS_FP0_REGNUM): Remove.
8833         (MIPS_FSR_REGNUM): Remove.
8834         (mips_fbsd_supply_fpregs): Use mips_regnum.
8835         (mips_fbsd_supply_gregs): Likewise.
8836         (mips_fbsd_collect_fpregs): Likewise.
8837         (mips_fbsd_collect_gregs): Likewise.
8838
8839 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8840
8841         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8842         (getpfpregs_supplies): New function.
8843         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8844         getfpregs_supplies.
8845         (mips_fbsd_store_inferior_registers): Likewise.
8846
8847 2017-05-22  Pedro Alves <palves@redhat.com>
8848
8849         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8850         maintainer.
8851
8852 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8853
8854         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8855         (store_register): Likewise.
8856         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8857         (get_decimal_float_return_value): Likewise.
8858         (do_ppc_sysv_return_value): Likewise.
8859         (ppc64_sysv_abi_push_integer): Likewise.
8860         (ppc64_sysv_abi_push_freg): Likewise.
8861         (ppc64_sysv_abi_return_value_base): Likewise.
8862         (ppc64_sysv_abi_return_value): Likewise.
8863         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8864         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8865         * rs6000-nat.c: Likewise.
8866         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8867         (rs6000_value_to_register): Likewise.
8868         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8869
8870 2017-05-21  Tom Tromey  <tom@tromey.com>
8871
8872         PR rust/21466:
8873         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8874         arrays as "[T]", not "[T; ]".
8875
8876 2017-05-19  Tom Tromey  <tom@tromey.com>
8877
8878         PR rust/21484:
8879         * rust-lang.c (exp_descriptor_rust): New function.
8880         (rust_language_defn): Use it.
8881         * p-lang.c (pascal_language_defn): Update.
8882         * opencl-lang.c (opencl_language_defn): Update.
8883         * objc-lang.c (objc_language_defn): Update.
8884         * m2-lang.c (m2_language_defn): Update.
8885         * language.h (struct language_defn)
8886         <la_watch_location_expression>: New member.
8887         * language.c (unknown_language_defn, auto_language_defn)
8888         (local_language_defn): Update.
8889         * go-lang.c (go_language_defn): Update.
8890         * f-lang.c (f_language_defn): Update.
8891         * d-lang.c (d_language_defn): Update.
8892         * c-lang.h (c_watch_location_expression): Declare.
8893         * c-lang.c (c_watch_location_expression): New function.
8894         (c_language_defn, cplus_language_defn, asm_language_defn)
8895         (minimal_language_defn): Use it.
8896         * breakpoint.c (watch_command_1): Call
8897         la_watch_location_expression.
8898         * ada-lang.c (ada_language_defn): Update.
8899
8900 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8901
8902         PR tui/21482
8903         * gdb_curses.h (NOMACROS): Define.
8904         (NCURSES_NOMACROS): Define.
8905
8906 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8907
8908         PR tui/21482
8909         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8910         arg to char *.
8911         * tui/tui-wingeneral.c (box_win): Likewise.
8912         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8913         (tui_show_source_line): Likewise.
8914         (tui_show_exec_info_content): Likewise.
8915
8916 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8917
8918         * sparc-tdep.c (sparc_structure_return_p)
8919         (sparc_arg_on_registers_p): New functions.
8920         (sparc32_store_arguments): Use them.
8921         * sparc64-tdep.c (sparc64_16_byte_align_p)
8922         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8923         Handle TYPE_CODE_ARRAY.
8924
8925 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8926
8927         * cli/cli-decode.c (add_alias_cmd): New function.
8928         * command.h (add_alias_cmd): Declare.
8929         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8930         instead call add_alias_cmd.
8931
8932 2017-05-17  Pedro Alves  <palves@redhat.com>
8933
8934         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8935         (nat_makefile_frag): ... this.  All references updated.
8936         * configure.ac: Likewise.
8937         * configure.nat: Likewise.  Enhance comments.
8938         * configure: Regenerate.
8939
8940 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8941
8942         * procfs.c (procfs_create_inferior): Change prototype to match
8943         definition.
8944
8945 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8946
8947         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8948         C++ compiler warning.
8949
8950 2017-05-12  Tom Tromey  <tom@tromey.com>
8951
8952         PR rust/21483:
8953         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8954         recurse, just call value_struct_elt directly.
8955
8956 2017-05-12  Tom Tromey  <tom@tromey.com>
8957
8958         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8959         OP_RUST_ARRAY>: Fix.
8960
8961 2017-05-12  Tom Tromey  <tom@tromey.com>
8962
8963         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8964
8965 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8966
8967         * regcache.c: Include <forward_list>.
8968         (struct regcache_list): Remove.
8969         (current_regcache): Update.
8970         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8971         (regcache_thread_ptid_changed): Likewise.
8972         (registers_changed_ptid): Likewise.
8973         (current_regcache_size): Likewise.
8974
8975 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8976
8977         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8978         (current_regcache_size): New function.
8979         (current_regcache_test): New function.
8980         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8981
8982 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8983
8984         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8985         (print_gp_register_row): Use get_frame_register_value.
8986
8987 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8988
8989         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8990         (mips_supply_fpregset): Likewise.
8991         (mips64_supply_gregset): Likewise.
8992
8993 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8994
8995         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8996         regcache->raw_supply_zeroed.
8997
8998 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8999
9000         * configure.nat: Rearrange 'case' statements to match
9001         host before cpu.
9002
9003 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9004
9005         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9006         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9007         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9008         "@nat_extra_makefile_frag@".
9009         (Makefile): Remove dependency on "@frags@".
9010         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9011         (data-directory/Makefile): Likewise.
9012         * config/aarch64/linux.mh: Deleted; moved contents to
9013         "gdb/configure.nat".
9014         * config/alpha/alpha-linux.mh: Likewise.
9015         * config/alpha/nbsd.mh: Likewise.
9016         * config/arm/linux.mh: Likewise.
9017         * config/arm/nbsdelf.mh: Likewise.
9018         * config/i386/cygwin.mh: Likewise.
9019         * config/i386/cygwin64.mh: Likewise.
9020         * config/i386/darwin.mh: Likewise.
9021         * config/i386/fbsd.mh: Likewise.
9022         * config/i386/fbsd64.mh: Likewise.
9023         * config/i386/go32.mh: Likewise.
9024         * config/i386/i386gnu.mh: Likewise.
9025         * config/i386/i386sol2.mh: Likewise.
9026         * config/i386/linux.mh: Likewise.
9027         * config/i386/linux64.mh: Likewise.
9028         * config/i386/mingw.mh: Likewise.
9029         * config/i386/mingw64.mh: Likewise.
9030         * config/i386/nbsd64.mh: Likewise.
9031         * config/i386/nbsdelf.mh: Likewise.
9032         * config/i386/nto.mh: Likewise.
9033         * config/i386/obsd.mh: Likewise.
9034         * config/i386/obsd64.mh: Likewise.
9035         * config/i386/sol2-64.mh: Likewise.
9036         * config/ia64/linux.mh: Likewise.
9037         * config/m32r/linux.mh: Likewise.
9038         * config/m68k/linux.mh: Likewise.
9039         * config/m68k/nbsdelf.mh: Likewise.
9040         * config/m68k/obsd.mh: Likewise.
9041         * config/m88k/obsd.mh: Likewise.
9042         * config/mips/fbsd.mh: Likewise.
9043         * config/mips/linux.mh: Likewise.
9044         * config/mips/nbsd.mh: Likewise.
9045         * config/mips/obsd64.mh: Likewise.
9046         * config/pa/linux.mh: Likewise.
9047         * config/pa/nbsd.mh: Likewise.
9048         * config/pa/obsd.mh: Likewise.
9049         * config/powerpc/aix.mh: Likewise.
9050         * config/powerpc/fbsd.mh: Likewise.
9051         * config/powerpc/linux.mh: Likewise.
9052         * config/powerpc/nbsd.mh: Likewise.
9053         * config/powerpc/obsd.mh: Likewise.
9054         * config/powerpc/ppc64-linux.mh: Likewise.
9055         * config/powerpc/spu-linux.mh: Likewise.
9056         * config/s390/linux.mh: Likewise.
9057         * config/sh/nbsd.mh: Likewise.
9058         * config/sparc/fbsd.mh: Likewise.
9059         * config/sparc/linux.mh: Likewise.
9060         * config/sparc/linux64.mh: Likewise.
9061         * config/sparc/nbsd64.mh: Likewise.
9062         * config/sparc/nbsdelf.mh: Likewise.
9063         * config/sparc/obsd64.mh: Likewise.
9064         * config/sparc/sol2.mh: Likewise.
9065         * config/tilegx/linux.mh: Likewise.
9066         * config/vax/nbsdelf.mh: Likewise.
9067         * config/vax/obsd.mh: Likewise.
9068         * config/xtensa/linux.mh: Likewise.
9069         * config/i386/i386gnu.mn: New file, with excerpts from
9070         "config/i386/i386gnu.mh".
9071         * configure: Regenerate.
9072         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9073         *.mh files under "gdb/config".
9074         * configure.nat: New file, with contents from the
9075         "gdb/config/*/*.mh" files.
9076
9077 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9078
9079         * btrace.c (btrace_clear): Free insn vector.
9080
9081 2017-05-05  Pedro Alves  <palves@redhat.com>
9082
9083         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9084         * configure: Regenerate.
9085
9086 2017-05-04  Pedro Alves  <palves@redhat.com>
9087
9088         * Makefile.in (SFILES): Add progspace-and-thread.c.
9089         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9090         (COMMON_OBS): Add progspace-and-thread.o.
9091         * breakpoint.c: Include "progspace-and-thread.h".
9092         (update_inserted_breakpoint_locations)
9093         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9094         Use scoped_restore_current_pspace_and_thread.
9095         (create_std_terminate_master_breakpoint): Use
9096         scoped_restore_current_program_space.
9097         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9098         (print_breakpoint_location): Use
9099         scoped_restore_current_program_space.
9100         (bp_loc_is_permanent): Use
9101         scoped_restore_current_pspace_and_thread.
9102         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9103         (download_tracepoint_locations): Use
9104         scoped_restore_current_pspace_and_thread.
9105         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9106         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9107         (enum step_over_calls_kind): Moved from inferior.h.
9108         (class scoped_restore_current_thread): New class.
9109         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9110         declaration.
9111         (scoped_restore_current_thread): New class.
9112         * infcmd.c: Include "common/gdb_optional.h".
9113         (continue_1, proceed_after_attach): Use
9114         scoped_restore_current_thread.
9115         (notice_new_inferior): Use scoped_restore_current_thread.
9116         * inferior.c: Include "progspace-and-thread.h".
9117         (restore_inferior, save_current_inferior): Delete.
9118         (add_inferior_command, clone_inferior_command): Use
9119         scoped_restore_current_pspace_and_thread.
9120         * inferior.h (scoped_restore_current_inferior): New class.
9121         * infrun.c: Include "progspace-and-thread.h" and
9122         "common/gdb_optional.h".
9123         (follow_fork_inferior): Use
9124         scoped_restore_current_pspace_and_thread.
9125         (scoped_restore_exited_inferior): New class.
9126         (handle_vfork_child_exec_or_exit): Use
9127         scoped_restore_exited_inferior,
9128         scoped_restore_current_pspace_and_thread,
9129         scoped_restore_current_thread and scoped_restore.
9130         (fetch_inferior_event): Use scoped_restore_current_thread.
9131         * linespec.c (decode_line_full, decode_line_1): Use
9132         scoped_restore_current_program_space.
9133         * mi/mi-main.c: Include "progspace-and-thread.h".
9134         (exec_continue): Use scoped_restore_current_thread.
9135         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9136         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9137         * proc-service.c (ps_pglobal_lookup): Use
9138         scoped_restore_current_program_space.
9139         * progspace-and-thread.c: New file.
9140         * progspace-and-thread.h: New file.
9141         * progspace.c (release_program_space, clone_program_space): Use
9142         scoped_restore_current_program_space.
9143         (restore_program_space, save_current_program_space)
9144         (save_current_space_and_thread): Delete.
9145         (switch_to_program_space_and_thread): Moved to
9146         progspace-and-thread.c.
9147         * progspace.h (save_current_program_space)
9148         (save_current_space_and_thread): Delete declarations.
9149         (scoped_restore_current_program_space): New class.
9150         * remote.c (remote_btrace_maybe_reopen): Use
9151         scoped_restore_current_thread.
9152         * symtab.c: Include "progspace-and-thread.h".
9153         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9154         * thread.c (print_thread_info_1): Use
9155         scoped_restore_current_thread.
9156         (struct current_thread_cleanup): Delete.
9157         (do_restore_current_thread_cleanup)
9158         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9159         (scoped_restore_current_thread::~scoped_restore_current_thread):
9160         ... this new dtor.
9161         (make_cleanup_restore_current_thread): Rename/convert to ...
9162         (scoped_restore_current_thread::scoped_restore_current_thread):
9163         ... this new ctor.
9164         (thread_apply_all_command): Use scoped_restore_current_thread.
9165         (thread_apply_command): Use scoped_restore_current_thread.
9166         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9167         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9168
9169 2017-05-04  Pedro Alves  <palves@redhat.com>
9170
9171         * thread.c (make_cleanup_restore_current_thread): Move
9172         find_thread_ptid call before the is_stopped call.  Assert that the
9173         thread is found.  Replace is_stopped call by checking the thread's
9174         state directly.  Remove unnecessary NULL-thread check.
9175
9176 2017-05-04  Pedro Alves  <palves@redhat.com>
9177
9178         * corelow.c (thread_section_name): New class.
9179         (get_core_register_section, get_core_siginfo): Use it.
9180
9181 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9182
9183         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9184         (get_core_register_section): Remove xfree of NULL pointer.
9185
9186 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9187
9188         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9189         * regcache.c (regcache::raw_supply_zeroed): New function.
9190         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9191
9192 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9193
9194         * gdbarch.sh: Remove commented out definition of
9195         TARGET_CHAR_BIT.
9196         * gdbarch.h: Re-generate.
9197
9198 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9199
9200         * configure: Regenerate.
9201
9202 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         * solib-target.c (solib_target_relocate_section_addresses):
9205         Remove num_section_bases, num_bases, segment_bases variables.
9206
9207 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9208
9209         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9210
9211 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9212
9213         * solib-target.c: Include <vector>
9214         (struct lm_info_target) <~lm_info_target>: Remove.
9215         <segment_bases, section_bases>: Change type to
9216         std::vector<CORE_ADDR>.
9217         (library_list_start_segment, library_list_start_section,
9218         library_list_end_library,
9219         solib_target_relocate_section_addresses): Adjust.
9220
9221 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9222
9223         * gdbarch.sh (software_single_step): Change return type to
9224         std::vector<CORE_ADDR>.
9225         * gdbarch.c, gdbarch.h: Re-generate.
9226         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9227         Adjust.
9228         (arm_deal_with_atomic_sequence_raw): Adjust.
9229         (thumb_get_next_pcs_raw): Adjust.
9230         (arm_get_next_pcs_raw): Adjust.
9231         (arm_get_next_pcs): Adjust.
9232         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9233         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9234         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9235         (alpha_software_single_step): Adjust.
9236         * alpha-tdep.h (alpha_software_single_step): Adjust.
9237         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9238         * arm-tdep.c (arm_software_single_step): Adjust.
9239         (arm_breakpoint_kind_from_current_state): Adjust.
9240         * arm-tdep.h (arm_software_single_step): Adjust.
9241         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9242         * cris-tdep.c (cris_software_single_step): Adjust.
9243         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9244         (micromips_deal_with_atomic_sequence): Adjust.
9245         (deal_with_atomic_sequence): Adjust.
9246         (mips_software_single_step): Adjust.
9247         * mips-tdep.h (mips_software_single_step): Adjust.
9248         * moxie-tdep.c (moxie_software_single_step): Adjust.
9249         * nios2-tdep.c (nios2_software_single_step): Adjust.
9250         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9251         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9252         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9253         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9254         * sparc-tdep.c (sparc_software_single_step): Adjust.
9255         * spu-tdep.c (spu_software_single_step): Adjust.
9256         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9257
9258 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9259
9260         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9261         * gdbarch.h: Re-generate.
9262
9263 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9264
9265         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9266         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9267         * python/py-instruction.c, python/py-instruction.h: New file.
9268         * python/py-record.c: Add py-instruction.h include.
9269         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9270         gdb.RecordInstruction.
9271         * python/python-internal.h: Add gdbpy_initialize_instruction
9272         declaration.
9273         * python/python.c (do_start_initialization): Add
9274         gdbpy_initialize_instruction.
9275
9276 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9277
9278         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9279         Remove.
9280         (btrace_func_from_recpy_func): New function.
9281         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9282         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9283         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9284         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9285         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9286         Also, use new helper functions.
9287         (btpy_list_item): Use new helper functions.
9288         (recpy_bt_function_call_history): Use new type name.
9289         (btpy_call_getset): Remove.
9290         (gdbpy_initialize_btrace): Remove code to initialize
9291         gdb.BtraceFunctionCall.
9292         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9293         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9294         recpy_bt_func_prev, recpy_bt_func_next): New export.
9295         * python/py-record.c (recpy_func_type): New static object.
9296         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9297         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9298         recpy_func_next): New function.
9299         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9300         (recpy_func_getset): New static object.
9301         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9302         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9303
9304 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9305
9306         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9307         (btpy_object, btpy_insn_type, btpy_new): Remove.
9308         (btpy_list_object): Use gdb.RecordInstruction type instead of
9309         gdb.BtraceInstruction type.
9310         (btrace_insn_from_recpy_insn): New function.
9311         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9312         btpy_new.
9313         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9314         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9315         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9316         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9317         instead of btpy_object.
9318         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9319         btpy_insn_data, btpy_insn_decode): Rename to ...
9320         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9321         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9322         recpy_bt_insn_decode): This.  Also, use new helper functions.
9323         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9324         recpy_insn_type.
9325         (btpy_insn_getset): Remove.
9326         (gdbpy_initialize_btrace): Remove code to initialize
9327         gdb.BtraceInstruction.  Use recpy_element_object.
9328         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9329         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9330         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9331         * python/py-record.c (recpy_insn_type): New static object.
9332         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9333         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9334         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9335         New function.
9336         (recpy_insn_getset): New static object.
9337         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9338         * python/py-record.h (recpy_element_object): New typedef.
9339         (recpy_insn_type, recpy_insn_new): New export.
9340
9341 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9342
9343         * py-record-btrace.c (btpy_insn_new): Removed.
9344         (btpy_insn_or_gap_new): New function.
9345         (btpy_insn_error): Removed.
9346         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9347         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9348         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9349         btpy_insn_or_gap_new instead of btpy_insn_new.
9350         (btpy_insn_getset): Remove btpy_insn_error.
9351         * py-record.c (recpy_gap_type): New static object.
9352         (recpy_gap_object): New typedef.
9353         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9354         recpy_gap_reason_string): New function.
9355         (recpy_gap_getset): New static object.
9356         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9357         * py-record.h (recpy_gap_new): New export.
9358
9359 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9360
9361         * python/py-record.c (recpy_ptid): Remove.
9362         (recpy_record_getset): Remove recpy_ptid.
9363
9364 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9365
9366         * btrace.c (btrace_fetch): Set inferior_ptid.
9367         * python/py-record-btrace.c: Add "py-record.h" include.
9368         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9369         recpy_bt_end, recpy_bt_instruction_history,
9370         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9371         in gdb.Record object instead of current ptid.
9372         * python/py-record.c: Include new "py-record.h" file.
9373         (recpy_record_object): Moved to py-record.h.
9374         * python/py-record.h: New file.
9375
9376 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9377
9378         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9379         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9380         indentation.
9381
9382 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9383
9384         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9385         the past maintainers section.
9386
9387 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9388
9389         * infcmd.c (get_return_value): Use regcache ctor, and remove
9390         cleanup.
9391
9392 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9393             Pedro Alves  <palves@redhat.com>
9394
9395         * regcache.c (regcache::regcache): New tag dispatch ctor.
9396         (do_cooked_read): Moved above.
9397         (regcache_dup): Use the tag dispatch ctor..
9398         * regcache.h (regcache): Declare ctor, delete copy ctor and
9399         assignment operator, remove friend regcache_dup.
9400
9401 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9402
9403         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9404         call method save instead of regcache_cpy.
9405         * regcache.h (struct regcache): Make regcache_dup a friend.
9406
9407 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9408
9409         * regcache.c (struct regcache): Move to regcache.h
9410         (regcache::arch): New method.
9411         (regcache_get_ptid): Update.
9412         (get_regcache_arch): Call arch method.
9413         (get_regcache_aspace): Call method aspace.
9414         (register_buffer): Change it to method.
9415         (regcache_save): Change it to regcache::save.
9416         (regcache_restore): Likewise.
9417         (regcache_cpy_no_passthrough): Remove the declaration.
9418         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9419         (regcache_cpy_no_passthrough): Change it to method
9420         cpy_no_passthrough.
9421         (regcache_register_status): Change it to method
9422         get_register_status.
9423         (regcache_invalidate): Change it to method invalidate.
9424         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9425         (regcache_raw_update): Change it to method raw_update.
9426         (regcache_raw_read): Likewise.
9427         (regcache_raw_read_signed): Likewise.
9428         (regcache_raw_read_unsigned): Likewise.
9429         (regcache_raw_write_signed): Likewise.
9430         (regcache_raw_write_unsigned): Likewise.
9431         (regcache_cooked_read): Likewise.
9432         (regcache_cooked_read_value): Likewise.
9433         (regcache_cooked_read_signed): Likewise.
9434         (regcache_cooked_read_unsigned): Likewise.
9435         (regcache_cooked_write_signed): Likewise.
9436         (regcache_cooked_write_unsigned): Likewise.
9437         (regcache_raw_set_cached_value): Likewise.
9438         (regcache_raw_write): Likewise.
9439         (regcache_cooked_write): Likewise.
9440         (regcache_xfer_part): Likewise.
9441         (regcache_raw_read_part): Likewise.
9442         (regcache_raw_write_part): Likewise.
9443         (regcache_cooked_read_part): Likewise.
9444         (regcache_cooked_write_part): Likewise.
9445         (regcache_raw_supply): Likewise.
9446         (regcache_raw_collect): Likewise.
9447         (regcache_transfer_regset): Likewise.
9448         (regcache_supply_regset): Likewise.
9449         (regcache_collect_regset): Likewise.
9450         (regcache_debug_print_register): Likewise.
9451         (enum regcache_dump_what): Move it to regcache.h.
9452         (regcache_dump): Change it to method dump.
9453         * regcache.h (enum regcache_dump_what): New.
9454         (class regcache): New.
9455         * target.c (target_fetch_registers): Call method
9456         debug_print_register.
9457         (target_store_registers): Likewise.
9458
9459 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9460
9461         * windows-nat.c (struct lm_info_windows): Initialize field.
9462         (windows_make_so): Allocate lm_info_windows with new.
9463         (windows_free_so): Free lm_info_windows with delete.
9464
9465 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9466
9467         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9468         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9469         cleanup.
9470         (darwin_free_so): Free lm_info_darwin with delete.
9471
9472 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9473
9474         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9475         <l_addr_p>: Change type to bool.
9476         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9477         (svr4_free_so): Free lm_info_svr4 with delete.
9478         (svr4_copy_library_list): Replace memcpy with call to copy
9479         constructor.
9480         (library_list_start_library, svr4_default_sos): Allocate
9481         lm_info_svr4 with new.
9482
9483 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9484
9485         * solib-target.c (struct lm_info_target): Add destructor,
9486         initialize fields.
9487         <name>: Change type to std::string.
9488         (library_list_start_library): Allocate lm_info_target with new.
9489         (solib_target_free_library_list): Free lm_info_target with
9490         delete.
9491         (solib_target_current_sos): Adapt to std::string.
9492         (solib_target_free_so): Free lm_info_target with delete.
9493
9494 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9495
9496         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9497         fields.
9498         (frv_current_sos): Allocate lm_info_frv with new.
9499         (frv_relocate_main_executable): Free lm_info_frv with delete,
9500         allocate with new.
9501         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9502
9503 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9504
9505         * solib-frv.c (struct lm_info_frv): Fix indentation.
9506
9507 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9508
9509         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9510         map field.
9511         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9512         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9513         and allocate with new.
9514         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9515
9516 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9517
9518         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9519         <filename, member_name>: Change type to std::string.
9520         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9521         (library_list_start_library): Allocate lm_info_aix with new.
9522         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9523         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9524         with copy constructor.
9525
9526 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9527
9528         * solist.h (struct lm_info): Remove.
9529         (struct lm_info_base): New class.
9530         (struct so_list) <lm_info>: Change type to lm_info_base *.
9531         * nto-tdep.c (struct lm_info): Remove.
9532         (lm_addr): Adjust.
9533         * solib-aix.c (struct lm_info): Rename to ...
9534         (struct lm_info_aix): ... this.  Extend lm_info_base.
9535         (lm_info_p): Rename to ...
9536         (lm_info_aix_p): ... this, and adjust.
9537         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9538         solib_aix_parse_libraries, library_list_start_library,
9539         solib_aix_free_library_list, solib_aix_parse_libraries,
9540         solib_aix_get_library_list,
9541         solib_aix_relocate_section_addresses, solib_aix_free_so,
9542         solib_aix_get_section_offsets,
9543         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9544         Adjust.
9545         (struct solib_aix_inferior_data) <library_list>: Adjust.
9546         * solib-darwin.c (struct lm_info): Rename to ...
9547         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9548         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9549         * solib-dsbt.c (struct lm_info): Rename to ...
9550         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9551         (struct dsbt_info) <main_executable_lm_info): Adjust.
9552         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9553         dsbt_relocate_section_addresses): Adjust.
9554         * solib-frv.c (struct lm_info): Rename to ...
9555         (struct lm_info_frv): ... this.  Extend lm_info_base.
9556         (main_executable_lm_info): Adjust.
9557         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9558         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9559         find_canonical_descriptor_in_load_object,
9560         frv_fdpic_find_canonical_descriptor): Adjust.
9561         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9562         to lm_info_svr4.
9563         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9564         svr4_clear_so, svr4_copy_library_list,
9565         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9566         svr4_current_sos, svr4_fetch_objfile_link_map,
9567         solist_update_incremental): Adjust.
9568         * solib-svr4.h (struct lm_info_svr4): Move here from
9569         solib-svr4.c.
9570         * solib-target.c (struct lm_info): Rename to ...
9571         (struct lm_info_target): ... this.  Extend lm_info_base.
9572         (lm_info_p): Rename to ...
9573         (lm_info_target_p): ... this.
9574         (solib_target_parse_libraries, library_list_start_segment,
9575         library_list_start_section, library_list_start_library,
9576         library_list_end_library, solib_target_free_library_list,
9577         solib_target_current_sos, solib_target_free_so,
9578         solib_target_relocate_section_addresses): Adjust.
9579         * windows-nat.c (struct lm_info): Rename to ...
9580         (struct lm_info_windows): ... this.  Extend lm_info_base.
9581         (windows_make_so, handle_load_dll, handle_unload_dll,
9582         windows_xfer_shared_libraries): Adjust.
9583
9584 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9585
9586         * solib-darwin.c (struct darwin_so_list): Remove.
9587         (darwin_current_sos): Allocate an so_list object instead of a
9588         darwin_so_list, separately allocate an lm_info object.
9589         (darwin_free_so): Free lm_info.
9590
9591 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9592
9593         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9594         with fprintf_filtered.
9595
9596 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9597
9598         * regcache.c (regcache::regcache): New function.
9599         (regcache::~regcache): New function.
9600         (regcache_xmalloc_1): Remove.
9601         (regcache_xmalloc): Call new regcache.
9602         (regcache_xfree): Call delete regcache.
9603         (get_thread_arch_aspace_regcache): Call new regcache.
9604
9605 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9606
9607         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9608         lwp instead of ptid_get_lwp.
9609
9610 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9611
9612         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9613         lwp_info instead of getting from inferior_ptid.
9614
9615 2017-04-27  Keith Seitz  <keiths@redhat.com>
9616
9617         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9618         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9619         (CV_CONVERSION_BADNESS): Define.
9620         (rank_one_type): Remove overly restrictive rvalue reference
9621         rank checks.
9622         Add cv-qualifier checks and subranks for type equality.
9623         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9624         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9625         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9626
9627 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9628
9629         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9630         count when creating the object.
9631
9632 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9633             Ulrich Weigand  <uweigand@de.ibm.com>
9634
9635         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9636         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9637         is used in AIX.
9638         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9639         (process_xcoff_symbol): Likewise.
9640         (scan_xcoff_symtab): Likewise.
9641
9642 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9643
9644         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9645         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9646         (ia64_access_reg): Use get_frame_register_unsigned.
9647         (ia64_access_rse_reg): Likewise.
9648         (ia64_libunwind_frame_prev_register): Likewise.
9649
9650 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9651
9652         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9653         * gdbarch.c: Regenerated.
9654         * gdbarch.h: Regenerated.
9655         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9656         visibility external.
9657         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9658         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9659         (enum cfa_how_kind): Move to ...
9660         (struct dwarf2_frame_state_reg_info): Likewise.
9661         (struct dwarf2_frame_state): Likewise.
9662         * dwarf2-frame.h: ... here.
9663         (dwarf2_frame_state_alloc_regs): New declaration.
9664         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9665         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9666
9667 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9668
9669         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9670         regcache_raw_read_unsigned.
9671         (xtensa_pseudo_register_write): Likewise.
9672
9673 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9674
9675         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9676         (nds32_pseudo_register_write): Likewise.
9677
9678 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9679
9680         * regcache.c (struct regcache) <readonly_p>: Change its type
9681         to bool.
9682         (regcache_xmalloc_1): Update parameter type and callers update.
9683
9684 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9685
9686         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9687         set_gdbarch_wchar_bit.
9688         * arm-tdep.c (arm_gdbarch_init): Likewise.
9689
9690 2017-04-25  Pedro Alves  <palves@redhat.com>
9691
9692         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9693         (BothAreRelocatable, memcopy, memmove): Don't define.
9694         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9695         macros.
9696
9697 2017-04-25  Pedro Alves  <palves@redhat.com>
9698
9699         * common/common-defs.h: Include "common/poison.h".
9700         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9701         and adjust.
9702         * common/poison.h: New file.
9703         * common/traits.h: Include <type_traits>.
9704         (Not, Or, Requires): New, moved from common/function-view.h.
9705
9706 2017-04-25  Pedro Alves  <palves@redhat.com>
9707
9708         * breakpoint.h (struct breakpoint): In-class initialize all
9709         fields.  Make boolean fields "bool".
9710         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9711         memset call and initializations no longer necessary.
9712
9713 2017-04-25  Pedro Alves  <palves@redhat.com>
9714
9715         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9716         reference.
9717         (pt_btrace_insn): New function.
9718         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9719
9720 2017-04-25  Pedro Alves  <palves@redhat.com>
9721
9722         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9723         "base" field and inherit from "bp_location" instead.  Add
9724         non-default ctor.
9725         (allocate_location_exception): Use new non-default ctor.
9726         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9727         (init_bp_location): Convert to ...
9728         (bp_location::bp_location): ... this new ctor, and remove memset
9729         call.
9730         (base_breakpoint_allocate_location): Use the new non-default ctor.
9731         * breakpoint.h (bp_location): Now a class.  Declare default and
9732         non-default ctors.  In-class initialize all members.
9733         (init_bp_location): Remove declaration.
9734
9735 2017-04-25  Pedro Alves  <palves@redhat.com>
9736
9737         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9738         assignment operator.
9739
9740 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9741
9742         * doublest.c (convert_doublest_to_floatformat): Call
9743         floatformat_totalsize_bytes.
9744
9745 2017-04-22  Tom Tromey  <tom@tromey.com>
9746
9747         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9748         ui_out_emit_list.
9749         * stack.c (print_frame): Use ui_out_emit_list.
9750         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9751         ui_out_emit_list.
9752         * mi/mi-main.c (print_one_inferior)
9753         (mi_cmd_data_list_register_names)
9754         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9755         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9756         ui_out_emit_list.
9757         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9758         (mi_output_solib_attribs): Use ui_out_emit_list,
9759         ui_out_emit_tuple.
9760         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9761         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9762         (mi_cmd_stack_list_args, list_args_or_locals): Use
9763         ui_out_emit_list.
9764         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9765         * breakpoint.c (print_solib_event, output_thread_groups): Use
9766         ui_out_emit_list.
9767
9768 2017-04-22  Tom Tromey  <tom@tromey.com>
9769
9770         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9771         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9772         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9773
9774 2017-04-22  Tom Tromey  <tom@tromey.com>
9775
9776         * tracepoint.c (tvariables_info_1)
9777         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9778
9779 2017-04-22  Tom Tromey  <tom@tromey.com>
9780
9781         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9782         annotate_arg_emitter.
9783         * breakpoint.c (print_mention_watchpoint)
9784         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9785         * annotate.h (struct annotate_arg_emitter): New.
9786
9787 2017-04-22  Tom Tromey  <tom@tromey.com>
9788
9789         * record-btrace.c (record_btrace_insn_history)
9790         (record_btrace_insn_history_range, record_btrace_call_history)
9791         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9792         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9793         ui_out_emit_tuple.
9794         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9795         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9796         * skip.c (skip_info): Use ui_out_emit_tuple.
9797         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9798         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9799         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9800         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9801         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9802         ui_out_emit_tuple.
9803         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9804         (output_register, mi_cmd_data_read_memory)
9805         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9806         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9807         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9808         Use ui_out_emit_tuple.
9809         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9810         ui_out_emit_tuple.
9811         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9812         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9813         * linux-thread-db.c (info_auto_load_libthread_db): Use
9814         ui_out_emit_tuple.
9815         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9816         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9817         * disasm.c (do_mixed_source_and_assembly_deprecated)
9818         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9819         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9820         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9821         * breakpoint.c (print_one_breakpoint_location)
9822         (print_one_breakpoint): Use ui_out_emit_tuple.
9823         * auto-load.c (print_script, info_auto_load_cmd): Use
9824         ui_out_emit_tuple.
9825         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9826
9827 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9828
9829         * thread.c (print_thread_info_1): Remove dead code.
9830
9831 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9832
9833         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9834         GDB_SELF_TEST.
9835         * arm-tdep.c (selftests::arm_record_test): Likewise.
9836
9837 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9838
9839         * regcache.c (regcache_restore): Remove argument 2.  Replace
9840         argument 3 with regcache.  Get register status from
9841         src->register_status and get register contents from
9842         register_buffer (src, regnum).
9843         (regcache_cpy): Update.
9844
9845 2017-04-19  Pedro Alves  <palves@redhat.com>
9846
9847         * gdbthread.h (thread): Add missing closing parenthesis in
9848         comment.
9849
9850 2017-04-19  Pedro Alves  <palves@redhat.com>
9851
9852         * common/refcounted-object.h: New file.
9853         * gdbthread.h: Include "common/refcounted-object.h".
9854         (thread_info): Inherit from refcounted_object and add comments.
9855         (thread_info::incref, thread_info::decref)
9856         (thread_info::m_refcount): Delete.
9857         (thread_info::deletable): Use the refcounted_object::refcount()
9858         method.
9859         * inferior.c (current_inferior_): Add comment.
9860         (set_current_inferior): Increment/decrement refcounts.
9861         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9862         not-deletable instead of comparing with the current inferior.
9863         (initialize_inferiors): Increment the initial inferior's refcount.
9864         * inferior.h (struct inferior): Forward declare.
9865         Include "common/refcounted-object.h".
9866         (current_inferior, set_current_inferior): Move declaration to
9867         before struct inferior's definition, and fix comment.
9868         (inferior): Inherit from refcounted_object.  Add comments.
9869         * thread.c (switch_to_thread_no_regs): Reference the thread's
9870         inferior pointer directly instead of doing a ptid lookup.
9871         (switch_to_no_thread): New function.
9872         (switch_to_thread(thread_info *)): New function, factored out
9873         from ...
9874         (switch_to_thread(ptid_t)): ... this.
9875         (restore_current_thread): Delete.
9876         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9877         fields, and add 'inf' field.
9878         (do_restore_current_thread_cleanup): Check whether old->inf is
9879         alive instead of looking up an inferior by ptid.  Use
9880         switch_to_thread and switch_to_no_thread.
9881         (restore_current_thread_cleanup_dtor): Use old->inf directly
9882         instead of lookup up an inferior by id.  Decref the inferior.
9883         Don't restore 'removable'.
9884         (make_cleanup_restore_current_thread): Same the inferior pointer
9885         in old, instead of the inferior number.  Incref the inferior.
9886         Don't save/clear 'removable'.
9887
9888 2017-04-19  Pedro Alves  <palves@redhat.com>
9889
9890         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9891         unittests/scoped_restore-selftests.c.
9892         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9893         * common/scoped_restore.h (scoped_restore_base): Make "class".
9894         (scoped_restore_base::release): New public method.
9895         (scoped_restore_base::scoped_restore_base): New protected ctor.
9896         (scoped_restore_base::m_saved_var): New protected field.
9897         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9898         scoped_restore_base base class instead of m_saved_var directly.
9899         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9900         (scoped_restore_tmpl::scoped_restore_tmpl(const
9901         scoped_restore_tmpl<T>&)): Likewise.
9902         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9903         method.
9904         (scoped_restore_tmpl::saved_var): New method.
9905         (scoped_restore_tmpl::m_saved_var): Delete.
9906         * inferior.h (inferior::detaching): Now a bool.
9907         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9908         cleanup.
9909         * unittests/scoped_restore-selftests.c: New file.
9910
9911 2017-04-19  Pedro Alves  <palves@redhat.com>
9912
9913         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9914         Re-sort in alphabetic order.
9915
9916 2017-04-18  Pedro Alves  <palves@redhat.com>
9917
9918         * xml-support.c (obstack_xml_printf): Delete.
9919         * xml-support.h (obstack_xml_printf): Delete.
9920
9921 2017-04-18  Pedro Alves  <palves@redhat.com>
9922
9923         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9924         vdebug, verror, body_text, start_element, end_element, name,
9925         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9926         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9927         is_xinclude>: Make private and add m_ prefix.
9928         (gdb_xml_parser::body_text): New method, based on ...
9929         (gdb_xml_body_text): ... this.  Adjust.
9930         (gdb_xml_parser::vdebug): New method, based on ...
9931         (gdb_xml_debug): ... this.  Adjust.
9932         (gdb_xml_parser::verror): New method, based on ...
9933         (gdb_xml_error): ... this.  Adjust.
9934         (gdb_xml_parser::start_element): New method, based on ...
9935         (gdb_xml_start_element): ... this.  Adjust.
9936         (gdb_xml_start_element_wrapper): Defer to
9937         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9938         (gdb_xml_parser::end_element): New method, based on ...
9939         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9940         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9941         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9942         (gdb_xml_parser::use_dtd): New method, based on ...
9943         (gdb_xml_use_dtd): ... this.  Adjust.
9944         (gdb_xml_parser::parse): New method, based on ...
9945         (gdb_xml_parse): ... this.  Adjust.
9946         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9947         (xinclude_start_include): Adjust to call the parser's name method.
9948         (xml_xinclude_default, xml_xinclude_start_doctype)
9949         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9950         method.
9951         (xml_process_xincludes): Adjust to call parser methods.
9952         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9953         declarations.
9954
9955 2017-04-18  Pedro Alves  <palves@redhat.com>
9956
9957         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9958         gdb::optional<std::string>.
9959         * xml-support.c: Include <string>.
9960         (scope_level::scope_level(scope_level &&))
9961         (scope_level::~scope_level): Delete.
9962         (scope_level::body): Now a std::string.
9963         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9964         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9965         parameter.
9966         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9967         (xinclude_parsing_data::output): Now a std::string reference.
9968         (xinclude_start_include): Adjust.
9969         (xml_xinclude_default): Adjust.
9970         (xml_process_xincludes): Add 'output' parameter, and return bool.
9971         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9972         and return bool.
9973         * xml-tdesc.c: Include <unordered_map> and <string>.
9974         (tdesc_xml_cache): Delete.
9975         (tdesc_xml_cache_s): Delete.
9976         (xml_cache): Now an std::unordered_map.
9977         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9978         (target_fetch_description_xml): Change return type to
9979         gdb::optional<std::string>, and adjust.
9980         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9981         (target_fetch_description_xml): Change return type to
9982         gdb::optional<std::string>.
9983
9984 2017-04-18  Pedro Alves  <palves@redhat.com>
9985
9986         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9987         unittests/optional-selftests.c.
9988         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9989         * unittests/optional-selftests.c: New file.
9990         * unittests/optional/assignment/1.cc: New file.
9991         * unittests/optional/assignment/2.cc: New file.
9992         * unittests/optional/assignment/3.cc: New file.
9993         * unittests/optional/assignment/4.cc: New file.
9994         * unittests/optional/assignment/5.cc: New file.
9995         * unittests/optional/assignment/6.cc: New file.
9996         * unittests/optional/assignment/7.cc: New file.
9997         * unittests/optional/cons/copy.cc: New file.
9998         * unittests/optional/cons/default.cc: New file.
9999         * unittests/optional/cons/move.cc: New file.
10000         * unittests/optional/cons/value.cc: New file.
10001         * unittests/optional/in_place.cc: New file.
10002         * unittests/optional/observers/1.cc: New file.
10003         * unittests/optional/observers/2.cc: New file.
10004
10005 2017-04-18  Pedro Alves  <palves@redhat.com>
10006
10007         * common/gdb_optional.h: Include common/traits.h.
10008         (in_place_t): New type.
10009         (in_place): New constexpr variable.
10010         (optional::optional): Remove member initialization of
10011         m_instantiated.
10012         (optional::optional(in_place_t...)): New constructor.
10013         (optional::~optional): Use reset.
10014         (optional::optional(const optional&)): New.
10015         (optional::optional(const optional&&)): New.
10016         (optional::optional(T &)): New.
10017         (optional::optional(T &&)): New.
10018         (operator::operator=(const optional &)): New.
10019         (operator::operator=(optional &&)): New.
10020         (operator::operator= (const T &))
10021         (operator::operator= (T &&))
10022         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10023         (operator::reset): New.
10024         (operator::m_instantiated):: Add in-class initializer.
10025         * common/traits.h: Include <type_traits>.
10026         (struct And): New types.
10027
10028 2017-04-18  Pedro Alves  <palves@redhat.com>
10029
10030         * xml-support.c: Include <vector>.
10031         (scope_level::scope_level(const gdb_xml_element *))
10032         (scope_level::scope_level(scope_level&&)): New.
10033         (scope_level::~scope_level): New.
10034         (scope_level_s): Delete.
10035         (gdb_xml_parser::scopes): Now a std::vector.
10036         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10037         Use std::vector.
10038         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10039         scope cleanup code.
10040         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10041         of the scopes member.  Use std::vector::emplace_back.
10042
10043 2017-04-18  Pedro Alves  <palves@redhat.com>
10044
10045         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10046         a bool.
10047         (gdb_xml_end_element): Change type of first parameter.
10048         (gdb_xml_cleanup): Rename to ...
10049         (gdb_xml_parser::~gdb_xml_parser): ... this.
10050         (gdb_xml_create_parser_and_cleanup): Delete with ...
10051         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10052         to this new ctor.
10053         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10054         using gdb_xml_create_parser_and_cleanup.
10055         (xinclude_parsing_data): Add ctor/dtor.
10056         (xml_xinclude_cleanup): Delete.
10057         (xml_process_xincludes): Create a local xinclude_parsing_data
10058         instead of heap-allocating one.  Create a local gdb_xml_parser
10059         instead of heap-allocating one with
10060         gdb_xml_create_parser_and_cleanup.
10061
10062 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10063
10064         PR threads/20743
10065         * fbsd-nat.c (resume_one_thread_cb): Remove.
10066         (resume_all_threads_cb): Remove.
10067         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10068         iterate_over_threads.
10069
10070 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10071
10072         * NEWS: Create a new section for the next release branch.
10073         Rename the section of the current branch, now that it has
10074         been cut.
10075
10076 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10077
10078         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10079         * version.in: Bump version to 8.0.50.DATE-git.
10080
10081 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10082
10083         PR gdb/21385
10084         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10085         independently of the host, and fix build breakage on Cygwin.
10086
10087 2017-04-13  Pedro Alves  <palves@redhat.com>
10088
10089         * inferior.c (free_inferior): Convert to ...
10090         (inferior::~inferior): ... this dtor.
10091         (inferior::inferior): New ctor, factored out from ...
10092         (add_inferior_silent): ... here.  Allocate the inferior with a new
10093         expression.
10094         (delete_inferior): Call delete instead of free_inferior.
10095         * inferior.h (gdb_environ, continuation): Forward declare.
10096         (inferior): Now a class.  Add in-class initialization to all
10097         members.  Make boolean fields bool, except 'detaching'.
10098         (inferior::inferior): New explicit ctor.
10099         (inferior::~inferior): New.
10100
10101 2017-04-13  Pedro Alves  <palves@redhat.com>
10102
10103         * inferior.c (init_inferior_list): Delete.
10104         * inferior.h (init_inferior_list): Delete.
10105
10106 2017-04-13  Pedro Alves  <palves@redhat.com>
10107
10108         PR threads/13217
10109         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10110         (top level): Call it twice, with different thread sets.
10111
10112 2017-04-13  Pedro Alves  <palves@redhat.com>
10113
10114         * thread.c: Include <algorithm>.
10115         (thread_array_cleanup): Delete.
10116         (scoped_inc_dec_ref): New class.
10117         (live_threads_count): New function.
10118         (set_thread_refcount): Delete.
10119         (tp_array_compar_ascending): Now a bool.
10120         (tp_array_compar): Convert to a std::sort comparison function.
10121         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10122         and live_threads_count.
10123
10124 2017-04-13  Pedro Alves  <palves@redhat.com>
10125
10126         * infrun.c (follow_fork_inferior): Also switch the current
10127         inferior.
10128
10129 2017-04-13  Pedro Alves  <palves@redhat.com>
10130
10131         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10132         before calling create_internal_breakpoint.
10133
10134 2017-04-13  Pedro Alves  <palves@redhat.com>
10135
10136         * fork-child.c (execv_argv): New class.
10137         (breakup_args): Refactored as ...
10138         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10139         Copy arguments to storage and replace separators with NULL
10140         terminators in place.
10141         (escape_bang_in_quoted_argument): Adjust to return bool.
10142         (execv_argv::execv_argv): New ctor.
10143         (execv_argv::init_for_shell): New method, factored out from
10144         fork_inferior.  Don't strdup strings into the vector.
10145         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10146         Remove free_vector_argv call.
10147
10148 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10149
10150         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10151         tdep->rx_psw_type.
10152
10153 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10154
10155         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10156         * rx-tdep.c (rx_gdbarch_init): Likewise.
10157
10158 2017-04-13  Pedro Alves  <palves@redhat.com>
10159
10160         * breakpoint.h (struct breakpoint): Reindent.
10161
10162 2017-04-13  Pedro Alves  <palves@redhat.com>
10163
10164         * breakpoint.c (bp_location): Rename to ...
10165         (bp_locations): ... this.  All references updated.
10166         (bp_location_count): Rename to ...
10167         (bp_locations_count): ... this.  All references updated.
10168         (bp_location_placed_address_before_address_max): Rename to ...
10169         (bp_locations_placed_address_before_address_max): ... this.  All
10170         references updated.
10171         (bp_location_shadow_len_after_address_max): Rename to ...
10172         (bp_locations_shadow_len_after_address_max): ... this.  All
10173         references updated.
10174         (bp_location_compare_addrs): Rename to ...
10175         (bp_locations_compare_addrs): ... this.  All references updated.
10176         (bp_location_compare):Rename to ...
10177         (bp_locations_compare): ... this.  All references updated.
10178         (bp_location_target_extensions_update): Rename to ...
10179         (bp_locations_target_extensions_update): ... this.  All references
10180         updated.
10181
10182 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10183
10184         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10185         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10186         'sgtty.h'.
10187         * common/gdb_termios.h: New file, with parts of "terminal.h".
10188         * inflow.c: Include "gdb_termios.h".
10189         * ser-unix.c: Include "gdb_termios.h".
10190         * terminal.h: Move terminal-related defines to
10191         "common/gdb_termios.h".
10192
10193 2017-04-12  Tom Tromey  <tom@tromey.com>
10194
10195         * probe.c (parse_probes): Update.
10196         * location.h (delete_event_location): Don't declare.
10197         (event_location_deleter::operator()): Update.
10198         * location.c (event_location_deleter::operator()): Rename from
10199         delete_event_location.
10200         * linespec.h (linespec_result) <location>: Change type to
10201         event_location_up.
10202         * linespec.c (canonicalize_linespec, event_location_to_sals)
10203         (decode_objc): Update.
10204         (linespec_result): Don't call delete_event_location.
10205         * breakpoint.c (create_breakpoints_sal)
10206         (bkpt_probe_create_sals_from_location)
10207         (strace_marker_create_sals_from_location): Update.
10208
10209 2017-04-12  Tom Tromey  <tom@tromey.com>
10210
10211         * linespec.h (struct linespec_result): Add constructor and
10212         destructor.
10213         (init_linespec_result, destroy_linespec_result)
10214         (make_cleanup_destroy_linespec_result): Don't declare.
10215         * linespec.c (init_linespec_result): Remove.
10216         (linespec_result::~linespec_result): Rename from
10217         destroy_linespec_result.  Update.
10218         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10219         Remove.
10220         * breakpoint.c (create_breakpoint, break_range_command)
10221         (decode_location_default): Update.
10222         * ax-gdb.c (agent_command_1): Update.
10223
10224 2017-04-12  Tom Tromey  <tom@tromey.com>
10225
10226         * remote.c (remote_download_tracepoint): Update.
10227         * python/py-breakpoint.c (bppy_get_location): Update.
10228         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10229         (gdbscm_breakpoint_location): Update.
10230         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10231         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10232         Change type to event_location_up.
10233         * breakpoint.c (create_overlay_event_breakpoint)
10234         (create_longjmp_master_breakpoint)
10235         (create_std_terminate_master_breakpoint)
10236         (create_exception_master_breakpoint)
10237         (breakpoint_event_location_empty_p, print_breakpoint_location)
10238         (print_one_breakpoint_location, create_thread_event_breakpoint)
10239         (init_breakpoint_sal, create_breakpoint)
10240         (print_recreate_ranged_breakpoint, break_range_command)
10241         (init_ada_exception_breakpoint, say_where): Update.
10242         (base_breakpoint_dtor): Don't call delete_event_location.
10243         (bkpt_print_recreate, tracepoint_print_recreate)
10244         (dprintf_print_recreate, update_static_tracepoint)
10245         (breakpoint_re_set_default): Update.
10246
10247 2017-04-12  Tom Tromey  <tom@tromey.com>
10248
10249         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10250         type of "to_do".  Update.
10251         (compute_stack_depth): Use std::vector.
10252
10253 2017-04-12  Tom Tromey  <tom@tromey.com>
10254
10255         * printcmd.c (find_instruction_backward): Use std::vector.
10256
10257 2017-04-12  Tom Tromey  <tom@tromey.com>
10258
10259         * symfile.c (objfilep): Remove typedef.
10260         (reread_symbols): Use a std::vector.
10261
10262 2017-04-12  Tom Tromey  <tom@tromey.com>
10263
10264         * mi/mi-main.c (exec_direction_forward): Remove.
10265         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10266         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10267         scoped_restore.
10268         * guile/guile.c (guile_repl_command, guile_command)
10269         (gdbscm_execute_gdb_command): Use scoped_restore.
10270         * go-exp.y (go_parse): Use scoped_restore.
10271         * d-exp.y (d_parse): Use scoped_restore.
10272         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10273         * c-exp.y (c_parse): Use scoped_restore.
10274
10275 2017-04-12  Tom Tromey  <tom@tromey.com>
10276
10277         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10278         (mi_parse): Update return type.
10279         (mi_parse_free): Remove.
10280         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10281         (mi_parse::~mi_parse): Rename from mi_parse_free.
10282         (mi_parse_cleanup): Remove.
10283         (mi_parse): Return a unique_ptr.  Use new.
10284         * mi/mi-main.c (mi_execute_command): Update.
10285
10286 2017-04-12  Tom Tromey  <tom@tromey.com>
10287
10288         * location.c (explicit_location_lex_one): Return a
10289         unique_xmalloc_ptr.
10290         (string_to_explicit_location): Update.  Remove cleanups.
10291
10292 2017-04-12  Tom Tromey  <tom@tromey.com>
10293
10294         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10295         (compare_value_and_voffset): Change type.  Update.
10296         (compute_vtable_size): Change type of "offset_vec".
10297         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10298         (gnuv3_get_typeid): Remove extraneous declaration.
10299
10300 2017-04-12  Tom Tromey  <tom@tromey.com>
10301
10302         * charset.h (wchar_iterator): Fix comment.
10303
10304 2017-04-12  Tom Tromey  <tom@tromey.com>
10305
10306         * charset.c (iconv_wrapper): New class.
10307         (cleanup_iconv): Remove.
10308         (convert_between_encodings): Use it.
10309
10310 2017-04-12  Tom Tromey  <tom@tromey.com>
10311
10312         * symfile.h (increment_reading_symtab): Update type.
10313         * symfile.c (decrement_reading_symtab): Remove.
10314         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10315         * psymtab.c (psymtab_to_symtab): Update.
10316         * dwarf2read.c (dw2_instantiate_symtab): Update.
10317
10318 2017-04-12  Tom Tromey  <tom@tromey.com>
10319
10320         * jit.c (struct jit_reader): Declare separately.  Add constructor
10321         and destructor.  Change type of "handle".
10322         (loaded_jit_reader): Define separately.
10323         (jit_reader_load): Update.  New "new".
10324         (jit_reader_unload_command): Use "delete".
10325         * gdb-dlfcn.h (struct dlclose_deleter): New.
10326         (gdb_dlhandle_up): New typedef.
10327         (gdb_dlopen, gdb_dlsym): Update types.
10328         (gdb_dlclose): Remove.
10329         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10330         (gdb_dlsym): Change type of "handle".
10331         (make_cleanup_dlclose): Remove.
10332         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10333         * compile/compile-c-support.c (load_libcc): Update.
10334
10335 2017-04-12  Tom Tromey  <tom@tromey.com>
10336
10337         * symtab.h (find_pcs_for_symtab_line): Change return type.
10338         * symtab.c (find_pcs_for_symtab_line): Change return type.
10339         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10340         type of "vec".  Update.
10341         (ltpy_get_pcs_for_line): Update.
10342         * linespec.c (decode_digits_ordinary): Update.
10343
10344 2017-04-12  Tom Tromey  <tom@tromey.com>
10345
10346         * tracepoint.c (actions_command): Update.
10347         * python/python.c (python_command, python_interactive_command):
10348         Update.
10349         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10350         * guile/guile.c (guile_command): Update.
10351         * defs.h (read_command_lines, read_command_lines_1): Return
10352         command_line_up.
10353         (command_lines_deleter): New struct.
10354         (command_line_up): New typedef.
10355         * compile/compile.c (compile_code_command)
10356         (compile_print_command): Update.
10357         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10358         command_line_up.
10359         (make_cleanup_free_command_lines): Remove.
10360         * cli/cli-script.c (get_command_line, read_command_lines_1)
10361         (copy_command_lines): Return command_line_up.
10362         (while_command, if_command, read_command_lines, define_command)
10363         (document_command): Update.
10364         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10365         Remove.
10366         * breakpoint.h (breakpoint_set_commands): Change type of
10367         "commands".
10368         * breakpoint.c (breakpoint_set_commands): Change type of
10369         "commands".  Update.
10370         (do_map_commands_command, update_dprintf_command_list)
10371         (create_tracepoint_from_upload): Update.
10372
10373 2017-04-12  Tom Tromey  <tom@tromey.com>
10374
10375         * tracepoint.c (scope_info): Update.
10376         * spu-tdep.c (spu_catch_start): Update.
10377         * python/python.c (gdbpy_decode_line): Update.
10378         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10379         * python/py-breakpoint.c (bppy_init): Update.
10380         * probe.c (parse_probes): Update.
10381         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10382         * location.h (event_location_deleter): New struct.
10383         (event_location_up): New typedef.
10384         (new_linespec_location, new_address_location, new_probe_location)
10385         (new_explicit_location, copy_event_location)
10386         (string_to_event_location, string_to_event_location_basic)
10387         (string_to_explicit_location): Update return type.
10388         (make_cleanup_delete_event_location): Remove.
10389         * location.c (new_linespec_location, new_address_location)
10390         (new_probe_location, new_explicit_location, copy_event_location):
10391         Return event_location_up.
10392         (delete_event_location_cleanup)
10393         (make_cleanup_delete_event_location): Remove.
10394         (string_to_explicit_location, string_to_event_location_basic)
10395         (string_to_event_location): Return event_location_up.
10396         * linespec.c (canonicalize_linespec, event_location_to_sals)
10397         (decode_line_with_current_source)
10398         (decode_line_with_last_displayed, decode_objc): Update.
10399         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10400         * completer.c (location_completer): Update.
10401         * cli/cli-cmds.c (edit_command, list_command): Update.
10402         * breakpoint.c (create_overlay_event_breakpoint)
10403         (create_longjmp_master_breakpoint)
10404         (create_std_terminate_master_breakpoint)
10405         (create_exception_master_breakpoint)
10406         (create_thread_event_breakpoint): Update.
10407         (init_breakpoint_sal): Update.  Remove some dead code.
10408         (create_breakpoint_sal): Change type of "location".  Update.
10409         (create_breakpoints_sal, create_breakpoint, break_command_1)
10410         (dprintf_command, break_range_command, until_break_command)
10411         (init_ada_exception_breakpoint)
10412         (strace_marker_create_sals_from_location)
10413         (update_static_tracepoint, trace_command, ftrace_command)
10414         (strace_command, create_tracepoint_from_upload): Update.
10415         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10416         * ax-gdb.c (agent_command_1): Update.
10417
10418 2017-04-12  Pedro Alves  <palves@redhat.com>
10419
10420         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10421         * configure.tgt: Handle i[34567]86-*-go32* and
10422         i[34567]86-*-msdosdjgpp*.
10423         * i386-tdep.c (i386_svr4_reg_to_regnum):
10424         Make extern.
10425         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10426         i386-go32-tdep.c.
10427         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10428         * i386-go32-tdep.c: New file.
10429         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10430         declarations.
10431
10432 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10433
10434         * aix-thread.c (pd_status2str): Change return type to const char *.
10435
10436 2017-04-12  Pedro Alves  <palves@redhat.com>
10437
10438         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10439         calls to set_gdbarch_gnu_triplet_regexp.
10440
10441 2017-04-12  Pedro Alves  <palves@redhat.com>
10442
10443         PR gdb/21323
10444         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10445         New enum value.
10446         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10447         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10448         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10449         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10450         * gdbarch.h, gdbarch.c: Regenerate.
10451         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10452         gdbarch_wchar_bit and gdbarch_wchar_signed.
10453         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10454         * arm-tdep.c (arm_gdbarch_init): Likewise.
10455         * avr-tdep.c (avr_gdbarch_init): Likewise.
10456         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10457         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10458         * i386-tdep.c (i386_go32_init_abi): Likewise.
10459         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10460         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10461         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10462         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10463         * sh-tdep.c (sh_gdbarch_init): Likewise.
10464         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10465         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10466         * windows-tdep.c (windows_init_abi): Likewise.
10467         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10468
10469 2017-04-12  Pedro Alves  <palves@redhat.com>
10470
10471         PR c++/21323
10472         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10473         cplus_primitive_type_char32_t>: New enum values.
10474         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10475         and cplus_primitive_type_char32_t.
10476         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10477         32, use the archtecture's built-in type for char16_t and char32_t,
10478         respectively.  Otherwise, fallback to init_integer_type as before,
10479         but make the type unsigned, and issue a complaint.
10480         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10481
10482 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10483
10484         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10485         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10486
10487 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10488
10489         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10490         'const char *'.
10491
10492 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10493
10494         * common/common-utils.c (free_vector_argv): New function.
10495         * common/common-utils.h: Include <vector>.
10496         (free_vector_argv): New prototype.
10497         * darwin-nat.c (darwin_create_inferior): Rewrite function
10498         prototype in order to constify "exec_file" and accept a
10499         "std::string" for "allargs".
10500         * fork-child.c: Include <vector>.
10501         (breakup_args): Rewrite function, using C++.
10502         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10503         and accept "std::string" for "allargs".  Update the code to
10504         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10505         and "execvp".
10506         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10507         order to constify "exec_file" and accept a "std::string" for
10508         "allargs".
10509         * go32-nat.c (go32_create_inferior): Likewise.
10510         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10511         * infcmd.c (run_command_1): Constify "exec_file".  Use
10512         "std::string" for inferior arguments.
10513         * inferior.h (fork_inferior): Update prototype.
10514         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10515         prototype in order to constify "exec_file" and accept a
10516         "std::string" for "allargs".
10517         * nto-procfs.c (procfs_create_inferior): Likewise.
10518         * procfs.c (procfs_create_inferior): Likewise.
10519         * remote-sim.c (gdbsim_create_inferior): Likewise.
10520         * remote.c (extended_remote_run): Update code to accept
10521         "std::string" as argument.
10522         (extended_remote_create_inferior): Rewrite function prototype in
10523         order to constify "exec_file" and accept a "std::string" for
10524         "allargs".
10525         * rs6000-nat.c (super_create_inferior): Likewise.
10526         (rs6000_create_inferior): Likewise.
10527         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10528         * windows-nat.c (windows_create_inferior): Likewise.
10529
10530 2017-04-11  Pedro Alves  <palves@redhat.com>
10531
10532         * thread.c: Fix whitespace throughout.
10533
10534 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10535
10536         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10537
10538 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10539
10540         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10541
10542 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10543
10544         PR gdb/21364
10545         * osdata.c (info_osdata): Check if 'type' is an empty string
10546         instead of NULL.
10547
10548 2017-04-10  Pedro Alves  <palves@redhat.com>
10549
10550         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10551         (ptid_to_global_thread_id, in_thread_list)
10552         (do_captured_list_thread_ids, set_resumed, set_running)
10553         (set_executing, set_stop_requested, finish_thread_state)
10554         (validate_registers_access, can_access_registers_ptid)
10555         (print_thread_info_1, switch_to_thread)
10556         (do_restore_current_thread_cleanup)
10557         (make_cleanup_restore_current_thread, thread_command)
10558         (thread_name_command): Use operator== instead of ptid_equal.
10559
10560 2017-04-10  Pedro Alves  <palves@redhat.com>
10561
10562         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10563         (current_thread_cleanup_chain): Delete.
10564         (restore_current_thread_cleanup_dtor)
10565         (make_cleanup_restore_current_thread): Remove references to
10566         current_thread_cleanup_chain.
10567
10568 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10569
10570         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10571         REG_UNKNOWN.
10572
10573 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10574
10575         PR gdb/19942
10576         * gdbthread.h (thread_info::deletable): New method.
10577         (thread_info::incref): New method.
10578         (thread_info::decref): New method.
10579         (thread_info::refcount): Move it to private.
10580         * infrun.c (save_stop_context): Call inc_refcount.
10581         (release_stop_context_cleanup): Likewise.
10582         * thread.c (set_thread_exited): New function.
10583         (init_thread_list): Delete "tp" only it is deletable, otherwise
10584         call set_thread_exited.
10585         (delete_thread_1): Call set_thread_exited.
10586         (current_thread_cleanup) <inferior_pid>: Remove.
10587         <thread>: New field.
10588         (restore_current_thread_ptid_changed): Removed.
10589         (do_restore_current_thread_cleanup): Adjust.
10590         (restore_current_thread_cleanup_dtor): Don't call
10591         find_thread_ptid.
10592         (set_thread_refcount): Use dec_refcount.
10593         (make_cleanup_restore_current_thread): Adjust.
10594         (thread_apply_all_command): Call inc_refcount.
10595         (_initialize_thread): Don't call
10596         observer_attach_thread_ptid_changed.
10597
10598 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10599
10600         * thread.c (delete_thread_1): Hoist code on marking thread as
10601         exited.
10602
10603 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10604
10605         * windows-nat.c (windows_detach): Initialize ptid with
10606         minus_one_ptid.
10607
10608 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10609
10610         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10611
10612 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10613
10614         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10615         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10616         (bfin_pseudo_register_write): Likewise
10617
10618 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10619
10620         * common/ptid.h (struct ptid): Change to...
10621         (class ptid_t): ... this.
10622         <ptid_t>: New constructors.
10623         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10624         matches>: New methods.
10625         <make_null, make_minus_one>: New static methods.
10626         <pid>: Rename to...
10627         <m_pid>: ...this.
10628         <lwp>: Rename to...
10629         <m_lwp>: ...this.
10630         <tid>: Rename to...
10631         <m_tid>: ...this.
10632         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10633         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10634         as references, move comment to class ptid_t.
10635         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10636         ptid_t static methods.
10637         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10638         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10639         Take ptid arguments as references, implement using ptid_t methods.
10640         * unittests/ptid-selftests.c: New file.
10641         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10642         unittests/ptid-selftests.c.
10643         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10644
10645 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10646
10647         * python/python.c (python_run_simple_file): Cast mode literal to
10648         non-const char pointer as expected by PyFile_FromString.
10649
10650 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10651
10652         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10653         minus_one_ptid and null_ptid.
10654
10655 2017-04-05  Pedro Alves  <palves@redhat.com>
10656
10657         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10658         * configure: Regenerate.
10659
10660 2017-04-05  Pedro Alves  <palves@redhat.com>
10661
10662         * ada-exp.y (yyerror): Constify.
10663         * ada-lang.c (bound_name, get_selections)
10664         (ada_variant_discrim_type)
10665         (ada_variant_discrim_name, ada_value_struct_elt)
10666         (ada_lookup_struct_elt_type, is_unchecked_variant)
10667         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10668         (catch_ada_exception_command_split)
10669         (catch_ada_assert_command_split, catch_assert_command)
10670         (ada_op_name): Constify.
10671         * ada-lang.h (ada_yyerror, get_selections)
10672         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10673         * arc-tdep.c (arc_print_frame_cache): Constify.
10674         * arm-tdep.c (arm_skip_stub): Constify.
10675         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10676         (gen_aggregate_elt_ref): Constify.
10677         * bcache.c (print_bcache_statistics): Constify.
10678         * bcache.h (print_bcache_statistics): Constify.
10679         * break-catch-throw.c (catch_exception_command_1):
10680         * breakpoint.c (struct ep_type_description::description):
10681         Constify.
10682         (add_solib_catchpoint): Constify.
10683         (catch_fork_command_1): Add cast.
10684         (add_catch_command): Constify.
10685         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10686         Constify.
10687         * bsd-uthread.c (bsd_uthread_state): Constify.
10688         * buildsym.c (patch_subfile_names): Constify.
10689         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10690         Constify.
10691         * c-exp.y (yyerror): Constify.
10692         (token::oper): Constify.
10693         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10694         * c-varobj.c (cplus_describe_child): Constify.
10695         * charset.c (find_charset_names): Add cast.
10696         (find_charset_names): Constify array and add const_cast.
10697         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10698         (edit_command): Constify.
10699         * cli/cli-decode.c (lookup_cmd): Constify.
10700         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10701         Constify.
10702         (struct dump_context): Constify.
10703         (add_dump_command, restore_command): Constify.
10704         * cli/cli-script.c (get_command_line): Constify.
10705         * cli/cli-script.h (get_command_line): Constify.
10706         * cli/cli-utils.c (check_for_argument): Constify.
10707         * cli/cli-utils.h (check_for_argument): Constify.
10708         * coff-pe-read.c (struct read_pe_section_data): Constify.
10709         * command.h (lookup_cmd): Constify.
10710         * common/print-utils.c (decimal2str): Constify.
10711         * completer.c (gdb_print_filename): Constify.
10712         * corefile.c (set_gnutarget): Constify.
10713         * cp-name-parser.y (yyerror): Constify.
10714         * cp-valprint.c (cp_print_class_member): Constify.
10715         * cris-tdep.c (cris_register_name, crisv32_register_name):
10716         Constify.
10717         * d-exp.y (yyerror): Constify.
10718         (struct token::oper): Constify.
10719         * d-lang.h (d_yyerror): Constify.
10720         * dbxread.c (struct header_file_location::name): Constify.
10721         (add_old_header_file, add_new_header_file, last_function_name)
10722         (dbx_next_symbol_text, add_bincl_to_list)
10723         (find_corresponding_bincl_psymtab, set_namestring)
10724         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10725         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10726         * defs.h (command_line_input, print_address_symbolic)
10727         (deprecated_readline_begin_hook): Constify.
10728         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10729         Constify.
10730         * event-top.c (handle_line_of_input): Constify and add cast.
10731         * exceptions.c (catch_errors): Constify.
10732         * exceptions.h (catch_errors): Constify.
10733         * expprint.c (print_subexp_standard, op_string, op_name)
10734         (op_name_standard, dump_raw_expression, dump_raw_expression):
10735         * expression.h (op_name, op_string, dump_raw_expression):
10736         Constify.
10737         * f-exp.y (yyerror): Constify.
10738         (struct token::oper): Constify.
10739         (struct f77_boolean_val::name): Constify.
10740         * f-lang.c (f_word_break_characters): Constify.
10741         * f-lang.h (f_yyerror): Constify.
10742         * fork-child.c (fork_inferior): Add cast.
10743         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10744         (new_variant): Constify.
10745         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10746         * gdbarch.c: Regenerate.
10747         * gdbcore.h (set_gnutarget): Constify.
10748         * go-exp.y (yyerror): Constify.
10749         (token::oper): Constify.
10750         * go-lang.h (go_yyerror): Constify.
10751         * go32-nat.c (go32_sysinfo): Constify.
10752         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10753         * guile/scm-cmd.c (cmdscm_function): Constify.
10754         * guile/scm-param.c (pascm_param_value): Constify.
10755         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10756         (h8300sx_register_name): Constify.
10757         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10758         Constify.
10759         * ia64-tdep.c (ia64_register_names): Constify.
10760         * infcmd.c (construct_inferior_arguments): Constify.
10761         (path_command, attach_post_wait): Constify.
10762         * language.c (show_range_command, show_case_command)
10763         (unk_lang_error): Constify.
10764         * language.h (language_defn::la_error)
10765         (language_defn::la_name_of_this): Constify.
10766         * linespec.c (decode_line_2): Constify.
10767         * linux-thread-db.c (thread_db_err_str): Constify.
10768         * lm32-tdep.c (lm32_register_name): Constify.
10769         * m2-exp.y (yyerror): Constify.
10770         * m2-lang.h (m2_yyerror): Constify.
10771         * m32r-tdep.c (m32r_register_names): Constify and make static.
10772         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10773         * m88k-tdep.c (m88k_register_name): Constify.
10774         * macroexp.c (appendmem): Constify.
10775         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10776         (upgrade_type, parse_external, parse_partial_symbols)
10777         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10778         (new_symbol): Constify.
10779         * memattr.c (mem_info_command): Constify.
10780         * mep-tdep.c (register_name_from_keyword): Constify.
10781         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10782         Constify.
10783         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10784         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10785         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10786         cast.
10787         (mi_execute_async_cli_command): Constify.
10788         * mips-tdep.c (mips_register_name): Constify.
10789         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10790         (am33_register_name, am33_2_register_name)
10791         * moxie-tdep.c (moxie_register_names): Constify.
10792         * nat/linux-osdata.c (osdata_type): Constify fields.
10793         * nto-tdep.c (nto_parse_redirection): Constify.
10794         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10795         (lookup_child_selector): Constify.
10796         (objc_methcall::name): Constify.
10797         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10798         (lookup_struct_typedef): Constify.
10799         * objfiles.c (pc_in_section): Constify.
10800         * objfiles.h (pc_in_section): Constify.
10801         * p-exp.y (struct token::oper): Constify.
10802         (yyerror): Constify.
10803         * p-lang.h (pascal_yyerror): Constify.
10804         * parser-defs.h (op_name_standard): Constify.
10805         (op_print::string): Constify.
10806         (exp_descriptor::op_name): Constify.
10807         * printcmd.c (print_address_symbolic): Constify.
10808         * psymtab.c (print_partial_symbols): Constify.
10809         * python/py-breakpoint.c (stop_func): Constify.
10810         (bppy_get_expression): Constify.
10811         * python/py-cmd.c (cmdpy_completer::name): Constify.
10812         (cmdpy_function): Constify.
10813         * python/py-event.c (evpy_add_attribute)
10814         (gdbpy_initialize_event_generic): Constify.
10815         * python/py-event.h (evpy_add_attribute)
10816         (gdbpy_initialize_event_generic): Constify.
10817         * python/py-evts.c (add_new_registry): Constify.
10818         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10819         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10820         * python/py-inferior.c (get_buffer): Add cast.
10821         * python/py-param.c (parm_constant::name): Constify.
10822         * python/py-unwind.c (fprint_frame_id): Constify.
10823         * python/python.c (gdbpy_parameter_value): Constify.
10824         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10825         * remote.c (memory_packet_config::name): Constify.
10826         (show_packet_config_cmd, remote_write_bytes)
10827         (remote_buffer_add_string):
10828         * reverse.c (exec_reverse_once): Constify.
10829         * rs6000-tdep.c (variant::name, variant::description): Constify.
10830         * rust-exp.y (rustyyerror): Constify.
10831         * rust-lang.c (rust_op_name): Constify.
10832         * rust-lang.h (rustyyerror): Constify.
10833         * serial.h (serial_ops::name): Constify.
10834         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10835         (sh_sh3e_register_name, sh_sh2e_register_name)
10836         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10837         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10838         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10839         (sh_sh4al_dsp_register_name): Constify.
10840         * sh64-tdep.c (sh64_register_name): Constify.
10841         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10842         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10843         * stabsread.c (patch_block_stabs, read_type_number)
10844         (ref_map::stabs, ref_add, process_reference)
10845         (symbol_reference_defined, define_symbol, define_symbol)
10846         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10847         (read_one_struct_field, read_struct_fields, read_baseclasses)
10848         (read_tilde_fields, read_struct_type, read_array_type)
10849         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10850         (read_huge_number, read_range_type, read_args, common_block_start)
10851         (find_name_end): Constify.
10852         * stabsread.h (common_block_start, define_symbol)
10853         (process_one_symbol, symbol_reference_defined, ref_add):
10854         * symfile.c (get_section_index, add_symbol_file_command):
10855         * symfile.h (get_section_index): Constify.
10856         * target-descriptions.c (tdesc_type::name): Constify.
10857         (tdesc_free_type): Add cast.
10858         * target.c (find_default_run_target):
10859         (add_deprecated_target_alias, find_default_run_target)
10860         (target_announce_detach): Constify.
10861         (do_option): Constify.
10862         * target.h (add_deprecated_target_alias): Constify.
10863         * thread.c (print_thread_info_1): Constify.
10864         * top.c (deprecated_readline_begin_hook, command_line_input):
10865         Constify.
10866         (init_main): Add casts.
10867         * top.h (handle_line_of_input): Constify.
10868         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10869         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10870         (tfind_command): Rename to ...
10871         (tfind_command_1): ... this and constify.
10872         (tfind_command): New function.
10873         (tfind_end_command, tfind_start_command): Adjust.
10874         (encode_source_string): Constify.
10875         * tracepoint.h (encode_source_string): Constify.
10876         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10877         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10878         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10879         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10880         * tui/tui-win.c (parse_scrolling_args): Constify.
10881         * tui/tui-windata.c (tui_erase_data_content): Constify.
10882         * tui/tui-windata.h (tui_erase_data_content): Constify.
10883         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10884         * tui/tui.c (tui_enable): Add cast.
10885         * utils.c (defaulted_query): Constify.
10886         (init_page_info): Add cast.
10887         (puts_debug, subset_compare): Constify.
10888         * utils.h (subset_compare): Constify.
10889         * varobj.c (varobj_format_string): Constify.
10890         * varobj.h (varobj_format_string): Constify.
10891         * vax-tdep.c (vax_register_name): Constify.
10892         * windows-nat.c (windows_detach): Constify.
10893         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10894         * xml-support.c (gdb_xml_end_element): Constify.
10895         * xml-tdesc.c (tdesc_start_reg): Constify.
10896         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10897         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10898         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10899
10900 2017-04-05  Pedro Alves  <palves@redhat.com>
10901
10902         * proc-api.c (struct trans): Constify.
10903         (procfs_note): Constify.
10904         * proc-events.c (struct trans, syscall_table):
10905         * proc-flags.c (struct trans): Constify.
10906         * proc-utils.h (procfs_note): Constify.
10907         * proc-why.c (struct trans): Constify.
10908         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10909         (procfs_detach): Constify.
10910         * sol-thread.c (struct string_map): Constify.
10911         (td_err_string, td_state_string): Constify.
10912
10913 2017-04-05  Pedro Alves  <palves@redhat.com>
10914
10915         * proc-api.c (procfs_filename): Don't initialize
10916         procfs_filename.
10917         (prepare_to_trace): Assume procfs_filename is non-NULL.
10918         (_initialize_proc_api): Give procfs_filename a default value here.
10919
10920 2017-04-05  Pedro Alves  <palves@redhat.com>
10921
10922         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10923         'cond_string' parameter.
10924         (extract_exception_regexp): Constify 'string' parameter.
10925         (catch_exception_command_1): Constify.
10926         * breakpoint.c (init_catchpoint)
10927         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10928         parameter.
10929         (ep_parse_optional_if_clause, catch_fork_command_1)
10930         (catch_exec_command_1): Constify.
10931         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10932         parameter.
10933         (ep_parse_optional_if_clause): Constify.
10934         * cli/cli-utils.c (remove_trailing_whitespace)
10935         (check_for_argument): Constify.
10936         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10937         non-const overload.
10938         (check_for_argument): Likewise.
10939
10940 2017-04-05  Pedro Alves  <palves@redhat.com>
10941
10942         * event-top.c (command_line_handler): Add cast to execute_command
10943         call.
10944         * record-btrace.c (cmd_record_btrace_bts_start)
10945         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10946         (cmd_record_btrace_start): Add cast to execute_command call.
10947         * record-full.c (record_full_goto_insn):
10948         * record.c (record_start, record_stop): Add cast to
10949         execute_command_to_string calls.
10950         (cmd_record_start): Add cast to execute_command calls.
10951
10952 2017-04-05  Pedro Alves  <palves@redhat.com>
10953
10954         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10955         static inline function.
10956         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10957         array and use gdb_PyArg_ParseTupleAndKeywords.
10958         * python/py-cmd.c (cmdpy_init): Likewise.
10959         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10960         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10961         (infpy_search_memory): Likewise.
10962         * python/py-objfile.c (objfpy_add_separate_debug_file)
10963         (gdbpy_lookup_objfile): Likewise.
10964         * python/py-symbol.c (gdbpy_lookup_symbol)
10965         (gdbpy_lookup_global_symbol): Likewise.
10966         * python/py-type.c (gdbpy_lookup_type): Likewise.
10967         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10968         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10969         Likewise.
10970
10971 2017-04-05  Pedro Alves  <palves@redhat.com>
10972
10973         * python/python-internal.h (gdb_PyGetSetDef): New type.
10974         * python/py-block.c (block_object_getset)
10975         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10976         * python/py-event.c (event_object_getset)
10977         (finish_breakpoint_object_getset): Likewise.
10978         * python/py-inferior.c (inferior_object_getset): Likewise.
10979         * python/py-infthread.c (thread_object_getset): Likewise.
10980         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10981         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10982         * python/py-objfile.c (objfile_getset): Likewise.
10983         * python/py-progspace.c (pspace_getset): Likewise.
10984         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10985         Likewise.
10986         * python/py-record.c (recpy_record_getset): Likewise.
10987         * python/py-symbol.c (symbol_object_getset): Likewise.
10988         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10989         Likewise.
10990         * python/py-type.c (type_object_getset, field_object_getset):
10991         Likewise.
10992         * python/py-value.c (value_object_getset): Likewise.
10993
10994 2017-04-05  Pedro Alves  <palves@redhat.com>
10995
10996         * python/python-internal.h (gdb_PyObject_CallMethod)
10997         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10998         New functions.
10999         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11000         (PySys_GetObject, PySys_SetPath): New macros.
11001
11002 2017-04-05  Pedro Alves  <palves@redhat.com>
11003
11004         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11005         info_osdata_command.
11006         * osdata.c (info_osdata_command): Rename to ...
11007         (info_osdata): ... this.  Constify 'type' parameter, and remove
11008         the 'from_tty' parameter.  Accept NULL TYPE.
11009         (info_osdata_command): New function.
11010         * osdata.h (info_osdata_command): Remove declaration.
11011         (info_osdata): New declaration.
11012
11013 2017-04-05  Pedro Alves  <palves@redhat.com>
11014
11015         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11016         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11017         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11018         parameter.
11019         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11020         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11021         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11022         parameter.
11023         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11024         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11025         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11026         (mi_cmd_file_list_exec_source_files)
11027         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11028         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11029         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11030         parameter.
11031         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11032         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11033         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11034         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11035         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11036         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11037         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11038         'command' parameter.
11039         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11040         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11041         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11042         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11043         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11044         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11045         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11046         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11047         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11048         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11049         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11050         parameter.
11051         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11052         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11053         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11054         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11055         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11056         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11057         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11058         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11059         (mi_cmd_data_list_changed_registers)
11060         (mi_cmd_data_write_register_values)
11061         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11062         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11063         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11064         (mi_cmd_list_features, mi_cmd_list_target_features)
11065         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11066         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11067         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11068         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11069         (mi_cmd_trace_frame_collected): Constify 'command'
11070         parameter.
11071         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11072         'command' parameter.
11073
11074 2017-04-05  Pedro Alves  <palves@redhat.com>
11075
11076         * ada-lang.c (ada_completer_word_break_characters): Now a const
11077         array.
11078         (ada_get_gdb_completer_word_break_characters): Constify.
11079         * completer.c (gdb_completer_command_word_break_characters)
11080         (gdb_completer_file_name_break_characters)
11081         (gdb_completer_quote_characters): Now const arrays.
11082         (get_gdb_completer_quote_characters): Constify.
11083         (set_rl_completer_word_break_characters): New function.
11084         (set_gdb_completion_word_break_characters)
11085         (complete_line_internal): Use it.
11086         * completer.h (get_gdb_completer_quote_characters): Constify.
11087         (set_rl_completer_word_break_characters): Declare.
11088         * f-lang.c (f_word_break_characters): Constify.
11089         * language.c (default_word_break_characters): Constify.
11090         * language.h (language_defn::la_word_break_characters): Constify.
11091         (default_word_break_characters): Constify.
11092         * top.c (init_main): Use set_rl_completer_word_break_characters.
11093
11094 2017-04-05  Pedro Alves  <palves@redhat.com>
11095
11096         * aix-thread.c (aix_thread_pid_to_str)
11097         (aix_thread_extra_thread_info): Constify.
11098         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11099         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11100         (bsd_uthread_pid_to_str): Constify.
11101         * corelow.c (core_pid_to_str): Constify.
11102         * darwin-nat.c (darwin_pid_to_str): Constify.
11103         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11104         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11105         Constify.
11106         * gnu-nat.c (gnu_pid_to_str): Constify.
11107         * go32-nat.c (go32_pid_to_str): Constify.
11108         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11109         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11110         * inferior.c (inferior_pid_to_str): Constify.
11111         * linux-nat.c (linux_nat_pid_to_str): Constify.
11112         * linux-tdep.c (linux_core_pid_to_str): Constify.
11113         * linux-thread-db.c (thread_db_pid_to_str)
11114         (thread_db_extra_thread_info): Constify.
11115         * nto-tdep.c (nto_extra_thread_info): Constify.
11116         * nto-tdep.h (nto_extra_thread_info): Constify.
11117         * obsd-nat.c (obsd_pid_to_str): Constify.
11118         * procfs.c (procfs_pid_to_str): Constify.
11119         * ravenscar-thread.c (ravenscar_extra_thread_info)
11120         (ravenscar_pid_to_str): Constify.
11121         * remote-sim.c (gdbsim_pid_to_str): Constify.
11122         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11123         Constify.
11124         * sol-thread.c (solaris_pid_to_str): Constify.
11125         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11126         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11127         * target.c (default_pid_to_str, target_pid_to_str)
11128         (normal_pid_to_str, default_pid_to_str): Constify.
11129         * target.h (target_ops::to_pid_to_str)
11130         (target_ops::to_extra_thread_info): Constify.
11131         (target_pid_to_str, normal_pid_to_str): Constify.
11132         * windows-nat.c (windows_pid_to_str): Constify.
11133         * gdbarch.sh (core_pid_to_str): Constify.
11134         * target-delegates.c: Regenerate.
11135         * gdbarch.h, gdbarch.c: Regenerate.
11136
11137 2017-04-05  Pedro Alves  <palves@redhat.com>
11138
11139         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11140         the memory of the temporary warning_pre_print override.
11141         * utils.c (warning_pre_print): Constify.
11142         * utils.h (warning_pre_print): Constify.
11143
11144 2017-04-05  Pedro Alves  <palves@redhat.com>
11145
11146         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11147         (shell_command): New function.
11148         (make_command): Use std::string.
11149         (init_cli_cmds): Register shell_command instead of shell_escape.
11150
11151 2017-04-05  Pedro Alves  <palves@redhat.com>
11152
11153         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11154         * tracepoint.c (default_collect): Don't initialize.
11155
11156 2017-04-05  Pedro Alves  <palves@redhat.com>
11157
11158         * macroexp.c (macro_buffer::shared): Now a bool.
11159         (init_buffer): Update.
11160         (init_shared_buffer): Constify 'addr' parameter.
11161         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11162         casts.
11163
11164 2017-04-05  Pedro Alves  <palves@redhat.com>
11165
11166         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11167         * disasm.c (set_disassembler_options): Constify local.
11168         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11169
11170 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11171
11172         PR gdb/21352
11173         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11174         option.
11175
11176 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11177
11178         * frame.c (frame_unwind_register_unsigned): Call
11179         frame_unwind_register_value.
11180
11181 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11182
11183         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11184         Use gdb_test_multiple, and don't match anchor.
11185
11186 2017-04-05  Pedro Alves  <palves@redhat.com>
11187
11188         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11189         (Write After Approval): Remove Simon Marchi.
11190
11191 2017-04-05  Pedro Alves  <palves@redhat.com>
11192
11193         * common/gdb_optional.h (optional::optional): Make constexpr and
11194         initialize m_dummy.
11195
11196 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11197
11198         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11199         (amd64fbsd_jmp_buf_reg_offset): Remove.
11200         (amd64fbsd_supply_uthread): Remove function.
11201         (amd64fbsd_collect_uthread): Remove function.
11202         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11203         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11204         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11205         (fbsd-nat.c): Update comment.
11206         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11207         (i386fbsd_jmp_buf_reg_offset): Remove.
11208         (i386fbsd_supply_uthread): Remove function.
11209         (i386fbsd_collect_uthread): Remove function.
11210         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11211
11212 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11213
11214         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11215         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11216         * NEWS: Mention that support for FreeBSD/alpha was removed.
11217         * alpha-fbsd-tdep.c: Delete file.
11218         * config/alpha/fbsd.mh: Delete file.
11219         * configure.host: Delete alpha*-*-freebsd* and
11220         alpha*-*-kfreebsd*-gnu.
11221         * configure.tgt: Delete alpha*-*-freebsd* and
11222         alpha*-*-kfreebsd*-gnu.
11223
11224 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11225
11226         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11227         amd64bsd_store_inferior_registers): Use ptid from regcache.
11228
11229 2017-04-04  Pedro Alves  <palves@redhat.com>
11230
11231         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11232         data fields, make them private and add "m_" prefixes.
11233         (lnp_state_machine::lnp_state_machine): New ctor.
11234         (record_line, check_line_address, handle_set_discriminator)
11235         (handle_set_address, handle_advance_pc, handle_special_opcode)
11236         (handle_advance_line, handle_set_file, handle_negate_stmt)
11237         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11238         (end_sequence, advance_line): New methods.
11239         (m_gdbarch, m_record_lines_p): New fields.
11240         (lnp_reader_state): Delete.
11241         (dwarf_record_line): Rename to ...
11242         (lnp_state_machine::record_line): ... adjust.
11243         (init_lnp_state_machine): Delete.
11244         (lnp_state_machine::lnp_state_machine): New.
11245         (check_line_address): Rename to ...
11246         (lnp_state_machine::check_line_address): This.
11247         (dwarf_decode_lines_1): Remove reference to "reader_state".
11248         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11249         State machine internal state manipulation moved to
11250         lnp_state_machine methods.
11251
11252 2017-04-04  Pedro Alves  <palves@redhat.com>
11253
11254         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11255         unittests/offset-type-selftests.c.
11256         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11257         * common/offset-type.h: New file.
11258         * common/preprocessor.h: New file.
11259         * common/traits.h: New file.
11260         * common/valid-expr.h: New file.
11261         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11262         sect_offset and cu_offset strong typedefs throughout.
11263         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11264         typedefs throughout.
11265         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11266         sect_offset and cu_offset strong typedefs throughout.
11267         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11268         typedefs throughout.
11269         * gdbtypes.h: Include "common/offset-type.h".
11270         (cu_offset): Now an offset type (strong typedef) instead of a
11271         struct.
11272         (sect_offset): Likewise.
11273         (union call_site_parameter_u): Rename "param_offset" field to
11274         "param_cu_off".
11275         * unittests/offset-type-selftests.c: New file.
11276
11277 2017-04-04  Pedro Alves  <palves@redhat.com>
11278
11279         * common/underlying.h: New file.
11280         * dwarf2read.c: Include "common/gdb_optional.h" and
11281         "common/underlying.h".
11282         (dir_index, file_name_index): New types.
11283         (file_entry): Use them.
11284         (file_entry::include): Use to_underlying.
11285         (line_header::add_file_name): Use dir_index.
11286         (read_formatted_entries): Use gdb::optional.  Read form before
11287         writting to file_entry.
11288         (dwarf_decode_line_header): Use dir_index.
11289         (lnp_state_machine::current_file): Use to_underlying.
11290         (lnp_state_machine::file): Change type to file_name_index.
11291         (dwarf_record_line): Use to_underlying.
11292         (init_lnp_state_machine): Use file_name_index.
11293         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11294
11295 2017-04-04  Pedro Alves  <palves@redhat.com>
11296
11297         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11298         operator bool, has_value and get methods.
11299
11300 2017-04-04  Pedro Alves  <palves@redhat.com>
11301
11302         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11303         fields.
11304         (line_header): Initialize all data fields.  Change type of
11305         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11306         Change type of include_dirs to std::vector<const char *>.  Remove
11307         num_include_dirs, include_dirs_size.  Change type of file_names to
11308         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11309         (line_header::line_header): New.
11310         (line_header::add_include_dir, line_header::add_file_name): New
11311         methods.
11312         (line_header::include_dir_at): Remove NULL check.
11313         (line_header::file_name_at): Add const overload.
11314         (line_header_up): New unique_ptr typedef.
11315         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11316         std::vector.  Remove free_line_header call.
11317         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11318         free_line_header call.
11319         (free_cu_line_header): Delete.
11320         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11321         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11322         Adjust to use std::vector.
11323         (free_line_header): Delete.
11324         (free_line_header_voidp): Use delete.
11325         (add_include_dir): Replace with ...
11326         (line_header::add_include_dir): ... this method.  Use std::vector.
11327         (add_file_name): Replace with ...
11328         (line_header::add_file_name): ... this method.  Use std::vector.
11329         (add_include_dir_stub): Delete.
11330         (read_formatted_entries): Remove memset.
11331         (dwarf_decode_line_header): Return a line_header_up instead of a
11332         raw pointer.  Remove cleanup handling.  Pass lambdas to
11333         read_formatted_entries.  Adjust to use line_header methods.
11334         (dwarf_decode_lines_1): Adjust to use line_header methods.
11335         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11336         use std::vector.
11337
11338 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11339
11340         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11341         instead of struct ptid.
11342
11343 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11344
11345         * frame.c (get_frame_register_bytes): Unwind using value.
11346         (put_frame_register_bytes): Likewise.
11347
11348 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11349
11350         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11351         aggregate-like.
11352
11353 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11354
11355         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11356
11357 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11358
11359         * gdbthread.h (struct thread_info): Declare constructor and
11360         destructor.  Add some in-class member initializers.
11361         * thread.c (free_thread): Remove.
11362         (init_thread_list): Call delete instead of free_thread.
11363         (new_thread): Call thread_info constructor.
11364         (thread_info::thread_info): New function.
11365         (thread_info::~thread_info): New function.
11366         (delete_thread_1): Call delete instead of free_thread.
11367         (make_cleanup_restore_current_thread): Move tp and frame to
11368         inner block.
11369
11370 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11371
11372         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11373         (arc_skip_prologue): Likewise.
11374         (arc_make_frame_cache): Likewise.
11375         (arc_pv_get_operand): New function.
11376         (arc_is_in_prologue): Likewise.
11377         (arc_analyze_prologue): Likewise.
11378         (arc_print_frame_cache): Likewise.
11379         (MAX_PROLOGUE_LENGTH): New constant.
11380
11381 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11382
11383         * configure.tgt: Add arc-insn.o.
11384         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11385         (dump_arc_instruction_command): New function.
11386         (arc_fprintf_disasm): Likewise.
11387         (arc_disassemble_info): Likewise.
11388         (arc_insn_get_operand_value): Likewise.
11389         (arc_insn_get_operand_value_signed): Likewise.
11390         (arc_insn_get_memory_base_reg): Likewise.
11391         (arc_insn_get_memory_offset): Likewise.
11392         (arc_insn_get_branch_target): Likewise.
11393         (arc_insn_dump): Likewise.
11394         (arc_insn_get_linear_next_pc): Likewise.
11395         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11396         (arc_disassemble_info): Likewise.
11397         (arc_insn_get_branch_target): Likewise.
11398         (arc_insn_get_linear_next_pc): Likewise.
11399         * NEWS: Mention new "maint print arc arc-instruction".
11400
11401 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11402
11403         * arc-tdep (maintenance_print_arc_list): New variable.
11404         (maintenance_print_arc_command): New function.
11405
11406 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11407
11408         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11409         Add "limm" and "reserved".
11410         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11411         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11412         * arc-tdep.h (arc_regnum): Likewise.
11413
11414 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11415
11416         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11417         for THREADPTR register.
11418         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11419         register.
11420         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11421         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11422         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11423
11424 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11425
11426         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11427         registers above gdbarch_num_regs (gdbarch) as privileged in
11428         call0 ABI.
11429
11430 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11431
11432         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11433         for a single specified register or for all registers in
11434         a0_base..a0_base + C0_NREGS range.
11435         (supply_gregset_reg): Call regcache_raw_supply for a single
11436         specified register or for all registers in a0_base..a0_base +
11437         C0_NREGS range.
11438
11439 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11440
11441         * arch/xtensa.h (C0_NREGS): Add definition.
11442         * xtensa-tdep.c (C0_NREGS): Remove definition.
11443
11444 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11445
11446         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11447         Drop xtensa_default_isa initialization.
11448         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11449
11450 2017-03-27  Pedro Alves  <palves@redhat.com>
11451
11452         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11453         (file_entry::include_dir): New method.
11454         (line_header::include_dir_at, line_header::file_name_at): New
11455         methods.
11456         (setup_type_unit_groups, setup_type_unit_groups)
11457         (psymtab_include_file_name): Simplify using the new methods.
11458         (lnp_state_machine) <the_line_header>: New field.
11459         <file>: Add comment.
11460         (lnp_state_machine::current_file): New method.
11461         (dwarf_record_line): Simplify using the new methods.
11462         (init_lnp_state_machine): Initialize the "the_line_header" field.
11463         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11464         Simplify using the new methods.
11465
11466 2017-03-27  Pedro Alves  <palves@redhat.com>
11467
11468         * cp-name-parser.y (make_empty): Delete.
11469         (demangler_special, nested_name, ptr_operator, array_indicator)
11470         (direct_declarator, declarator_1): Use fill_comp instead of
11471         make_empty.
11472
11473 2017-03-27  Pedro Alves  <palves@redhat.com>
11474
11475         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11476         to ATTRIBUTE_PRINTF.
11477         * solib-target.c (library_list_start_list): Print "string" not
11478         "version".
11479         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11480         gdb_xml_error call.
11481
11482 2017-03-27  Pedro Alves  <palves@redhat.com>
11483
11484         * dwarf2read.c (struct file_and_directory): New.
11485         (dwarf2_get_dwz_file): Adjust to use std::string.
11486         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11487         (find_file_and_directory): Adjust to return a file_and_directory
11488         object.
11489         (read_file_scope): Adjust to use file_and_directory.  Remove
11490         make_cleanup/do_cleanups calls.
11491         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11492         make_cleanup/do_cleanups calls.
11493         * python/python.c (do_start_initialization): Adjust to ldirname
11494         returning a std::string.
11495         * utils.c (ldirname): Now returns a std::string.
11496         * utils.h (ldirname): Change return type to std::string.
11497         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11498         returning a std::string.
11499         * xml-tdesc.c (file_read_description_xml): Likewise.
11500
11501 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11502
11503         * regcache.c (regcache_debug_print_register): New function.
11504         * regcache.h (regcache_debug_print_register): New declaration.
11505         * target.c (debug_print_register): Remove.
11506         (target_fetch_registers): Call regcache_debug_print_register.
11507         (target_store_registers): Likewise.
11508
11509 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11510
11511         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11512         reference beyond the 'lh->include_dirs' array before accessing to
11513         it.
11514         (psymtab_include_file_name): Likewise.
11515         (dwarf_decode_lines_1): Likewise.
11516         (dwarf_decode_lines): Likewise.
11517         (file_file_name): Likewise.
11518
11519 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11520
11521         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11522         inferior_ptid.
11523         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11524         ps_lsetfpregs): Likewise.
11525         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11526         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11527         ps_lsetfpregs): Likewise.
11528         * target.c (target_fetch_registers, target_store_registers):
11529         Remove asserts.
11530
11531 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11532
11533         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11534
11535 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11536
11537         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11538         (_initialize_aarch64_tdep): Register it.
11539         (aarch64_record_load_store): Handle PRFM instruction.
11540         (aarch64_process_record_test): New function.
11541
11542 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11543
11544         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11545         indentation.
11546
11547 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11548
11549         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11550
11551 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11552
11553         python/python.c (do_start_initialization): Fix memory leak.
11554
11555 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11556
11557         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11558         using get_ptrace_pid.
11559         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11560         inferior_ptid.
11561         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11562         inferior_ptid instead of pid.
11563
11564 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11565
11566         * aarch64-tdep.c: Wrap locally used classes in anonymous
11567         namespace.
11568         * arm-tdep.c: Likewise.
11569         * linespec.c: Likewise.
11570         * ui-out.c: Likewise.
11571
11572 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11573
11574         PR gdb/19637
11575         * python/lib/gdb/printer/bound_registers.py: Import sys.
11576
11577 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11578
11579         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11580         windows_thread_info parameter and use it instead of
11581         current_thread.
11582         (windows_fetch_inferior_registers): Don't set current_thread,
11583         pass the thread to do_windows_fetch_inferior_registers.  Use
11584         ptid from regcache instead of inferior_ptid.
11585         (do_windows_store_inferior_registers): Add windows_thread_info
11586         parameter and use it instead of current_thread.
11587         (windows_store_inferior_registers): Don't set current_thread,
11588         pass the thread to do_windows_store_inferior_registers.  Use
11589         ptid from regcache instead of inferior_ptid.
11590
11591 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11592
11593         * ser-mingw.c (ser_windows_raw): Remove reference to
11594         struct serial::current_timeout.
11595
11596 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11597
11598         PR tdep/20928
11599         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11600         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11601         (sparc64_fsr_type): Fix %fsr decoding.
11602
11603 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11604
11605         * python/py-record-btrace.c (btpy_insn_data): Change return type
11606         for Python 2.
11607
11608 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11609
11610         * spu-linux-nat.c (spu_fetch_inferior_registers,
11611         spu_store_inferior_registers): Use ptid from regcache, set and
11612         restore inferior_ptid.
11613         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11614         Likewise.
11615
11616 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11617
11618         * i386-linux-nat.c (fetch_register, store_register,
11619         i386_linux_fetch_inferior_registers,
11620         i386_linux_store_inferior_registers): Use ptid from regcache.
11621         * ia64-linux-nat.c (ia64_linux_fetch_register,
11622         ia64_linux_store_register): Likewise.
11623         * inf-ptrace.c (inf_ptrace_fetch_register,
11624         inf_ptrace_store_register): Likewise.
11625         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11626         m32r_linux_store_inferior_registers): Likewise.
11627         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11628         m68kbsd_store_inferior_registers): Likewise.
11629         * m68k-linux-nat.c (fetch_register, store_register,
11630         m68k_linux_fetch_inferior_registers,
11631         m68k_linux_store_inferior_registers): Likewise.
11632         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11633         m88kbsd_store_inferior_registers): Likewise.
11634         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11635         mips_fbsd_store_inferior_registers): Likewise.
11636         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11637         mips64_linux_regsets_store_registers): Likewise.
11638         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11639         mipsnbsd_store_inferior_registers): Likewise.
11640         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11641         mips64obsd_store_inferior_registers): Likewise.
11642         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11643         Likewise.
11644         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11645         ppcfbsd_store_inferior_registers): Likewise.
11646         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11647         ppc_linux_store_inferior_registers): Likewise.
11648         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11649         ppcnbsd_store_inferior_registers): Likewise.
11650         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11651         ppcobsd_store_registers): Likewise.
11652         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11653         Likewise.
11654         * ravenscar-thread.c (ravenscar_fetch_registers,
11655         ravenscar_store_registers, ravenscar_prepare_to_store):
11656         Likewise.
11657         * record-btrace.c (record_btrace_fetch_registers,
11658         record_btrace_store_registers, record_btrace_prepare_to_store):
11659         Likewise.
11660         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11661         Lookup inferior using ptid from regcache, instead of
11662         current_inferior.
11663         * remote.c (remote_fetch_registers, remote_store_registers): Use
11664         ptid from regcache.
11665         * rs6000-nat.c (fetch_register, store_register): Likewise.
11666         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11667         s390_linux_store_inferior_registers): Likewise.
11668         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11669         shnbsd_store_inferior_registers): Likewise.
11670         * sol-thread.c (sol_thread_fetch_registers,
11671         sol_thread_store_registers): Likewise.
11672         * sparc-nat.c (sparc_fetch_inferior_registers,
11673         sparc_store_inferior_registers): Likewise.
11674         * tilegx-linux-nat.c (fetch_inferior_registers,
11675         store_inferior_registers): Likewise.
11676         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11677         vaxbsd_store_inferior_registers): Likewise.
11678         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11679         store_xtregs): Likewise.
11680
11681 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11682
11683         PR gdb/14441
11684         * NEWS: Mention support for rvalue references in GDB and python.
11685         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11686         supports both lvalue and rvalue references.
11687
11688 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11689
11690         PR gdb/14441
11691         * gdbtypes.c (rank_one_type): Implement overloading
11692         resolution rules regarding rvalue references.
11693
11694 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11695
11696         PR gdb/14441
11697         * aarch64-tdep.c (aarch64_type_align)
11698         (aarch64_extract_return_value, aarch64_store_return_value): Change
11699         lvalue reference type checks to general reference type checks.
11700         * amd64-tdep.c (amd64_classify): Likewise.
11701         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11702         Likewise.
11703         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11704         (arm_store_return_value): Likewise.
11705         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11706         * c-typeprint.c (c_print_type): Likewise.
11707         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11708         (cplus_number_of_children, cplus_describe_child): Likewise.
11709         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11710         * completer.c (expression_completer): Likewise.
11711         * cp-support.c (make_symbol_overload_list_adl_namespace):
11712         Likewise.
11713         * darwin-nat-info.c (info_mach_region_command): Likewise.
11714         * dwarf2loc.c (entry_data_value_coerce_ref)
11715         (value_of_dwarf_reg_entry): Likewise.
11716         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11717         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11718         Likewise.
11719         * findvar.c (extract_typed_address, store_typed_address):
11720         Likewise.
11721         * gdbtypes.c (rank_one_type): Likewise.
11722         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11723         * infcall.c (value_arg_coerce): Likewise.
11724         * language.c (pointer_type): Likewise.
11725         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11726         Likewise.
11727         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11728         * mn10300-tdep.c (mn10300_type_align): Likewise.
11729         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11730         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11731         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11732         Likewise.
11733         * printcmd.c (print_formatted, x_command): Likewise.
11734         * python/py-type.c (typy_get_composite, typy_template_argument):
11735         Likewise.
11736         * python/py-value.c (valpy_referenced_value)
11737         (valpy_get_dynamic_type, value_has_field): Likewise.
11738         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11739         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11740         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11741         * spu-tdep.c (spu_scalar_value_p): Likewise.
11742         * symtab.c (lookup_symbol_aux): Likewise.
11743         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11744         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11745         Likewise.
11746         * valops.c (value_cast_pointers, value_cast)
11747         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11748         (value_struct_elt, value_struct_elt_bitpos)
11749         (value_find_oload_method_list, find_overload_match)
11750         (value_rtti_indirect_type): Likewise.
11751         * valprint.c (val_print_scalar_type_p, generic_val_print):
11752         Likewise.
11753         * value.c (value_actual_type, value_as_address, unpack_long)
11754         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11755         (coerce_ref): Likewise.
11756         * varobj.c (varobj_get_value_type): Likewise.
11757
11758 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11759
11760         PR gdb/14441
11761         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11762         table of constants.
11763         * python/lib/gdb/command/explore.py: Support exploring values
11764         of rvalue reference types.
11765         * python/lib/gdb/types.py: Implement get_basic_type() for
11766         rvalue reference types.
11767         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11768         constant.
11769         * python/py-value.c (valpy_getitem): Add an rvalue reference
11770         check.
11771         (valpy_reference_value): Add new parameter "refcode".
11772         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11773         New wrappers for valpy_reference_value().
11774         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11775         (gdbpy_invoke_xmethod): Likewise.
11776
11777 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11778
11779         PR gdb/14441
11780         * dwarf2read.c (process_die, read_type_die_1): Handle the
11781         DW_TAG_rvalue_reference_type DIE.
11782         (read_tag_reference_type): Add new parameter "refcode".
11783
11784 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11785
11786         PR gdb/14441
11787         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11788         (c_type_print_modifier, c_type_print_varspec_suffix)
11789         (c_type_print_base): Support printing rvalue reference types.
11790         * c-valprint.c (c_val_print, c_value_print): Support printing
11791         rvalue reference values.
11792
11793 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11794
11795         PR gdb/14441
11796         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11797         typename.
11798         * cp-support.c (replace_typedefs): Handle
11799         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11800         * python/py-type.c (typy_lookup_type): Likewise.
11801
11802 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11803
11804         PR gdb/14441
11805         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11806         * parse.c (insert_type): Change assert statement.
11807         (follow_types): Handle rvalue reference types.
11808         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11809         constant.
11810
11811 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11812
11813         PR gdb/14441
11814         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11815         value_ref() interface.
11816         * c-valprint.c (c_value_print): Likewise.
11817         * infcall.c (value_arg_coerce): Likewise.
11818         * python/py-value.c (valpy_reference_value): Likewise.
11819         * valops.c (value_cast, value_reinterpret_cast)
11820         (value_dynamic_cast, typecmp): Likewise.
11821         (value_ref): Parameterize by kind of return value reference type.
11822         * value.h (value_ref): Add new parameter "refcode".
11823
11824 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11825
11826         PR gdb/14441
11827         * dwarf2read.c (read_tag_reference_type): Use
11828         lookup_lvalue_reference_type() instead of lookup_reference_type().
11829         * eval.c (evaluate_subexp_standard): Likewise.
11830         * f-exp.y: Likewise.
11831         * gdbtypes.c (make_reference_type, lookup_reference_type):
11832         Generalize with rvalue reference types.
11833         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11834         convenience wrappers for lookup_reference_type().
11835         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11836         reference kind parameter.
11837         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11838         wrappers for lookup_reference_type().
11839         * guile/scm-type.c (gdbscm_type_reference): Use
11840         lookup_lvalue_reference_type() instead of lookup_reference_type().
11841         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11842         * parse.c (follow_types): Likewise.
11843         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11844         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11845         Likewise.
11846         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11847         (gdbpy_invoke_xmethod): Likewise.
11848         * stabsread.c: Provide extra argument to make_reference_type()
11849         call.
11850         * valops.c (value_ref, value_rtti_indirect_type): Use
11851         lookup_lvalue_reference_type() instead of lookup_reference_type().
11852
11853 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11854
11855         PR gdb/14441
11856         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11857         (TYPE_IS_REFERENCE): New macro.
11858         (struct type): Add rvalue_reference_type field.
11859         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11860
11861 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11862
11863         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11864         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11865         New function definition.
11866         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11867         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11868         New function declaration.
11869         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11870         * mi/mi-interp.h: New file.
11871         * solib.c (info_sharedlibrary_command): Replace for loop with
11872         ALL_SO_LIBS macro
11873         * solib.h (update_solib_list): New function declaration.
11874         (so_list_head): Move macro.
11875         * solist.h (ALL_SO_LIBS): New macro.
11876
11877 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11878
11879         * infcmd.c (post_create_inferior): Remove unused argument in
11880         call to solib_add.
11881         * remote.c (remote_start_remote): Likewise.
11882         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11883         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11884         (enable_break): Likewise.
11885         * solib.c (update_solib_list): Remove unused target argument
11886         and its documentation.
11887         (solib_add): Remove unused target argument.  Remove unused
11888         argument in call to update_solib_list.
11889         (info_sharedlibrary_command): Remove unused argument in call
11890         to update_solib_list.
11891         (sharedlibrary_command): Remove unused argument in call to
11892         solib_add.
11893         (handle_solib_event): Likewise.
11894         (reload_shared_libraries): Likewise.
11895         * solib.h (solib_add): Remove unused target argument.
11896
11897 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11898
11899         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11900         (s390_displaced_step_fixup): Cover relative branches with the
11901         default fixup handling.  This fixes lack of support for some
11902         relative branch instructions.
11903
11904 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11905
11906         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11907         ptid from regcache.
11908
11909 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11910
11911         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11912         i386_darwin_store_inferior_registers): Use ptid from regcache.
11913
11914 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11915
11916         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11917         i386bsd_store_inferior_registers): Use ptid from regcache.
11918
11919 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11920
11921         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11922         hppaobsd_store_registers): Use ptid from regcache.
11923
11924 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11925
11926         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11927         hppanbsd_store_registers): Use ptid from regcache.
11928
11929 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11930
11931         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11932         from regcache.  Use get_ptrace_pid.
11933
11934 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11935
11936         * corelow.c (get_core_register_section): Use ptid from regcache,
11937         update doc.
11938
11939 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11940
11941         * bsd-uthread.c (bsd_uthread_fetch_registers,
11942         bsd_uthread_store_registers): Use ptid from regcache, set and
11943         restore inferior_ptid.
11944
11945 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11946
11947         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11948         fetch_fp_regs, store_register, store_regs, store_fp_register,
11949         store_fp_regs): Use ptid from regcache.
11950
11951 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11952
11953         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11954         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11955         store_vfp_regs): Use ptid from regcache.
11956
11957 2017-03-17  Pedro Alves  <palves@redhat.com>
11958
11959         PR remote/21188
11960         * ser-base.c (ser_base_wait_for): Add comment.
11961         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11962         version.
11963         * ser-unix.c (hardwire_raw): Remove reference to
11964         scb->current_timeout.
11965         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11966         (hardwire_ops): Install ser_base_readchar instead of
11967         hardwire_readchar.
11968         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11969         Remove fields.
11970
11971 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11972
11973         PR gdb/19637
11974         * python/lib/gdb/printer/bound_registers.py: Add support for
11975         Python 3.
11976
11977 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11978
11979         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11980         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11981         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11982         byte_offset to subobj_byte_offset.  Fix the handling of
11983         DWARF_VALUE_STACK on big-endian targets when coming via an
11984         implicit pointer.
11985         (dwarf2_evaluate_loc_desc): Adjust call to
11986         dwarf2_evaluate_loc_desc_full.
11987         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11988         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11989
11990 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11991
11992         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11993         and REVSH instructions.
11994
11995 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11996
11997         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11998         (arm_record_test): Declare.
11999         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12000         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12001         align with the manual.
12002         (thumb_record_misc): Adjust the code order to align with the
12003         manual.
12004         (thumb2_record_decode_insn_handler): Fix instruction matching.
12005         (instruction_reader_thumb): New class.
12006         (arm_record_test): New function.
12007
12008 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12009
12010         * arm-tdep.c (abstract_memory_reader): New class.
12011         (instruction_reader): New class.
12012         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12013         (decode_insn): Likewise.
12014
12015 2017-03-16  Doug Evans  <dje@google.com>
12016
12017         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12018         member.  Change type of TYPE member to SCM.  All uses updated.
12019         (lsscm_make_lazy_string_smob): Add assert.
12020         (lsscm_make_lazy_string): Flag bad length values.
12021         (lsscm_elt_type): New function.
12022         (gdbscm_lazy_string_to_value): Rewrite to use
12023         lsscm_safe_lazy_string_to_value.
12024         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12025         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12026         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12027         in incoming type.
12028         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12029         * guile/scm-type.c (tyscm_scm_to_type): New function.
12030
12031 2017-03-15  Doug Evans  <dje@google.com>
12032
12033         PR python/17728, python/18439, python/18779
12034         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12035         member.  Change type of TYPE member to PyObject *.  All uses updated.
12036         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12037         (gdbpy_create_lazy_string_object): Flag bad length values.
12038         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12039         Handle typedefs in incoming type.
12040         (stpy_lazy_string_elt_type): New function.
12041         (gdbpy_extract_lazy_string): Call it.
12042         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12043         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12044         typedefs in incoming type.
12045
12046 2017-03-16  Doug Evans  <dje@google.com>
12047
12048         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12049         * guile/scm-type.c (tyscm_scm_to_type): New function.
12050
12051 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12052
12053         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12054         "ULONGEST" for "skip".
12055
12056 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12057
12058         PR gdb/21220
12059         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12060         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12061         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12062         over ptrace peek/poke until end of buffer or error.
12063
12064 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12065
12066         * parse.c (length_of_subexp): Make static.
12067         * parser-defs.h (length_of_subexp): Remove.
12068
12069 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12070
12071         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12072         as well.
12073
12074 2017-03-14  Pedro Alves  <palves@redhat.com>
12075
12076         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12077         (main): Use std::unique_ptr.  Remove calls to
12078         cp_demangled_name_parse_free.
12079
12080 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12081
12082         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12083         alphabsd_store_inferior_registers): Use regcache->ptid instead
12084         of inferior_ptid.
12085
12086 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12087
12088         * aix-thread.c (aix_thread_fetch_registers,
12089         aix_thread_store_registers): Use regcache->ptid instead of
12090         inferior_ptid.
12091
12092 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12093
12094         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12095         store_gregs_to_thread, fetch_fpregs_from_thread,
12096         store_fpregs_to_thread): Use regcache->ptid instead of
12097         inferior_ptid.
12098
12099 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12100
12101         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12102         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12103         instead of inferior_ptid.
12104
12105 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12106
12107         * target.c (target_fetch_registers, target_store_registers): Add
12108         assert.
12109
12110 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12111
12112         * regcache.h (regcache_get_ptid): New function.
12113         * regcache.c (regcache_get_ptid): New function.
12114
12115 2017-03-13  Mark Wielaard  <mark@klomp.org>
12116
12117         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12118
12119 2017-03-10  Keith Seitz  <keiths@redhat.com>
12120
12121         PR c++/8218
12122         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12123
12124 2017-03-08  Pedro Alves  <palves@redhat.com>
12125
12126         PR gdb/18360
12127         * infrun.c (start_step_over, do_target_resume, resume)
12128         (restart_threads): Assert we're not resuming a thread that is
12129         meant to be stopped.
12130         (infrun_thread_stop_requested_callback): Delete.
12131         (infrun_thread_stop_requested): If the thread is internally
12132         stopped, queue a pending stop event and clear the thread's
12133         inline-frame state.
12134         (handle_stop_requested): New function.
12135         (handle_syscall_event, handle_inferior_event_1): Use
12136         handle_stop_requested.
12137         (handle_stop_requested): New function.
12138         (handle_signal_stop): Set the thread's stop_signal here instead of
12139         at caller.
12140         (finish_step_over): Clear step over info unconditionally.
12141         (handle_signal_stop): If the user had interrupted the event
12142         thread, consider the stop a random signal.
12143         (handle_signal_stop) <signal arrived while stepping over
12144         breakpoint>: Don't restart threads here.
12145         (stop_waiting): Don't clear step-over info here.
12146
12147 2017-03-08  Pedro Alves  <palves@redhat.com>
12148
12149         PR 21206
12150         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12151         goes to argument 2, not 1.
12152
12153 2017-03-08  Pedro Alves  <palves@redhat.com>
12154
12155         PR cli/21218
12156         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12157         display_gdb_prompt.
12158         (command_line_input): Add comment.
12159
12160 2017-03-08  Pedro Alves  <palves@redhat.com>
12161
12162         PR tui/21216
12163         * tui/tui-file.c (tui_file::write): New.
12164         * tui/tui-file.h (tui_file): Override "write".
12165         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12166         factored out from ...
12167         (tui_puts): ... here.
12168         (tui_putc): Use them.
12169         (tui_write): New function.
12170         * tui/tui-io.h (tui_write): Declare.
12171
12172 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12173
12174         * Makefile.in (SFILES): Replace "environ.c" with
12175         "common/environ.c".
12176         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12177         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12178         to...
12179         * common/environ.c: ... here.
12180         * environ.h: Moved to...
12181         * common/environ.h: ... here.
12182
12183 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12184
12185         * gdbarch.sh (pstring_ptr): New static function.
12186         (gdbarch_disassembler_options): Use it.
12187         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12188         not valid_disassembler_option->name.
12189         * gdbarch.c: Regenerate.
12190
12191 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12192
12193         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12194
12195 2017-03-07  Pedro Alves  <palves@redhat.com>
12196
12197         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12198
12199 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12200
12201         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12202         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12203         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12204         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12205
12206 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12209
12210 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12211
12212         * remote.c (remote_add_target_side_commands): Use range-based
12213         for loop.
12214
12215 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12216
12217         PR gdb/21165
12218         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12219         value is lazy.
12220         * valprint.c (common_val_print): Likewise.
12221
12222 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12223
12224         * NEWS: Mention new set/show disassembler-options commands.
12225         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12226         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12227         (prospective_options): New static variable.
12228         (gdb_disassembler::gdb_disassembler): Initialize
12229         m_di.disassembler_options.
12230         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12231         (get_disassembler_options): New function.
12232         (set_disassembler_options): Likewise.
12233         (set_disassembler_options_sfunc): Likewise.
12234         (show_disassembler_options_sfunc): Likewise.
12235         (disassembler_options_completer): Likewise.
12236         (_initialize_disasm): Likewise.
12237         * disasm.h (get_disassembler_options): New prototype.
12238         (set_disassembler_options): Likewise.
12239         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12240         (gdbarch_verify_disassembler_options): Likewise.
12241         * gdbarch.c: Regenerate.
12242         * gdbarch.h: Likewise.
12243         * arm-tdep.c (num_disassembly_options): Delete.
12244         (set_disassembly_style): Likewise.
12245         (arm_disassembler_options): New static variable.
12246         (set_disassembly_style_sfunc): Convert short style name into long
12247         option name.  Call set_disassembler_options.
12248         (show_disassembly_style_sfunc): New function.
12249         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12250         set_gdbarch_verify_disassembler_options.
12251         (_initialize_arm_tdep): Delete regnames variable and update callers.
12252         (arm_disassembler_options): Initialize.
12253         (disasm_options): New variable.
12254         (num_disassembly_options): Rename from this...
12255         (num_disassembly_styles): ...to this.  Compute by scanning through
12256         disasm_options.
12257         (valid_disassembly_styles): Initialize using disasm_options.
12258         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12259         set_arm_regname_option.
12260         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12261         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12262         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12263         set_gdbarch_verify_disassembler_options.
12264         * s390-tdep.c (s390_disassembler_options): New static variable.
12265         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12266         set_gdbarch_verify_disassembler_options.
12267
12268 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12269
12270         * remote.c (remote_add_target_side_condition): Remove "struct"
12271         keyword from range-based for loop.
12272
12273 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12274
12275         * remote.c (remote_add_target_side_condition): Use range-based
12276         for loop.  Update comment.
12277
12278 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12279
12280         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12281
12282 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12283
12284         * regcache.c (regcache_raw_update): New function.
12285         (regcache_raw_read): Move code to regcache_raw_update.
12286         * regcache.h (regcache_raw_update): New declaration.
12287         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12288
12289 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12290
12291         * dwarf2read.c (create_debug_type_hash_table): Initialize
12292         header.signature and header.type_offset_in_tu.
12293
12294 2017-02-24  Pedro Alves  <palves@redhat.com>
12295
12296         * symtab.c (make_file_symbol_completion_list_1): Use
12297         add_symtab_completions.
12298
12299 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12300
12301         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12302
12303 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12304
12305         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12306         I386_MAX_REGISTER_SIZE.
12307         (i386_pseudo_register_write): Likewise.
12308         (i386_process_record): Likewise.
12309         * i387-tdep.c (i387_supply_xsave): Likewise.
12310         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12311         (store_register): Likewise.
12312
12313 2017-02-23  Pedro Alves  <palves@redhat.com>
12314
12315         * ada-lang.c: Include "common/function-view.h".
12316         (ada_iterate_over_symbols): Adjust to use function_view as
12317         callback type.
12318         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12319         (ada_make_symbol_completion_list): Use a lambda.
12320         (ada_exc_search_name_matches): Delete.
12321         (name_matches_regex): New.
12322         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12323         * compile/compile-c-support.c: Include "common/function-view.h".
12324         (print_one_macro): Change prototype to accept a ui_file pointer.
12325         (write_macro_definitions): Use a lambda.
12326         * dwarf2read.c: Include "common/function-view.h".
12327         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12328         (dw2_expand_symtabs_matching): Adjust to use function_view as
12329         callback type.
12330         * language.h: Include "common/function-view.h".
12331         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12332         function_view as callback type.
12333         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12334         * linespec.c: Include "common/function-view.h".
12335         (collect_info::add_symbol): New method.
12336         (struct symbol_and_data_callback, iterate_inline_only, struct
12337         symbol_matcher_data, iterate_name_matcher): Delete.
12338         (iterate_over_all_matching_symtabs): Adjust to use function_view
12339         as callback type and lambdas.
12340         (iterate_over_file_blocks): Adjust to use function_view as
12341         callback type.
12342         (decode_compound_collector): Now a class with private fields.
12343         (decode_compound_collector::release_symbols): New method.
12344         (collect_one_symbol): Rename to...
12345         (decode_compound_collector::operator()): ... this and adjust.
12346         (lookup_prefix_sym): decode_compound_collector construction bits
12347         move to decode_compound_collector ctor.  Pass the
12348         decode_compound_collector object directly as callback.  Remove
12349         cleanups and use decode_compound_collector::release_symbols
12350         instead.
12351         (symtab_collector): Now a class with private fields.
12352         (symtab_collector::release_symtabs): New method.
12353         (add_symtabs_to_list): Rename to...
12354         (symtab_collector::operator()): ... this and adjust.
12355         (collect_symtabs_from_filename): symtab_collector construction
12356         bits move to symtab_collector ctor.  Pass the symtab_collector
12357         object directly as callback.  Remove cleanups and use
12358         symtab_collector::release_symtabs instead.
12359         (collect_symbols): Delete.
12360         (add_matching_symbols_to_info): Use lambdas.
12361         * macrocmd.c (print_macro_callback): Delete.
12362         (info_macro_command): Use a lambda.
12363         (info_macros_command): Pass print_macro_definition as callable
12364         directly.
12365         (print_one_macro): Remove 'ignore' parameter.
12366         (macro_list_command): Adjust.
12367         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12368         (macro_for_each_data::user_data): Delete field.
12369         (foreach_macro): Adjust to call the function_view.
12370         (macro_for_each): Adjust to use function_view as callback type.
12371         (foreach_macro_in_scope): Adjust to call the function_view.
12372         (macro_for_each_in_scope): Adjust to use function_view as callback
12373         type.
12374         * macrotab.h: Include "common/function-view.h".
12375         (macro_callback_fn): Declare a prototype instead of a pointer.
12376         Remove "user_data" parameter.
12377         (macro_for_each, macro_for_each_in_scope): Adjust to use
12378         function_view as callback type.
12379         * psymtab.c (partial_map_expand_apply)
12380         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12381         Adjust to use function_view as callback type and to return bool.
12382         (psym_expand_symtabs_matching): Adjust to use function_view as
12383         callback types.
12384         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12385         to use function_view as callback type and to return bool.
12386         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12387         callback types.
12388         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12389         as callback types.
12390         * symfile.h: Include "common/function-view.h".
12391         (expand_symtabs_file_matcher_ftype)
12392         (expand_symtabs_symbol_matcher_ftype)
12393         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12394         return bool.
12395         (quick_symbol_functions::map_symtabs_matching_filename)
12396         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12397         function_view as callback type and return bool.
12398         (expand_symtabs_matching): Adjust to use function_view as callback
12399         type.
12400         (maintenance_expand_name_matcher)
12401         (maintenance_expand_file_matcher): Delete.
12402         (maintenance_expand_symtabs): Use lambdas.
12403         * symtab.c (iterate_over_some_symtabs): Adjust to use
12404         function_view as callback types and return bool.
12405         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12406         of a cleanup.
12407         (lookup_symtab_callback): Delete.
12408         (lookup_symtab): Use a lambda.
12409         (iterate_over_symbols): Adjust to use function_view as callback
12410         type.
12411         (struct search_symbols_data, search_symbols_file_matches)
12412         (search_symbols_name_matches): Delete.
12413         (search_symbols): Use a pair of lambdas.
12414         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12415         (symtab_expansion_callback): Delete.
12416         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12417         * symtab.h: Include "common/function-view.h".
12418         (iterate_over_some_symtabs): Adjust to use function_view as
12419         callback type and return bool.
12420         (iterate_over_symtabs): Adjust to use function_view as callback
12421         type.
12422         (symbol_found_callback_ftype): Remove 'data' parameter and return
12423         bool.
12424         (iterate_over_symbols): Adjust to use function_view as callback
12425         type.
12426
12427 2017-02-23  Pedro Alves  <palves@redhat.com>
12428
12429         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12430         (%.o) <unittests/%.c>: New pattern.
12431         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12432         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12433         * common/function-view.h: New file.
12434         * unittests/function-view-selftests.c: New file.
12435         * configure: Regenerate.
12436
12437 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12438
12439         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12440         inferior_ptid.
12441         * go32-nat.c (go32_thread_alive): Likewise.
12442
12443 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12444
12445         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12446         delete.
12447
12448 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12449
12450         * varobj.c (varobj_clear_saved_item): Use delete instead of
12451         xfree.
12452         (update_dynamic_varobj_children): Likewise.
12453
12454 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12455
12456         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12457
12458 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12459
12460         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12461         m_enum_value to 0 in default constructor.
12462
12463 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12464
12465         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12466         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12467         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12468         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12469         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12470         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12471         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12472         IS_STORE_CONDITIONAL_INSN.
12473
12474 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12475
12476         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12477
12478 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12479
12480         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12481
12482 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12483
12484         * dwarf2read.c (skip_one_die, read_attribute_value)
12485         (dwarf2_const_value_attr, dump_die_shallow)
12486         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12487         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12488
12489 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12490
12491         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12492         (dwarf_parse_macro_header): Accept DWARF version 5.
12493         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12494
12495 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12496
12497         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12498         DW_AT_GNU_*.
12499         * common/common-exceptions.h (enum errors): Likewise.
12500         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12501         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12502         (dwarf_expr_context::execute_stack_op): Likewise.
12503         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12504         Likewise.
12505         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12506         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12507         (show_entry_values_debug, call_site_to_target_addr)
12508         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12509         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12510         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12511         (value_of_dwarf_block_entry, indirect_pieced_value)
12512         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12513         (disassemble_dwarf_expression): Likewise.
12514         * dwarf2read.c (process_die, inherit_abstract_dies)
12515         (read_call_site_scope): Likewise.
12516         * gdbtypes.h (struct func_type, struct call_site_parameter)
12517         (struct call_site): Likewise.
12518         * stack.c (read_frame_arg): Likewise.
12519         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12520
12521 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12522
12523         * defs.h (read_unsigned_leb128): New declaration.
12524         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12525         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12526         (dwarf2_find_location_expression): Call also
12527         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12528         * dwarf2loc.h (dwarf2_version): New declaration.
12529         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12530         rnglists.
12531         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12532         .debug_rnglists.
12533         (struct dwop_section_names): Add loclists_dwo.
12534         (dwop_section_names): Add .debug_loclists.dwo.
12535         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12536         (struct dwarf2_per_cu_data): Add dwarf_version.
12537         (struct dwo_sections): Add loclists.
12538         (struct attr_abbrev): Add implicit_const.
12539         (read_indirect_line_string): New declaration.
12540         (read_unsigned_leb128): Delete declaration.
12541         (rcuh_kind): New definition.
12542         (read_and_check_comp_unit_head): Change parameter
12543         is_debug_types_section to section_kind.
12544         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12545         (read_comp_unit_head): Change parameter abfd to section, add parameter
12546         section_kind.  Handle DWARF-5.
12547         (error_check_comp_unit_head): Accept also DWARF version 5.
12548         (read_and_check_comp_unit_head): Change parameter
12549         is_debug_types_section to section_kind.
12550         (read_and_check_type_unit_head): Delete function.
12551         (read_abbrev_offset): Handle DWARF-5.
12552         (create_debug_type_hash_table): Add parameter section_kind.  Process
12553         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12554         comp_unit_head.
12555         (create_debug_types_hash_table): Update create_debug_type_hash_table
12556         caller.
12557         (create_all_type_units): Call create_debug_type_hash_table.
12558         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12559         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12560         caller.
12561         (skip_one_die): Handle DW_FORM_implicit_const.
12562         (dwarf2_rnglists_process): New function.
12563         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12564         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12565         (read_attribute_value): Handle DW_FORM_implicit_const,
12566         DW_FORM_line_strp.
12567         (read_attribute): Handle DW_FORM_implicit_const.
12568         (read_indirect_string_at_offset_from): New function from
12569         read_indirect_string_at_offset.
12570         (read_indirect_string_at_offset): Call
12571         read_indirect_string_at_offset_from.
12572         (read_indirect_line_string_at_offset): New function.
12573         (read_indirect_string): New function comment.
12574         (read_indirect_line_string): New function.
12575         (read_unsigned_leb128): Make it global.
12576         (dwarf2_string_attr): Handle DWARF-5.
12577         (add_include_dir_stub, read_formatted_entries): New functions.
12578         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12579         Handle DWARF-5.
12580         (per_cu_header_read_in): Update read_comp_unit_head caller.
12581         (dwarf2_version): New function.
12582         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12583         rnglists.
12584         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12585         fields.
12586
12587 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12588
12589         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12590
12591 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12592
12593         * dwarf2read.c (dwarf2_ranges_process): New function from
12594         dwarf2_ranges_read.
12595         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12596         dwarf2_ranges_process.
12597
12598 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12599
12600         * dwarf2read.c (create_debug_type_hash_table): New function from
12601         create_debug_types_hash_table.
12602         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12603         (create_all_type_units, open_and_init_dwo_file): Update
12604         create_debug_types_hash_table callers.
12605
12606 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12607
12608         PR gdb/16188
12609         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12610         refer to 'ap', not 'args'.
12611
12612 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12613             Pedro Alves  <palves@redhat.com>
12614
12615         PR gdb/16188
12616         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12617         calls succeeded.
12618         * fork-child.c (trace_start_error): New function.
12619         (trace_start_error_with_name): Likewise.
12620         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12621         * inf-ptrace.c (inf_ptrace_me): Likewise.
12622         * inferior.h (trace_start_error): New prototype.
12623         (trace_start_error_with_name): Likewise.
12624
12625 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12626
12627         PR gdb/21164
12628         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12629         NULL before using it.
12630         * symmisc.c (maintenance_print_symbols): Likewise.
12631         (maintenance_print_msymbols): Likewise.
12632
12633 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12634
12635         * NEWS: Add record Python bindings entry.
12636
12637 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12638
12639         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12640         py-record-full.o.
12641         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12642         * python/py-record-btrace.c, python/py-record-btrace.h,
12643         python/py-record-full.c, python/py-record-full.h: New file.
12644         * python/py-record.c: Add include for py-record-btrace.h and
12645         py-record-full.h.
12646         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12647         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12648         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12649         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12650         New definition.
12651         (gdbpy_initialize_btrace): New export.
12652         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12653
12654 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12655
12656         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12657         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12658         * python/py-record.c: New file.
12659         * python/python-internal.h (gdbpy_start_recording,
12660         gdbpy_current_recording, gdpy_stop_recording,
12661         gdbpy_initialize_record): New export.
12662         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12663         (python_GdbMethods): Add gdbpy_start_recording,
12664         gdbpy_current_recording and gdbpy_stop_recording.
12665
12666 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12667
12668         * record-btrace.c (record_btrace_record_method): New function.
12669         (init_record_btrace_ops): Initialize to_record_method.
12670         * record-full.c (record_full_record_method): New function.
12671         (init_record_full_ops, init_record_full_core_ops): Add
12672         record_full_record_method.
12673         * record.h (enum record_method): New enum.
12674         * target-debug.h (target_debug_print_enum_record_method: New define.
12675         * target-delegates.c: Regenerate.
12676         * target.c (target_record_method): New function.
12677         * target.h: Include record.h.
12678         (struct target_ops) <to_record_method>: New field.
12679         (target_record_method): New export.
12680
12681 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12682
12683         * record.h (record_start, record_stop): New export.
12684         * record.c (record_start, record_stop): New function.
12685
12686 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12687
12688         * btrace.c (btrace_fetch): Copy function call segments pointer
12689         into a vector.
12690         (btrace_clear): Clear the vector.
12691         (btrace_find_insn_by_number): Use binary search to find the correct
12692         function call segment.
12693         * btrace.h (brace_fun_p): New typedef.
12694         (struct btrace_thread_info) <functions>: New field.
12695
12696 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12697
12698         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12699         * btrace.c (btrace_decode_error): ... here.  New function.
12700         * btrace.h (btrace_decode_error): New export.
12701
12702 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12703
12704         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12705         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12706         btrace_find_insn_by_number): Remove special case for gaps.
12707         * btrace.h (btrace_insn_get_error): New export.
12708         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12709         * record-btrace.c (btrace_insn_history): Print number for gaps.
12710         (record_btrace_info, record_btrace_goto): Handle gaps.
12711
12712 2017-02-14  Tom Tromey  <tom@tromey.com>
12713
12714         PR python/13598:
12715         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12716         event.
12717         * python/py-evts.c (gdbpy_initialize_py_events): Add
12718         before_prompt registry.
12719         * python/py-events.h (events_object) <before_prompt>: New field.
12720
12721 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12722
12723         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12724
12725 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12726
12727         * symfile (_initialize_symfile): Add usage text to the load command's
12728         help text.
12729
12730 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12731
12732         * utils.c (defaulted_query): Don't query on secondary UIs.
12733
12734 2017-02-10  Tom Tromey  <tom@tromey.com>
12735
12736         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12737
12738 2017-02-10  Tom Tromey  <tom@tromey.com>
12739
12740         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12741         "cleanup" local.
12742         * python/py-type.c (typy_legacy_template_argument): Remove
12743         unnecessary "cleanup" local.
12744
12745 2017-02-10  Tom Tromey  <tom@tromey.com>
12746
12747         * python/python.c (do_start_initialization): New function, from
12748         _initialize_python.
12749         (_initialize_python): Call do_start_initialization.
12750         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12751         goto.
12752
12753 2017-02-10  Tom Tromey  <tom@tromey.com>
12754
12755         * python/py-prettyprint.c (pretty_print_one_value): Use
12756         gdbpy_ref.
12757
12758 2017-02-10  Tom Tromey  <tom@tromey.com>
12759
12760         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12761         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12762         gdbpy_ref.
12763         * python/py-type.c (field_new): Use gdbpy_ref.
12764         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12765         gdbpy_ref.
12766         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12767         (py_free_pspace): Likewise.
12768         (pspace_to_pspace_object): Likewise.
12769         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12770         (py_free_objfile): Likewise.
12771         (objfile_to_objfile_object): Likewise.
12772         * python/py-inferior.c (delete_thread_object): Use
12773         gdbpy_ref.
12774         (infpy_read_memory): Likewise.
12775         (py_free_inferior): Likewise.
12776         * python/py-evtregistry.c (create_eventregistry_object): Use
12777         gdbpy_ref.
12778         * python/py-event.c (create_event_object): Use gdbpy_ref.
12779
12780 2017-02-10  Tom Tromey  <tom@tromey.com>
12781
12782         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12783         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12784         used.
12785         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12786         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12787         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12788         python/py-framefilter.c, python/py-function.c,
12789         python/py-inferior.c, python/py-infevents.c,
12790         python/py-linetable.c, python/py-newobjfileevent.c,
12791         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12792         python/py-signalevent.c, python/py-stopevent.c,
12793         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12794         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12795         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12796         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12797
12798 2017-02-10  Tom Tromey  <tom@tromey.com>
12799
12800         * ui-out.h (ui_out_emit_type): New class.
12801         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12802         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12803         and ui_out_emit_tuple.
12804         (enumerate_locals): Likewise.
12805         (py_mi_print_variables, py_print_locals, py_print_args): Use
12806         ui_out_emit_list.
12807         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12808         ui_out_emit_list.
12809         * common/gdb_optional.h: New file.
12810
12811 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12812
12813         * MAINTAINERS (Write After Approval): Update my e-mail address.
12814
12815 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12816
12817         PR gdb/21122
12818         * breakpoint.c (_initialize_breakpoint): Update the help description
12819         of the 'commands' command to indicate that it takes a list argument.
12820
12821 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12822
12823         * interps.c (current_interp_set_logging): Remove "return".
12824
12825 2017-02-09  Gary Benson  <gbenson@redhat.com>
12826
12827         * symtab.c (add_symtab_completions): Prevent NULL pointer
12828         dereference.
12829
12830 2017-02-08  Pedro Alves  <palves@redhat.com>
12831
12832         * interps.c (interp::interp): Remove reference to quiet_p.
12833         (interp_set): Make static.  Remove dead "Switching to" output
12834         code.
12835         (interp_quiet_p, interp_set_quiet): Delete.
12836         (interpreter_exec_cmd): Don't set the interpreter quiet.
12837         * interps.h (interp_quiet_p): Make static.
12838         (class interp) <quiet_p>: Remove field
12839
12840 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12841
12842         * cli/cli-decode.c (find_command_name_length): Make it extern.
12843         * cli/cli-decode.h (find_command_name_length): Declare.
12844         * cli/cli-script.c (command_name_equals, line_first_arg):
12845         New functions.
12846         (process_next_line): Use cli-decode to parse command names.
12847         (build_command_line): Make args a constant pointer.
12848
12849 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12850
12851         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12852         Remove case-insensitive search.
12853
12854 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12855
12856         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12857         at the end of the line.  Avoids an ARI warning.
12858
12859 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12860
12861         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12862         rdseed instructions.
12863         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12864
12865 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12866
12867         PR tdep/20936
12868         Provide and use sparc32 and sparc64 target description XML files.
12869         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12870         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12871         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12872         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12873         * features/sparc/sparc32-solaris.xml: New file.
12874         * features/sparc/sparc64-solaris.xml: New file.
12875         * features/sparc/sparc32-solaris.c: Generated.
12876         * features/sparc/sparc64-solaris.c: Generated.
12877         * sparc-tdep.h: Account for differences in target descriptions.
12878         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12879         (sparc32_register_type): Use target provided registers.
12880         (validate_tdesc_registers): New function.
12881         (sparc32_gdbarch_init): Use tdesc_has_registers.
12882         Set pseudoregister functions.
12883         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12884         (sparc64_register_type): Use target provided registers.
12885         (sparc64_init_abi): Set pseudoregister functions.
12886
12887 2017-02-03  Tom Tromey  <tom@tromey.com>
12888
12889         PR rust/21097:
12890         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12891         with a single member.
12892
12893 2017-02-03  Pedro Alves  <palves@redhat.com>
12894
12895         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12896         (cli_interp_base::~cli_interp_base): New.
12897         (cli_interp): New struct.
12898         (as_cli_interp): Cast the interp itself to cli_interp.
12899         (cli_interpreter_pre_command_loop): Rename to ...
12900         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12901         parameter.
12902         (cli_interpreter_init): Rename to ...
12903         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12904         boolean.  Make extern.
12905         (cli_interpreter_resume): Rename to ...
12906         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12907         extern.
12908         (cli_interpreter_suspend): Rename to ...
12909         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12910         extern.
12911         (cli_interpreter_exec): Rename to ...
12912         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12913         extern.
12914         (cli_interpreter_supports_command_editing): Rename to ...
12915         (cli_interp_base::supports_command_editing): ... this.  Remove
12916         'interp' parameter.  Make extern.
12917         (cli_ui_out): Rename to ...
12918         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12919         Make extern.
12920         (cli_set_logging): Rename to ...
12921         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12922         parameter.  Make extern.
12923         (cli_interp_procs): Delete.
12924         (cli_interp_factory): Adjust to use "new".
12925         * cli/cli-interp.h: Include "interps.h".
12926         (struct cli_interp_base): New struct.
12927         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12928         (interp_new): Delete.
12929         (interp::interp, interp::~interp): New.
12930         (interp_set): Use bool, and return void.  Assume the interpreter
12931         has suspend, init and resume methods, and that the all return
12932         void.
12933         (set_top_level_interpreter): interp_set returns void.
12934         (interp_ui_out): Adapt.
12935         (current_interp_set_logging): Adapt.
12936         (interp_data): Delete.
12937         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12938         (interp_exec): Adapt.
12939         (top_level_interpreter_data): Delete.
12940         * interps.h (interp_init_ftype, interp_resume_ftype)
12941         (interp_suspend_ftype, interp_exec_ftype)
12942         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12943         (class interp): New.
12944         (interp_new): Delete.
12945         (interp_set): Now returns void.  Use bool.
12946         (interp_data, top_level_interpreter_data): Delete.
12947         * mi/mi-common.h: Include interps.h.
12948         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12949         init, resume, suspect, exec, interp_ui_out, set_logging and
12950         pre_command_loop methods.
12951         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12952         (mi_interpreter_init): Rename to ...
12953         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12954         bool, return void and make extern.  Adjust.
12955         (mi_interpreter_resume): ... Rename to ...
12956         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12957         return void and make extern.  Adjust.
12958         (mi_interpreter_suspend): ... Rename to ...
12959         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12960         return void and make extern.  Adjust.
12961         (mi_interpreter_exec): ... Rename to ...
12962         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12963         extern.  Adjust.
12964         (mi_interpreter_pre_command_loop): ... Rename to ...
12965         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12966         parameter and make extern.
12967         (mi_on_normal_stop_1): Adjust.
12968         (mi_ui_out): Rename to ...
12969         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12970         parameter and make extern.  Adjust.
12971         (mi_set_logging): Rename to ...
12972         (mi_interp::set_logging): ... this.  Remove the 'interp'
12973         parameter and make extern.  Adjust.
12974         (mi_interp_procs): Delete.
12975         (mi_interp_factory): Adjust to use 'new'.
12976         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12977         (mi_print_exception, mi_execute_command, mi_load_progress):
12978         Adjust.
12979         * tui/tui-interp.c (tui_interp): New class.
12980         (as_tui_interp): Return a tui_interp pointer.
12981         (tui_on_normal_stop, tui_on_signal_received)
12982         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12983         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12984         to use interp::interp_ui_out.
12985         (tui_init): Rename to ...
12986         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12987         bool, return void and make extern.  Adjust.
12988         (tui_resume): Rename to ...
12989         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12990         return void and make extern.  Adjust.
12991         (tui_suspend): Rename to ...
12992         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12993         return void and make extern.  Adjust.
12994         (tui_ui_out): Rename to ...
12995         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12996         parameter, and make extern.  Adjust.
12997         (tui_exec): Rename to ...
12998         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12999         make extern.
13000         (tui_interp_procs): Delete.
13001         (tui_interp_factory): Use "new".
13002
13003 2017-02-02  Tom Tromey  <tom@tromey.com>
13004
13005         * rust-exp.y (ends_raw_string, space_then_number)
13006         (rust_identifier_start_p): Return bool.
13007         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13008         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13009         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13010         (rust_chartype_p): Return bool.
13011         (val_print_struct, rust_print_struct_def, rust_print_type):
13012         Update.
13013         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13014         Return bool.
13015
13016 2017-02-02  Tom Tromey  <tom@tromey.com>
13017
13018         * rust-lang.c: Reindent.
13019
13020 2017-02-02  Tom Tromey  <tom@tromey.com>
13021
13022         * rust-lang.h (rust_crate_for_block): Update.
13023         * rust-lang.c (rust_crate_for_block): Return std::string.
13024         (rust_get_disr_info): Use std:;string, not
13025         gdb::unique_xmalloc_ptr.
13026         * rust-exp.y (crate_name): Update.
13027
13028 2017-02-02  Pedro Alves  <palves@redhat.com>
13029
13030         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13031         field out of gdb_disassembler_test and make it static.
13032
13033 2017-02-02  Pedro Alves  <palves@redhat.com>
13034
13035         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13036         mi1_interp and mi_interp fields.
13037
13038 2017-02-02  Pedro Alves  <palves@redhat.com>
13039
13040         * cli/cli-interp.c (struct saved_output_files, saved_output):
13041         Moved from cli/cli-logging.c.
13042         (cli_set_logging): New function.
13043         (cli_interp_procs): Install cli_set_logging.
13044         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13045         Declare.
13046         * cli/cli-logging.c (struct saved_output_files, saved_output):
13047         Moved to cli/cli-interp.c.
13048         (pop_output_files): Don't save outputs here.
13049         (make_logging_output): New function.
13050         (handle_redirections): Don't build tee nor save previous outputs
13051         here.
13052         * interps.c (current_interp_set_logging): Change prototype.
13053         Assume there's always a set_logging_proc method installed.
13054         * interps.h (interp_set_logging_ftype): Change prototype.
13055         (current_interp_set_logging): Change prototype and adjust comment.
13056         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13057         use make_logging_output.
13058         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13059 2017-02-02  Pedro Alves  <palves@redhat.com>
13060
13061         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13062         from ...
13063         (set_logging_overwrite): ... here.
13064         (logging_no_redirect_file): Delete.
13065         (set_logging_redirect): Don't handle redirection on the fly.
13066         Instead warn that "logging off" / "logging on" is necessary.
13067         (pop_output_files): Delete references to logging_no_redirect_file.
13068         (show_logging_command): Always speak in terms of what will happen
13069         once logging is reenabled.
13070
13071 2017-02-02  Pedro Alves  <palves@redhat.com>
13072
13073         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13074
13075 2017-02-02  Pedro Alves  <palves@redhat.com>
13076
13077         * disasm.c (gdb_pretty_print_insn): Rename to ...
13078         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13079         Remove gdbarch parameter.  Adapt to clear the object's buffers
13080         instead of allocating new buffers, and to print using the object's
13081         gdb_disassembler instead of calling gdb_print_insn.
13082         (dump_insns): Use gdb_pretty_print_disassembler.
13083         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13084         (gdb_pretty_print_disassembler): New class.
13085         * record-btrace.c (btrace_insn_history): Use
13086         gdb_pretty_print_disassembler.
13087
13088 2017-02-02  Pedro Alves  <palves@redhat.com>
13089
13090         * ada-lang.c (type_as_string): Use string_file.
13091         * ada-valprint.c (ada_print_floating): Use string_file.
13092         * ada-varobj.c (ada_varobj_scalar_image)
13093         (ada_varobj_get_value_image): Use string_file.
13094         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13095         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13096         * breakpoint.c (update_inserted_breakpoint_locations)
13097         (insert_breakpoint_locations, reattach_breakpoints)
13098         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13099         (print_it_watchpoint): Use string_file.
13100         (save_breakpoints): Use stdio_file.
13101         * c-exp.y (oper): Use string_file.
13102         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13103         tee_file.
13104         (pop_output_files): Use delete.
13105         (handle_redirections): Use stdio_file and tee_file.
13106         * cli/cli-setshow.c (do_show_command): Use string_file.
13107         * compile/compile-c-support.c (c_compute_program): Use
13108         string_file.
13109         * compile/compile-c-symbols.c (generate_vla_size): Take a
13110         'string_file &' instead of a 'ui_file *'.
13111         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13112         of a 'ui_file *'.  Use string_file.
13113         (generate_c_for_variable_locations): Take a 'string_file &'
13114         instead of a 'ui_file *'.
13115         * compile/compile-internal.h (generate_c_for_for_one_variable):
13116         Take a 'string_file &' instead of a 'ui_file *'.
13117         * compile/compile-loc2c.c (push, pushf, unary, binary)
13118         (print_label, pushf_register_address, pushf_register)
13119         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13120         'ui_file *'.  Adjust.
13121         * compile/compile.c (compile_to_object): Use string_file.
13122         * compile/compile.h (compile_dwarf_expr_to_c)
13123         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13124         'ui_file *'.
13125         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13126         (replace_typedefs_qualified_name): Use string_file and
13127         obstack_copy0.
13128         * disasm.c (gdb_pretty_print_insn): Use string_file.
13129         (gdb_disassembly): Adjust reference the null_stream global.
13130         (do_ui_file_delete): Delete.
13131         (gdb_insn_length): Use null_stream.
13132         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13133         * dwarf2loc.c (dwarf2_compile_property_to_c)
13134         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13135         'string_file &' instead of a 'ui_file *'.
13136         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13137         * dwarf2read.c (do_ui_file_peek_last): Delete.
13138         (dwarf2_compute_name): Use string_file.
13139         * event-top.c (gdb_setup_readline): Use stdio_file.
13140         * gdbarch.sh (verify_gdbarch): Use string_file.
13141         * gdbtypes.c (safe_parse_type): Use null_stream.
13142         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13143         string_file.
13144         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13145         'string_file *' instead of a 'ui_file *'.
13146         (gdbscm_arch_disassemble): Use string_file.
13147         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13148         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13149         inherits from ui_file.
13150         (ioscm_file_port_delete, ioscm_file_port_rewind)
13151         (ioscm_file_port_put): Delete.
13152         (ioscm_file_port_write): Rename to ...
13153         (ioscm_file_port::write): ... this.  Remove file_port_magic
13154         checks.
13155         (ioscm_file_port_new): Delete.
13156         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13157         ui_file_up.
13158         * guile/scm-type.c (tyscm_type_name): Use string_file.
13159         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13160         Use string_file.
13161         * infcmd.c (print_return_value_1): Use string_file.
13162         * infrun.c (print_target_wait_results): Use string_file.
13163         * language.c (add_language): Use string_file.
13164         * location.c (explicit_to_string_internal): Use string_file.
13165         * main.c (captured_main_1): Use null_file.
13166         * maint.c (maintenance_print_architecture): Use stdio_file.
13167         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13168         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13169         event_channel>: Change type to mi_console_file pointer.
13170         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13171         (mi_console_file_delete): Delete.
13172         (struct mi_console_file): Delete.
13173         (mi_console_file_magic): Delete.
13174         (mi_console_file_new): Delete.
13175         (mi_console_file::mi_console_file): New.
13176         (mi_console_file_delete): Delete.
13177         (mi_console_file_fputs): Delete.
13178         (mi_console_file::write): New.
13179         (mi_console_raw_packet): Delete.
13180         (mi_console_file::flush): New.
13181         (mi_console_file_flush): Delete.
13182         (mi_console_set_raw): Rename to ...
13183         (mi_console_file::set_raw): ... this.
13184         * mi/mi-console.h (class mi_console_file): New class.
13185         (mi_console_file_new, mi_console_set_raw): Delete.
13186         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13187         (mi_set_logging): Use delete and tee_file.  Adjust.
13188         * mi/mi-main.c (output_register): Use string_file.
13189         (mi_cmd_data_evaluate_expression): Use string_file.
13190         (mi_cmd_data_read_memory): Use string_file.
13191         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13192         * mi/mi-out.c (mi_ui_out::main_stream): New.
13193         (mi_ui_out::rewind): Use main_stream and
13194         string_file.
13195         (mi_ui_out::put): Use main_stream and string_file.
13196         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13197         Allocate a 'string_file' instead.
13198         (mi_out_new): Don't allocate a mem_fileopen stream here.
13199         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13200         (mi_ui_out::main_stream): Declare method.
13201         * printcmd.c (eval_command): Use string_file.
13202         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13203         * python/py-arch.c (archpy_disassemble): Use string_file.
13204         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13205         * python/py-frame.c (frapy_str): Use string_file.
13206         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13207         Use string_file.
13208         * python/py-type.c (typy_str): Use string_file.
13209         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13210         * python/py-value.c (valpy_str): Use string_file.
13211         * record-btrace.c (btrace_insn_history): Use string_file.
13212         * regcache.c (regcache_print): Use stdio_file.
13213         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13214         * remote.c (escape_buffer): Use string_file.
13215         * rust-lang.c (rust_get_disr_info): Use string_file.
13216         * serial.c (serial_open_ops_1): Use stdio_file.
13217         (do_serial_close): Use delete.
13218         * stack.c (print_frame_arg): Use string_file.
13219         (print_frame_args): Remove local mem_fileopen stream, not used.
13220         (print_frame): Use string_file.
13221         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13222         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13223         Take a 'string_file *' instead of a 'ui_file *'.
13224         * top.c (new_ui): Use stdio_file and stderr_file.
13225         (free_ui): Use delete.
13226         (execute_command_to_string): Use string_file.
13227         (quit_confirm): Use string_file.
13228         * tracepoint.c (collection_list::append_exp): Use string_file.
13229         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13230         * tui/tui-file.c: Don't include "ui-file.h".
13231         (enum streamtype, struct tui_stream): Delete.
13232         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13233         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13234         (tui_file::tui_file): New method.
13235         (tui_file_fputs): Delete.
13236         (tui_file_get_strbuf): Delete.
13237         (tui_file::puts): New method.
13238         (tui_file_adjust_strbuf): Delete.
13239         (tui_file_flush): Delete.
13240         (tui_file::flush): New method.
13241         * tui/tui-file.h: Tweak intro comment.
13242         Include ui-file.h.
13243         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13244         (tui_file_adjust_strbuf): Delete declarations.
13245         (class tui_file): New class.
13246         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13247         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13248         (tui_register_format): Use string_stream.
13249         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13250         (tui_get_function_from_frame): Use string_file.
13251         * typeprint.c (type_to_string): Use string_file.
13252         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13253         (null_stream): New global.
13254         (ui_file_delete): Delete.
13255         (ui_file::ui_file): New.
13256         (null_file_isatty): Delete.
13257         (ui_file::~ui_file): New.
13258         (null_file_rewind): Delete.
13259         (ui_file::printf): New.
13260         (null_file_put): Delete.
13261         (null_file_flush): Delete.
13262         (ui_file::putstr): New.
13263         (null_file_write): Delete.
13264         (ui_file::putstrn): New.
13265         (null_file_read): Delete.
13266         (ui_file::putc): New.
13267         (null_file_fputs): Delete.
13268         (null_file_write_async_safe): Delete.
13269         (ui_file::vprintf): New.
13270         (null_file_delete): Delete.
13271         (null_file::write): New.
13272         (null_file_fseek): Delete.
13273         (null_file::puts): New.
13274         (ui_file_data): Delete.
13275         (null_file::write_async_safe): New.
13276         (gdb_flush, ui_file_isatty): Adjust.
13277         (ui_file_put, ui_file_rewind): Delete.
13278         (ui_file_write): Adjust.
13279         (ui_file_write_for_put): Delete.
13280         (ui_file_write_async_safe, ui_file_read): Adjust.
13281         (ui_file_fseek): Delete.
13282         (fputs_unfiltered): Adjust.
13283         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13284         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13285         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13286         (set_ui_file_data): Delete.
13287         (string_file::~string_file, string_file::write)
13288         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13289         (do_ui_file_as_string, ui_file_as_string): Delete.
13290         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13291         (struct mem_file): Delete.
13292         (mem_file_new): Delete.
13293         (stdio_file::stdio_file): New.
13294         (mem_file_delete): Delete.
13295         (stdio_file::stdio_file): New.
13296         (mem_fileopen): Delete.
13297         (stdio_file::~stdio_file): New.
13298         (mem_file_rewind): Delete.
13299         (stdio_file::set_stream): New.
13300         (mem_file_put): Delete.
13301         (stdio_file::open): New.
13302         (mem_file_write): Delete.
13303         (stdio_file_magic, struct stdio_file): Delete.
13304         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13305         (stdio_file::flush): New.
13306         (stdio_file_read): Rename to ...
13307         (stdio_file::read): ... this.  Adjust.
13308         (stdio_file_write): Rename to ...
13309         (stdio_file::write): ... this.  Adjust.
13310         (stdio_file_write_async_safe): Rename to ...
13311         (stdio_file::write_async_safe) ... this.  Adjust.
13312         (stdio_file_fputs): Rename to ...
13313         (stdio_file::puts) ... this.  Adjust.
13314         (stdio_file_isatty): Delete.
13315         (stdio_file_fseek): Delete.
13316         (stdio_file::isatty): New.
13317         (stderr_file_write): Rename to ...
13318         (stderr_file::write) ... this.  Adjust.
13319         (stderr_file_fputs): Rename to ...
13320         (stderr_file::puts) ... this.  Adjust.
13321         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13322         (stderr_file::stderr_file): New.
13323         (tee_file_magic): Delete.
13324         (struct tee_file): Delete.
13325         (tee_file::tee_file): New.
13326         (tee_file_new): Delete.
13327         (tee_file::~tee_file): New.
13328         (tee_file_delete): Delete.
13329         (tee_file_flush): Rename to ...
13330         (tee_file::flush): ... this.  Adjust.
13331         (tee_file_write): Rename to ...
13332         (tee_file::write): ... this.  Adjust.
13333         (tee_file::write_async_safe): New.
13334         (tee_file_fputs): Rename to ...
13335         (tee_file::puts): ... this.  Adjust.
13336         (tee_file_isatty): Rename to ...
13337         (tee_file::isatty): ... this.  Adjust.
13338         * ui-file.h (struct obstack, struct ui_file): Don't
13339         forward-declare.
13340         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13341         (ui_file_write_ftype)
13342         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13343         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13344         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13345         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13346         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13347         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13348         (set_ui_file_fseek): Delete.
13349         (ui_file_data, ui_file_delete, ui_file_rewind)
13350         (struct ui_file): New.
13351         (ui_file_up): New.
13352         (class null_file): New.
13353         (null_stream): Declare.
13354         (ui_file_write_for_put, ui_file_put): Delete.
13355         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13356         Delete.
13357         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13358         (gdb_fopen, tee_file_new): Delete.
13359         (struct string_file): New.
13360         (struct stdio_file): New.
13361         (stdio_file_up): New.
13362         (struct stderr_file): New.
13363         (class tee_file): New.
13364         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13365         of a 'ui_file *'.  Adjust.
13366         * ui-out.h (class ui_out) <field_stream>: Likewise.
13367         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13368         (null_stream): Delete.
13369         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13370         Adjust.
13371         * utils.h (struct ui_file): Delete forward declaration..
13372         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13373         (error_stream): Take a 'string_file &' instead of a
13374         'ui_file *'.
13375         * varobj.c (varobj_value_get_print_value): Use string_file.
13376         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13377         * gdbarch.c: Regenerate.
13378
13379 2017-02-02  Pedro Alves  <palves@redhat.com>
13380
13381         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13382         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13383         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13384         Adjust to call gdb_print_insn instead of
13385         gdb_disassembler::print_insn.
13386         (dump_insns, do_mixed_source_and_assembly_deprecated)
13387         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13388         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13389         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13390         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13391         declaration.
13392         (gdb_pretty_print_insn): Re-add declaration.
13393         * record-btrace.c (btrace_insn_history): Don't allocate a
13394         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13395
13396 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13397
13398         * disasm.h (gdb_disassembly): Remove file_string parameter.
13399         * disasm.c (gdb_disassembly): Likewise.
13400         * cli/cli-cmds.c (print_disassembly): Adapt.
13401         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13402         * stack.c (do_gdb_disassembly): Likewise.
13403
13404 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13405
13406         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13407         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13408         targets.  And if the implicit value is longer than needed, extract
13409         the first bytes instead of the "least significant" ones.
13410
13411 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13412
13413         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13414         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13415         (btrace_fetch): Assert can_access_registers_ptid.
13416         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13417         validate_registers_access.
13418
13419 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13420
13421         * gdbthread.h (can_access_registers_ptid): New.
13422         * thread.c (can_access_registers_ptid): New.
13423
13424 2017-02-01  Pedro Alves  <palves@redhat.com>
13425
13426         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13427
13428 2017-01-31  Pedro Alves  <palves@redhat.com>
13429
13430         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13431         Fix typos.
13432
13433 2017-01-31  Pedro Alves  <palves@redhat.com>
13434
13435         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13436         not used.
13437
13438 2017-01-31  Pedro Alves  <palves@redhat.com>
13439
13440         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13441
13442 2017-01-31  Pedro Alves  <palves@redhat.com>
13443
13444         * common/scoped_restore.h
13445         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13446         change the value's parameter type to T2.
13447         (make_scoped_restore): Likewise.
13448
13449 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13450             Richard Henderson  <rth@redhat.com>
13451
13452         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13453         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13454         GS_BASE for older kernels.
13455         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13456         GS_BASE for older kernels.
13457         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13458         and GS_BASE to the offset table.
13459         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13460         system register group.
13461         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13462         for older kernels.
13463         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13464         amd64 ABI.
13465         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13466         AMD64_GSBASE_REGNUM.
13467         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13468         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13469         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13470         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13471         i386/64bit-segments.xml in those rules.
13472         * features/i386/64bit-segments.xml: New file.
13473         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13474         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13475         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13476         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13477         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13478         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13479         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13480         * features/i386/amd64-avx-linux.c: Regenerated.
13481         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13482         * features/i386/amd64-avx-mpx.c: Regenerated.
13483         * features/i386/amd64-avx512-linux.c: Regenerated.
13484         * features/i386/amd64-linux.c: Regenerated.
13485         * features/i386/amd64-mpx-linux.c: Regenerated.
13486         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13487         * features/i386/i386-avx-mpx.c: Regenerated.
13488         * features/i386/x32-avx-linux.c: Regenerated.
13489         * features/i386/x32-avx512-linux.c: Regenerated.
13490         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13491         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13492         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13493         * regformats/i386/amd64-linux.dat: Regenerated.
13494         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13495         * regformats/i386/x32-avx-linux.dat: Regenerated.
13496         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13497         * regformats/i386/x32-linux.dat: Regenerated.
13498
13499 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13500
13501         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13502         Set to AMD64_NUM_REGS.
13503
13504 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13505
13506         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13507         that checks validity of a register number.
13508
13509 2017-01-27  Kees Cook  <keescook@google.com>
13510
13511         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13512         fetch_fpregs if target has fpa registers.
13513         (arm_linux_store_inferior_registers): Call store_fpregs if target
13514         has fpa registers.
13515
13516 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13517
13518         * cris-tdep.c (cris_gdbarch_init): Remove check for
13519         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13520
13521 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13522
13523         * corelow.c (get_core_register_section): Check for regset
13524         existence before checking for REGSET_VARIABLE_SIZE.
13525
13526 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13527             Pedro Alves  <palves@redhat.com>
13528
13529         PR gdb/20939
13530         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13531         call memory_error, save memaddr instead.
13532         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13533         negative, cal memory_error.
13534         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13535
13536 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13537
13538         * disasm-selftests.c (memory_error_test): New function.
13539         (_initialize_disasm_selftests): Register memory_error_test.
13540
13541 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13542
13543         * Makefile.in (SFILES): Add disasm-selftests.c and
13544         selftest-arch.c.
13545         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13546         * disasm-selftests.c: New file.
13547         * selftest-arch.c: New file.
13548         * selftest-arch.h: New file.
13549
13550 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13551
13552         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13553         to bfd_arch_mep.  Don't return 0 if section is not
13554         found.  Call print_insn_mep.
13555
13556 2017-01-26  Pedro Alves  <palves@redhat.com>
13557             Yao Qi  <yao.qi@linaro.org>
13558
13559         * arm-tdep.c: Include "disasm.h".
13560         (gdb_print_insn_arm): Update code to get gdbarch.
13561         * disasm.c (dis_asm_read_memory): Change it to
13562         gdb_disassembler::dis_asm_read_memory.
13563         (dis_asm_memory_error): Likewise.
13564         (dis_asm_print_address): Likewise.
13565         (gdb_pretty_print_insn): Change it to
13566         gdb_disassembler::pretty_print_insn.
13567         (dump_insns): Add one argument gdb_disassemlber.  All
13568         callers updated.
13569         (do_mixed_source_and_assembly_deprecated): Likewise.
13570         (do_mixed_source_and_assembly): Likewise.
13571         (do_assembly_only): Likewise.
13572         (gdb_disassembler::gdb_disassembler): New.
13573         (gdb_disassembler::print_insn): New.
13574         * disasm.h (class gdb_disassembler): New.
13575         (gdb_pretty_print_insn): Remove declaration.
13576         (gdb_disassemble_info): Likewise.
13577         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13578         (gdbscm_disasm_read_memory_worker): Update.
13579         (gdbscm_disasm_read_memory): Update.
13580         (gdbscm_disasm_memory_error): Remove.
13581         (gdbscm_disasm_print_address): Remove.
13582         (gdbscm_disassembler::gdbscm_disassembler): New.
13583         (gdbscm_print_insn_from_port): Update.
13584         * mips-tdep.c: Include disasm.h.
13585         (gdb_print_insn_mips): Update code to get gdbarch.
13586         * record-btrace.c (btrace_insn_history): Update.
13587         * spu-tdep.c: Include disasm.h.
13588         (struct spu_dis_asm_data): Remove.
13589         (struct spu_dis_asm_info): New.
13590         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13591         SPU id.
13592         (gdb_print_insn_spu): Cast disassemble_info to
13593         spu_dis_asm_info.
13594
13595 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13596
13597         * disasm.c (do_ui_file_delete): Delete.
13598         (gdb_insn_length): Move code creating stream to ...
13599         * utils.c (null_stream): ... here.  New function.
13600         * utils.h (null_stream): Declare.
13601
13602 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13603
13604         * python/py-inferior.c (find_thread_object): Return directly
13605         from the loop.  Remove "found" variable.
13606
13607 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13608
13609         GDB 7.12.1 released.
13610
13611 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13612
13613         * python/py-function.c (fnpy_call): Reorder declarations to have
13614         the gdbpy_enter object declared first.
13615         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13616
13617 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13618
13619         PR python/21068
13620         * python/python-internal.h (PyMem_RawMalloc): Define for
13621         Python < 3.4.
13622         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13623         PyMem_RawMalloc instead of PyMem_Malloc.
13624
13625 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13626             Luis Machado  <lgustavo@codesourcery.com>
13627
13628         * NEWS (New commands): Mention flash-erase.
13629         (New MI commands): Mention target-flash-erase.
13630         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13631         command.
13632         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13633         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13634         * target.c (flash_erase_command): New function.
13635         (initialize_targets): Add new flash-erase command.
13636         * target.h (flash_erase_command): New declaration.
13637
13638 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13639
13640         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13641         HAVE_SYS_PROCFS_H is defined.
13642
13643 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13644
13645         * remote.c (struct cached_reg): Change data into a pointer.
13646         * (stop_reply_dtr): Free data pointers before deleting vector.
13647         (process_stop_reply): Likewise.
13648         (remote_parse_stop_reply): Allocate space for data
13649
13650 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13651
13652         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13653         MAX_REGISTER_SIZE.
13654         (amd64_pseudo_register_read_value): Likewise.
13655         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13656         (store_register_using_P): Likewise.
13657         * regcache.c (regcache_xfer_part): Likewise.
13658
13659 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13660
13661         Split real and pseudo registers.
13662         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13663         (sparc32_pseudo_regnum): New enum.
13664         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13665         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13666         (SPARC32_CP0_REGISTERS): New macro.
13667         (sparc32_pseudo_register_name): New function.
13668         (sparc32_register_name): Use sparc32_pseudo_register_name.
13669         (sparc32_pseudo_register_type): New function.
13670         (sparc32_register_type): Use sparc32_pseudo_register_type.
13671         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13672         pseudo register numbers.
13673         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13674         (SPARC64_CP0_REGISTERS): New macro.
13675         (sparc64_pseudo_register_name): New function.
13676         (sparc64_register_name): Use sparc64_pseudo_register_name.
13677         (sparc64_pseudo_register_type): New function.
13678         (sparc64_register_type): Use sparc64_pseudo_register_type.
13679         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13680         pseudo register numbers.
13681         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13682         sparc64_store_arguments): Handle pseudo register numbers.
13683
13684 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13685
13686         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13687         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13688         output.
13689         (getpkt_or_notif_sane_1): Likewise.
13690
13691 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13692
13693         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13694         of CC.  Pass "-x c++-header" instead of "-x c".
13695
13696 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13697
13698         * remote.c (remote_can_async_p): Update comment.
13699
13700 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13701
13702         * linux-nat.c (linux_nat_can_async_p): Update comment.
13703
13704 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13705
13706         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13707
13708 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13709
13710         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13711
13712 2017-01-10  Tom Tromey  <tom@tromey.com>
13713
13714         * python/py-type.c (typy_legacy_template_argument): Update.
13715         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13716         ~demangle_parse_info): Declare new members.
13717         (cp_demangled_name_to_comp): Return unique_ptr.
13718         (cp_demangled_name_parse_free)
13719         (make_cleanup_cp_demangled_name_parse_free)
13720         (cp_new_demangle_parse_info): Remove.
13721         * cp-support.c (do_demangled_name_parse_free_cleanup)
13722         (make_cleanup_cp_demangled_name_parse_free): Remove.
13723         (inspect_type, cp_canonicalize_string_full)
13724         (cp_canonicalize_string): Update.
13725         (mangled_name_to_comp): Change return type.
13726         (cp_class_name_from_physname, method_name_from_physname)
13727         (cp_func_name, cp_remove_params): Update.
13728         * cp-name-parser.y (demangle_parse_info): New constructor, from
13729         cp_new_demangle_parse_info.
13730         (~demangle_parse_info): New destructor, from
13731         cp_demangled_name_parse_free.
13732         (cp_merge_demangle_parse_infos): Update.
13733         (cp_demangled_name_to_comp): Change return type.
13734
13735 2017-01-10  Tom Tromey  <tom@tromey.com>
13736
13737         * top.c (prevent_dont_repeat): Change return type.
13738         * python/python.c (execute_gdb_command): Use std::string.
13739         Update.
13740         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13741         * command.h (prevent_dont_repeat): Change return type.
13742         * breakpoint.c (bpstat_do_actions_1): Update.
13743
13744 2017-01-10  Tom Tromey  <tom@tromey.com>
13745
13746         * value.h (scoped_value_mark::~scoped_value_mark): Call
13747         free_to_mark.
13748         (scoped_value_mark::free_to_mark): New method.
13749         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13750         scoped_value_mark.
13751
13752 2017-01-10  Tom Tromey  <tom@tromey.com>
13753
13754         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13755         (valpy_reference_value, valpy_const_value, valpy_get_address)
13756         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13757         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13758         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13759         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13760         scoped_value_mark.
13761         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13762         * value.h (scoped_value_mark): New class.
13763
13764 2017-01-10  Tom Tromey  <tom@tromey.com>
13765
13766         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13767         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13768         * psymtab.c (discard_psymtabs_upto): Remove.
13769         (make_cleanup_discard_psymtabs): Remove.
13770         (struct psymtab_state): Remove.
13771
13772 2017-01-10  Tom Tromey  <tom@tromey.com>
13773
13774         * record-full.c (record_full_save_cleanups): Remove.
13775         (record_full_save): Use gdb::unlinker.
13776         * gcore.c (do_bfd_delete_cleanup): Remove.
13777         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13778         cleanups.
13779         * dwarf2read.c (unlink_if_set): Remove.
13780         (write_psymtabs_to_index): Use gdb::unlinker.
13781         * common/gdb_unlinker.h: New file.
13782
13783 2017-01-10  Tom Tromey  <tom@tromey.com>
13784
13785         * windows-tdep.c (windows_xfer_shared_library): Update.
13786         * windows-nat.c (windows_make_so): Update.
13787         * utils.h (make_cleanup_bfd_unref): Remove.
13788         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13789         * symfile.h (symfile_bfd_open)
13790         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13791         * symfile.c (read_symbols, symbol_file_add)
13792         (separate_debug_file_exists): Update.
13793         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13794         (generic_load, reread_symbols): Update.
13795         * symfile-mem.c (symbol_file_add_from_memory): Update.
13796         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13797         (spu_symbol_file_add_from_memory): Update.
13798         * solist.h (struct target_so_ops) <bfd_open>: Return
13799         gdb_bfd_ref_ptr.
13800         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13801         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13802         gdb_bfd_ref_ptr.
13803         (solib_map_sections, reload_shared_libraries_1): Update.
13804         * solib-svr4.c (enable_break): Update.
13805         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13806         * solib-frv.c (enable_break2): Update.
13807         * solib-dsbt.c (enable_break): Update.
13808         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13809         gdb_bfd_ref_ptr.
13810         (darwin_solib_get_all_image_info_addr_at_init): Update.
13811         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13812         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13813         * record-full.c (record_full_save): Update.
13814         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13815         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13816         * minidebug.c (find_separate_debug_file_in_section): Return
13817         gdb_bfd_ref_ptr.
13818         * machoread.c (macho_add_oso_symfile): Change abfd to
13819         gdb_bfd_ref_ptr.
13820         (macho_symfile_read_all_oso): Update.
13821         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13822         (macho_symfile_read): Update.
13823         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13824         (jit_bfd_try_read_symtab): Update.
13825         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13826         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13827         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13828         gdb_bfd_ref_ptr.
13829         (gdb_bfd_ref_policy): New struct.
13830         (gdb_bfd_ref_ptr): New typedef.
13831         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13832         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13833         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13834         gdb_bfd_ref_ptr.
13835         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13836         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13837         (gcore_command): Update.
13838         * exec.c (exec_file_attach): Update.
13839         * elfread.c (elf_symfile_read): Update.
13840         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13841         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13842         (open_and_init_dwo_file): Update.
13843         (open_dwp_file): Return gdb_bfd_ref_ptr.
13844         (open_and_init_dwp_file): Update.
13845         * corelow.c (core_open): Update.
13846         * compile/compile-object-load.c (compile_object_load): Update.
13847         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13848         * coffread.c (coff_symfile_read): Update.
13849         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13850         gdb_bfd_ref_ptr.  Rename.
13851         (dump_bfd_file, restore_command): Update.
13852         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13853         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13854         (find_separate_debug_file_by_buildid): Update.
13855
13856 2017-01-10  Tom Tromey  <tom@tromey.com>
13857
13858         * common/gdb_ref_ptr.h: New file.
13859         * python/py-ref.h (struct gdbpy_ref_policy): New.
13860         (gdbpy_ref): Now a typedef.
13861
13862 2017-01-10  Tom Tromey  <tom@tromey.com>
13863
13864         * utils.h (make_cleanup_htab_delete): Don't declare.
13865         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13866         Remove.
13867         * linespec.c (decode_compound_collector): Add constructor,
13868         destructor.
13869         (lookup_prefix_sym): Remove cleanup.
13870         (symtab_collector): Add constructor, destructor.
13871         (collect_symtabs_from_filename): Remove cleanup.
13872         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13873         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13874         Use htab_up.
13875         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13876         * dwarf2read.c (dw2_expand_symtabs_matching)
13877         (dw2_map_symbol_filenames, dwarf_decode_macros)
13878         (write_psymtabs_to_index): Use htab_up.
13879         * dwarf2loc.c (func_verify_no_selftailcall)
13880         (call_site_find_chain_1, func_verify_no_selftailcall)
13881         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13882         std::vector, gdb::unique_xmalloc_ptr.
13883         (call_sitep): Remove typedef.
13884         (dwarf2_locexpr_baton_eval): Remove unused variable.
13885
13886 2017-01-10  Tom Tromey  <tom@tromey.com>
13887
13888         * python/python-internal.h (make_cleanup_py_decref)
13889         (make_cleanup_py_xdecref): Don't declare.
13890         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13891         (py_xdecref, make_cleanup_py_xdecref): Remove.
13892
13893 2017-01-10  Tom Tromey  <tom@tromey.com>
13894
13895         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13896         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13897
13898 2017-01-10  Tom Tromey  <tom@tromey.com>
13899
13900         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13901
13902 2017-01-10  Tom Tromey  <tom@tromey.com>
13903
13904         * python/py-utils.c (unicode_to_encoded_string)
13905         (python_string_to_target_string)
13906         (python_string_to_target_python_string)
13907         (python_string_to_host_string, gdbpy_obj_to_string)
13908         (get_addr_from_python): Use gdbpy_ref.
13909
13910 2017-01-10  Tom Tromey  <tom@tromey.com>
13911
13912         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13913         gdbpy_ref.
13914
13915 2017-01-10  Tom Tromey  <tom@tromey.com>
13916
13917         * python/python.c (eval_python_command, gdbpy_decode_line)
13918         (gdbpy_run_events, gdbpy_start_type_printers)
13919         (gdbpy_apply_type_printers): Use gdbpy_ref.
13920
13921 2017-01-10  Tom Tromey  <tom@tromey.com>
13922
13923         * python/py-param.c (get_doc_string, compute_enum_values): Use
13924         gdbpy_ref.
13925
13926 2017-01-10  Tom Tromey  <tom@tromey.com>
13927
13928         * python/py-inferior.c (find_thread_object, build_inferior_list):
13929         Use gdbpy_ref.
13930
13931 2017-01-10  Tom Tromey  <tom@tromey.com>
13932
13933         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13934
13935 2017-01-10  Tom Tromey  <tom@tromey.com>
13936
13937         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13938         gdbpy_ref.
13939
13940 2017-01-10  Tom Tromey  <tom@tromey.com>
13941
13942         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13943         extra incref.
13944         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13945         Use gdbpy_ref.
13946
13947 2017-01-10  Tom Tromey  <tom@tromey.com>
13948
13949         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13950         gdbpy_ref.
13951
13952 2017-01-10  Tom Tromey  <tom@tromey.com>
13953
13954         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13955         decref results of PyArg_ParseTupleAndKeywords.
13956
13957 2017-01-10  Tom Tromey  <tom@tromey.com>
13958
13959         * python/python.c (python_run_simple_file): Use
13960         unique_xmalloc_ptr, gdbpy_ref.
13961
13962 2017-01-10  Tom Tromey  <tom@tromey.com>
13963
13964         * python/py-prettyprint.c (print_stack_unless_memory_error)
13965         (print_string_repr, print_children): Use gdbpy_ref.
13966         (dummy_python_frame): New class.
13967         (dummy_python_frame::dummy_python_frame): Rename from
13968         push_dummy_python_frame.
13969         (py_restore_tstate): Remove.
13970
13971 2017-01-10  Tom Tromey  <tom@tromey.com>
13972
13973         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13974
13975 2017-01-10  Tom Tromey  <tom@tromey.com>
13976
13977         * python/python.c (ensure_python_env, restore_python_env):
13978         Remove.
13979         * python/python-internal.h (ensure_python_env): Don't declare.
13980         * varobj.h (varobj_ensure_python_env): Don't declare.
13981         * varobj.c (varobj_ensure_python_env): Remove.
13982
13983 2017-01-10  Tom Tromey  <tom@tromey.com>
13984
13985         * varobj.c (varobj_value_get_print_value): Use
13986         gdbpy_enter_varobj.
13987
13988 2017-01-10  Tom Tromey  <tom@tromey.com>
13989
13990         * python/py-prettyprint.c (print_string_repr, print_children):
13991         Update.
13992         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13993         of "encoding".
13994         * varobj.c (varobj_value_get_print_value): Update.
13995         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13996
13997 2017-01-10  Tom Tromey  <tom@tromey.com>
13998
13999         * varobj.c (varobj_get_display_hint)
14000         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14001         (varobj_set_visualizer, free_variable): Use
14002         gdbpy_enter_varobj.
14003
14004 2017-01-10  Tom Tromey  <tom@tromey.com>
14005
14006         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14007         (do_finish_initialization): New function.  Use gdbpy_ref.
14008         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14009         do_finish_initialization.
14010
14011 2017-01-10  Tom Tromey  <tom@tromey.com>
14012
14013         * python/py-param.c (get_set_value, get_show_value): Use
14014         gdbpy_enter, gdbpy_ref.
14015
14016 2017-01-10  Tom Tromey  <tom@tromey.com>
14017
14018         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14019
14020 2017-01-10  Tom Tromey  <tom@tromey.com>
14021
14022         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14023
14024 2017-01-10  Tom Tromey  <tom@tromey.com>
14025
14026         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14027         Use gdbpy_enter_varobj.
14028
14029 2017-01-10  Tom Tromey  <tom@tromey.com>
14030
14031         * varobj.c (gdbpy_enter_varobj): New constructor.
14032         * python/python-internal.h (gdbpy_enter_varobj): New class.
14033         * python/py-varobj.c (py_varobj_get_iterator): Use
14034         gdbpy_enter_varobj.
14035
14036 2017-01-10  Tom Tromey  <tom@tromey.com>
14037
14038         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14039         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14040         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14041         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14042         unique_xmalloc_ptr.
14043         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14044
14045 2017-01-10  Tom Tromey  <tom@tromey.com>
14046
14047         * python/py-xmethods.c (invoke_match_method): Use
14048         gdbpy_ref.
14049
14050 2017-01-10  Tom Tromey  <tom@tromey.com>
14051
14052         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14053         gdbpy_enter, gdbpy_ref.
14054
14055 2017-01-10  Tom Tromey  <tom@tromey.com>
14056
14057         * python/python.c (python_interactive_command): Use gdbpy_enter.
14058
14059 2017-01-10  Tom Tromey  <tom@tromey.com>
14060
14061         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14062         gdbpy_ref.
14063
14064 2017-01-10  Tom Tromey  <tom@tromey.com>
14065
14066         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14067         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14068
14069 2017-01-10  Tom Tromey  <tom@tromey.com>
14070
14071         * utils.h (htab_deleter): New struct.
14072         (htab_up): New typedef.
14073         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14074         gdbpy_enter, gdbpy_ref, htab_up.
14075
14076 2017-01-10  Tom Tromey  <tom@tromey.com>
14077
14078         * python/py-unwind.c (pending_frame_invalidate): Remove.
14079         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14080
14081 2017-01-10  Tom Tromey  <tom@tromey.com>
14082
14083         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14084         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14085
14086 2017-01-10  Tom Tromey  <tom@tromey.com>
14087
14088         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14089
14090 2017-01-10  Tom Tromey  <tom@tromey.com>
14091
14092         * python/python.c (gdbpy_eval_from_control_command)
14093         (gdbpy_source_script, gdbpy_run_events)
14094         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14095         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14096         gdbpy_enter.
14097
14098 2017-01-10  Tom Tromey  <tom@tromey.com>
14099
14100         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14101
14102 2017-01-10  Tom Tromey  <tom@tromey.com>
14103
14104         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14105
14106 2017-01-10  Tom Tromey  <tom@tromey.com>
14107
14108         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14109         (python_on_inferior_call_pre, python_on_inferior_call_post)
14110         (python_on_memory_change, python_on_register_change)
14111         (python_inferior_exit, python_new_objfile, add_thread_object)
14112         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14113
14114 2017-01-10  Tom Tromey  <tom@tromey.com>
14115
14116         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14117         (bpfinishpy_handle_exit): Use gdbpy_enter.
14118
14119 2017-01-10  Tom Tromey  <tom@tromey.com>
14120
14121         * python/py-cmd.c (cmdpy_destroyer)
14122         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14123         gdbpy_enter.
14124
14125 2017-01-10  Tom Tromey  <tom@tromey.com>
14126
14127         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14128         gdbpy_enter.
14129         (gdbpy_breakpoint_has_cond): Likewise.
14130
14131 2017-01-10  Tom Tromey  <tom@tromey.com>
14132
14133         * python/python.c (gdbpy_enter): New constructor.
14134         (~gdbpy_enter): New destructor.
14135         (restore_python_env, ensure_python_env): Rewrite.
14136         * python/python-internal.h (gdbpy_enter): New class.
14137
14138 2017-01-10  Tom Tromey  <tom@tromey.com>
14139
14140         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14141
14142 2017-01-10  Tom Tromey  <tom@tromey.com>
14143
14144         * python/py-value.c (value_has_field, get_field_flag)
14145         (get_field_type, valpy_getitem, convert_value_from_python): Use
14146         gdbpy_ref.
14147
14148 2017-01-10  Tom Tromey  <tom@tromey.com>
14149
14150         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14151         gdbpy_ref.
14152
14153 2017-01-10  Tom Tromey  <tom@tromey.com>
14154
14155         * python/py-prettyprint.c (search_pp_list)
14156         (find_pretty_printer_from_objfiles)
14157         (find_pretty_printer_from_progspace)
14158         (find_pretty_printer_from_gdb, find_pretty_printer)
14159         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14160         gdbpy_ref.
14161
14162 2017-01-10  Tom Tromey  <tom@tromey.com>
14163
14164         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14165
14166 2017-01-10  Tom Tromey  <tom@tromey.com>
14167
14168         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14169         (ltpy_get_all_source_lines): Use gdbpy_ref.
14170
14171 2017-01-10  Tom Tromey  <tom@tromey.com>
14172
14173         * python/py-framefilter.c (extract_sym, extract_value)
14174         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14175         gdbpy_ref.
14176
14177 2017-01-10  Tom Tromey  <tom@tromey.com>
14178
14179         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14180
14181 2017-01-10  Tom Tromey  <tom@tromey.com>
14182
14183         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14184
14185 2017-01-10  Tom Tromey  <tom@tromey.com>
14186
14187         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14188         gdbpy_ref.
14189
14190 2017-01-10  Tom Tromey  <tom@tromey.com>
14191
14192         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14193
14194 2017-01-10  Tom Tromey  <tom@tromey.com>
14195
14196         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14197         (typy_range): Use gdbpy_ref.
14198
14199 2017-01-10  Tom Tromey  <tom@tromey.com>
14200
14201         * python/py-threadevent.c (create_thread_event_object): Use
14202         gdbpy_ref.
14203         * python/py-stopevent.c (create_stop_event_object): Simplify.
14204         (emit_stop_event): Use gdbpy_ref.
14205         * python/py-signalevent.c (create_signal_event_object): Use
14206         gdbpy_ref.
14207         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14208         (emit_new_objfile_event, create_clear_objfiles_event_object)
14209         (emit_clear_objfiles_event): Use gdbpy_ref.
14210         * python/py-infevents.c (create_inferior_call_event_object)
14211         (create_register_changed_event_object)
14212         (create_memory_changed_event_object, emit_inferior_call_event)
14213         (emit_memory_changed_event, emit_register_changed_event): Use
14214         gdbpy_ref.
14215         * python/py-exitedevent.c (create_exited_event_object)
14216         (emit_exited_event): Use gdbpy_ref.
14217         * python/py-event.h (evpy_emit_event): Remove
14218         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14219         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14220         * python/py-continueevent.c (emit_continue_event): Use
14221         gdbpy_ref.
14222         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14223         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14224         gdbpy_ref.
14225         * python/py-bpevent.c (create_breakpoint_event_object): Use
14226         gdbpy_ref.
14227
14228 2017-01-10  Tom Tromey  <tom@tromey.com>
14229
14230         * python/py-ref.h: New file.
14231
14232 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14233
14234         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14235         void.
14236         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14237         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14238         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14239         * ui-out.c (ui_out::redirect): Likewise.
14240         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14241         * cli/cli-logging.c (set_logging_redirect): Update call site of
14242         ui_out::redirect.
14243         (handle_redirections): Likewise.
14244         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14245         * top.c (execute_command_to_string): Likewise.
14246         * utils.c (do_ui_out_redirect_pop): Likewise.
14247
14248 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14249
14250         * stack.c (_initialize_stack): Update "frame" command help message.
14251
14252 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14253
14254         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14255
14256 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14257
14258         * x86-linux-nat.h: Include gdb_proc_service.h.
14259
14260 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14261
14262         * ser-base.h: Include serial.h.
14263
14264 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14265
14266         * ppc-linux-tdep.h: Include ppc-tdep.h.
14267
14268 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14269
14270         * nat/amd64-linux-siginfo.h: Include signal.h.
14271
14272 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14273
14274         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14275
14276 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14277
14278         * mi/mi-parse.h: Include mi-cmds.h.
14279
14280 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14281
14282         * inf-loop.c: Don't include "target.h".
14283         * inf-loop.h: Include it here.
14284
14285 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14286
14287         * dfp.h: Include "dboulest.h" and "expression.h".
14288
14289 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14290
14291         * ax-gdb.h: Include "ax.h".
14292
14293 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14294
14295         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14296         with nat/gdb_ptrace.h.
14297
14298 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14299
14300         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14301         new line.
14302         (mips64_fbsd_sigframe_init): Likewise.
14303
14304 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14305
14306         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14307         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14308
14309 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14310
14311         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14312         * NEWS: Mention new FreeBSD/mips native configuration.
14313         * config/mips/fbsd.mh: New file.
14314         * configure.host: Add mips*-*-freebsd*.
14315         * mips-fbsd-nat.c: New file.
14316
14317 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14318
14319         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14320         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14321         * NEWS: Mention new FreeBSD/mips target.
14322         * configure.tgt: Add mips*-*-freebsd*.
14323         * mips-fbsd-tdep.c: New file.
14324         * mips-fbsd-tdep.h: New file.
14325
14326 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14327
14328         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14329         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14330
14331 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14332
14333         Update copyright year range in all GDB files.
14334
14335 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14336
14337         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14338
14339 For older changes see ChangeLog-2016.
14340 \f
14341 Local Variables:
14342 mode: change-log
14343 left-margin: 8
14344 fill-column: 74
14345 version-control: never
14346 coding: utf-8
14347 End: