Return unique_xmalloc_ptr from target_read_stralloc
[external/binutils.git] / gdb / ChangeLog
1 2017-10-16  Tom Tromey  <tom@tromey.com>
2
3         * xml-syscall.c (xml_init_syscalls_info): Update.
4         * xml-support.c (xinclude_start_include): Update.
5         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
6         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
7         (xml_fetch_content_from_file): Likewise.
8         * osdata.c (get_osdata): Update.
9         * target.h (target_read_stralloc, target_get_osdata): Return
10         unique_xmalloc_ptr.
11         * solib-aix.c (solib_aix_get_library_list): Update.
12         * solib-target.c (solib_target_current_sos): Update.
13         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
14         * xml-tdesc.c (fetch_available_features_from_target): Update.
15         (target_fetch_description_xml): Update.
16         (file_read_description_xml): Update.
17         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
18         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
19         (remote_pid_to_exec_file): Update.
20         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
21         (target_get_osdata): Likewise.
22
23 2017-10-16  Tom Tromey  <tom@tromey.com>
24
25         * remote.c (remote_register_number_and_offset): Use std::vector.
26         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
27         (putpkt_binary): Use gdb::def_vector.
28         (compare_sections_command): Use gdb::byte_vector.
29
30 2017-10-16  Tom Tromey  <tom@tromey.com>
31
32         * ppc-linux-nat.c (hwdebug_insert_point): Use
33         gdb::unique_xmalloc_ptr, XDUP.
34
35 2017-10-16  Tom Tromey  <tom@tromey.com>
36
37         * probe.c (parse_probes): Use std::string.
38         (info_probes_for_ops, enable_probes_command)
39         (disable_probes_command): Remove cleanups.
40
41 2017-10-16  Tom Tromey  <tom@tromey.com>
42
43         * buildsym.c (block_compar): Remove.
44         (end_symtab_get_static_block): Use std::vector.
45
46 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
47
48         * memrange.h (struct mem_range): Define operator< and operator==.
49         (mem_range_s): Remove.
50         (DEF_VEC_O (mem_range_s)): Remove.
51         (normalize_mem_ranges): Change parameter type to std::vector.
52         * memrange.c (compare_mem_ranges): Remove.
53         (normalize_mem_ranges): Change parameter type to std::vector,
54         adjust to vector change.
55         * exec.c (section_table_available_memory): Return vector, remove
56         parameter.
57         (section_table_read_available_memory): Adjust to std::vector
58         change.
59         * remote.c (remote_read_bytes): Adjust to std::vector
60         change.
61         * tracepoint.h (traceframe_available_memory): Change parameter
62         type to std::vector.
63         * tracepoint.c (traceframe_available_memory): Change parameter
64         type to std::vector, adjust.
65         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
66         std::vector change.
67         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
68         unittests/memrange-selftests.c.
69         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
70         * gdb/unittests/memrange-selftests.c: New file.
71
72 2017-10-16  Pedro Alves  <palves@redhat.com>
73
74         * elfread.c (probe_key_free): Rename range-for variable.
75         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
76         (find_probe_by_pc, collect_probes): Rename range-for variable.
77
78 2017-10-16  Yao Qi  <yao.qi@linaro.org>
79
80         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
81         * features/tic6x-c62x.c: Remove.
82         * features/tic6x-c64x-linux.c: Remove.
83         * features/tic6x-c64x.c: Remove.
84         * features/tic6x-c64xp-linux.c: Remove.
85         * features/tic6x-c64xp.c: Remove.
86         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
87         initialize_tdesc_tic6x_*_linux functions.
88         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
89         initialize_tdesc_tic6x_* functions.
90
91 2017-10-16  Yao Qi  <yao.qi@linaro.org>
92
93         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
94         tic6x-c62x.
95         * regformats/tic6x-c62x.dat: Remove.
96         * regformats/tic6x-c64x.dat: Remove.
97         * regformats/tic6x-c64xp.dat: Remove.
98
99 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
100
101         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
102         (the !HAVE_LIBEXPAT version).
103
104 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
105
106         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
107         const.
108
109 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
110
111         * target.h: Include tracepoint.h.
112         (enum trace_find_type): Move to tracepoint.h.
113         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
114         * tracepoint.h: Don't include target.h
115         (enum trace_find_type): Move from target.h.
116         (parse_traceframe_info): Return a unique ptr.
117         * tracepoint.c (current_traceframe_info): Change type to unique
118         ptr.
119         (free_traceframe_info): Remove.
120         (clear_traceframe_info): Don't manually free
121         current_traceframe_info.
122         (free_result): Remove.
123         (parse_traceframe_info): Return a unique ptr.
124         (get_traceframe_info): Adjust to unique ptr.
125         * ctf.c (ctf_traceframe_info): Return a unique ptr.
126         * remote.c (remote_traceframe_info): Return a unique ptr.
127         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
128         ptr.
129         * target-debug.h (target_debug_print_traceframe_info_up): New
130         macro.
131         * target-delegates.c: Regenerate.
132
133 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
134
135         * memrange.h (struct mem_range): Add constructors.
136         * tracepoint.h (struct traceframe_info) <memory>: Change type to
137         std::vector<mem_range>.
138         * tracepoint.c (free_traceframe_info): Don't manually free
139         vector.
140         (traceframe_info_start_memory): Adjust to vector change.
141         (traceframe_available_memory): Likewise.
142         * tracefile-tfile.c (build_traceframe_info): Likewise.
143         * ctf.c (ctf_traceframe_info): Likewise.
144
145 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
146
147         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
148         std::vector<int>.
149         * tracepoint.c (free_traceframe_info): Deallocate with delete.
150         (traceframe_info_start_tvar): Adjust to vector change.
151         (parse_traceframe_info): Allocate with new.
152         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
153         vector change.
154         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
155         change.
156         tfile_traceframe_info): Allocate with new.
157         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
158         change.
159
160 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
161
162         * tracepoint.c (traceframe_info): Rename to...
163         (current_traceframe_info): ...this.
164         (clear_traceframe_info): Adjust.
165         (get_traceframe_info): Adjust.
166
167 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
168
169         * nat/linux-osdata.c: Include algorithm.
170         (compare_processes): Remove.
171         (struct pid_pgid_entry): New struct.
172         (linux_xfer_osdata_processgroups): Use std::vector instead of
173         XNEWVEC.
174
175 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
176
177         * objfiles.h: Don't include symfile.h.
178         (struct partial_symbol): Remove forward-declaration.
179         (struct objfile) <global_psymbols, static_psymbols>: Change type
180         to std::vector<partial_symbol *>.
181         * objfiles.c (objfile::objfile): Don't memset those fields.
182         (objfile::~objfile): Don't free those fields.
183         * psympriv.h (struct psymbol_allocation_list): Remove
184         forward-declaration.
185         (add_psymbol_to_list): Change psymbol_allocation_list parameter
186         to std::vector.
187         (start_psymtab_common): Change parameters to std::vector.
188         * psymtab.c: Include algorithm.
189         (require_partial_symbols): Call shrink_to_fit.
190         (find_pc_sect_psymbol): Adjust to vector change.
191         (match_partial_symbol): Likewise.
192         (lookup_partial_symbol): Likewise.
193         (psym_relocate): Likewise.
194         (dump_psymtab): Likewise.
195         (recursively_search_psymtabs): Likewise.
196         (compare_psymbols): Remove.
197         (sort_pst_symbols): Adjust to vector change.
198         (start_psymtab_common): Likewise.
199         (end_psymtab_common): Likewise.
200         (psymbol_bcache_full): De-constify return value.
201         (add_psymbol_to_bcache): Likewise.
202         (extend_psymbol_list): Remove.
203         (append_psymbol_to_list): Adjust to vector change.
204         (add_psymbol_to_list): Likewise.
205         (init_psymbol_list): Likewise.
206         (maintenance_info_psymtabs): Likewise.
207         (maintenance_check_psymtabs): Likewise.
208         * symfile.h (struct psymbol_allocation_list): Remove.
209         * symfile.c (reread_symbols): Adjust to vector change.
210         * dbxread.c (start_psymtab): Change type of parameters.
211         (dbx_symfile_read): Adjust to vector change.
212         (read_dbx_symtab): Likewise.
213         (start_psymtab): Change type of parameters.
214         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
215         (create_partial_symtab): Likewise.
216         (add_partial_symbol): Likewise.
217         (write_one_signatured_type): Likewise.
218         (recursively_write_psymbols): Likewise.
219         * mdebugread.c (parse_partial_symbols): Likewise.
220         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
221         (scan_xcoff_symtab): Adjust to vector change.
222         (xcoff_initial_scan): Likewise.
223
224 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
225
226         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
227
228 2017-10-13  Yao Qi  <yao.qi@linaro.org>
229
230         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
231         Remove s390x-*-expedite, add s390x-expedite.
232
233 2017-10-13  Yao Qi  <yao.qi@linaro.org>
234
235         * features/s390-gs-linux64.c: Regenerated.
236         * features/s390x-gs-linux64.c: Regenerated.
237
238 2017-10-13  Tom Tromey  <tom@tromey.com>
239
240         * compile/compile-object-run.c (do_module_cleanup): Use delete.
241         * solib.c (update_solib_list, reload_shared_libraries_1): Use
242         delete.
243         * symfile.c (symbol_file_add_with_addrs): Use new.
244         (symbol_file_add_separate): Update comment.
245         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
246         * jit.c (jit_object_close_impl): Use new.
247         (jit_unregister_code): Use delete.
248         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
249         (~objfile): Rename from free_objfile.
250         (free_objfile_separate_debug, do_free_objfile_cleanup)
251         (free_all_objfiles, objfile_purge_solibs): Use delete.
252         * objfiles.h (struct objfile): Add constructor and destructor.
253         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
254         (allocate_objfile, free_objfile): Don't declare.
255         (struct objstats): Add initializers.
256
257 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
258
259         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
260         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
261         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
262         * gdbarch.h: Regenerate.
263         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
264         Adjust comment.
265         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
266         (i386_displaced_step_fixup): Adjust comment.
267         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
268
269 2017-10-12  Tom Tromey  <tom@tromey.com>
270
271         * prologue-value.h (pv_area::store_would_trash): Return bool.
272         (pv_area::find_reg): Likewise.
273         * prologue-value.c (pv_area::store_would_trash): Return bool.
274         (pv_area::find_reg): Likewise.
275
276 2017-10-12  Tom Tromey  <tom@tromey.com>
277
278         * s390-linux-tdep.c (s390_store, s390_load)
279         (s390_check_for_saved, s390_analyze_prologue): Update.
280         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
281         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
282         * prologue-value.h (class pv_area): Move from prologue-value.c.
283         Change names of members.  Add constructor, destructor, member
284         functions.
285         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
286         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
287         (pv_area_fetch, pv_area_scan): Don't declare.
288         * prologue-value.c (struct pv_area::area_entry): Now member of
289         pv_area.
290         (struct pv_area): Move to prologue-value.h.
291         (pv_area::pv_area): Rename from make_pv_area.
292         (pv_area::~pv_area): Rename from free_pv_area.
293         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
294         (clear_entries, find_entry, overlaps, store_would_trash, store)
295         (fetch, find_reg, scan): Now member of pv_area.
296         Remove "area" argument.  Update.
297         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
298         Update.
299         * mn10300-tdep.c (push_reg, check_for_saved)
300         (mn10300_analyze_prologue): Update.
301         * mep-tdep.c (is_arg_spill, check_for_saved)
302         (mep_analyze_prologue): Update.
303         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
304         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
305         (m32c_is_struct_return, m32c_analyze_prologue): Update.
306         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
307         Update.
308         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
309         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
310
311 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
312
313         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
314         * linux-nat.c (linux_nat_delete_thread): New variable.
315         (lwp_free): Invoke linux_nat_delete_thread if set.
316         (linux_nat_set_delete_thread): New function.
317         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
318         thread delete callback.
319         * arm-linux-nat.c (arm_linux_delete_thread): New function.
320         (_initialize_arm_linux_nat): Assign thread delete callback.
321         * s390-linux-nat.c (s390_delete_thread): New function.
322         (_initialize_s390_nat): Assign thread delete callback.
323         * x86-linux-nat.c (x86_linux_add_target): Likewise.
324         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
325         function.
326         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
327         declaration.
328         * nat/x86-linux.c (x86_linux_delete_thread): New function.
329         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
330
331 2017-10-09  Tom Tromey  <tom@tromey.com>
332
333         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
334         std::string.
335         * tui/tui-layout.c (enum tui_status): Use std::string.
336
337 2017-10-11  Tom Tromey  <tom@tromey.com>
338
339         * gdbthread.h (thread_command): Constify.
340         * inferior.h (detach_command): Constify.
341         * top.h (set_history, show_history): Constify.
342         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
343         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
344         * bsd-kvm.c (bsd_kvm_cmd): Constify.
345         * printcmd.c (set_command): Constify.
346         (non_const_set_command): New function.
347         * dcache.c (set_dcache_command, show_dcache_command): Constify.
348         * breakpoint.c (enable_command, disable_command, delete_command)
349         (catch_command, tcatch_command, set_breakpoint_cmd)
350         (show_breakpoint_cmd): Constify.
351         * macrocmd.c (macro_command): Constify.
352         * infcmd.c (unset_command, kill_command, detach_command)
353         (info_proc_cmd): Constify.
354         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
355         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
356         (info_auto_load_cmd): Constify.
357         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
358         (unset_tdesc_cmd): Constify.
359         * ada-lang.c (set_ada_command, show_ada_command)
360         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
361         * guile/guile.c (set_guile_command, show_guile_command)
362         (info_guile_command): Constify.
363         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
364         Constify.
365         * skip.c (skip_command): Constify.
366         * compile/compile.c (_initialize_compile): Constify.
367         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
368         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
369         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
370         (maint_btrace_pt_show_cmd): Constify.
371         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
372         Constify.
373         * python/python.c (user_show_python, user_set_python): Constify.
374         * mips-tdep.c (set_mips_command, show_mips_command)
375         (set_mipsfpu_command): Constify.
376         * record-btrace.c (cmd_record_btrace_start)
377         (cmd_set_record_btrace, cmd_show_record_btrace)
378         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
379         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
380         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
381         Constify.
382         * symfile.c (overlay_command): Constify.
383         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
384         * cli/cli-logging.c (set_logging_command, show_logging_command):
385         Constify.
386         * cli/cli-dump.c (dump_command, append_command)
387         (srec_dump_command, ihex_dump_command, verilog_dump_command)
388         (tekhex_dump_command, binary_dump_command)
389         (binary_append_command): Constify.
390         * cli/cli-decode.c (struct cmd_list_element): Change type of
391         "fun".
392         * cli/cli-cmds.c (info_command, show_command, set_debug)
393         (show_debug): Constify.
394         (show_command): Add non-const overload.
395         * top.c (set_history, show_history): Constify.
396         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
397         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
398         * target.c (target_command): Constify.
399         * sparc64-tdep.c (info_adi_command): Constify.
400         * record-full.c (cmd_record_full_start): Constify.
401         (set_record_full_command): Constify.  Fix typo.
402         (show_record_full_command): Constify.
403         * thread.c (thread_command, thread_apply_command): Constify.
404         * memattr.c (dummy_cmd): Constify.
405         * value.c (function_command): Constify.
406         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
407         * probe.c (info_probes_command): Constify.
408         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
409         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
410         (show_thread_cmd, set_thread_default_cmd)
411         (show_thread_default_cmd): Constify.
412         (check_empty): Constify.
413         * tracepoint.c (tfind_command): Constify.
414         * cp-support.c (maint_cplus_command): Constify.
415         * windows-tdep.c (info_w32_command): Constify.
416         * record.c (cmd_record_start, set_record_command)
417         (show_record_command, info_record_command, cmd_record_goto):
418         Constify.
419         * ravenscar-thread.c (set_ravenscar_command)
420         (show_ravenscar_command): Constify.
421         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
422         Constify.
423         (add_internal_problem_command): Remove casts.
424         * arc-tdep.c (maintenance_print_arc_command): Constify.
425         * valprint.c (set_print, show_print, set_print_raw)
426         (show_print_raw): Constify.
427         * maint.c (maintenance_command, maintenance_info_command)
428         (maintenance_print_command, maintenance_set_cmd)
429         (maintenance_show_cmd, set_per_command_cmd)
430         (show_per_command_cmd, maintenance_check_command): Constify.
431         * language.c (set_check, show_check): Constify.
432         * typeprint.c (show_print_type, set_print_type): Constify.
433         * go32-nat.c (go32_info_dos_command): Constify.
434
435 2017-10-11  Tom Tromey  <tom@tromey.com>
436
437         * breakpoint.c (prepare_re_set_context): Remove.
438         (breakpoint_re_set_one): Update.  Don't use cleanups.
439         (breakpoint_re_set): Use scoped_restore, std::string, and
440         scoped_restore_current_language.
441
442 2017-10-11  Tom Tromey  <tom@tromey.com>
443
444         * breakpoint.c (commands_command_1): Use std::string.
445         (cleanup_executing_breakpoints): Remove.
446         (bpstat_do_actions_1): Use scoped_restore.
447         (bpstat_check_watchpoint): Use std::string.
448         (decode_static_tracepoint_spec): Likewise.
449         (break_range_command): Likewise.
450         (watch_command_1): Likewise.
451         (compare_breakpoints): Change argument types.
452         (clear_command): Use std::vector.
453         (cleanup_executing_breakpoints): Remove.
454         (update_global_location_list): Use unique_xmalloc_ptr.
455         (strace_command): Remove unused declaration.
456
457 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
458
459         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
460         * NEWS: Mention new FreeBSD/arm native configuration.
461         * configure.host: Add arm*-*-freebsd*.
462         * configure.nat: Likewise.
463         * arm-fbsd-nat.c: New file.
464
465 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
466
467         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
468         (ALLDEPFILES): Add arm-fbsd-tdep.c.
469         * NEWS: Mention new FreeBSD/arm target.
470         * configure.tgt: Add arm*-*-freebsd*.
471         * arm-fbsd-tdep.c: New file.
472         * arm-fbsd-tdep.h: New file.
473
474 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
475
476         * linux-tdep.c (linux_make_corefile_notes): Remove call to
477         `gdbarch_elfcore_write_linux_prpsinfo'.
478         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
479         method.
480         (elf_internal_linux_prpsinfo): Remove declaration.
481         * gdbarch.h: Regenerate.
482         * gdbarch.c: Regenerate.
483
484 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
485
486         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
487         `set_gdbarch_elfcore_write_linux_prpsinfo'.
488
489 2017-10-11  Pedro Alves  <palves@redhat.com>
490
491         * breakpoint.c (reattach_breakpoints): Delete.
492         * breakpoint.h (reattach_breakpoints): Delete.
493
494 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
495
496         * symfile.c (registered_sym_fns): Make struct, not typedef.
497         (DEF_VEC_O (registered_sym_fns)): Remove.
498         (symtab_fns): Change type to std::vector.
499         (add_symtab_fns): Adjust.
500         (find_sym_fns): Adjust.
501
502 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
503
504         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
505         * arc-tdep.h (arc_arch_is_em): New function.
506         (arc_arch_is_hs): Likewise.
507
508 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
509
510         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
511         parentheses in the declaration.
512         (macro_lookup_inclusion): Likewise.
513         (macro_lookup_definition): Likewise.
514         * p-lang.h (pascal_builtin_types): Likewise.
515         * tui/tui-data.c (tui_win_list): Likewise.
516         * tui/tui-data.h (tui_win_list): Likewise.
517         * utils.h (make_cleanup_free_section_addr_info): Likewise.
518
519 2017-10-11  Mark Rages  <markrages@gmail.com>
520
521         * target-memory.c (block_boundaries): Fix for block address not
522         aligned on block size.
523
524 2017-10-10  Pedro Alves <palves@redhat.com>
525             Tom Tromey  <tom@tromey.com>
526
527         * breakpoint.c (struct captured_breakpoint_query_args)
528         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
529         (print_breakpoint): New.
530         * breakpoint.h (print_breakpoint): Declare.
531         * common/common-exceptions.h (enum return_reason): Remove
532         references to catch_exceptions.
533         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
534         Delete.
535         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
536         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
537         * gdb.h: Delete.
538         * gdbthread.h (thread_select): Declare.
539         * mi/mi-cmd-break.c: Don't include gdb.h.
540         (breakpoint_notify): Use print_breakpoint.
541         * mi/mi-cmd-catch.c: Don't include gdb.h.
542         * mi/mi-interp.c: Don't include gdb.h.
543         (mi_print_breakpoint_for_event): New.
544         (mi_breakpoint_created, mi_breakpoint_modified): Use
545         mi_print_breakpoint_for_event.
546         * mi/mi-main.c: Don't include gdb.h.
547         (mi_cmd_thread_select): Parse the global thread ID here.  Use
548         thread_select instead of gdb_thread_select.
549         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
550         of using gdb_list_thread_ids.
551         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
552         FILEIO_ENOSYS here.
553         (remote_fileio_request): Use TRY/CATCH instead of
554         catch_exceptions.
555         * symfile-mem.c (struct symbol_file_add_from_memory_args)
556         (symbol_file_add_from_memory_wrapper): Delete.
557         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
558         * thread.c: Don't include gdb.h.
559         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
560         (thread_alive): Use thread_select.
561         (do_captured_thread_select): Delete, parts salvaged as ...
562         (thread_select): ... this new function.
563         (gdb_thread_select): Delete.
564
565 2017-10-10  Pedro Alves  <palves@redhat.com>
566             Tom Tromey  <tom@tromey.com>
567
568         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
569         and reverse logic.
570         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
571         No longer macros.  Instead ...
572         (enum wp_check_result): They're now values of this new
573         enumeration.
574         (watchpoint_check): Change return type to wp_check_result and
575         parameter type to bpstat.
576         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
577         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
578         catch_errors.  Reverse logic of watchpoint_check call.
579         (breakpoint_re_set_one): Now returns void and takes a breakpoint
580         pointer as parameter.
581         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
582         * common/common-exceptions.c (throw_exception_sjlj): Update
583         comments to avoid mentioning catch_errors.
584         * exceptions.c (catch_errors): Delete.
585         * exceptions.h: Update comments to avoid mentioning catch_errors.
586         (catch_errors_ftype, catch_errors): Delete.
587         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
588         (hook_stop_stub): Delete.
589         (restore_selected_frame): Change return type to void, and
590         parameter type to const frame_id &.
591         (restore_infcall_control_state): Use TRY/CATCH instead of
592         catch_errors.
593         * main.c (captured_command_loop): Return void and remove
594         parameter.  Remove references to catch_errors.
595         (captured_main): Use TRY/CATCH instead of catch_errors.
596         * objc-lang.c (objc_submethod_helper_data)
597         (find_objc_msgcall_submethod_helper): Delete.
598         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
599         catch_errors.
600         * record-full.c (record_full_message): Return void.
601         (record_full_message_args, record_full_message_wrapper): Delete.
602         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
603         instead of catch_errors.
604         * solib-aix.c (solib_aix_open_symbol_file_object): Change
605         parameter type to int.
606         * solib-darwin.c (open_symbol_file_object): Ditto.
607         * solib-dsbt.c (open_symbol_file_object): Ditto.
608         * solib-frv.c (open_symbol_file_object): Ditto.
609         * solib-svr4.c (open_symbol_file_object): Ditto.
610         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
611         * solib.c (update_solib_list): Use TRY/CATCH instead of
612         catch_errors.
613         * solist.h (struct target_so_ops) <open_symbol_file_object>:
614         Change type.
615         * symmisc.c (struct print_symbol_args): Remove.
616         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
617         (print_symbol): Change type.
618         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
619         and remove parameters.
620         (catch_errors): New.
621         (get_windows_debug_event): Adjust.
622
623 2017-10-09  Tom Tromey  <tom@tromey.com>
624
625         * mi/mi-main.c (free_splay_tree): Remove.
626         (list_available_thread_groups): Use splay_tree_up.
627         * common/gdb_splay_tree.h: New file.
628
629 2017-10-09  Tom Tromey  <tom@tromey.com>
630
631         * mi/mi-main.c (do_nothing): Remove.
632         (list_available_thread_groups): Update.
633
634 2017-10-09  Pedro Alves  <palves@redhat.com>
635
636         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
637         reading registers when switching context.
638
639 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
640
641         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
642         (fbsd_convert_siginfo): Likewise.
643         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
644
645 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
646
647         * configure.ac (try_guile_versions): Remove guile-2.2.
648         * configure: Regenerate.
649
650 2017-10-09  Tom Tromey  <tom@tromey.com>
651
652         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
653         (COMPILE.pre): Use $(CXX).
654
655 2017-10-09  Pedro Alves  <palves@redhat.com>
656
657         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
658         Use bool.
659         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
660         * cp-support.h (cp_remove_params): Now returns a
661         gdb::unique_xmalloc_ptr.
662         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
663         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
664         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
665         returning a gdb::unique_xmalloc_ptr.
666         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
667         * stack.c (find_frame_funname): Adjust to cp_remove_params
668         returning a gdb::unique_xmalloc_ptr.
669
670 2017-10-08  Tom Tromey  <tom@tromey.com>
671
672         * dwarf2read.c (dwarf2_get_dwz_file): Use
673         gdb::unique_xmalloc_ptr.
674         (find_slot_in_mapped_hash): Likewise.
675         (dwarf2_physname): Likewise.
676         (create_dwo_unit_in_dwp_v1): Use std::string.
677         (create_dwo_unit_in_dwp_v2): Likewise.
678         (lookup_dwo_cutu): Likewise.
679         (inherit_abstract_dies): Use std::vector.
680         (read_array_type): Likewise.
681         (dwarf_decode_macros): Remove unused declaration.
682         (unsigned_int_compar): Remove.
683         (dwarf2_build_psymtabs_hard): Use scoped_restore.
684         (psymtabs_addrmap_cleanup): Remove.
685
686 2017-10-08  Tom Tromey  <tom@tromey.com>
687
688         * frame-unwind.c (frame_unwind_try_unwinder): Update.
689         * frame.h (frame_cleanup_after_sniffer): Declare.
690         (frame_prepare_for_sniffer): Return void.
691         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
692         type of argument.
693         (frame_prepare_for_sniffer): Return void.
694
695 2017-10-08  Tom Tromey  <tom@tromey.com>
696
697         * utils.h (make_cleanup_value_free): Remove.
698         * utils.c (do_value_free, struct cleanup): Remove.
699         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
700         Use gdb_value_up.
701         * value.h (struct value_deleter): New.
702         (gdb_value_up): New typedef.
703
704 2017-10-08  Tom Tromey  <tom@tromey.com>
705
706         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
707         (make_cleanup_free_search_symbols): Remove.
708         (search_symbols): Return std::vector.
709         (symbol_search::compare_search_syms): Now member of
710         symbol_search.  Change arguments.
711         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
712         (symtab_symbol_info, rbreak_command): Update.
713         * symtab.h (struct symbol_search) <next>: Remove.
714         Add constructors.
715         (symbol_search::operator<): New function.
716         (symbol_search::operator==): New function.
717         (search_symbols): Remove std::vector.
718         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
719         (symbol_search::compare_search_syms): Declare.
720
721 2017-10-06  Yao Qi  <yao.qi@linaro.org>
722
723         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
724         arch/aarch64-insn.o.
725         Remove one rule.
726         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
727
728 2017-10-06  Yao Qi  <yao.qi@linaro.org>
729
730         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
731         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
732         arch/arm-linux.o respectively.
733         * configure.tgt: Likewise.
734
735 2017-10-06  Yao Qi  <yao.qi@linaro.org>
736
737         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
738         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
739
740 2017-10-06  Pedro Alves  <palves@redhat.com>
741
742         * windows-nat.c: Include <algorithm>.
743
744 2017-10-06  Yao Qi  <yao.qi@linaro.org>
745
746         * configure.tgt (i386_tobjs): New variable.
747         (amd64_tobjs): New variable.
748         Set $cpu_obs and $os_obs.
749
750 2017-10-06  Yao Qi  <yao.qi@linaro.org>
751
752         * Makefile.in (CONFIG_SRC_SUBDIR): New.
753         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
754         (clean): Remove object files and dependency files.
755         (distclean): Remove the directory.
756         * configure.ac: Invoke AC_CONFIG_COMMANDS.
757         * configure: Re-generated.
758         * configure.tgt: Replace amd64.o with arch/amd64.o.
759
760 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
761
762         PR build/22188
763         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
764         and SETEND.
765
766 2017-10-05  Pedro Alves  <palves@redhat.com>
767
768         * linux-nat.c (linux_child_follow_fork): When following the parent
769         and detaching the child, consult the parent thread's architecture
770         instead of the child's.
771
772 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
773
774         * ax.h: Do not include "doublest.h".
775         (union agent_val): Remove.
776
777 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
778
779         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
780         (decimal_to_string): Return std::string object.
781         (decimal_from_string): Accept std::string object.  Return bool.
782         (decimal_from_integral, decimal_from_doublest): Remove.
783         (decimal_from_longest): Add prototype.
784         (decimal_from_ulongest): Likewise.
785         (decimal_to_longest): Likewise.
786         (decimal_from_doublest): Likewise.
787         * dfp.c: Do not include "gdbtypes.h" or "value.h".
788         (MAX_DECIMAL_STRING): Move here.
789         (decimal_to_string): Return std::string object.
790         (decimal_from_string): Accept std::string object.  Return bool.
791         (decimal_from_integral): Remove, replace by ...
792         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
793         (decimal_to_longest): New function.
794         (decimal_from_floating): Remove, replace by ...
795         (decimal_from_doublest): ... this new function.
796         (decimal_to_doublest): Update to new decimal_to_string interface.
797
798         * value.c (unpack_long): Use decimal_to_longest.
799         * valops.c (value_cast): Use decimal_from_doublest instead of
800         decimal_from_floating.  Use decimal_from_[u]longest isntead of
801         decimal_from_integral.
802         * valarith.c (value_args_as_decimal): Likewise.
803         * valprint.c (print_decimal_floating): Update to new
804         decimal_to_string interface.
805         * printcmd.c (printf_decfloat): Likewise.
806         * c-exp.y (parse_number): Update to new decimal_from_string interface.
807
808 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
809
810         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
811         * gdbtypes.c: Include "floatformat.h".
812         * value.c: Likewise.
813         * m68k-tdep.c: Likewise.
814
815         * findvar.c: Do not include "floatformat.h".
816         * amd64-darwin-tdep.c: Likewise.
817         * arm-linux-tdep.c: Likewise.
818         * i386-darwin-tdep.c: Likewise.
819         * i387-tdep.c: Likewise.
820         * m68k-linux-tdep.c: Likewise.
821         * mep-tdep.c: Likewise.
822         * mips-tdep.c: Likewise.
823         * nios2-tdep.c: Likewise.
824         * s390-linux-tdep.c: Likewise.
825         * sparc-obsd-tdep.c: Likewise.
826         * sparc-tdep.c: Likewise.
827         * sparc64-tdep.c: Likewise.
828         * spu-tdep.c: Likewise.
829         * tic6x-tdep.c: Likewise.
830         * tilegx-tdep.c: Likewise.
831         * vax-tdep.c: Likewise.
832         * xstormy16-tdep.c: Likewise.
833         * xtensa-tdep.c: Likewise.
834
835         * top.c: Do not include "doublest.h".
836         * aarch64-tdep.c: Likewise.
837         * alpha-tdep.c: Likewise.
838         * arm-linux-tdep.c: Likewise.
839         * m68k-linux-tdep.c: Likewise.
840         * tilegx-tdep.c: Likewise.
841         * xstormy16-tdep.c: Likewise.
842
843 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
844
845         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
846         (mipsn32_fbsd_sigframe): Define.
847         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
848         for FreeBSD/mipsn32.
849
850 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
851
852         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
853         AT_HWCAP.
854
855 2017-10-05  Tristan Gingold  <tgingold@free.fr>
856
857         * MAINTAINERS (Misc): Update my email address.
858
859 2017-10-04  Pedro Alves  <palves@redhat.com>
860
861         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
862         it instead of target_gdbarch.
863         (get_remote_state, get_remote_packet_size): Adjust
864         get_remote_arch_state calls, passing down target_gdbarch
865         explicitly.
866         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
867         'gdbarch' and use it instead of target_gdbarch.
868         (get_memory_packet_size): Adjust get_remote_arch_state calls,
869         passing down target_gdbarch explicitly.
870         (struct stop_reply) <arch>: New field.
871         (remote_parse_stop_reply): Use the stopped thread's architecture,
872         not the current inferior's.  Save the architecture in the
873         stop_reply.
874         (process_stop_reply): Use the stop reply's architecture.
875         (process_g_packet, remote_fetch_registers)
876         (remote_prepare_to_store, store_registers_using_G)
877         (remote_store_registers): Adjust get_remote_arch_state calls,
878         using the regcache's architecture.
879         (remote_get_trace_status): Adjust get_remote_arch_state calls,
880         passing down target_gdbarch explicitly.
881         * spu-multiarch.c (spu_thread_architecture): Defer to the target
882         beneath instead of calling target_gdbarch.
883         * target.c (default_thread_architecture): Use the specified
884         inferior's architecture, instead of the current inferior's
885         architecture (via target_gdbarch).
886
887 2017-10-04  Pedro Alves  <palves@redhat.com>
888
889         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
890         case.
891         (regcache_print): Handle !target_has_registers here instead.
892
893 2017-10-04  Pedro Alves  <palves@redhat.com>
894
895         * frame.c (create_test_frame): Delete.
896         * frame.h (create_test_frame): Delete.
897         * gdbarch-selftests.c: Include gdbthread.h and target.h.
898         (class regcache_test): Delete.
899         (test_target_has_registers, test_target_has_stack)
900         (test_target_has_memory, test_target_prepare_to_store)
901         (test_target_store_registers): New functions.
902         (test_target_ops): New class.
903         (register_to_value_test): Error out if there's already a
904         process_stratum (or higher) target pushed.  Create a fuller mock
905         environment, with mock target_ops, inferior, address space, thread
906         and inferior_ptid.
907         * progspace.c (struct address_space): Move to ...
908         * progspace.h (struct address_space): ... here.
909         * regcache.h (regcache::~regcache, regcache::raw_write)
910         [GDB_SELF_TEST]: No longer virtual.
911
912 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
913
914         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
915
916 2017-10-04  Pedro Alves  <palves@redhat.com>
917
918         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
919         out of 'between TRY and CATCH'.
920
921 2017-10-04  Pedro Alves  <palves@redhat.com>
922
923         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
924         * common/common-exceptions.h (TRY): Open an outermost scope.
925         Expand intro comment.
926         (CATCH): Reindent.
927         (END_CATCH): Close the outermost scope.
928         * completer.c (complete_line_internal): Add missing END_CATCH.
929
930 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
931
932         * NEWS (Changes since GDB 8.0): Add entry about new
933         'set-cwd-on-gdbserver' feature.
934         (New remote packets): Add entry for QSetWorkingDir.
935         * common/common-inferior.h (set_inferior_cwd): New prototype.
936         * infcmd.c (set_inferior_cwd): Remove "static".
937         (show_cwd_command): Expand text to include remote debugging.
938         * remote.c: Add PACKET_QSetWorkingDir.
939         (remote_protocol_features) <QSetWorkingDir>: New entry for
940         PACKET_QSetWorkingDir.
941         (extended_remote_set_inferior_cwd): New function.
942         (extended_remote_create_inferior): Call
943         "extended_remote_set_inferior_cwd".
944         (_initialize_remote): Call "add_packet_config_cmd" for
945         QSetWorkingDir.
946
947 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
948
949         * NEWS (New commands): Mention "set/show cwd".
950         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
951         "cd" command's help text.
952         * common/common-inferior.h (get_inferior_cwd): New prototype.
953         * infcmd.c (inferior_cwd_scratch): New global variable.
954         (set_inferior_cwd): New function.
955         (get_inferior_cwd): Likewise.
956         (set_cwd_command): Likewise.
957         (show_cwd_command): Likewise.
958         (_initialize_infcmd): Add "set/show cwd" commands.
959         * inferior.h (class inferior) <cwd>: New field.
960         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
961         (fork_inferior): Change inferior's cwd before its execution.
962         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
963         to CreateProcess.
964
965 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
966
967         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
968         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
969         (COMMON_OBS): Add gdb_tilde_expand.o.
970         * common/gdb_tilde_expand.c: New file.
971         * common/gdb_tilde_expand.h: Likewise.
972
973 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
974
975         * gdbarch.sh (objfile): Remove duplicate declaration.
976         * gdbarch.h: Regenerate.
977
978 2017-10-03  Tom Tromey  <tom@tromey.com>
979
980         * utils.c (internal_vproblem): Use string_vprintf.
981
982 2017-10-03  Tom Tromey  <tom@tromey.com>
983
984         * printcmd.c (info_symbol_command): Use std::string.
985
986 2017-10-03  Tom Tromey  <tom@tromey.com>
987
988         * top.c (gdb_safe_append_history): Use std::string.
989
990 2017-10-03  Tom Tromey  <tom@tromey.com>
991
992         * event-top.c (stdin_event_handler): Update.
993         * main.c (captured_main_1): Update.
994         * top.h (make_delete_ui_cleanup): Remove.
995         (struct ui): Add constructor and destructor.
996         (new_ui, delete_ui): Remove.
997         * top.c (make_delete_ui_cleanup): Remove.
998         (new_ui_command): Use std::unique_ptr.
999         (delete_ui_cleanup): Remove.
1000         (ui::ui): Rename from new_ui.  Update.
1001         (free_ui): Remove.
1002         (ui::~ui): Rename from delete_ui.  Update.
1003
1004 2017-10-03  Tom Tromey  <tom@tromey.com>
1005
1006         * symfile.c (load_progress): Use gdb::byte_vector.
1007
1008 2017-10-03  Tom Tromey  <tom@tromey.com>
1009
1010         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1011         declaration.
1012         * printcmd.c (x_command): Remove unused declaration.
1013         * symfile.c (symbol_file_command): Remove unused declaration.
1014
1015 2017-10-03  Tom Tromey  <tom@tromey.com>
1016
1017         * utils.c (internal_vproblem): Use std::string.
1018         (defaulted_query): Likewise.
1019
1020 2017-10-03  Tom Tromey  <tom@tromey.com>
1021
1022         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1023         * top.c (execute_command_to_string): Update.
1024         * utils.c (make_cleanup_restore_page_info): Remove.
1025         (do_restore_page_info_cleanup): Remove.
1026         (set_batch_flag_and_restore_page_info):
1027         New.
1028         (make_cleanup_restore_page_info): Remove.
1029         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1030         (~set_batch_flag_and_restore_page_info): New
1031         (make_cleanup_restore_uinteger): Remove.
1032         (make_cleanup_restore_integer): Remove.
1033         (struct restore_integer_closure): Remove.
1034         (restore_integer): Remove.
1035         * utils.h (struct set_batch_flag_and_restore_page_info): New
1036         class.
1037         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1038         (make_cleanup_restore_page_info): Remove.
1039         (make_cleanup_restore_uinteger) Remove.
1040         (make_cleanup_restore_integer) Remove.
1041
1042 2017-10-03  Tom Tromey  <tom@tromey.com>
1043
1044         * record-full.h (record_full_gdb_operation_disable_set): Return
1045         scoped_restore_tmpl<int>.
1046         * infrun.c (adjust_pc_after_break): Update.
1047         (handle_signal_stop): Update.
1048         * record-full.c (record_full_gdb_operation_disable_set): Return
1049         scoped_restore_tmpl<int>.
1050         (record_full_wait_1, record_full_insert_breakpoint)
1051         (record_full_remove_breakpoint, record_full_save)
1052         (record_full_goto_insn): Update.
1053
1054 2017-10-02  Tom Tromey  <tom@tromey.com>
1055
1056         PR rust/22236:
1057         * rust-lang.c (rust_val_print_str): New function.
1058         (val_print_struct): Call it.
1059         (rust_subscript): Preserve name of slice type.
1060
1061 2017-10-02  Tom Tromey  <tom@tromey.com>
1062
1063         * rust-lang.c (rust_subscript): Handle slices in
1064         EVAL_AVOID_SIDE_EFFECTS case.
1065
1066 2017-10-02  Tom Tromey  <tom@tromey.com>
1067
1068         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1069
1070 2017-10-02  Tom Tromey  <tom@tromey.com>
1071
1072         * rust-lang.h (rust_slice_type): Add "extern".
1073
1074 2017-10-02  Tom Tromey  <tom@tromey.com>
1075             Pedro Alves  <palves@redhat.com>
1076
1077         * ada-lang.h (ada_exc_info::operator<): Make const.
1078         (ada_exc_info::operator==): Make const.
1079         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1080         Make const.
1081
1082 2017-09-29  Tom Tromey  <tom@tromey.com>
1083
1084         * target.c (read_whatever_is_readable): Change type of "result".
1085         Update.
1086         (free_memory_read_result_vector): Remove.
1087         (read_memory_robust): Change return type.  Update.
1088         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1089         bin2hex, std::string.
1090         * target.h (memory_read_result_s): Remove typedef.
1091         (free_memory_read_result_vector): Remove.
1092         (read_memory_robust): Return std::vector.
1093
1094 2017-09-29  Tom Tromey  <tom@tromey.com>
1095
1096         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1097
1098 2017-09-29  Tom Tromey  <tom@tromey.com>
1099
1100         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1101         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1102         operator< and operator==.
1103         (ada_exceptions_list): Return a std::vector.
1104         * ada-lang.c (ada_exc_info::operator<): Rename from
1105         compare_ada_exception_info.
1106         (ada_exc_info::operator==): New.
1107         (sort_remove_dups_ada_exceptions_list): Change type of
1108         "exceptions".
1109         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1110         (ada_add_global_exceptions): Likewise.
1111         (ada_exceptions_list_1): Return a std::vector.
1112         (ada_exceptions_list): Likewise.
1113
1114 2017-09-29  Tom Tromey  <tom@tromey.com>
1115
1116         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1117         'std::set *'.
1118         (print_one_inferior): Update.
1119         (free_vector_of_ints): Remove.
1120         (list_available_thread_groups): Change "ids" to std::set.
1121         (mi_cmd_list_thread_groups): Update.
1122         (struct collect_cores_data) <core>: Now a std::set.
1123         (collect_cores): Update.
1124         (unique): Remove.
1125         (print_one_inferior): Update.
1126
1127 2017-09-29  Tom Tromey  <tom@tromey.com>
1128
1129         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1130         (mi_execute_async_cli_command): Likewise.
1131         (mi_cmd_trace_frame_collected): Use field_fmt.
1132
1133 2017-09-29  Tom Tromey  <tom@tromey.com>
1134
1135         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1136         gdb::byte_vector.
1137
1138 2017-09-29  Tom Tromey  <tom@tromey.com>
1139
1140         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1141
1142 2017-09-29  Tom Tromey  <tom@tromey.com>
1143
1144         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1145
1146 2017-09-29  Tom Tromey  <tom@tromey.com>
1147
1148         * varobj.h (varobj_gen_name): Return std::string.
1149         * varobj.c (varobj_gen_name): Return std::string.
1150         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1151         (mi_cmd_var_delete): Don't copy "name".
1152
1153 2017-09-29  Tom Tromey  <tom@tromey.com>
1154
1155         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1156         (mi_cmd_break_insert_1): Update.
1157
1158 2017-09-29  Tom Tromey  <tom@tromey.com>
1159
1160         * target.h (make_scoped_defer_target_commit_resume): Update.
1161         * target.c (make_scoped_defer_target_commit_resume): Rename from
1162         make_cleanup_defer_target_commit_resume.  Return a
1163         scoped_restore.
1164         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1165
1166 2017-09-29  Tom Tromey  <tom@tromey.com>
1167
1168         * main.c (captured_main_1): Remove unused declaration.
1169         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1170
1171 2017-09-29  Tom Tromey  <tom@tromey.com>
1172
1173         * symtab.c (search_symbols): Remove unused outer cleanup.
1174         (make_source_files_completion_list): Remove unused declaration.
1175
1176 2017-09-29  Tom Tromey  <tom@tromey.com>
1177
1178         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1179
1180 2017-09-29  Tom Tromey  <tom@tromey.com>
1181
1182         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1183         gdb::byte_vector.
1184
1185 2017-09-29  Tom Tromey  <tom@tromey.com>
1186
1187         * complaints.c (vcomplaint): Use std::string.
1188
1189 2017-09-29  Tom Tromey  <tom@tromey.com>
1190
1191         * tracepoint.c (trace_variable_command): Use std::string.
1192         (encode_actions_1): Remove unused declarations.
1193         (create_tsv_from_upload): Use std::string.
1194
1195 2017-09-29  Tom Tromey  <tom@tromey.com>
1196
1197         * cp-support.c (gdb_demangle): Use std::string.
1198
1199 2017-09-29  Tom Tromey  <tom@tromey.com>
1200
1201         * stack.c (parse_frame_specification): Use std::string
1202         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1203
1204 2017-09-29  Tom Tromey  <tom@tromey.com>
1205
1206         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1207
1208 2017-09-29  Tom Tromey  <tom@tromey.com>
1209
1210         * utils.c (vfprintf_maybe_filtered): Use std::string.
1211         (vfprintf_unfiltered): Likewise.
1212
1213 2017-09-29  Tom Tromey  <tom@tromey.com>
1214
1215         * event-top.c (top_level_prompt): Return std::string.
1216         (display_gdb_prompt): Update.
1217
1218 2017-09-29  Tom Tromey  <tom@tromey.com>
1219
1220         * unittests/common-utils-selftests.c (format): New function.
1221         (string_vprintf_tests): New function.
1222         (_initialize_common_utils_selftests): Register new tests.
1223         * common/common-utils.c (string_vprintf): New function.
1224         * common/common-utils.h (string_vprintf): Declare.
1225
1226 2017-09-29  Pedro Alves  <palves@redhat.com>
1227
1228         * common/rsp-low.c (unpack_varlen_hex): Constify.
1229         * common/rsp-low.h (unpack_varlen_hex): Constify.
1230         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1231         Constify.
1232         * remote.c (remote_set_permissions, read_ptid)
1233         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1234         (remote_static_tracepoint_marker_at)
1235         (remote_static_tracepoint_markers_by_strid)
1236         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1237         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1238         (parse_tracepoint_definition, parse_tsv_definition)
1239         (parse_static_tracepoint_marker_definition): Constify.
1240         * tracepoint.h (parse_static_tracepoint_marker_definition)
1241         (parse_trace_status, parse_tracepoint_status)
1242         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1243
1244 2017-09-29  Pedro Alves  <palves@redhat.com>
1245
1246         * remote.c (target_buf, target_buf_size): Delete.
1247         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1248         Use the connection's packet buffer instead.
1249         All callers adjusted.
1250         (_initialize_remote): Remove references to target_buf and
1251         target_buf_size.
1252
1253 2017-09-28  Pedro Alves  <palves@redhat.com>
1254
1255         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1256         unittests/common-utils-selftests.c.
1257         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1258         (COMMON_OBS): Remove utils-selftests.o.
1259         * utils-selftests.c: Move to ...
1260         * unittests/common-utils-selftests.c: ... here and rename self
1261         test to "string_printf".
1262
1263 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1264
1265         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1266         having NULL cus or tus.
1267
1268 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1269
1270         * arm-tdep.c: (convert_from_extended): Remove.
1271         (convert_to_extended): Likewise.
1272         (arm_extract_return_value): Use convert_typed_floating.
1273         (arm_store_return_value): Likewise.
1274
1275         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1276         * sh-tdep.c: Do not include "floatformat.h".
1277         (sh_littlebyte_bigword_type): New function.
1278         (sh_register_convert_to_virtual): Use convert_typed_floating.
1279         (sh_register_convert_to_raw): Likewise.
1280         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1281         (sh64_littlebyte_bigword_type): New function.
1282         (sh64_extract_return_value): Use convert_typed_floating.
1283         (sh64_register_convert_to_virtual): Likewise.
1284         (sh64_register_convert_to_raw): Likewise.
1285
1286 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1287
1288         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1289         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1290
1291         * gdbtypes.h (union type_specific): Make field floatformat hold
1292         just a single struct floatformat, not an array.
1293         (floatformat_from_type): Move here.
1294         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1295         changed TYPE_FLOATFORMAT definition.
1296         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1297         (recursive_dump_type): Likewise.
1298         (init_float_type): Install correct floatformat for byte order.
1299         (arch_float_type): Likewise.
1300
1301 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1302
1303         * gdbtypes.c (init_type): Change incoming argument from
1304         length-in-bytes to length-in-bits.  Assert length is a
1305         multiple of TARGET_CHAR_BITS.
1306         (arch_type, arch_flags_type): Likewise.
1307         (init_integer_type): Update call to init_type.
1308         (init_character_type): Likewise.
1309         (init_boolean_type): Likewise.
1310         (init_float_type): Likewise.
1311         (init_decfloat_type): Likewise.
1312         (init_complex_type): Likewise.
1313         (init_pointer_type): Likewise.
1314         (objfile_type): Likewise.
1315         (arch_integer_type): Update call to arch_type.
1316         (arch_character_type): Likewise.
1317         (arch_boolean_type): Likewise.
1318         (arch_float_type): Likewise.
1319         (arch_decfloat_type): Likewise.
1320         (arch_complex_type): Likewise.
1321         (arch_pointer_type): Likewise.
1322         (gdbtypes_post_init): Likewise.
1323
1324         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1325         (read_base_type): Likewise.
1326         * mdebugread.c (basic_type): Likewise.
1327         * stabsread.c (dbx_init_float_type): Likewise.
1328         (rs6000_builtin_type): Likewise.
1329         (read_range_type): Likewise.  Also, fix call to init_integer_type
1330         with erroneous length argument.
1331
1332         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1333         * d-lang.c (build_d_types): Likewise.
1334         * f-lang.c (build_fortran_types): Likewise.
1335         * go-lang.c (build_go_types): Likewise.
1336         * opencl-lang.c (build_opencl_types): Likewise.
1337         * jit.c (finalize_symtab): Likewise.
1338         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1339         (build_std_type_info_type): Likewise.
1340         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1341         update call to arch_flags_type.
1342
1343         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1344         arch_type.
1345         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1346         * windows-tdep.c (windows_get_tlb_type): Likewise.
1347
1348         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1349         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1350         * m32c-tdep.c (make_types): Likewise.
1351         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1352         (rl78_psw_type): Update call to arch_flags_type.
1353         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1354         * rx-tdep.c (rx_psw_type): Likewise.
1355         (rx_fpsw_type): Likewise.
1356         * sparc-tdep.c (sparc_psr_type): Likewise.
1357         (sparc_fsr_type): Likewise.
1358         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1359         (sparc64_ccr_type): Likewise.
1360         (sparc64_fsr_type): Likewise.
1361         (sparc64_fprs_type): Likewise.
1362
1363 2017-09-27  Tom Tromey  <tom@tromey.com>
1364
1365         * findcmd.c (find_command): Constify.
1366
1367 2017-09-27  Tom Tromey  <tom@tromey.com>
1368
1369         * ada-tasks.c (task_command_1, task_command): Constify.
1370
1371 2017-09-27  Tom Tromey  <tom@tromey.com>
1372
1373         * symtab.c (maintenance_print_symbol_cache)
1374         (maintenance_flush_symbol_cache)
1375         (maintenance_print_symbol_cache_statistics): Constify.
1376
1377 2017-09-27  Tom Tromey  <tom@tromey.com>
1378
1379         * inferior.c (detach_inferior_command, kill_inferior_command)
1380         (inferior_command): Constify.
1381
1382 2017-09-27  Tom Tromey  <tom@tromey.com>
1383
1384         * regcache.c (regcache_print, maintenance_print_registers)
1385         (maintenance_print_raw_registers)
1386         (maintenance_print_cooked_registers)
1387         (maintenance_print_register_groups)
1388         (maintenance_print_remote_registers): Constify.
1389
1390 2017-09-27  Tom Tromey  <tom@tromey.com>
1391
1392         * printcmd.c (map_display_numbers, undisplay_command)
1393         (enable_disable_display_command, enable_display_command)
1394         (disable_display_command): Constify.
1395
1396 2017-09-27  Tom Tromey  <tom@tromey.com>
1397
1398         * breakpoint.h (delete_command): Don't declare.
1399         * breakpoint.c (delete_command, enable_once_command)
1400         (enable_count_command, enable_delete_command, breakpoint_1)
1401         (maintenance_info_breakpoints, stopin_command, stopat_command)
1402         (delete_command, delete_trace_command, save_breakpoints)
1403         (save_breakpoints_command, save_tracepoints_command): Constify.
1404
1405 2017-09-27  Tom Tromey  <tom@tromey.com>
1406
1407         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1408         (skip_ws, extract_identifier, macro_define_command)
1409         (macro_undef_command, macro_list_command): Constify.
1410
1411 2017-09-27  Tom Tromey  <tom@tromey.com>
1412
1413         * infcmd.c (environment_info, set_environment_command)
1414         (unset_environment_command, path_info, info_proc_cmd_1)
1415         (info_proc_cmd_mappings, info_proc_cmd_stat)
1416         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1417         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1418
1419 2017-09-27  Tom Tromey  <tom@tromey.com>
1420
1421         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1422         Constify.
1423
1424 2017-09-27  Tom Tromey  <tom@tromey.com>
1425
1426         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1427
1428 2017-09-27  Tom Tromey  <tom@tromey.com>
1429
1430         * demangle.c (demangle_command): Constify.
1431
1432 2017-09-27  Tom Tromey  <tom@tromey.com>
1433
1434         * progspace.c (maintenance_info_program_spaces_command):
1435         Constify.
1436
1437 2017-09-27  Tom Tromey  <tom@tromey.com>
1438
1439         * compile/compile.c (check_raw_argument, compile_file_command)
1440         (compile_code_command, compile_print_command): Constify.
1441
1442 2017-09-27  Tom Tromey  <tom@tromey.com>
1443
1444         * reggroups.c (maintenance_print_reggroups): Constify.
1445
1446 2017-09-27  Tom Tromey  <tom@tromey.com>
1447
1448         * dwarf2read.c (save_gdb_index_command): Constify.
1449
1450 2017-09-27  Tom Tromey  <tom@tromey.com>
1451
1452         * stap-probe.c (info_probes_stap_command): Constify.
1453
1454 2017-09-27  Tom Tromey  <tom@tromey.com>
1455
1456         * fork-child.c (unset_exec_wrapper_command): Constify.
1457
1458 2017-09-27  Tom Tromey  <tom@tromey.com>
1459
1460         * btrace.c (get_uint, get_context_size, no_chunk)
1461         (maint_btrace_packet_history_cmd)
1462         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1463         (maint_info_btrace_cmd): Constify.
1464
1465 2017-09-27  Tom Tromey  <tom@tromey.com>
1466
1467         * reverse.c (delete_bookmark_command): Constify.
1468
1469 2017-09-27  Tom Tromey  <tom@tromey.com>
1470
1471         * remote.c (set_memory_packet_size)
1472         (set_memory_write_packet_size, show_memory_write_packet_size)
1473         (set_memory_read_packet_size, show_memory_read_packet_size)
1474         (compare_sections_command, packet_command, remote_put_command)
1475         (remote_get_command, remote_delete_command): Constify.
1476
1477 2017-09-27  Tom Tromey  <tom@tromey.com>
1478
1479         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1480         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1481         (set_mipsfpu_auto_command): Constify.
1482
1483 2017-09-27  Tom Tromey  <tom@tromey.com>
1484
1485         * cli/cli-cmds.h (cd_command): Constify.
1486         * cli/cli-cmds.c (cd_command): Constify.
1487
1488 2017-09-27  Tom Tromey  <tom@tromey.com>
1489
1490         * thread.c (thread_name_command, thread_find_command): Constify.
1491
1492 2017-09-27  Tom Tromey  <tom@tromey.com>
1493
1494         * probe.c (enable_probes_command, disable_probes_command):
1495         Constify.
1496
1497 2017-09-27  Tom Tromey  <tom@tromey.com>
1498
1499         * symfile.c (symbol_file_command): Constify.
1500         * gdbcore.h (deprecated_file_changed_hook): Constify.
1501         * exec.c (deprecated_file_changed_hook, exec_file_command)
1502         (file_command): Constify.
1503         * defs.h (symbol_file_command): Constify.
1504
1505 2017-09-27  Tom Tromey  <tom@tromey.com>
1506
1507         * remote-fileio.c (set_system_call_allowed)
1508         (show_system_call_allowed): Constify.
1509
1510 2017-09-27  Tom Tromey  <tom@tromey.com>
1511
1512         * tracepoint.c (delete_trace_variable_command)
1513         (tfind_end_command, tfind_start_command, tfind_pc_command)
1514         (tfind_tracepoint_command, tfind_line_command)
1515         (tfind_range_command, tfind_outside_command): Constify.
1516
1517 2017-09-27  Tom Tromey  <tom@tromey.com>
1518
1519         * ax-gdb.c (maint_agent_printf_command, agent_command)
1520         (agent_eval_command): Constify.
1521
1522 2017-09-27  Tom Tromey  <tom@tromey.com>
1523
1524         * tracepoint.c (info_scope_command): Constify.
1525         * python/python.c (gdbpy_decode_line): Constify.
1526         * python/py-breakpoint.c (bppy_init): Constify.
1527         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1528         * location.h: (new_linespec_location)
1529         (string_to_event_location_basic, string_to_event_location):
1530         Constify.
1531         * location.c (new_linespec_location)
1532         (string_to_event_location_basic, string_to_event_location):
1533         Constify.
1534         * linespec.h (decode_line_with_current_source)
1535         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1536         * linespec.c (linespec_lex_to_end)
1537         (decode_line_with_current_source)
1538         (decode_line_with_last_displayed): Constify.
1539         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1540         Constify.
1541         * cli/cli-cmds.c (edit_command, list_command): Constify.
1542         * breakpoint.h (until_break_command, watch_command_wrapper)
1543         (awatch_command_wrapper, rwatch_command_wrapper)
1544         (init_ada_exception_breakpoint): Constify.
1545         * breakpoint.c (break_command_1, dprintf_command)
1546         (break_range_command, watch_command_wrapper)
1547         (rwatch_command_wrapper, awatch_command_wrapper)
1548         (until_break_command, init_ada_exception_breakpoint)
1549         (strace_marker_create_sals_from_location, trace_command)
1550         (ftrace_command, strace_command, struct tracepoint): Constify.
1551         * ax-gdb.c (agent_command_1): Constify.
1552         * ada-lang.c (ada_exception_sal): Constify.
1553
1554 2017-09-27  Tom Tromey  <tom@tromey.com>
1555
1556         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1557         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1558         (get_context_size, no_chunk, get_insn_history_modifiers)
1559         (cmd_record_insn_history, get_call_history_modifiers)
1560         (cmd_record_call_history): Constify.
1561
1562 2017-09-27  Tom Tromey  <tom@tromey.com>
1563
1564         * source.c (show_substitute_path_command)
1565         (unset_substitute_path_command, set_substitute_path_command):
1566         Constify.
1567
1568 2017-09-27  Tom Tromey  <tom@tromey.com>
1569
1570         * typeprint.c (maintenance_print_type): Constify.
1571         * maint.c (maintenance_dump_me, maintenance_demangle)
1572         (maintenance_time_display, maintenance_info_sections)
1573         (maintenance_print_statistics, maintenance_deprecate)
1574         (maintenance_undeprecate): Constify.
1575         (maintenance_do_deprecate): Constify.  Use std::string.
1576         (maintenance_selftest): Constify.
1577         * gdbtypes.h (maintenance_print_type): Constify.
1578
1579 2017-09-27  Tom Tromey  <tom@tromey.com>
1580
1581         * hppa-tdep.c (unwind_command): Constify.
1582
1583 2017-09-27  Tom Tromey  <tom@tromey.com>
1584
1585         * target-descriptions.c (unset_tdesc_filename_cmd)
1586         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1587         Constify.
1588
1589 2017-09-27  Tom Tromey  <tom@tromey.com>
1590
1591         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1592
1593 2017-09-27  Tom Tromey  <tom@tromey.com>
1594
1595         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1596
1597 2017-09-27  Tom Tromey  <tom@tromey.com>
1598
1599         * tui/tui-regs.c (tui_reg_command): Constify.
1600
1601 2017-09-27  Tom Tromey  <tom@tromey.com>
1602
1603         * skip.c (skip_file_command, skip_function_command)
1604         (skip_enable_command, skip_disable_command, skip_delete_command):
1605         Constify.
1606
1607 2017-09-27  Tom Tromey  <tom@tromey.com>
1608
1609         * record-btrace.c (cmd_record_btrace_bts_start)
1610         (cmd_record_btrace_pt_start): Constify.
1611
1612 2017-09-27  Tom Tromey  <tom@tromey.com>
1613
1614         * symmisc.c (maintenance_print_symbols)
1615         (maintenance_print_msymbols, maintenance_print_objfiles)
1616         (maintenance_info_symtabs, maintenance_check_symtabs)
1617         (maintenance_expand_symtabs, maintenance_info_line_tables):
1618         Constify.
1619
1620 2017-09-27  Tom Tromey  <tom@tromey.com>
1621
1622         * top.c (new_ui_command): Constify.
1623
1624 2017-09-27  Tom Tromey  <tom@tromey.com>
1625
1626         * symfile.c (add_symbol_file_command)
1627         (remove_symbol_file_command, list_overlays_command)
1628         (map_overlay_command, unmap_overlay_command)
1629         (overlay_auto_command, overlay_manual_command)
1630         (overlay_off_command, overlay_load_command): Constify.
1631
1632 2017-09-27  Tom Tromey  <tom@tromey.com>
1633
1634         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1635         (info_spu_mailbox_command, info_spu_dma_command)
1636         (info_spu_proxydma_command): Constify.
1637
1638 2017-09-27  Tom Tromey  <tom@tromey.com>
1639
1640         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1641
1642 2017-09-27  Tom Tromey  <tom@tromey.com>
1643
1644         * cli/cli-script.c (user_defined_command): Constify.
1645
1646 2017-09-27  Tom Tromey  <tom@tromey.com>
1647
1648         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1649         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1650         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1651         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1652         (dump_binary_value, append_binary_memory, append_binary_value):
1653         Constify.
1654         (struct dump_context) <func>: Constify.
1655         (add_dump_command): Update.
1656
1657 2017-09-27  Tom Tromey  <tom@tromey.com>
1658
1659         * cli/cli-cmds.c (show_version, show_configuration)
1660         (source_command, show_user): Constify.
1661
1662 2017-09-27  Tom Tromey  <tom@tromey.com>
1663
1664         * target.c (maintenance_print_target_stack): Constify.
1665
1666 2017-09-27  Tom Tromey  <tom@tromey.com>
1667
1668         * interps.c (interpreter_exec_cmd): Constify.
1669
1670 2017-09-27  Tom Tromey  <tom@tromey.com>
1671
1672         * record-full.c (cmd_record_full_restore): Constify.
1673
1674 2017-09-27  Tom Tromey  <tom@tromey.com>
1675
1676         * memattr.c (enable_mem_command, disable_mem_command)
1677         (delete_mem_command): Constify.
1678
1679 2017-09-27  Tom Tromey  <tom@tromey.com>
1680
1681         * value.c (show_convenience): Constify.
1682
1683 2017-09-27  Tom Tromey  <tom@tromey.com>
1684
1685         * gdbcore.h (core_file_command): Update.
1686         * corefile.c (core_file_command): Constify.
1687
1688 2017-09-27  Tom Tromey  <tom@tromey.com>
1689
1690         * user-regs.c (maintenance_print_user_registers): Constify.
1691
1692 2017-09-27  Tom Tromey  <tom@tromey.com>
1693
1694         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1695
1696 2017-09-27  Tom Tromey  <tom@tromey.com>
1697
1698         * cp-support.c (first_component_command): Constify.
1699
1700 2017-09-27  Tom Tromey  <tom@tromey.com>
1701
1702         * psymtab.c (maintenance_print_psymbols)
1703         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1704         Constify.
1705
1706 2017-09-27  Tom Tromey  <tom@tromey.com>
1707
1708         * windows-tdep.c (display_tib): Constify.
1709
1710 2017-09-27  Tom Tromey  <tom@tromey.com>
1711
1712         * linux-fork.c (delete_checkpoint_command)
1713         (detach_checkpoint_command): Constify.
1714
1715 2017-09-27  Tom Tromey  <tom@tromey.com>
1716
1717         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1718
1719 2017-09-27  Tom Tromey  <tom@tromey.com>
1720
1721         * arc-tdep.c (dump_arc_instruction_command): Constify.
1722
1723 2017-09-27  Tom Tromey  <tom@tromey.com>
1724
1725         * valprint.c (set_radix, show_radix): Constify.
1726
1727 2017-09-27  Tom Tromey  <tom@tromey.com>
1728
1729         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1730
1731 2017-09-27  Tom Tromey  <tom@tromey.com>
1732
1733         * command.h (not_just_help_class_command): Update.
1734         * cli/cli-decode.h (not_just_help_class_command): Update.
1735         * cli/cli-decode.c (not_just_help_class_command): Constify.
1736
1737 2017-09-27  Tom Tromey  <tom@tromey.com>
1738
1739         * gdb_bfd.c (maintenance_info_bfds): Constify.
1740
1741 2017-09-27  Tom Tromey  <tom@tromey.com>
1742
1743         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1744         overloads.
1745         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1746         (do_const_cfunc): New function.
1747         (cmd_cfunc_eq): New overload.
1748         (cli_user_command_p): Check do_const_cfunc.
1749         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1750         const_cfunc.
1751         * command.h (add_cmd): Add const overload and no-function
1752         overload.
1753         (set_cmd_cfunc): Add const overload.
1754         (cmd_const_cfunc_ftype): Declare.
1755         (cmd_cfunc_eq): Add const overload.
1756         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1757         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1758         overload.
1759
1760 2017-09-27  Tom Tromey  <tom@tromey.com>
1761
1762         * macroexp.c (get_next_token_for_substitution): New function.
1763         (substitute_args): Call it.  Check for __VA_OPT__.
1764
1765 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1766             Pedro Alves <palves@redhat.com>
1767
1768         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1769         producer_is_icc_lt_14.
1770         (producer_is_icc_lt_14): New function.
1771         (check_producer): Add code for checking version of ICC.
1772         (producer_is_icc): Move to producer.c.
1773         (read_structure_type): Restrict ICC workaround to ICC<14.
1774         * producer.c: Include selftest.h.
1775         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1776         New functions.
1777         * producer.h (producer_is_icc): New declaration.
1778
1779 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1780
1781         * Makefile.in (SFILES): Add producer.c.
1782         (COMMON_OBS): Add producer.o
1783         * amd64-tdep.c (producer.h): Add new include.
1784         * dwarf2read.c (producer.h): Add new include.
1785         * producer.c: New file.
1786         * producer.h: New file.
1787         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1788         producer.c.
1789         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1790         producer.h.
1791
1792 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1793
1794         * configure.ac: Search ncursesw before ncurses.
1795         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1796         * gdb_curses.h: Include <ncursesw/ncurses.h>
1797         * config.in, configure: Regenerate.
1798
1799 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1800
1801         PR gdb/22185
1802         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1803         obsolete.
1804         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1805         Remove i386sol2 support.
1806         * configure.nat <i386sol2>: Remove.
1807         <sol2-64>: Fold into ...
1808         <sol2>: ... this.
1809         Move common settings to default section.
1810         Add sol-thread.o.
1811         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1812         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1813         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1814         <i[34567]86-*-solaris*>: Remove.
1815         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1816
1817         * configure.ac: Remove wctype in libw check.
1818         (_MSE_INT_H): Don't define on Solaris 7-9.
1819         <solaris*>: Remove libthread_db.so.1 check.
1820         * configure: Regenerate.
1821         * config.in: Regenerate.
1822
1823         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1824         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1825         (gdb_ps_size_t): Remove.
1826         Use base types in users.
1827         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1828
1829         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1830
1831 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1832
1833         PR build/22206
1834         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1835         (adi_is_addr_mapped): Likewise.
1836         (PSR_ICC): Don't redefine.
1837         (PSR_IMPL): Likewise.
1838
1839 2017-09-25  Tom Tromey  <tom@tromey.com>
1840
1841         * regcache.c (regcache::dump): Use string_printf.
1842
1843 2017-09-25  Tom Tromey  <tom@tromey.com>
1844
1845         * regcache.c (class regcache_invalidator): New.
1846         (struct register_to_invalidate): Remove.
1847         (make_cleanup_regcache_invalidate): Remove.
1848         (regcache::raw_write): Use regcache_invalidator.
1849
1850 2017-09-25  Tom Tromey  <tom@tromey.com>
1851
1852         * spu-tdep.c (spu2ppu_sniffer): Update.
1853         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1854         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1855         Remove.
1856         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1857         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1858         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1859         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1860         (frame_pop): Update.
1861
1862 2017-09-25  Tom Tromey  <tom@tromey.com>
1863
1864         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1865         * regcache.h (regcache_xfree): Don't declare.
1866         * regcache.c (regcache_xfree): Remove.
1867         (do_regcache_xfree): Use delete.
1868         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1869         * linux-fork.c (free_fork): Use delete.
1870         (fork_save_infrun_state): Likewise.
1871         * jit.c (jit_dealloc_cache): Use delete.
1872         * infrun.c (discard_infcall_suspend_state): Use delete.
1873
1874 2017-09-25  Tom Tromey  <tom@tromey.com>
1875
1876         * regcache.h (regcache_xmalloc): Don't declare.
1877         (regcache_raw_set_cached_value): Update comment.
1878         * regcache.c (regcache_xmalloc): Remove.
1879         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1880         * jit.c (jit_frame_sniffer): Use new.
1881         * frame.c (frame_save_as_regcache): Use new.
1882
1883 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1884
1885         * NEWS: Advertise support for guarded-storage registers on IBM z.
1886
1887 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1888
1889         * s390-linux-nat.c (have_regset_gs): New static variable.
1890         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1891         control block and guarded-storage broadcast control regsets.
1892         (s390_read_description): Detect whether the target has
1893         guarded-storage support, return appropriate tdesc.
1894         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1895         (features/s390x-gs-linux64.c): Likewise.
1896         (struct gdbarch_tdep) <have_gs>: New field.
1897         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1898         (s390_gsbc_regset): New variables.
1899         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1900         and s390_gsbc_regset, if applicable.
1901         (s390_core_read_description): Check whether core file was from a
1902         target with guarded-storage support; include appropriate regsets.
1903         (s390_gdbarch_init): Add registers for guarded-storage support.
1904         (_initialize_s390_tdep): Initialize new target descriptions that
1905         include registers for guarded-storage support.
1906         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1907         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1908         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1909         (S390_NUM_REGS): Adjust macro definition.
1910         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1911         (tdesc_s390x_gs_linux64): New declarations.
1912
1913 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1914
1915         * features/s390-gs-linux64.xml: New file.
1916         * features/s390-gs.xml: New file.
1917         * features/s390-gsbc.xml: New file.
1918         * features/s390x-gs-linux64.xml: New file.
1919         * features/Makefile (WHICH): Add s390-gs-linux64 and
1920         s390x-gs-linux64.
1921         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1922         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1923         * features/s390-gs-linux64.c: New generated file.
1924         * features/s390x-gs-linux64.c: New file.
1925         * regformats/s390-gs-linux64.dat: New file.
1926         * regformats/s390x-gs-linux64.dat: New file.
1927
1928 2017-09-23  Tom Tromey  <tom@tromey.com>
1929
1930         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1931
1932 2017-09-22  Tom Tromey  <tom@tromey.com>
1933
1934         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1935         type to scoped_restore_tmpl.
1936         <scoped_input_handler>: Initialize m_quit_handler directly.
1937
1938 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1939
1940         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1941         (cd_command): Likewise.  Free "current_directory" before
1942         assigning to it.
1943         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1944         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1945         * top.c (gdb_dirbuf): Remove global declaration.
1946         * top.h (gdb_dirbuf): Likewise.
1947
1948 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1949
1950         * gnulib/aclocal.m4: Regenerate.
1951         * gnulib/config.in: Regenerate.
1952         * gnulib/configure: Regenerate.
1953         * gnulib/import/Makefile.am: Regenerate.
1954         * gnulib/import/Makefile.in: Regenerate.
1955         * gnulib/import/assure.h: New file.
1956         * gnulib/import/at-func.c: Likewise
1957         * gnulib/import/chdir-long.c: New file.
1958         * gnulib/import/chdir-long.h: New file.
1959         * gnulib/import/cloexec.c: New file.
1960         * gnulib/import/cloexec.h: New file.
1961         * gnulib/import/close.c: New file.
1962         * gnulib/import/closedir.c: New file.
1963         * gnulib/import/dirent-private.h: New file.
1964         * gnulib/import/dup-safer.c: New file.
1965         * gnulib/import/dup.c: New file.
1966         * gnulib/import/dup2.c: New file.
1967         * gnulib/import/error.c: New file.
1968         * gnulib/import/error.h: New file.
1969         * gnulib/import/exitfail.c: New file.
1970         * gnulib/import/exitfail.h: New file.
1971         * gnulib/import/fchdir.c: New file.
1972         * gnulib/import/fcntl.c: New file.
1973         * gnulib/import/fcntl.in.h: New file.
1974         * gnulib/import/fd-hook.c: New file.
1975         * gnulib/import/fd-hook.h: New file.
1976         * gnulib/import/fd-safer.c: New file.
1977         * gnulib/import/fdopendir.c: New file.
1978         * gnulib/import/filename.h: New file.
1979         * gnulib/import/filenamecat-lgpl.c: New file.
1980         * gnulib/import/filenamecat.h: New file.
1981         * gnulib/import/fstat.c: New file.
1982         * gnulib/import/fstatat.c: New file.
1983         * gnulib/import/getcwd-lgpl.c: New file.
1984         * gnulib/import/getcwd.c: New file.
1985         * gnulib/import/getdtablesize.c: New file.
1986         * gnulib/import/getlogin_r.c: New file.
1987         * gnulib/import/getprogname.c: New file.
1988         * gnulib/import/getprogname.h: New file.
1989         * gnulib/import/gettext.h: New file.
1990         * gnulib/import/glob-libc.h: New file.
1991         * gnulib/import/glob.c: New file.
1992         * gnulib/import/glob.in.h: New file.
1993         * gnulib/import/intprops.h: New file.
1994         * gnulib/import/m4/chdir-long.m4: New file.
1995         * gnulib/import/m4/close.m4: New file.
1996         * gnulib/import/m4/closedir.m4: New file.
1997         * gnulib/import/m4/d-ino.m4: New file.
1998         * gnulib/import/m4/d-type.m4: New file.
1999         * gnulib/import/m4/dup.m4: New file.
2000         * gnulib/import/m4/dup2.m4: New file.
2001         * gnulib/import/m4/error.m4: New file.
2002         * gnulib/import/m4/fchdir.m4: New file.
2003         * gnulib/import/m4/fcntl.m4: New file.
2004         * gnulib/import/m4/fcntl_h.m4: New file.
2005         * gnulib/import/m4/fdopendir.m4: New file.
2006         * gnulib/import/m4/filenamecat.m4: New file.
2007         * gnulib/import/m4/fstat.m4: New file.
2008         * gnulib/import/m4/fstatat.m4: New file.
2009         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2010         * gnulib/import/m4/getcwd-path-max.m4: New file.
2011         * gnulib/import/m4/getcwd.m4: New file.
2012         * gnulib/import/m4/getdtablesize.m4: New file.
2013         * gnulib/import/m4/getlogin_r.m4: New file.
2014         * gnulib/import/m4/getprogname.m4: New file.
2015         * gnulib/import/m4/glob.m4: New file.
2016         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2017         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2018         * gnulib/import/m4/mempcpy.m4: New file.
2019         * gnulib/import/m4/memrchr.m4: New file.
2020         * gnulib/import/m4/mode_t.m4: New file.
2021         * gnulib/import/m4/msvc-inval.m4: New file.
2022         * gnulib/import/m4/msvc-nothrow.m4: New file.
2023         * gnulib/import/m4/open.m4: New file.
2024         * gnulib/import/m4/openat.m4: New file.
2025         * gnulib/import/m4/opendir.m4: New file.
2026         * gnulib/import/m4/readdir.m4: New file.
2027         * gnulib/import/m4/realloc.m4: New file.
2028         * gnulib/import/m4/rewinddir.m4: New file.
2029         * gnulib/import/m4/save-cwd.m4: New file.
2030         * gnulib/import/m4/strdup.m4: New file.
2031         * gnulib/import/m4/strerror.m4: New file.
2032         * gnulib/import/m4/unistd-safer.m4: New file.
2033         * gnulib/import/mempcpy.c: New file.
2034         * gnulib/import/memrchr.c: New file.
2035         * gnulib/import/msvc-inval.c: New file.
2036         * gnulib/import/msvc-inval.h: New file.
2037         * gnulib/import/msvc-nothrow.c: New file.
2038         * gnulib/import/msvc-nothrow.h: New file.
2039         * gnulib/import/open.c: New file.
2040         * gnulib/import/openat-die.c: New file.
2041         * gnulib/import/openat-priv.h: New file.
2042         * gnulib/import/openat-proc.c: New file.
2043         * gnulib/import/openat.c: New file.
2044         * gnulib/import/openat.h: New file.
2045         * gnulib/import/opendir.c: New file.
2046         * gnulib/import/pipe-safer.c: New file.
2047         * gnulib/import/readdir.c: New file.
2048         * gnulib/import/realloc.c: New file.
2049         * gnulib/import/rewinddir.c: New file.
2050         * gnulib/import/save-cwd.c: New file.
2051         * gnulib/import/save-cwd.h: New file.
2052         * gnulib/import/strdup.c: New file.
2053         * gnulib/import/strerror-override.c: New file.
2054         * gnulib/import/strerror-override.h: New file.
2055         * gnulib/import/strerror.c: New file.
2056         * gnulib/import/unistd--.h: New file.
2057         * gnulib/import/unistd-safer.h: New file.
2058         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2059         "getcwd" and "glob".
2060         * ser-tcp.c: Undefine "close" before redefining it.
2061
2062 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2063
2064         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2065         get rid of res_val.
2066
2067 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2068
2069         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2070         <sol2,sparc>: Likewise.
2071         <sol2-64,i386>: Likewise.
2072
2073         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2074         -Wdeprecated-declarations on *-*-solaris*.
2075         * configure: Regenerate.
2076
2077         * procfs.c: Include "nat/inferior.h".
2078         (procfs_info_proc): Fix typo.
2079
2080 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2081
2082         * remote.c (vector): Include.
2083         (struct private_thread_info): Add field, thread_handle.
2084         (free_private_thread_info): Deallocate storage associated with
2085         thread handle.
2086         (get_private_info_thread): Initialize `thread_handle' field.
2087         (struct thread_item): Add field, thread_handle.
2088         (clear_threads_listing_context): Deallocate storage associated
2089         with thread handle.
2090         (start_thread): Add support for "handle" attribute.
2091         (thread_attributes): Add "handle".
2092         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2093         field.
2094         (remote_update_thread_list): Update thread_handle.
2095         (remote_thread_handle_to_thread_info): New function.
2096         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2097
2098 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2099
2100         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2101         function.
2102         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2103         * python/python-internal.h (thread_object_type): Declare.
2104
2105 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2106
2107         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2108         (target_thread_handle_to_thread_info): Declare.
2109         * target.c (target_thread_handle_to_thread_info): New function.
2110         * target-delegates.c: Regenerate.
2111         * gdbthread.h (find_thread_by_handle): Declare.
2112         * thread.c (find_thread_by_handle): New function.
2113         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2114         function.
2115         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2116
2117 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2118
2119         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2120
2121 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2122
2123         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2124
2125 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2126
2127         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2128         to gdb_target_obs.
2129
2130 2017-09-20  Tom Tromey  <tom@tromey.com>
2131
2132         * breakpoint.c (struct counted_command_line): Remove.
2133         (breakpoint_commands): Update.
2134         (alloc_counted_command_line, incref_counted_command_line)
2135         (decref_counted_command_line, do_cleanup_counted_command_line)
2136         (make_cleanup_decref_counted_command_line): Remove.
2137         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2138         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2139         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2140         (save_breakpoints): Update.
2141         * breakpoint.h (counted_command_line): Now a typedef to
2142         shared_ptr.
2143         (struct breakpoint) <commands>: Now a counted_command_line.
2144         (struct bpstats) <command>: Likewise.
2145
2146 2017-09-20  Tom Tromey  <tom@tromey.com>
2147
2148         * breakpoint.c (struct commands_info, do_map_commands_command):
2149         Remove.
2150         (commands_command_1): Update.
2151         (iterate_over_related_breakpoints): Take a function_view.
2152         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2153         (delete_command): Update.
2154         (map_breakpoint_numbers): Take a function_view.
2155         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2156         (disable_command): Update.
2157         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2158         (enable_command): Update.
2159         (struct disp_data, do_enable_breakpoint_disp)
2160         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2161         (do_map_enable_delete_breakpoint): Remove.
2162         (enable_once_command, enable_count_command, enable_delete_command)
2163         (delete_trace_variable_command): Update.
2164
2165 2017-09-20  Tom Tromey  <tom@tromey.com>
2166
2167         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2168         (bpstat_clear): Use delete.
2169         (bpstats): New constructors.
2170         (bpstat_copy, bpstat_stop_status): Use new.
2171         (dprintf_after_condition_true): Update.
2172         * breakpoint.h (bpstats::bpstats): Add constructors.
2173         (bpstats::~bpstats): Add destructor.
2174
2175 2017-09-20  Pedro Alves  <palves@redhat.com>
2176
2177         * eval.c (make_params): Delete, refactored as ...
2178         (class fake_method): ... this new type's ctor.
2179         (fake_method::~fake_method): New.
2180         (evaluate_subexp_standard): Use 'fake_method'.
2181
2182 2017-09-20  Tom Tromey  <tom@tromey.com>
2183
2184         * windows-nat.c (get_windows_debug_event, windows_wait)
2185         (do_initial_windows_stuff, windows_attach): Update.
2186         * utils.c (vwarning, internal_vproblem): Update.
2187         (ui_unregister_input_event_handler_cleanup)
2188         (prepare_to_handle_input): Remove.
2189         (class scoped_input_handler): New.
2190         (defaulted_query, prompt_for_continue): Update.
2191         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2192         Update.
2193         * top.c (undo_terminal_modifications_before_exit): Update.
2194         * target/target.h (target_terminal_init, target_terminal_inferior)
2195         (target_terminal_ours): Don't declare.
2196         (class target_terminal): New.
2197         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2198         (target_terminal_ours_for_output)
2199         (make_cleanup_restore_target_terminal): Don't declare.
2200         (target_terminal_info): Remove.
2201         * target.c (enum terminal_state, terminal_state): Remove.
2202         (target_terminal::terminal_state): Define.
2203         (target_terminal::init): Rename from target_terminal_init.
2204         (target_terminal::inferior): Rename from
2205         target_terminal_inferior.
2206         (target_terminal::ours): Rename from target_terminal_ours.
2207         (target_terminal::ours_for_output): Rename from
2208         target_terminal_ours_for_output.
2209         (target_terminal::info): New method.
2210         (cleanup_restore_target_terminal)
2211         (make_cleanup_restore_target_terminal): Remove.
2212         * solib.c (handle_solib_event): Update.
2213         * remote.c (remote_serial_quit_handler): Update.
2214         (remote_terminal_inferior, remote_wait_as): Update.
2215         * record-full.c (record_full_wait_1): Update.
2216         * nto-procfs.c (procfs_create_inferior): Update.
2217         * nat/fork-inferior.c (startup_inferior): Update.
2218         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2219         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2220         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2221         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2222         (mi_breakpoint_created, mi_breakpoint_deleted)
2223         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2224         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2225         (mi_user_selected_context_changed, report_initial_inferior):
2226         Update.
2227         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2228         (linux_nat_terminal_inferior): Update.
2229         * infrun.c (follow_fork_inferior)
2230         (handle_vfork_child_exec_or_exit, do_target_resume)
2231         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2232         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2233         Update.
2234         * inflow.c (child_terminal_init, info_terminal_command): Update.
2235         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2236         (attach_command): Update.
2237         * infcall.c (call_thread_fsm_should_stop): Update.
2238         * gnu-nat.c (gnu_attach): Update.
2239         * extension.c (struct active_ext_lang_state)
2240         (restore_active_ext_lang): Update.
2241         * exceptions.c (print_flush): Update.
2242         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2243         (struct quit_handler_cleanup_data, restore_quit_handler)
2244         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2245         Remove.
2246         * cp-support.c (gdb_demangle): Update.
2247         * breakpoint.c (update_inserted_breakpoint_locations)
2248         (insert_breakpoint_locations, handle_jit_event)
2249         (disable_breakpoints_in_unloaded_shlib): Update.
2250         * annotate.c (annotate_breakpoints_invalid)
2251         (annotate_frames_invalid): Update.
2252
2253 2017-09-20  Tom Tromey  <tom@tromey.com>
2254
2255         * main.c (catch_command_errors): Rename from
2256         catch_command_errors_const.
2257         (captured_main_1): Update.
2258
2259 2017-09-20  Pedro Alves  <palves@redhat.com>
2260
2261         * cli/cli-cmds.c (list_command): Use print_sal_location.
2262         (print_sal_location): New function.
2263         (ambiguous_line_spec): Use print_sal_location.
2264         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2265         * symtab.c (find_function_start_sal): Likewise.
2266         * symtab.h (symtab_and_line::symbol): New field.
2267
2268 2017-09-20  Pedro Alves  <palves@redhat.com>
2269
2270         * linespec.c (minsym_found): Handle non-text minsyms.
2271         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2272
2273 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2274
2275         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2276         backslash.
2277
2278 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2279
2280         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2281         vmovups instead vmovaps.
2282         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2283
2284 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2285
2286         * NEWS (Changes since GDB 8.0): Add starti.
2287         * infcmd.c (enum run_break): New.
2288         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2289         case.
2290         (run_command): Use enum run_how.
2291         (start_command): Likewise.
2292         (starti_command): New function.
2293         (RUN_ARGS_HELP): New macro.
2294         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2295         commands.  Add starti command.
2296
2297 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2298
2299         * Makefile.in (monitor.o): Remove the rule.
2300
2301 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2302
2303         * annotate.h (struct annotate_arg_emitter): Use
2304         DISABLE_COPY_AND_ASSIGN.
2305         * common/refcounted-object.h (refcounted_object): Likewise.
2306         * completer.h (struct completion_result): Likewise.
2307         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2308         * filename-seen-cache.h (filename_seen_cache): Likewise.
2309         * gdbcore.h (thread_section_name): Likewise.
2310         * gdb_regex.h (compiled_regex): Likewise.
2311         * gdbthread.h (scoped_restore_current_thread): Likewise.
2312         * inferior.h (scoped_restore_current_inferior): Likewise.
2313         * jit.c (jit_reader): Likewise.
2314         * linespec.h (struct linespec_result): Likewise.
2315         * mi/mi-parse.h (struct mi_parse): Likewise.
2316         * nat/fork-inferior.c (execv_argv): Likewise.
2317         * progspace.h (scoped_restore_current_program_space): Likewise.
2318         * python/python-internal.h (class gdbpy_enter): Likewise.
2319         * regcache.h (regcache): Likewise.
2320         * target-descriptions.c (struct tdesc_reg): Likewise.
2321         (struct tdesc_type): Likewise.
2322         (struct tdesc_feature): Likewise.
2323         * ui-out.h (ui_out_emit_type): Likewise.
2324
2325 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2326
2327         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2328         label abort_expression.
2329
2330 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2331
2332         * common/buffer.c (buffer_xml_printf): Adjust.
2333         * common/xml-utils.c (xml_escape_text): Change return type to
2334         std::string, update code accordingly.
2335         * common/xml-utils.h (xml_escape_text): Change return type to
2336         std::string.
2337         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2338         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2339         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2340         Adjust.
2341
2342 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2343
2344         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2345         (SUBDIR_UNITTESTS_OBS): Add new object file.
2346         * unittests/xml-utils-selftests.c: New file.
2347
2348 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2349
2350         * common/selftest.h (selftest): New struct/interface.
2351         (register_test): Add name parameter, add new overload.
2352         (run_tests): Add filter parameter.
2353         (for_each_selftest_ftype): New typedef.
2354         (for_each_selftest): New declaration.
2355         * common/selftest.c (tests): Change type to
2356         map<string, unique_ptr<selftest>>.
2357         (simple_selftest): New struct.
2358         (register_test): New function.
2359         (register_test): Add name parameter and use it.
2360         (run_tests): Add filter parameter and use it.  Add prints.
2361         Adjust to vector -> map change.
2362         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2363         registering selftests.
2364         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2365         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2366         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2367         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2368         * findvar.c (_initialize_findvar): Likewise.
2369         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2370         * maint.c (maintenance_selftest): Update call to run_tests.
2371         (maintenance_info_selftests): New function.
2372         (_initialize_maint_cmds): Register "maintenance info selftests"
2373         command.  Update "maintenance selftest" doc.
2374         * regcache.c (_initialize_regcache): Add names when registering
2375         selftests.
2376         * rust-exp.y (_initialize_rust_exp): Likewise.
2377         * selftest-arch.c (gdbarch_selftest): New struct.
2378         (gdbarch_tests): Remove.
2379         (register_test_foreach_arch): Add name parameter.  Call
2380         register_test.
2381         (tests_with_arch): Remove, move most content to
2382         gdbarch_selftest::operator().
2383         (_initialize_selftests_foreach_arch): Remove.
2384         * selftest-arch.h (register_test_foreach_arch): Add name
2385         parameter.
2386         (run_tests_with_arch): New declaration.
2387         * utils-selftests.c (_initialize_utils_selftests): Add names
2388         when registering selftests.
2389         * utils.c (_initialize_utils): Likewise.
2390         * unittests/array-view-selftests.c
2391         (_initialize_array_view_selftests): Likewise.
2392         * unittests/environ-selftests.c (_initialize_environ_selftests):
2393         Likewise.
2394         * unittests/function-view-selftests.c
2395         (_initialize_function_view_selftests): Likewise.
2396         * unittests/offset-type-selftests.c
2397         (_initialize_offset_type_selftests): Likewise.
2398         * unittests/optional-selftests.c
2399         (_initialize_optional_selftests): Likewise.
2400         * unittests/scoped_restore-selftests.c
2401         (_initialize_scoped_restore_selftests): Likewise.
2402         * NEWS: Document "maintenance selftest" and "maint info
2403         selftests".
2404
2405 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2406
2407         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2408         scoped_restore.
2409
2410 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2411
2412         * mi/mi-main.c (mi_load_progress): Make uiout variable
2413         a unique_ptr.
2414
2415 2017-09-15  Pedro Alves  <palves@redhat.com>
2416
2417         * compile/compile-c-types.c (convert_enum, convert_int)
2418         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2419
2420 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2421
2422         * dwarf2read.c (copy_string): Remove.
2423         (parse_macro_definition): Replace copy_string with savestring.
2424
2425 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2426
2427         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2428         gdb_target_obs.
2429         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2430         Likewise.
2431         (i[34567]86-*-linux*): Likewise.
2432
2433 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2434
2435         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2436         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2437         <stack>: Change type to std::vector.
2438         <stack_len, stack_allocated>: Remove.
2439         <grow_stack>: Remove.
2440         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2441         (dwarf_expr_context::~dwarf_expr_context): Remove.
2442         (dwarf_expr_context::grow_stack): Remove.
2443         (dwarf_expr_context::push): Adjust.
2444         (dwarf_expr_context::pop): Adjust.
2445         (dwarf_expr_context::fetch): Adjust.
2446         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2447         (dwarf_expr_context::stack_empty_p): Adjust.
2448         (dwarf_expr_context::execute_stack_op): Adjust.
2449
2450 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2451
2452         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2453         return type to bool.
2454         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2455
2456 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2457
2458         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2459         Change type to bool.
2460         (dwarf_stack_value) <in_stack_memory>: Likewise.
2461         (dwarf_expr_context) <push_address>: Change parameter type to
2462         bool.
2463         <fetch_in_stack_memory>: Change return type to bool.
2464         <push>: Change parameter type to bool.
2465         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2466         to bool.
2467         (dwarf_expr_context::push_address): Likewise.
2468         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2469         to bool.
2470         (dwarf_expr_context::execute_stack_op): Adjust.
2471         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2472
2473 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2474
2475         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2476         (struct dwarf_expr_context) <n_pieces>: Remove.
2477         <pieces>: Change type to std::vector.
2478         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2479         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2480         pieces.
2481         (dwarf_expr_context::add_piece): Adjust.
2482         * dwarf2loc.c (struct piece_closure): Initialize fields.
2483         <n_pieces>: Remove.
2484         <pieces>: Change type to std::vector.
2485         (allocate_piece_closure): Adjust, change parameter to
2486         std::vector rvalue and std::move it to piece_closure.
2487         (rw_pieced_value): Adjust.
2488         (check_pieced_synthetic_pointer): Adjust.
2489         (indirect_synthetic_pointer): Adjust.
2490         (coerce_pieced_ref): Adjust.
2491         (free_pieced_value_closure):  Adjust.  Use delete to free
2492         piece_closure.
2493         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2494         to allocate_piece_closure.
2495         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2496
2497 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2498
2499         * probe.h (probe_ops_cp): Remove typedef.
2500         (DEF_VEC_P (probe_ops_cp)): Remove.
2501         (all_probe_ops): Change type to std::vector.
2502         * probe.c (info_probes_for_ops): Adjust to vector change.
2503         (probe_linespec_to_ops): Likewise.
2504         (all_probe_ops): Change type to std::vector.
2505         (_initialize_probe): Adjust to vector change.
2506         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2507         * elfread.c (elf_get_probes): Likewise.
2508         * stap-probe.c (_initialize_stap_probe): Likewise.
2509
2510 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2511
2512         * probe.h (struct bound_probe): Define constructors.
2513         * probe.c (bound_probe_s): Remove typedef.
2514         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2515         (collect_probes): Change return type to std::vector, remove
2516         cleanup.
2517         (compare_probes): Return bool, change parameter type.  Change
2518         semantic to "less than".
2519         (gen_ui_out_table_header_info): Change parameter to std::vector
2520         and update.
2521         (exists_probe_with_pops): Likewise.
2522         (info_probes_for_ops): Update to std::vector change.
2523         (enable_probes_command): Likewise.
2524         (disable_probes_command): Likewise.
2525
2526 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2527
2528         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2529         vec to std::vector.
2530         * probe.c (parse_probes_in_pspace): Update.
2531         (find_probes_in_objfile): Update.
2532         (find_probe_by_pc): Update.
2533         (collect_probes): Update.
2534         (probe_any_get_probes): Update.
2535         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2536         return type to reference to std::vector.
2537         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2538         std::vector and update.
2539         (dtrace_process_dof): Likewise.
2540         (dtrace_get_probes): Likewise.
2541         * elfread.c (elf_get_probes): Change return type to std::vector,
2542         store an std::vector in bfd_data.
2543         (probe_key_free): Update to std::vector.
2544         * stap-probe.c (handle_stap_probe): Change parameter to
2545         std::vector and update.
2546         (stap_get_probes): Likewise.
2547         * symfile-debug.c (debug_sym_get_probes): Change return type to
2548         std::vector and update.
2549
2550 2017-09-11  Tom Tromey  <tom@tromey.com>
2551
2552         * breakpoint.c (program_breakpoint_here_p): Update.
2553         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2554         from make_show_memory_breakpoints_cleanup.  Return a
2555         scoped_restore_tmpl<int>.
2556         (restore_show_memory_breakpoints): Remove.
2557         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2558         * mem-break.c (memory_validate_breakpoint): Update.
2559         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2560         (ia64_memory_remove_breakpoint): Update.
2561         (ia64_breakpoint_from_pc): Update.
2562         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2563         from make_show_memory_breakpoints_cleanup.
2564
2565 2017-09-11  Tom Tromey  <tom@tromey.com>
2566
2567         * d-namespace.c (d_lookup_symbol): Use std::string.
2568         (find_symbol_in_baseclass): Likewise.
2569
2570 2017-09-11  Tom Tromey  <tom@tromey.com>
2571
2572         * ctf.c (ctf_start): Use std::string.
2573
2574 2017-09-11  Tom Tromey  <tom@tromey.com>
2575
2576         * ada-lang.c (is_known_support_routine): Update.
2577         (ada_unhandled_exception_name_addr_from_raise): Update.
2578         * guile/scm-frame.c (gdbscm_frame_name): Update.
2579         * python/py-frame.c (frapy_name): Update.
2580         (frapy_function): Update.
2581         * stack.h (find_frame_funname): Update.
2582         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2583         (print_frame): Update.
2584
2585 2017-09-11  Tom Tromey  <tom@tromey.com>
2586
2587         * findcmd.c (put_bits): Take a gdb::byte_vector.
2588         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2589         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2590         cleanups.
2591         (find_command): Update.
2592
2593 2017-09-11  Tom Tromey  <tom@tromey.com>
2594
2595         * cli/cli-script.c (class scoped_restore_hook_in): New.
2596         (clear_hook_in_cleanup): Remove.
2597         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2598         scoped_restore_hook_in.
2599
2600 2017-09-11  Tom Tromey  <tom@tromey.com>
2601
2602         * cli/cli-script.c (restore_interp): Remove.
2603         (read_command_lines): Use scoped_restore_interp.
2604         * interps.c (scoped_restore_interp::set_temp): Rename from
2605         interp_set_temp.
2606         * interps.h (class scoped_restore_interp): New.
2607         (interp_set_temp): Remove.
2608
2609 2017-09-11  Tom Tromey  <tom@tromey.com>
2610
2611         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2612         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2613         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2614         scoped_restore.
2615         (mi_cmd_break_insert_1): Update.
2616         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2617         scoped_restore.
2618
2619 2017-09-11  Tom Tromey  <tom@tromey.com>
2620
2621         * demangle.c (demangle_command): Update.
2622         * breakpoint.c (disable_command): Update.
2623         (enable_command): Update.
2624         (find_location_by_number): Make "number" const.  Use
2625         get_number_trailer.
2626         * cli/cli-utils.c (extract_arg): Return std::string.
2627         * probe.c (parse_probe_linespec): Update.  Change types.
2628         (collect_probes): Take string arguments.
2629         (parse_probe_linespec): Likewise.
2630         (info_probes_for_ops): Update.
2631         (enable_probes_command): Update.
2632         (disable_probes_command): Update.
2633         * break-catch-sig.c (catch_signal_split_args): Update.
2634         * mi/mi-parse.c (mi_parse): Update.
2635
2636 2017-09-11  Tom Tromey  <tom@tromey.com>
2637
2638         * language.h (language_enum): Make argument const.
2639         * language.c (language_enum): Make argument const.
2640
2641 2017-09-11  Tom Tromey  <tom@tromey.com>
2642
2643         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2644         as function.
2645         (skip_to_space): Rename from skip_to_space_const.
2646         * common/common-utils.c (skip_to_space): New function.
2647         (skip_to_space): Rename from skip_to_space_const.
2648         * cli/cli-utils.h (get_number): Rename from get_number_const.
2649         (extract_arg): Rename from extract_arg_const.
2650         * cli/cli-utils.c (get_number): Rename from get_number_const.
2651         (extract_arg): Rename from extract_arg_const.
2652         (number_or_range_parser::get_number): Use ::get_number.
2653         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2654         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2655         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2656         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2657         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2658         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2659         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2660         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2661
2662 2017-09-11  Tom Tromey  <tom@tromey.com>
2663
2664         * python/python.c (do_start_initialization): Use
2665         py-event-types.def to initialize types.
2666         Define all object type structures.
2667         * python/python-internal.h: Don't declare event initialization
2668         functions.
2669         * python/py-threadevent.c (thread_event_object_type): Don't
2670         define.
2671         * python/py-stopevent.c (stop_event_object_type): Don't define.
2672         * python/py-signalevent.c (signal_event_object_type): Don't
2673         declare or define.
2674         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2675         (clear_objfiles_event_object_type): Don't declare or define.
2676         * python/py-infevents.c (inferior_call_pre_event_object_type)
2677         (inferior_call_post_event_object_type)
2678         (register_changed_event_object_type)
2679         (memory_changed_event_object_type): Don't declare or define.
2680         * python/py-inferior.c (new_thread_event_object_type)
2681         (new_inferior_event_object_type)
2682         (inferior_deleted_event_object_type): Don't declare or define.
2683         * python/py-exitedevent.c (exited_event_object_type): Don't
2684         declare or define.
2685         * python/py-evts.c (gdbpy_initialize_py_events): Use
2686         py-all-events.def.
2687         * python/py-events.h (thread_event_object_type): Don't declare.
2688         (events_object): Use py-all-events.def.
2689         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2690         py-event-types.def.
2691         * python/py-event-types.def: New file.
2692         * python/py-continueevent.c (create_continue_event_object): Don't
2693         declare or define.
2694         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2695         declare or define.
2696         * python/py-all-events.def: New file.
2697
2698 2017-09-11  Tom Tromey  <tom@tromey.com>
2699
2700         * python/py-threadevent.c (create_thread_event_object): Return
2701         gdbpy_ref.
2702         * python/py-stopevent.h (create_stop_event_object)
2703         (create_breakpoint_event_object, create_signal_event_object):
2704         Update.
2705         * python/py-stopevent.c (create_stop_event_object): Return
2706         gdbpy_ref.
2707         (emit_stop_event): Update.
2708         * python/py-signalevent.c (create_signal_event_object): Return
2709         gdbpy_ref.
2710         * python/py-infevents.c (create_inferior_call_event_object):
2711         Update.
2712         * python/py-event.h (create_event_object)
2713         (create_thread_event_object): Update.
2714         * python/py-event.c (create_event_object): Return gdbpy_ref.
2715         * python/py-continueevent.c: Return gdbpy_ref.
2716         * python/py-bpevent.c (create_breakpoint_event_object): Return
2717         gdbpy_ref.
2718
2719 2017-09-11  Tom Tromey  <tom@tromey.com>
2720
2721         PR python/15622:
2722         * NEWS: Add entry.
2723         * python/python.c (do_start_initialization): Initialize new event
2724         types.
2725         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2726         (gdbpy_initialize_inferior_deleted_event)
2727         (gdbpy_initialize_new_thread_event): Declare.
2728         * python/py-threadevent.c (create_thread_event_object): Add option
2729         "thread" parameter.
2730         * python/py-inferior.c (new_thread_event_object_type)
2731         (new_inferior_event_object_type)
2732         (inferior_deleted_event_object_type): Declare.
2733         (python_new_inferior, python_inferior_deleted): New functions.
2734         (add_thread_object): Emit new_thread event.
2735         (gdbpy_initialize_inferior): Attach new functions to corresponding
2736         observers.
2737         (new_thread, new_inferior, inferior_deleted): Define new event
2738         types.
2739         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2740         registries.
2741         * python/py-events.h (events_object) <new_inferior,
2742         inferior_deleted, new_thread>: New fields.
2743         * python/py-event.h (create_thread_event_breakpoint): Add optional
2744         "thread" parameter.
2745
2746 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2747
2748         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2749         check current_ui instead.
2750         (internal_vproblem): Likewise.
2751
2752 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2753
2754         * thread.c (print_thread_info_1): Remove unnecessary calls to
2755         uiout->is_mi_like_p.
2756
2757 2017-09-09  Tom Tromey  <tom@tromey.com>
2758
2759         * namespace.h (add_using_directive): Update.
2760         * namespace.c (add_using_directive): Change type of excludes to
2761         std::vector.
2762         * dwarf2read.c (read_import_statement): Use std::vector.
2763         (read_namespace): Update.
2764         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2765
2766 2017-09-09  Tom Tromey  <tom@tromey.com>
2767
2768         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2769
2770 2017-09-09  Tom Tromey  <tom@tromey.com>
2771
2772         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2773
2774 2017-09-09  Tom Tromey  <tom@tromey.com>
2775
2776         * stack.c (func_command): Use gdb::def_vector.
2777
2778 2017-09-09  Tom Tromey  <tom@tromey.com>
2779
2780         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2781         ui_out_emit_list, ui_out_emit_tuple.
2782         (mi_cmd_var_update): Likewise.
2783
2784 2017-09-09  Tom Tromey  <tom@tromey.com>
2785
2786         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2787         ui_out_redirect_pop.
2788         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2789         ui_out_redirect_pop.
2790         * utils.c (do_ui_out_redirect_pop)
2791         (make_cleanup_ui_out_redirect_pop): Remove.
2792         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2793         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2794         * ui-out.h (ui_out_redirect_pop): New class.
2795
2796 2017-09-09  Tom Tromey  <tom@tromey.com>
2797
2798         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2799         (list_available_thread_groups, mi_cmd_list_thread_groups)
2800         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2801         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2802         Likewise.
2803
2804 2017-09-09  Tom Tromey  <tom@tromey.com>
2805
2806         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2807         ui_out_emit_tuple.
2808
2809 2017-09-09  Tom Tromey  <tom@tromey.com>
2810
2811         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2812         * stack.c (print_frame): Use ui_out_emit_tuple.
2813         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2814         (info_spu_mailbox_command, info_spu_dma_command)
2815         (info_spu_proxydma_command): Likewise.
2816         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2817         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2818         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2819         ui_out_emit_tuple.
2820         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2821
2822 2017-09-09  Tom Tromey  <tom@tromey.com>
2823
2824         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2825         (class ui_out_emit_table): Update comment.
2826         * ui-out.c (do_cleanup_table_end)
2827         (make_cleanup_ui_out_table_begin_end): Remove.
2828         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2829         (info_spu_dma_cmdlist): Likewise.
2830         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2831         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2832         ui_out_emit_table.
2833
2834 2017-09-09  Tom Tromey  <tom@tromey.com>
2835
2836         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2837         ui_out_emit_list, gdb::optional.
2838
2839 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2840
2841         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2842         prototype.
2843         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2844         prototype.
2845         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2846         prototype.
2847         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2848         * ada-exp.y: Remove _initialize_ada_exp prototype.
2849         * ada-lang.c: Remove _initialize_ada_language prototype.
2850         * ada-tasks.c: Remove _initialize_tasks prototype.
2851         * addrmap.c: Remove _initialize_addrmap prototype.
2852         * agent.c: Remove _initialize_agent prototype.
2853         * aix-thread.c: Remove _initialize_aix_thread prototype.
2854         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2855         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2856         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2857         prototype.
2858         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2859         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2860         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2861         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2862         prototype.
2863         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2864         prototype.
2865         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2866         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2867         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2868         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2869         prototype.
2870         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2871         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2872         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2873         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2874         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2875         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2876         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2877         prototype.
2878         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2879         prototype.
2880         * annotate.c: Remove _initialize_annotate prototype.
2881         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2882         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2883         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2884         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2885         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2886         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2887         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2888         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2889         prototype.
2890         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2891         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2892         * auto-load.c: Remove _initialize_auto_load prototype.
2893         * auxv.c: Remove _initialize_auxv prototype.
2894         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2895         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2896         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2897         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2898         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2899         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2900         prototype.
2901         * break-catch-throw.c: Remove _initialize_break_catch_throw
2902         prototype.
2903         * breakpoint.c: Remove _initialize_breakpoint prototype.
2904         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2905         * btrace.c: Remove _initialize_btrace prototype.
2906         * charset.c: Remove _initialize_charset prototype.
2907         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2908         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2909         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2910         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2911         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2912         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2913         * coffread.c: Remove _initialize_coffread prototype.
2914         * compile/compile.c: Remove _initialize_compile prototype.
2915         * complaints.c: Remove _initialize_complaints prototype.
2916         * completer.c: Remove _initialize_completer prototype.
2917         * copying.awk: Remove _initialize_copying prototype.
2918         * copying.c: Regenerate.
2919         * core-regset.c: Remove _initialize_core_regset prototype.
2920         * corefile.c: Remove _initialize_core prototype.
2921         * corelow.c: Remove _initialize_corelow prototype.
2922         * cp-abi.c: Remove _initialize_cp_abi prototype.
2923         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2924         * cp-support.c: Remove _initialize_cp_support prototype.
2925         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2926         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2927         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2928         * ctf.c: Remove _initialize_ctf prototype.
2929         * d-lang.c: Remove _initialize_d_language prototype.
2930         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2931         prototype.
2932         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2933         * dbxread.c: Remove _initialize_dbxread prototype.
2934         * dcache.c: Remove _initialize_dcache prototype.
2935         * demangle.c: Remove _initialize_demangler prototype.
2936         * disasm-selftests.c: Remove _initialize_disasm_selftests
2937         prototype.
2938         * disasm.c: Remove _initialize_disasm prototype.
2939         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2940         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2941         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2942         prototype.
2943         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2944         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2945         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2946         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2947         * elfread.c: Remove _initialize_elfread prototype.
2948         * exec.c: Remove _initialize_exec prototype.
2949         * extension.c: Remove _initialize_extension prototype.
2950         * f-lang.c: Remove _initialize_f_language prototype.
2951         * f-valprint.c: Remove _initialize_f_valprint prototype.
2952         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2953         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2954         * filesystem.c: Remove _initialize_filesystem prototype.
2955         * findcmd.c: Remove _initialize_mem_search prototype.
2956         * fork-child.c: Remove _initialize_fork_child prototype.
2957         * frame-base.c: Remove _initialize_frame_base prototype.
2958         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2959         * frame.c: Remove _initialize_frame prototype.
2960         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2961         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2962         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2963         * gcore.c: Remove _initialize_gcore prototype.
2964         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2965         * gdbarch.c: Regenerate.
2966         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2967         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2968         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2969         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2970         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2971         * go-lang.c: Remove _initialize_go_language prototype.
2972         * go32-nat.c: Remove _initialize_go32_nat prototype.
2973         * guile/guile.c: Remove _initialize_guile prototype.
2974         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2975         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2976         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2977         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2978         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2979         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2980         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2981         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2982         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2983         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2984         prototype.
2985         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2986         prototype.
2987         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2988         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2989         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2990         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2991         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2992         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2993         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2994         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2995         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2996         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2997         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2998         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2999         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3000         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3001         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3002         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3003         prototype.
3004         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3005         prototype.
3006         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3007         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3008         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3009         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3010         * infcall.c: Remove _initialize_infcall prototype.
3011         * infcmd.c: Remove _initialize_infcmd prototype.
3012         * inferior.c: Remove _initialize_inferiors prototype.
3013         * inflow.c: Remove _initialize_inflow prototype.
3014         * infrun.c: Remove _initialize_infrun prototype.
3015         * interps.c: Remove _initialize_interpreter prototype.
3016         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3017         * jit.c: Remove _initialize_jit prototype.
3018         * language.c: Remove _initialize_language prototype.
3019         * linux-fork.c: Remove _initialize_linux_fork prototype.
3020         * linux-nat.c: Remove _initialize_linux_nat prototype.
3021         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3022         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3023         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3024         * m2-lang.c: Remove _initialize_m2_language prototype.
3025         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3026         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3027         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3028         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3029         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3030         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3031         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3032         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3033         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3034         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3035         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3036         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3037         * machoread.c: Remove _initialize_machoread prototype.
3038         * macrocmd.c: Remove _initialize_macrocmd prototype.
3039         * macroscope.c: Remove _initialize_macroscope prototype.
3040         * maint.c: Remove _initialize_maint_cmds prototype.
3041         * mdebugread.c: Remove _initialize_mdebugread prototype.
3042         * memattr.c: Remove _initialize_mem prototype.
3043         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3044         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3045         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3046         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3047         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3048         * microblaze-linux-tdep.c: Remove
3049         _initialize_microblaze_linux_tdep prototype.
3050         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3051         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3052         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3053         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3054         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3055         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3056         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3057         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3058         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3059         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3060         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3061         prototype.
3062         * mipsread.c: Remove _initialize_mipsread prototype.
3063         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3064         prototype.
3065         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3066         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3067         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3068         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3069         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3070         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3071         prototype.
3072         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3073         * nto-procfs.c: Remove _initialize_procfs prototype.
3074         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3075         * objc-lang.c: Remove _initialize_objc_language prototype.
3076         * objfiles.c: Remove _initialize_objfiles prototype.
3077         * observer.c: Remove observer_test_first_notification_function,
3078         observer_test_second_notification_function,
3079         observer_test_third_notification_function, and
3080         _initialize_observer prototypes.
3081         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3082         * osabi.c: Remove _initialize_gdb_osabi prototype.
3083         * osdata.c: Remove _initialize_osdata prototype.
3084         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3085         * parse.c: Remove _initialize_parse prototype.
3086         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3087         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3088         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3089         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3090         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3091         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3092         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3093         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3094         * printcmd.c: Remove _initialize_printcmd prototype.
3095         * probe.c: Remove _initialize_probe prototype.
3096         * proc-api.c: Remove _initialize_proc_api prototype.
3097         * proc-events.c: Remove _initialize_proc_events prototype.
3098         * proc-service.c: Remove _initialize_proc_service prototype.
3099         * procfs.c: Remove _initialize_procfs prototype.
3100         * psymtab.c: Remove _initialize_psymtab prototype.
3101         * python/python.c: Remove _initialize_python prototype.
3102         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3103         * record-btrace.c: Remove _initialize_record_btrace prototype.
3104         * record-full.c: Remove _initialize_record_full prototype.
3105         * record.c: Remove _initialize_record prototype.
3106         * regcache.c: Remove _initialize_regcache prototype.
3107         * reggroups.c: Remove _initialize_reggroup prototype.
3108         * remote-notif.c: Remove _initialize_notif prototype.
3109         * remote-sim.c: Remove _initialize_remote_sim prototype.
3110         * remote.c: Remove _initialize_remote prototype.
3111         * reverse.c: Remove _initialize_reverse prototype.
3112         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3113         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3114         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3115         prototype.
3116         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3117         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3118         * rust-exp.y: Remove _initialize_rust_exp prototype.
3119         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3120         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3121         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3122         * score-tdep.c: Remove _initialize_score_tdep prototype.
3123         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3124         prototype.
3125         * ser-go32.c: Remove _initialize_ser_dos prototype.
3126         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3127         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3128         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3129         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3130         * serial.c: Remove _initialize_serial prototype.
3131         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3132         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3133         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3134         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3135         * skip.c: Remove _initialize_step_skip prototype.
3136         * sol-thread.c: Remove _initialize_sol_thread prototype.
3137         * solib-aix.c: Remove _initialize_solib_aix prototype.
3138         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3139         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3140         * solib-frv.c: Remove _initialize_frv_solib prototype.
3141         * solib-spu.c: Remove _initialize_spu_solib prototype.
3142         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3143         * solib-target.c: Remove _initialize_solib_target prototype.
3144         * solib.c: Remove _initialize_solib prototype.
3145         * source.c: Remove _initialize_source prototype.
3146         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3147         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3148         prototype.
3149         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3150         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3151         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3152         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3153         prototype.
3154         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3155         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3156         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3157         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3158         prototype.
3159         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3160         prototype.
3161         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3162         prototype.
3163         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3164         prototype.
3165         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3166         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3167         prototype.
3168         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3169         prototype.
3170         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3171         prototype.
3172         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3173         prototype.
3174         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3175         prototype.
3176         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3177         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3178         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3179         * stabsread.c: Remove _initialize_stabsread prototype.
3180         * stack.c: Remove _initialize_stack prototype.
3181         * stap-probe.c: Remove _initialize_stap_probe prototype.
3182         * std-regs.c: Remove _initialize_frame_reg prototype.
3183         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3184         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3185         * symfile.c: Remove _initialize_symfile prototype.
3186         * symmisc.c: Remove _initialize_symmisc prototype.
3187         * symtab.c: Remove _initialize_symtab prototype.
3188         * target-dcache.c: Remove _initialize_target_dcache prototype.
3189         * target-descriptions.c: Remove _initialize_target_descriptions
3190         prototype.
3191         * thread.c: Remove _initialize_thread prototype.
3192         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3193         prototype.
3194         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3195         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3196         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3197         prototype.
3198         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3199         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3200         * tracefile.c: Remove _initialize_tracefile prototype.
3201         * tracepoint.c: Remove _initialize_tracepoint prototype.
3202         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3203         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3204         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3205         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3206         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3207         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3208         * tui/tui.c: Remove _initialize_tui prototype.
3209         * typeprint.c: Remove _initialize_typeprint prototype.
3210         * user-regs.c: Remove _initialize_user_regs prototype.
3211         * utils.c: Remove _initialize_utils prototype.
3212         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3213         * valarith.c: Remove _initialize_valarith prototype.
3214         * valops.c: Remove _initialize_valops prototype.
3215         * valprint.c: Remove _initialize_valprint prototype.
3216         * value.c: Remove _initialize_values prototype.
3217         * varobj.c: Remove _initialize_varobj prototype.
3218         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3219         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3220         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3221         * windows-nat.c: Remove _initialize_windows_nat,
3222         _initialize_check_for_gdb_ini, and _initialize_loadable
3223         prototypes.
3224         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3225         * xcoffread.c: Remove _initialize_xcoffread prototype.
3226         * xml-support.c: Remove _initialize_xml_support prototype.
3227         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3228         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3229         prototype.
3230         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3231         prototype.
3232         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3233
3234 2017-09-08  Keith Seitz  <keiths@redhat.com>
3235
3236         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3237         field.
3238
3239 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3240
3241         * f-valprint.c (f_val_print): Remove check for one byte
3242         sized integers. Remove printing of character type.
3243
3244 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3245             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3246             Bernhard Heckel  <bernhard.heckel@intel.com>
3247
3248         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3249         to maintain proper indentation when printing pointers/refs.
3250
3251 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3252
3253         GDB 8.0.1 released.
3254
3255 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3256
3257         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3258
3259 2017-09-05  Tom Tromey  <tom@tromey.com>
3260
3261         * parse.c (funcall_chain): Now a std::vector.
3262         (start_arglist, end_arglist): Simplify.
3263         (free_funcalls): Remove.
3264         (parse_exp_in_context_1): Remove cleanup.
3265
3266 2017-09-05  Tom Tromey  <tom@tromey.com>
3267
3268         * go-exp.y (go_parse): Don't create a cleanup.
3269
3270 2017-09-05  Tom Tromey  <tom@tromey.com>
3271
3272         * d-exp.y (PrimaryExpression): Use std::string.
3273         (d_parse): Don't create a cleanup.
3274
3275 2017-09-05  Tom Tromey  <tom@tromey.com>
3276
3277         * utils.c (do_clear_parser_state): Remove.
3278         (make_cleanup_clear_parser_state): Remove.
3279         * p-exp.y (pascal_parse): Use scoped_restore.
3280         * m2-exp.y (m2_parse): Use scoped_restore.
3281         * f-exp.y (f_parse): Use scoped_restore.
3282         * d-exp.y (d_parse): Use scoped_restore.
3283         * c-exp.y (c_parse): Use scoped_restore.
3284         * ada-exp.y (ada_parse): Use scoped_restore.
3285         * utils.h (make_cleanup_clear_parser_state): Remove.
3286
3287 2017-09-06  Keith Seitz  <keiths@redhat.com>
3288
3289         * dwarf2read.c (dw2_linkage_name_attr): New function.
3290         (dw2_linkage_name): New function.
3291         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3292         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3293         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3294
3295 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3296
3297         * config/djgpp/djconfig.sh: Correct shell portability issue.
3298
3299 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3300
3301         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3302
3303 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3304
3305         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3306         * NEWS: Mention new FreeBSD/mips native configuration.
3307         * configure.host: Add aarch64*-*-freebsd*.
3308         * configure.nat: Likewise.
3309         * aarch64-fbsd-nat.c: New file.
3310
3311 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3312
3313         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3314         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3315         * NEWS: Mention new FreeBSD/aarch64 target.
3316         * configure.tgt: Add aarch64*-*-freebsd*.
3317         * aarch64-fbsd-tdep.c: New file.
3318         * aarch64-fbsd-tdep.h: New file.
3319
3320 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3321
3322         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3323
3324 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3325
3326         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3327         of TLS symbols.
3328
3329 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3330
3331         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3332         call.
3333
3334 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3335
3336         * infrun.c (follow_exec): Call add_thread after
3337         target_find_description.
3338
3339 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3340
3341         * infrun.c (handle_inferior_event_1): When exec'ing, read
3342         stop_pc after follow_exec.
3343
3344 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3345
3346         * remote.c (process_g_packet): Update error message.
3347
3348 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3349
3350         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3351         targets.
3352
3353 2017-09-05  Pedro Alves  <palves@redhat.com>
3354
3355         * eval.c (eval_call, evaluate_funcall): New functions, factored
3356         out from ...
3357         (evaluate_subexp_standard): ... this.
3358
3359 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3360
3361         * amd64-tdep.c (amd64_target_description): Create target
3362         descriptions.
3363         (_initialize_amd64_tdep): Don't call functions
3364         initialize_tdesc_amd64_*.  Add self tests.
3365         * arch/amd64.c (amd64_create_target_description): Add parameter
3366         is_linux.  Call set_tdesc_osabi if is_linux is true.
3367         * arch/amd64.h (amd64_create_target_description): Update the
3368         declaration.
3369         * arch/i386.c (i386_create_target_description): Add parameter
3370         is_linux.  Call set_tdesc_osabi if is_linux is true.
3371         * arch/i386.h (i386_create_target_description): Update
3372         declaration.
3373         * configure.tgt: Add i386.o to gdb_target_obs.
3374         * features/Makefile (XMLTOC): Remove i386/*.xml.
3375         * features/i386/amd64-avx-avx512.c: Remove.
3376         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3377         * features/i386/amd64-avx-mpx.c: Remove.
3378         * features/i386/amd64-avx.c: Remove.
3379         * features/i386/amd64-mpx.c: Remove.
3380         * features/i386/amd64.c: Remove.
3381         * features/i386/i386-avx-avx512.c: Remove.
3382         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3383         * features/i386/i386-avx-mpx.c: Remove.
3384         * features/i386/i386-avx.c: Remove.
3385         * features/i386/i386-mmx.c: Remove.
3386         * features/i386/i386-mpx.c: Remove.
3387         * features/i386/i386.c: Remove.
3388         * i386-tdep.c: Don't include features/i386/i386*.c., include
3389         target-descriptions.h and arch/i386.h.
3390         (i386_target_description): Create target descriptions.
3391         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3392         functions.  Do self tests.
3393
3394 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3395
3396         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3397         * features/i386/amd64-avx-avx512-linux.c: Removed.
3398         * features/i386/amd64-avx-linux.c: Removed.
3399         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3400         * features/i386/amd64-avx-mpx-linux.c: Removed.
3401         * features/i386/amd64-linux.c: Removed.
3402         * features/i386/amd64-mpx-linux.c: Removed.
3403         * features/i386/x32-avx-avx512-linux.c: Removed.
3404         * features/i386/x32-avx-linux.c: Removed.
3405         * features/i386/x32-linux.c: Removed.
3406
3407 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3408
3409         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3410         features/i386/*.c.
3411         (amd64_linux_read_description): Call
3412         amd64_create_target_description.
3413         * arch/amd64.c: New file.
3414         * arch/amd64.h: New file.
3415         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3416         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3417
3418 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3419
3420         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3421         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3422         (amd64_linux_read_description): Create target descriptions.
3423         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3424         functions.  Add unit tests.
3425         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3426         x32-core.xml.
3427         * features/i386/64bit-avx.c: Generated.
3428         * features/i386/64bit-avx512.c: Generated.
3429         * features/i386/64bit-core.c: Generated.
3430         * features/i386/64bit-linux.c: Generated.
3431         * features/i386/64bit-mpx.c: Generated.
3432         * features/i386/64bit-pkeys.c: Generated.
3433         * features/i386/64bit-segments.c: Generated.
3434         * features/i386/64bit-sse.c: Generated.
3435         * features/i386/x32-core.c: Generated.
3436         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3437         c files for amd64-linux and x32-linux.
3438
3439 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3440
3441         * amd64-linux-tdep.c (amd64_linux_read_description): New
3442         function.
3443         (amd64_linux_core_read_description): Call
3444         amd64_linux_read_description.
3445         (amd64_linux_init_abi): Likewise.
3446         (amd64_x32_linux_init_abi): Likewise.
3447         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3448         * x86-linux-nat.c (x86_linux_read_description): Call
3449         amd64_linux_read_description.
3450
3451 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3452
3453         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3454         comments.
3455
3456 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3457
3458         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3459         * features/i386/i386-avx-avx512-linux.c: Remove.
3460         * features/i386/i386-avx-linux.c: Remove.
3461         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3462         * features/i386/i386-avx-mpx-linux.c: Remove.
3463         * features/i386/i386-linux.c: Remove.
3464         * features/i386/i386-mmx-linux.c: Remove.
3465         * features/i386/i386-mpx-linux.c: Remove.
3466
3467 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3468
3469         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3470         (SFILES): Add arch/i386.c.
3471         (HFILES_NO_SRCDIR): Add arch/i386.h.
3472         * arch/i386.c: New file.
3473         * arch/i386.h: New file.
3474         * arch/tdesc.h (allocate_target_description): Declare.
3475         (set_tdesc_architecture): Declare.
3476         (set_tdesc_osabi): Declare.
3477         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3478         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3479         include arch/i386.h.
3480         (i386_linux_read_description): Remove code and call
3481         i386_create_target_description.
3482         (set_tdesc_architecture): New function.
3483         (set_tdesc_osabi): New function.
3484         * target-descriptions.h (allocate_target_description): Remove.
3485
3486 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3487
3488         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3489         * target-descriptions.c (tdesc_create_feature): Likewise, and
3490         adjust code.
3491         * features/i386/32bit-avx.c: Re-generated.
3492         * features/i386/32bit-avx512.c: Re-generated.
3493         * features/i386/32bit-core.c: Re-generated.
3494         * features/i386/32bit-linux.c: Re-generated.
3495         * features/i386/32bit-mpx.c: Re-generated.
3496         * features/i386/32bit-pkeys.c: Re-generated.
3497         * features/i386/32bit-sse.c: Re-generated.
3498
3499 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3500
3501         * regformats/regdef.h (struct reg): Override operator == and !=.
3502
3503 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3504
3505         * arch/tdesc.h: New file.
3506         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3507         * target-descriptions.c: Update comments.
3508         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3509         declarations.
3510         * features/i386/32bit-avx.c: Re-generated.
3511         * features/i386/32bit-avx512.c: Re-generated.
3512         * features/i386/32bit-core.c: Re-generated.
3513         * features/i386/32bit-linux.c: Re-generated.
3514         * features/i386/32bit-mpx.c: Re-generated.
3515         * features/i386/32bit-pkeys.c: Re-generated.
3516         * features/i386/32bit-sse.c: Re-generated.
3517
3518 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3519
3520         * regformats/regdat.sh: Update generated code.
3521
3522 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3523
3524         * regformats/regdat.sh: Adjust code order.
3525
3526 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3527
3528         * expprint.c (dump_subexp_body_standard): Use constant format
3529         string in fprintf_filtered call.
3530
3531 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3532
3533         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3534         NetBSD/i386.
3535         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3536
3537 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3538
3539         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3540
3541 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3542
3543         * bsd-kvm.o: Define _KMEMUSER.
3544         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3545         * configure: Regenerate.
3546
3547 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3548
3549         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3550         * i386-fbsd-nat.c: Likewise.
3551
3552 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3553
3554         * unittests/array-view-selftests.c: Add include of <array>.
3555
3556 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3557
3558         * spu-tdep.c (flush_ea_cache): Add missing argument to
3559         call_function_by_hand.
3560
3561 2017-09-04  Pedro Alves  <palves@redhat.com>
3562
3563         * NEWS (Safer support for debugging with no debug info): New.
3564
3565 2017-09-04  Pedro Alves  <palves@redhat.com>
3566
3567         * c-exp.y (function_method, function_method_void): Add current
3568         instance flags to TYPE_INSTANCE.
3569         * dwarf2read.c (check_modifier): New.
3570         (compute_delayed_physnames): Assert that only C++ adds delayed
3571         physnames.  Mark fn_fields as const/volatile depending on
3572         physname.
3573         * eval.c (make_params): New type_instance_flags parameter.  Use
3574         it as the new type's instance flags.
3575         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3576         flags element and pass it to make_params.
3577         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3578         instance flags element.
3579         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3580         * gdbtypes.h: Include "enum-flags.h".
3581         (type_instance_flags): New enum-flags type.
3582         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3583         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3584         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3585         (follow_type_instance_flags): New function.
3586         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3587         * parser-defs.h (follow_type_instance_flags): Declare.
3588         * valops.c (value_struct_elt_for_reference): const/volatile must
3589         match too.
3590
3591 2017-09-04  Pedro Alves  <palves@redhat.com>
3592
3593         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3594         function/method scopes; lookup the nested name as a function local
3595         static variable.
3596
3597 2017-09-04  Pedro Alves  <palves@redhat.com>
3598
3599         (%type <voidval>): Add function_method.
3600         * c-exp.y (exp): New production for calls with no arguments.
3601         (function_method, function_method_void_or_typelist): New
3602         productions.
3603         (exp): New production for "method()::static_var".
3604         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3605         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3606         Handle OP_FUNC_STATIC_VAR.
3607         * parse.c (operator_length_standard):
3608         Handle OP_FUNC_STATIC_VAR.
3609
3610 2017-09-04  Pedro Alves  <palves@redhat.com>
3611
3612         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3613         handling.
3614         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3615         Ditto.
3616         * parse.c (operator_length_standard, operator_check_standard):
3617         Ditto.
3618         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3619
3620 2017-09-04  Pedro Alves  <palves@redhat.com>
3621
3622         * ax-gdb.c: Include "typeprint.h".
3623         (gen_expr_for_cast): New function.
3624         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3625         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3626         type is unknown.
3627         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3628         nodebug_data_symbol.
3629         * eval.c: Include "typeprint.h".
3630         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3631         Error out if symbol has unknown type.
3632         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3633         evaluate_subexp_for_cast.
3634         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3635         OP_VAR_MSYM_VALUE.
3636         (evaluate_subexp_for_cast): New function.
3637         * gdbtypes.c (init_nodebug_var_type): New function.
3638         (objfile_type): Use it to initialize types of variables with no
3639         debug info.
3640         * typeprint.c (error_unknown_type): New.
3641         * typeprint.h (error_unknown_type): New declaration.
3642         * compile/compile-c-types.c (convert_type_basic): Handle
3643         TYPE_CODE_ERROR; warn and fallback to int for variables with
3644         unknown type.
3645
3646 2017-09-04  Pedro Alves  <palves@redhat.com>
3647
3648         * eval.c (evaluate_var_value): New function, factored out from ...
3649         (evaluate_subexp_standard): ... here.
3650
3651 2017-09-04  Pedro Alves  <palves@redhat.com>
3652
3653         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3654         Remove useless assignments to 'op'.
3655
3656 2017-09-04  Pedro Alves  <palves@redhat.com>
3657
3658         * eval.c (eval_skip_value): New function.
3659         (evaluate_subexp_standard): Use it.
3660
3661 2017-09-04  Pedro Alves  <palves@redhat.com>
3662
3663         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3664         function name from symbol/minsym and pass it to
3665         error_call_unknown_return_type.
3666
3667 2017-09-04  Pedro Alves  <palves@redhat.com>
3668
3669         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3670         * ax-gdb.c (gen_msym_var_ref): New function.
3671         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3672         * eval.c (evaluate_var_msym_value): New function.
3673         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3674         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3675         to call_function_by_hand.
3676         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3677         Handle OP_VAR_MSYM_VALUE.
3678         (union exp_element) <msymbol>: New field.
3679         * minsyms.h (struct type): Forward declare.
3680         (find_minsym_type_and_address): Declare.
3681         * parse.c (write_exp_elt_msym): New function.
3682         (write_exp_msymbol): Delete, refactored as ...
3683         (find_minsym_type_and_address): ... this new function.
3684         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3685         (operator_length_standard, operator_check_standard): Handle
3686         OP_VAR_MSYM_VALUE.
3687         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3688
3689 2017-09-04  Pedro Alves  <palves@redhat.com>
3690
3691         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3692         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3693         unknown.
3694         * ada-typeprint.c (print_func_type): Handle functions with unknown
3695         return type.
3696         * c-typeprint.c (c_type_print_base): Handle functions and methods
3697         with unknown return type.
3698         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3699         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3700         * compile/compile-c-types.c: Include "objfiles.h".
3701         (convert_func): For functions with unknown return type, warn and
3702         default to int.
3703         * compile/compile-object-run.c (compile_object_run): Adjust call
3704         to call_function_by_hand_dummy.
3705         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3706         call_function_by_hand.
3707         * eval.c (evaluate_subexp_standard): Adjust calls to
3708         call_function_by_hand.  Handle functions and methods with unknown
3709         return type.  Pass expect_type to call_function_by_hand.
3710         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3711         return type.
3712         * gcore.c (call_target_sbrk): Adjust call to
3713         call_function_by_hand.
3714         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3715         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3716         an integer address type instead of nodebug.
3717         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3718         call_function_by_hand.
3719         * infcall.c (error_call_unknown_return_type): New function.
3720         (call_function_by_hand): New "default_return_type" parameter.
3721         Pass it down.
3722         (call_function_by_hand_dummy): New "default_return_type"
3723         parameter.  Use it instead of defaulting to int.  If there's no
3724         default and the return type is unknown, throw an error.  If
3725         there's a default return type, and the called function has no
3726         debug info, then assume the function is prototyped.
3727         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3728         New "default_return_type" parameter.
3729         (error_call_unknown_return_type): New declaration.
3730         * linux-fork.c (call_lseek): Cast return type of lseek.
3731         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3732         call_function_by_hand.
3733         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3734         calls to call_function_by_hand.
3735         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3736         return type.
3737         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3738         (value_nsstring, print_object_command): Adjust calls to
3739         call_function_by_hand.
3740         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3741         functions with unknown return type.
3742         (pascal_type_print_func_varspec_suffix): New function.
3743         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3744         TYPE_CODE_METHOD>: Use it.
3745         * python/py-value.c (valpy_call): Adjust call to
3746         call_function_by_hand.
3747         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3748         call_function_by_hand.
3749         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3750         call_function_by_hand.
3751         * valops.c (value_allocate_space_in_inferior): Adjust call to
3752         call_function_by_hand.
3753         * typeprint.c (type_print_unknown_return_type): New function.
3754         * typeprint.h (type_print_unknown_return_type): New declaration.
3755
3756 2017-09-04  Pedro Alves  <palves@redhat.com>
3757
3758         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3759         types with more than one parameter as prototyped.
3760
3761 2017-09-04  Pedro Alves  <palves@redhat.com>
3762
3763         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3764         (disassemble_command): Use gdb_disassembly_flags instead of bare
3765         int.
3766         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3767         (dump_insns, do_mixed_source_and_assembly_deprecated)
3768         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3769         Use gdb_disassembly_flags instead of bare int.
3770         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3771         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3772         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3773         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3774         (enum gdb_disassembly_flag): ... values of this new enumeration.
3775         (gdb_disassembly_flags): Define.
3776         (gdb_disassembly)
3777         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3778         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3779         gdb_disassembly_flags instead of bare int.
3780         * record-btrace.c (btrace_insn_history)
3781         (record_btrace_insn_history, record_btrace_insn_history_range)
3782         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3783         instead of bare int.
3784         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3785         Use gdb_disassembly_flags instead of bare int.
3786         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3787         Define.
3788         * target-delegates.c: Regenerate.
3789         * target.c (target_insn_history, target_insn_history_from)
3790         (target_insn_history_range): Use gdb_disassembly_flags instead of
3791         bare int.
3792         * target.h: Include "disasm.h".
3793         (struct target_ops) <to_insn_history, to_insn_history_from,
3794         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3795         int.
3796         (target_insn_history, target_insn_history_from)
3797         (target_insn_history_range): Use gdb_disassembly_flags instead of
3798         bare int.
3799
3800 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3801
3802         * cli/cli-script.c (build_command_line): For if/while commands,
3803         check whether args is empty.
3804
3805 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3806
3807         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3808         (enum command_control_type): Likewise.
3809         (struct command_line): Likewise.
3810         (free_command_lines): Likewise.
3811         (struct command_lines_deleter): Likewise.
3812         (command_line_up): Likewise.
3813         (read_command_lines): Likewise.
3814         (read_command_lines_1): Likewise.
3815         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3816         (enum command_control_type): Likewise.
3817         (struct command_line): Likewise.
3818         (free_command_lines): Likewise.
3819         (struct command_lines_deleter): Likewise.
3820         (command_line_up): Likewise.
3821         (read_command_lines): Likewise.
3822         (read_command_lines_1): Likewise.
3823         * breakpoint.h: Include cli/cli-script.h.
3824         * extension-priv.h: Likewise.
3825         * gdbcmd.h: Likewise.
3826
3827 2017-09-04  Pedro Alves  <palves@redhat.com>
3828
3829         * ada-lang.c (is_known_support_routine): Move sal declaration to
3830         where it is initialized.
3831         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3832         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3833         (clear_command, update_static_tracepoint): Remove init_sal
3834         references.  Move declarations closer to initializations.
3835         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3836         initializations.
3837         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3838         references.  Move sal declarations closer to initializations.
3839         * frame.c (find_frame_sal): Return a symtab_and_line via function
3840         return instead of output parameter.  Remove init_sal references.
3841         * frame.h (find_frame_sal): Return a symtab_and_line via function
3842         return instead of output parameter.
3843         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3844         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3845         instead of memset.
3846         (gdbscm_find_pc_line): Remove init_sal reference.
3847         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3848         references.  Move declarations closer to initializations.
3849         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3850         initializations.
3851         (finish_backward): Remove init_sal references.  Move declarations
3852         closer to initializations.
3853         * infrun.c (process_event_stop_test, handle_step_into_function)
3854         (insert_hp_step_resume_breakpoint_at_frame)
3855         (insert_step_resume_breakpoint_at_caller): Likewise.
3856         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3857         (symbol_to_sal): Likewise.
3858         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3859         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3860         to its initialization.
3861         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3862         init_sal references.  Move declarations closer to initializations.
3863         * source.c (get_current_source_symtab_and_line): Remove brace
3864         initialization.
3865         (set_current_source_symtab_and_line): Now takes the sal by const
3866         reference.  Remove brace initialization.
3867         (line_info): Remove init_sal reference.
3868         * source.h (set_current_source_symtab_and_line): Now takes a
3869         symtab_and_line via const reference.
3870         * stack.c (set_current_sal_from_frame): Adjust.
3871         (print_frame_info): Adjust.
3872         (get_last_displayed_sal): Return the sal via function return
3873         instead of via output parameter.  Simplify.
3874         (frame_info): Adjust.
3875         * stack.h (get_last_displayed_sal): Return the sal via function
3876         return instead of via output parameter.
3877         * symtab.c (init_sal): Delete.
3878         (find_pc_sect_line): Remove init_sal references.  Move
3879         declarations closer to initializations.
3880         (find_function_start_sal): Remove init_sal references.  Move
3881         declarations closer to initializations.
3882         * symtab.h (struct symtab_and_line): In-class initialize all
3883         fields.
3884         * tracepoint.c (set_traceframe_context)
3885         (print_one_static_tracepoint_marker): Remove init_sal references.
3886         Move declarations closer to initializations.
3887         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3888         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3889         declarations closer to initializations.
3890         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3891         init_sal references.  Adjust.
3892
3893 2017-09-04  Pedro Alves  <palves@redhat.com>
3894
3895         * ax-gdb.c (agent_command_1): Use range-for.
3896         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3897         * breakpoint.c: Include "common/array-view.h".
3898         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3899         parameter from struct symtabs_and_lines to
3900         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3901         (breakpoint_sals_to_pc): Change sals parameter from struct
3902         symtabs_and_lines to std::vector reference.
3903         (check_fast_tracepoint_sals): Change sals parameter from struct
3904         symtabs_and_lines to std::array_view.  Use range-for.
3905         (decode_static_tracepoint_spec): Return a std::vector instead of
3906         symtabs_and_lines.  Update.
3907         (create_breakpoint): Update.
3908         (break_range_command, until_break_command, clear_command): Update.
3909         (base_breakpoint_decode_location, bkpt_decode_location)
3910         (bkpt_probe_create_sals_from_location)
3911         (bkpt_probe_decode_location, tracepoint_decode_location)
3912         (tracepoint_probe_decode_location)
3913         (strace_marker_create_sals_from_location): Return a std::vector
3914         instead of symtabs_and_lines.
3915         (strace_marker_create_breakpoints_sal): Update.
3916         (strace_marker_decode_location): Return a std::vector instead of
3917         symtabs_and_lines.  Update.
3918         (update_breakpoint_locations): Change struct symtabs_and_lines
3919         parameters to gdb::array_view.  Adjust.
3920         (location_to_sals): Return a std::vector instead of
3921         symtabs_and_lines.  Update.
3922         (breakpoint_re_set_default): Use std::vector instead of struct
3923         symtabs_and_lines.
3924         (decode_location_default): Return a std::vector instead of
3925         symtabs_and_lines.  Update.
3926         * breakpoint.h: Include "common/array-view.h".
3927         (struct breakpoint_ops) <decode_location>: Now returns a
3928         std::vector instead of returning a symtabs_and_lines via output
3929         parameter.
3930         (update_breakpoint_locations): Change sals parameters to use
3931         gdb::array_view.
3932         * cli/cli-cmds.c (edit_command, list_command): Update to use
3933         std::vector and gdb::array_view.
3934         (ambiguous_line_spec): Adjust to use gdb::array_view and
3935         range-for.
3936         (compare_symtabs): Rename to ...
3937         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3938         const reference and adjust.
3939         (filter_sals): Rewrite using std::vector and standard algorithms.
3940         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3941         (jump_command): Update to use std::vector.
3942         * linespec.c (struct linespec_state) <canonical_names>: Update
3943         comment.
3944         (add_sal_to_sals_basic): Delete.
3945         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3946         (decode_line_2, create_sals_line_offset)
3947         (convert_address_location_to_sals, convert_linespec_to_sals)
3948         (convert_explicit_location_to_sals, parse_linespec)
3949         (event_location_to_sals, decode_line_full, decode_line_1)
3950         (decode_line_with_current_source)
3951         (decode_line_with_last_displayed, decode_objc)
3952         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3953         (linespec_result::~linespec_result): Adjust to use std::vector
3954         instead of symtabs_and_lines.
3955         * linespec.h (linespec_sals::sals): Now a std::vector.
3956         (struct linespec_result): Use std::vector, bool, and in-class
3957         initialization.
3958         (decode_line_1, decode_line_with_current_source)
3959         (decode_line_with_last_displayed): Return std::vector.
3960         * macrocmd.c (info_macros_command): Use std::vector.
3961         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3962         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3963         std::vector.
3964         * probe.h (parse_probes): Return a std::vector.
3965         * python/python.c (gdbpy_decode_line): Use std::vector and
3966         gdb::array_view.
3967         * source.c (select_source_symtab, line_info): Use std::vector.
3968         * stack.c (func_command): Use std::vector.
3969         * symtab.h (struct symtabs_and_lines): Delete.
3970         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3971
3972 2017-09-04  Pedro Alves  <palves@redhat.com>
3973
3974         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3975         unittests/array-view-selftests.c.
3976         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3977         * common/array-view.h: New file.
3978         * unittests/array-view-selftests.c: New file.
3979
3980 2017-09-04  Pedro Alves  <palves@redhat.com>
3981
3982         * cli/cli-cmds.c (edit_command): Pass message to
3983         ambiguous_line_spec.
3984         (list_command): Pass message to ambiguous_line_spec.  Say
3985         "first"/"last" instead of "start" and "end" to be consistent with
3986         the manual.
3987         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3988         them to print formatted message.
3989
3990 2017-09-04  Pedro Alves  <palves@redhat.com>
3991
3992         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3993         ftrace_update_insns by reference instead of pointer.
3994
3995 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3996
3997         * i386-go32-tdep.c: Include x86-xstate.h.
3998         (i386_go32_init_abi): Call i386_target_description.
3999         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4000         if xcr0 is X86_XSTATE_X87_MASK.
4001         * i386-tdep.h (tdesc_i386): Remove the declaration.
4002         (tdesc_i386_mmx): Likewise.
4003
4004 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4005
4006         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4007         X86_XSTATE_SSE_MASK instead of 0.
4008
4009 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4010
4011         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4012         i386_target_description.
4013         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4014         i386_target_description.
4015         * i386-tdep.c (i386_gdbarch_init): Likewise.
4016
4017 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4018
4019         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4020         (x86_darwin_init_abi_64): Call amd64_target_description.
4021         * amd64-dicos-tdep.c: Likewise.
4022         * amd64-fbsd-nat.c: Likewise.
4023         * amd64-fbsd-tdep.c: Likewise.
4024         * amd64-nbsd-tdep.c: Likewise.
4025         * amd64-obsd-tdep.c: Likewise.
4026         * amd64-sol2-tdep.c: Likewise.
4027         * amd64-windows-tdep.c: Likewise.
4028         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4029
4030 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4031
4032         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4033         (btrace_function) <insn>: Change type to use std::vector.
4034         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4035         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4036         ftrace_update_insns, ftrace_compute_global_level_offset,
4037         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4038         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4039         change to std::vector.
4040         (ftrace_update_insns): Adjust to change to std::vector, change
4041         type of INSN parameter.
4042         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4043         * record-btrace.c (btrace_call_history_insn_range,
4044         btrace_compute_src_line_range,
4045         record_btrace_frame_prev_register): Adjust to change to
4046         std::vector.
4047         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4048         to change to std::vector.
4049
4050 2017-09-03  Tom Tromey  <tom@tromey.com>
4051
4052         * corefile.c (reopen_exec_file): Use std::string.
4053
4054 2017-09-03  Tom Tromey  <tom@tromey.com>
4055
4056         * compile/compile.c (compile_register_name_mangled): Return
4057         std::string.
4058         * compile/compile-loc2c.c (pushf_register_address): Update.
4059         (pushf_register): Update.
4060         * compile/compile-c-types.c (convert_array): Update.
4061         * compile/compile-c-symbols.c (generate_vla_size): Update.
4062         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4063         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4064         (convert_one_symbol): Update.
4065         (generate_c_for_for_one_variable): Update.
4066         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4067         std::string.
4068         (generate_register_struct): Update.
4069         * compile/compile-internal.h (c_get_range_decl_name): Return a
4070         std::string.
4071         (compile_register_name_mangled): Return std::string.
4072
4073 2017-09-03  Tom Tromey  <tom@tromey.com>
4074
4075         * utils.c (perror_string): Return a std::string.
4076         (throw_perror_with_name, perror_warning_with_name): Update.
4077
4078 2017-09-03  Tom Tromey  <tom@tromey.com>
4079
4080         * demangle.c (demangle_command): Use std::string,
4081         unique_xmalloc_ptr.
4082
4083 2017-09-03  Tom Tromey  <tom@tromey.com>
4084
4085         * cli/cli-setshow.c (do_set_command): Use std::string.
4086
4087 2017-09-03  Tom Tromey  <tom@tromey.com>
4088
4089         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4090
4091 2017-09-03  Tom Tromey  <tom@tromey.com>
4092
4093         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4094
4095 2017-09-03  Tom Tromey  <tom@tromey.com>
4096
4097         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4098         gdb::unique_xmalloc_ptr.
4099
4100 2017-09-03  Tom Tromey  <tom@tromey.com>
4101
4102         * thread.c (print_thread_info_1): Use string_printf.
4103         (thread_apply_command, thread_apply_all_command): Use
4104         std::string.
4105
4106 2017-09-03  Tom Tromey  <tom@tromey.com>
4107
4108         * valprint.c (val_print_string): Update.
4109         * gdbcore.h (memory_error_message): Return std::string.
4110         * corefile.c (memory_error_message): Return std::string.
4111         (memory_error): Update.
4112         * breakpoint.c (insert_bp_location): Update.
4113
4114 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4115
4116         * target/waitstatus.h (target_waitstatus_to_string): Change
4117         return type to std::string.
4118         * target/waitstatus.c (target_waitstatus_to_string): Return
4119         std::string.
4120         * target.h (target_waitstatus_to_string): Remove declaration.
4121         * infrun.c (resume, clear_proceed_status_thread,
4122         print_target_wait_results, do_target_wait, save_waitstatus,
4123         stop_all_threads): Adjust.
4124         * record-btrace.c (record_btrace_wait): Adjust.
4125         * target-debug.h
4126         (target_debug_print_struct_target_waitstatus_p): Adjust.
4127
4128 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4129
4130         PR gdb/22046
4131         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4132         detection.
4133
4134 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4135
4136         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4137         for setting/unsetting environment variables on the remote target.
4138         (New remote packets): Add entries for QEnvironmentHexEncoded,
4139         QEnvironmentUnset and QEnvironmentReset.
4140         * common/environ.c (gdb_environ::operator=): Extend method to
4141         handle m_user_set_env_list and m_user_unset_env_list.
4142         (gdb_environ::clear): Likewise.
4143         (match_var_in_string): Change type of first parameter from 'char
4144         *' to 'const char *'.
4145         (gdb_environ::set): Extend method to handle
4146         m_user_set_env_list and m_user_unset_env_list.
4147         (gdb_environ::unset): Likewise.
4148         (gdb_environ::clear_user_set_env): New method.
4149         (gdb_environ::user_set_envp): Likewise.
4150         (gdb_environ::user_unset_envp): Likewise.
4151         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4152         m_user_unset_env_list on move constructor/assignment.
4153         (unset): Add new default parameter 'update_unset_list = true'.
4154         (clear_user_set_env): New method.
4155         (user_set_envp): Likewise.
4156         (user_unset_envp): Likewise.
4157         (m_user_set_env_list): New std::set.
4158         (m_user_unset_env_list): Likewise.
4159         * common/rsp-low.c (hex2str): New function.
4160         (bin2hex): New overload for bin2hex function.
4161         * common/rsp-low.c (hex2str): New prototype.
4162         (str2hex): New overload prototype.
4163         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4164         QEnvironmentUnset and QEnvironmentReset.
4165         (remote_protocol_features): Add QEnvironmentHexEncoded,
4166         QEnvironmentUnset and QEnvironmentReset packets.
4167         (send_environment_packet): New function.
4168         (extended_remote_environment_support): Likewise.
4169         (extended_remote_create_inferior): Call
4170         extended_remote_environment_support.
4171         (_initialize_remote): Add QEnvironmentHexEncoded,
4172         QEnvironmentUnset and QEnvironmentReset packet configs.
4173         * unittests/environ-selftests.c (gdb_selftest_env_var):
4174         New variable.
4175         (test_vector_initialization): New function.
4176         (test_init_from_host_environ): Likewise.
4177         (test_reinit_from_host_environ): Likewise.
4178         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4179         Likewise.
4180         (test_unset_set_empty_vector): Likewise.
4181         (test_vector_clear): Likewise.
4182         (test_std_move): Likewise.
4183         (test_move_constructor):
4184         (test_self_move): Likewise.
4185         (test_set_unset_reset): Likewise.
4186         (run_tests): Rewrite in terms of the functions above.
4187
4188 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4189
4190         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4191         (adi_available): Use a temp variable of type CORE_ADDR as argument
4192         3 when calling target_auxv_search.
4193         (adi_normalize_address): Use masks and xor operators to calculate
4194         normalized address.
4195         (adi_read_versions, adi_write_versions, adi_print_versions)
4196         (do_examine, do_assign): Use paddress.
4197
4198 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4199
4200         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4201         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4202         out of loop and add supply of FIR.
4203         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4204         add collect of FIR.
4205
4206 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4207
4208         PR gdb/21827
4209         * cli/cli-script.c (define_command): Don't convert command name
4210         to lower case.
4211
4212 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4213
4214         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4215         Update all callers accordingly. Remove all code blocks handling
4216         the case where DISPP is not NULL.
4217
4218 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4219
4220         PR symtab/22003
4221         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4222         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4223         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4224
4225 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4226
4227         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4228         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4229         (read_comp_units_from_section): New parameter abbrev_section, use
4230         read_and_check_comp_unit_head, allocate signatured_type if needed.
4231         (create_all_comp_units): Update read_comp_units_from_section caller.
4232
4233 2017-08-23  Pedro Alves  <palves@redhat.com>
4234
4235         PR remote/21852
4236         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4237         to null_ptid and switch to thread without reading the registers
4238         after adding the inferior.
4239
4240 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4241
4242         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4243         compile-gcc.
4244         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4245         (compile_to_object): Implement compile_gcc.
4246         (_initialize_compile): Install "set compile-gcc".  Initialize
4247         compile_gcc.
4248
4249 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4250
4251         * compile/compile.c (compile_to_object): Conditionally call
4252         set_verbose.  Conditionally call compile or compile_v0.
4253
4254 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4255
4256         * sparc64-tdep.h: (adi_normalize_address): New export.
4257         * sparc-nat.h: (open_adi_tag_fd): New export.
4258         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4259         * sparc64-linux-tdep.c:
4260         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4261         (sparc64_linux_handle_segmentation_fault): New function.
4262         (sparc64_linux_init_abi): Register
4263         sparc64_linux_handle_segmentation_fault
4264         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4265         (sparc64_addr_bits_remove): New function.
4266         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4267         (MAX_PROC_NAME_SIZE): New macro.
4268         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4269         (sparc64adilist): New variable.
4270         (adi_proc_list): New variable.
4271         (find_adi_info): New function.
4272         (add_adi_info): New function.
4273         (get_adi_info_proc): New function.
4274         (get_adi_info): New function.
4275         (info_adi_command): New function.
4276         (read_maps_entry): New function.
4277         (adi_available): New function.
4278         (adi_normalize_address): New function.
4279         (adi_align_address): New function.
4280         (adi_convert_byte_count): New function.
4281         (adi_tag_fd): New function.
4282         (adi_is_addr_mapped): New function.
4283         (adi_read_versions): New function.
4284         (adi_write_versions): New function.
4285         (adi_print_versions): New function.
4286         (do_examine): New function.
4287         (do_assign): New function.
4288         (adi_examine_command): New function.
4289         (adi_assign_command): New function.
4290         (_initialize_sparc64_adi_tdep): New function.
4291
4292 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4293
4294         * breakpoint.c (breakpoints_info): Rename to ...
4295         (info_breakpoints_command): ... this.
4296         (watchpoints_info): Rename to ...
4297         (info_watchpoints_command): ... this.
4298         (tracepoints_info): Rename to ...
4299         (info_tracepoints_command): ... this.
4300         (_initialize_breakpoint): Adjust.
4301         * dcache.c (dcache_info): Rename to ...
4302         (info_display_command): ... this.
4303         (_initialize_dcache): Adjust.
4304         * frame.h (args_info): Rename to ...
4305         (info_args_command): ... this.
4306         (locals_info): Rename to ...
4307         (info_locals_command): ... this.
4308         * infcmd.c (nofp_registers_info): Rename to ...
4309         (info_registers_command): ... this.
4310         (float_info): Rename to ...
4311         (info_float_command): ... this.
4312         (program_info): Rename to ...
4313         (info_program_command): ... this.
4314         (all_registers_info): Rename to ...
4315         (info_all_registers_command): ... this.
4316         (vector_info): Rename to ...
4317         (info_vector_command): ... this.
4318         (float_info): Rename to ...
4319         (info_float_command): ... this.
4320         (_initialize_infcmd): Adjust.
4321         * inferior.h (term_info): Rename to ...
4322         (info_terminal_command): ... this.
4323         * inflow.c (term_info): Rename to ...
4324         (info_terminal_command): ... this.
4325         (_initialize_inflow): Adjust.
4326         * infrun.c (signals_info): Rename to ...
4327         (info_signals_command): ... this.
4328         (_initialize_infrun): Adjust.
4329         * objc-lang.c (classes_info): Rename to ...
4330         (info_classes_command): ... this.
4331         (selectors_info): Rename to ...
4332         (info_selectors_command): ... this.
4333         (_initialize_objc_language): Adjust.
4334         * printcmd.c (sym_info): Rename to ...
4335         (info_symbol_command): ... this.
4336         (address_info): Rename to ...
4337         (info_address_command): ... this.
4338         (display_info): Rename to ...
4339         (info_display_command): ... this.
4340         (_initialize_printcmd): Adjust.
4341         * reverse.c (bookmarks_info): Rename to ...
4342         (info_breakpoints_command): ... this.
4343         (_initialize_reverse): Adjust.
4344         * ser-go32.c (dos_info): Rename to ...
4345         (info_serial_command): ... this.
4346         (_initialize_ser_dos): Adjust.
4347         * skip.c (skip_info): Rename to ...
4348         (info_skip_command): ... this.
4349         (_initialize_step_skip): Adjust.
4350         * source.c (line_info): Rename to ...
4351         (info_line_command): ... this.
4352         (source_info): Rename to ...
4353         (info_source_command)
4354         * stack.c (frame_info): Rename to ...
4355         (info_frame_command): ... this.
4356         (locals_info): Rename to ...
4357         (info_locals_command): ... this.
4358         (args_info): Rename to ...
4359         (info_args_command): ... this.
4360         (_initialize_stack): Adjust.
4361         * symtab.c (sources_info): Rename to ...
4362         (info_sources_command): ... this.
4363         (variables_info): Rename to ...
4364         (info_variables_command): ... this.
4365         (functions_info): Rename to ...
4366         (info_functions_command): ... this.
4367         (types_info): Rename to ...
4368         (info_types_command): ... this.
4369         (_initialize_symtab): Adjust.
4370         * target.c (target_info): Rename to ...
4371         (info_target_command): ... this.
4372         (initialize_targets): Adjust.
4373         * tracepoint.c (tvariables_info): Rename to ...
4374         (info_tvariables_command): ... this.
4375         (scope_info): Rename to ...
4376         (info_scope_command): ... this.
4377         (trace_dump_actions): Adjust.
4378         (_initialize_tracepoint): Adjust.
4379
4380 2017-08-22  Tom Tromey  <tom@tromey.com>
4381
4382         * breakpoint.h (install_breakpoint): Update.
4383         * breakpoint.c (add_solib_catchpoint): Update.
4384         (install_breakpoint): Change argument to a std::unique_ptr.
4385         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4386         (create_breakpoint_sal, create_breakpoint): Update.
4387         (watch_command_1, catch_exec_command_1)
4388         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4389         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4390         Return the breakpoint.
4391         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4392         (new_single_step_breakpoint): Update.
4393         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4394         std::unique_ptr.
4395         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4396         std::unique_ptr.
4397         * break-catch-sig.c (create_signal_catchpoint): Use
4398         std::unique_ptr.
4399         * ada-lang.c (create_ada_exception_catchpoint): Use
4400         std::unique_ptr.
4401
4402 2017-08-22  Tom Tromey  <tom@tromey.com>
4403
4404         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4405
4406 2017-08-22  Tom Tromey  <tom@tromey.com>
4407
4408         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4409         (lookup_partial_symbol): Update.
4410
4411 2017-08-22  Tom Tromey  <tom@tromey.com>
4412
4413         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4414         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4415         (find_and_open_source, symtab_to_fullname): Update.
4416         * psymtab.c (psymtab_to_fullname): Update.
4417
4418 2017-08-22  Tom Tromey  <tom@tromey.com>
4419
4420         * exec.c (exec_file_attach): Update.
4421         * linux-thread-db.c (try_thread_db_load): Update.
4422         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4423         * utils.c (gdb_realpath): Change return type.
4424         (gdb_realpath_keepfile): Update.
4425         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4426         (_initialize_utils): Register the new self test.
4427         * source.c (openp): Update.
4428         (find_and_open_source): Update.
4429         * nto-tdep.c (nto_find_and_open_solib): Update.
4430         * main.c (set_gdb_data_directory): Update.
4431         (captured_main_1): Update.
4432         * dwarf2read.c (dwarf2_get_dwz_file): Update
4433         (dw2_map_symbol_filenames): Update.
4434         * auto-load.c (auto_load_safe_path_vec_update): Update.
4435         (filename_is_in_auto_load_safe_path_vec): Change type of
4436         "filename_realp".
4437         (auto_load_objfile_script): Update.
4438         (file_is_auto_load_safe): Update.  Use std::string.
4439         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4440
4441 2017-08-22  Tom Tromey  <tom@tromey.com>
4442
4443         * utils.c (gdb_realpath_keepfile): Return a
4444         gdb::unique_xmalloc_ptr.
4445         * exec.c (exec_file_attach): Update.
4446         * utils.h (gdb_realpath_keepfile): Return a
4447         gdb::unique_xmalloc_ptr.
4448
4449 2017-08-22  Tom Tromey  <tom@tromey.com>
4450
4451         * compile/compile.c (compile_file_command): Use
4452         gdb::unique_xmalloc_ptr, std::string.
4453         * utils.c (gdb_abspath): Change return type.
4454         * source.c (openp): Update.
4455         * objfiles.c (allocate_objfile): Update.
4456         * main.c (set_gdb_data_directory): Update.
4457         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4458
4459 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4460
4461         * cli-cmds.c (list_commands): List actual code around more than
4462         one location.
4463
4464 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4465
4466         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4467
4468 2017-08-21  Pedro Alves  <palves@redhat.com>
4469
4470         PR gdb/19487
4471         * c-exp.y (variable production): Handle function aliases.
4472         * minsyms.c (msymbol_is_text): New function.
4473         * minsyms.h (msymbol_is_text): Declare.
4474         * symtab.c (find_function_alias_target): New function.
4475         * symtab.h (find_function_alias_target): Declare.
4476
4477 2017-08-21  Pedro Alves  <palves@redhat.com>
4478
4479         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4480         typedefs.
4481         * typeprint.c (whatis_exp): If handling "whatis", and expression
4482         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4483         typedefs here.
4484         * valops.c (value_cast): Save "to" type before resolving
4485         stubs/typedefs.  Use that type as resulting value's type.
4486
4487 2017-08-18  Tom Tromey  <tom@tromey.com>
4488             Pedro Alves  <palves@redhat.com>
4489
4490         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4491         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4492         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4493         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4494         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4495         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4496         (linux_get_siginfo_data): Add "thread" argument.  Use
4497         scoped_restore.
4498         * linux-nat.c (linux_child_follow_fork)
4499         (check_stopped_by_watchpoint): Use scoped_restore.
4500         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4501         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4502         (restore_inferior_ptid, save_inferior_ptid): Remove.
4503         * btrace.c (btrace_fetch): Use scoped_restore.
4504         * bsd-uthread.c (bsd_uthread_fetch_registers)
4505         (bsd_uthread_store_registers): Use scoped_restore.
4506         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4507         scoped_restore.
4508         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4509         (aix_thread_xfer_partial): Use scoped_restore.
4510         * inferior.h (save_inferior_ptid): Remove.
4511
4512 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4513
4514         PR tdep/21818
4515         * arm-tdep.c (gdb_print_insn_arm): Mark
4516         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4517
4518 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4519
4520         * NEWS: Mention GDBserver's new option "--selftest".
4521         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4522         * selftest.c: Move it to common/selftest.c.
4523         * selftest.h: Move it to common/selftest.h.
4524         * selftest-arch.c (reset): New function.
4525         (tests_with_arch): Call reset.
4526
4527 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4528
4529         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4530         instead of exception_fprintf and printf_filtered.
4531
4532 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4533
4534         * selftest.c (register_self_test): Rename it to
4535         selftests::register_test.
4536         (run_self_tests): selftest::run_tests.
4537         * selftest.h: Update declarations.
4538         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4539         selftests::register_test_foreach_arch.
4540         * selftest-arch.h: Update declaration.
4541         * aarch64-tdep.c: Update.
4542         * arm-tdep.c: Likewise.
4543         * disasm-selftests.c: Likewise.
4544         * dwarf2loc.c: Likewise.
4545         * dwarf2-frame.c: Likewise.
4546         * findvar.c: Likewise.
4547         * gdbarch-selftests.c: Likewise.
4548         * maint.c (maintenance_selftest): Likewise.
4549         * regcache.c: Likewise.
4550         * rust-exp.y: Likewise.
4551         * selftest-arch.c: Likewise.
4552         * unittests/environ-selftests.c: Likewise.
4553         * unittests/function-view-selftests.c: Likewise.
4554         * unittests/offset-type-selftests.c: Likewise.
4555         * unittests/optional-selftests.c: Likewise.
4556         * unittests/scoped_restore-selftests.c: Likewise.
4557         * utils-selftests.c: Likewise.
4558
4559 2017-08-17  Pedro Alves  <palves@redhat.com>
4560
4561         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4562         local.
4563
4564 2017-08-17  Pedro Alves  <palves@redhat.com>
4565
4566         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4567         field.
4568         (reset_die_in_process): Delete, replaced by ...
4569         (process_die_scope): ... this new class.  Make it responsible for
4570         freeing cu->line_header too.
4571         (process_die): Use process_die_scope.
4572         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4573         cu->line_header_die_owner.  Don't release the line header if it's
4574         owned by the CU.
4575         (setup_type_unit_groups): Make the CU/DIE own the line header.
4576         Don't release the line header here.
4577
4578 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4579
4580         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4581
4582 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4583
4584         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4585         Single-Key mode
4586
4587 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4588
4589         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4590         mode command list.
4591
4592 2017-08-15  Stafford Horne  <shorne@gmail.com>
4593
4594         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4595
4596 2017-08-15  Stafford Horne  <shorne@gmail.com>
4597
4598         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4599
4600 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4601
4602         PR gdb/21954
4603         * infcmd.c (unset_environment_command): Use the 'clear' method on
4604         the environment instead of resetting it.
4605
4606 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4607
4608         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4609         platforms.
4610
4611 2017-08-14  Tom Tromey  <tom@tromey.com>
4612
4613         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4614         (print_binary_chars): Likewise.
4615         (BITS_IN_BYTES): Remove.
4616
4617 2017-08-14  Tom Tromey  <tom@tromey.com>
4618
4619         PR gdb/21675
4620         * valprint.c (LOW_ZERO): Change value to 034.
4621         (print_octal_chars): Add static_asserts for octal constants.
4622         * printcmd.c (print_scalar_formatted): Add 'd' case.
4623
4624 2017-08-11  Tom Tromey  <tom@tromey.com>
4625
4626         * symfile.c (add_symbol_file_command): Use std::vector.
4627
4628 2017-08-14  Tom Tromey  <tom@tromey.com>
4629
4630         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4631         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4632         std::move.
4633         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4634
4635 2017-08-11  Pedro Alves  <palves@redhat.com>
4636
4637         * infrun.c (process_event_stop_test): Adjust
4638         function_name_is_marked_for_skip call.
4639         * skip.c: Include <list>.
4640         (skiplist_entry): Make it a class with private fields, and
4641         getters/setters.
4642         (skiplist_entry_chain): Delete.
4643         (skiplist_entries): New.
4644         (skiplist_entry_count): Delete.
4645         (highest_skiplist_entry_num): New.
4646         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4647         (add_skiplist_entry): Delete.
4648         (skiplist_entry::skiplist_entry): New.
4649         (skiplist_entry::add_entry): New.
4650         (skip_file_command, skip_function): Adjust.
4651         (compile_skip_regexp): Delete.
4652         (skip_command): Don't compile regexp here.  Adjust to use
4653         skiplist_entry::add_entry.
4654         (skip_info): Adjust to use range-for and getters.
4655         (skip_enable_command, skip_disable_command): Adjust to use
4656         range-for and setters.
4657         (skip_delete_command): Adjust to use std::list.
4658         (add_skiplist_entry): Delete.
4659         (skip_file_p): Delete, refactored as ...
4660         (skiplist_entry::do_skip_file_p): ... this new method.
4661         (skip_gfile_p): Delete, refactored as ...
4662         (skiplist_entry::do_gskip_file_p): ... this new method.
4663         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4664         (skiplist_entry::skip_function_p): ... this new method.
4665         (function_name_is_marked_for_skip): Now returns bool, and takes
4666         the function sal by const reference.  Adjust to use range-for and
4667         skiplist_entry methods.
4668         (_initialize_step_skip): Remove references to
4669         skiplist_entry_chain, skiplist_entry_count.
4670         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4671         takes the function sal by const reference.
4672
4673 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4674
4675         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4676         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4677         (dwarf2_frame_cache):
4678         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4679         RETURN_MASK_ALL and set *this_case to NULL.
4680         * frame-unwind.h: Update comments.
4681
4682 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4683
4684         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4685         (dwarf2_frame_state_copy_regs): Remove.
4686         (dwarf2_frame_state_free_regs): Remove.
4687         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4688         (dwarf2_restore_rule): Call method .alloc_regs instead of
4689         dwarf2_frame_state_alloc_regs.
4690         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4691         constructor.  Call std::move.
4692         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4693         (dwarf2_frame_cache): Likewise.
4694
4695         [GDB_SELF_TEST]: Include selftest.h and
4696         selftest-arch.h.
4697         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4698         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4699         execute_cfa_program_test.
4700
4701         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4702         copy ctor, assignment operator, move assignment.
4703         <alloc_regs>: New method.
4704         <swap>: New method.
4705         (struct dwarf2_frame_state): Delete dtor.
4706         (dwarf2_frame_state_alloc_regs): Remove declaration.
4707         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4708         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4709
4710 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4711
4712         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4713         (dwarf2_frame_state::dwarf2_frame_state): New.
4714         (dwarf2_frame_state::~dwarf2_frame_state): New.
4715         (dwarf2_fetch_cfa_info): Update.
4716         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4717         rather than a pointer.  Update code.
4718         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4719         dtor.
4720         <data_align, code_align, retaddr_column>: Change them to const.
4721         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4722         to bool.
4723
4724 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4725
4726         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4727         <loc.exp>: New field.
4728         * dwarf2-frame.c (execute_cfa_program): Update.
4729         (dwarf2_frame_prev_register): Update.
4730
4731 2017-08-10  Pedro Alves  <palves@redhat.com>
4732
4733         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4734
4735 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4736
4737         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4738         (fbsd_pending_children): Use std::list.
4739         (fbsd_remember_child): Likewise.
4740         (fbsd_is_child_pending): Likewise.
4741         (fbsd_pending_vfork_done): Use std::forward_list.
4742         (fbsd_add_vfork_done): Likewise.
4743         (fbsd_is_vfork_done_pending): Likewise.
4744         (fbsd_next_vfork_done): Likewise.
4745
4746 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4747
4748         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4749         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4750         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4751         for `mapfilename'.
4752         (fbsd_xfer_partial): Use gdb::byte_vector.
4753         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4754
4755 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4756
4757         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4758         "filestuff.h".
4759         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4760
4761 2017-08-09  Tom Tromey  <tom@tromey.com>
4762
4763         * skip.c (skiplist_entry): New constructor.
4764         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4765         (skiplist_entry::file_is_glob): Now bool.
4766         (skiplist_entry::file, skiplist_entry::function): Now
4767         std::string.
4768         (make_skip_entry): Return a unique_ptr.  Use new.
4769         (free_skiplist_entry, free_skiplist_entry_cleanup)
4770         (make_free_skiplist_entry_cleanup): Remove.
4771         (skip_command, skip_disable_command, add_skiplist_entry)
4772         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4773         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4774         (function_name_is_marked_for_skip): Update.
4775         (skip_delete_command): Update.  Use delete.
4776
4777 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4778
4779         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4780         (aarch64_linux_core_read_description): New function.
4781         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4782
4783 2017-08-09  Pedro Alves  <palves@redhat.com>
4784
4785         * cp-name-parser.y (cp_comp_to_string): Return a
4786         gdb::unique_xmalloc_ptr<char>.
4787         * cp-support.c (replace_typedefs_qualified_name)
4788         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4789         (cp_canonicalize_string_full): Use op= instead of explicit
4790         convertion.
4791         (cp_class_name_from_physname, method_name_from_physname)
4792         (cp_func_name, cp_remove_params): Adjust to use
4793         gdb::unique_xmalloc_ptr<char>.
4794         * cp-support.h (cp_comp_to_string): Return a
4795         gdb::unique_xmalloc_ptr<char>.
4796         * python/py-type.c (typy_lookup_type): Adjust to use
4797         gdb::unique_xmalloc_ptr<char>.
4798
4799 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4800
4801         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4802
4803 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4804             Yao Qi  <yao.qi@linaro.org>
4805
4806         * cp-support.c (cp_canonicalize_string_full): Use
4807         gdb::unique_xmalloc_ptr<char>.
4808         (cp_canonicalize_string): Likewise.
4809
4810 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4811
4812         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4813         * regformats/i386/amd64-avx-avx512.dat: Remove.
4814         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4815         * regformats/i386/amd64-avx-mpx.dat:Remove.
4816         * regformats/i386/amd64-avx.dat: Remove.
4817         * regformats/i386/amd64-mpx.dat: Remove.
4818         * regformats/i386/i386-avx-avx512.dat: Remove.
4819         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4820         * regformats/i386/i386-avx-mpx.dat: Remove.
4821         * regformats/i386/i386-mmx.dat: Remove.
4822         * regformats/i386/i386-mpx.dat: Remove.
4823
4824 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4825
4826         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4827         * amd64-tdep.c: Don't include features/i386/x32*.c.
4828         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4829         functions.
4830         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4831         and i386/x32-avx-avx512.
4832         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4833         and i386/x32.xml.
4834         * features/i386/x32-avx-avx512.c: Removed.
4835         * features/i386/x32-avx-avx512.xml: Removed.
4836         * features/i386/x32-avx.c: Removed.
4837         * features/i386/x32-avx.xml: Removed.
4838         * features/i386/x32.c: Removed.
4839         * features/i386/x32.xml: Removed.
4840         * regformats/i386/x32-avx-avx512.dat: Removed.
4841         * regformats/i386/x32-avx.dat: Removed.
4842         * regformats/i386/x32.dat: Removed.
4843
4844 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4845
4846         PR breakpoints/21886
4847         * mem-break.c (default_memory_insert_breakpoint): Use
4848         `->placed_address' rather than `->reqstd_address' for the
4849         breakpoint location.
4850
4851 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4852
4853         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4854         assertions.
4855
4856 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4857
4858         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4859         a union of `tdep_info', `tdesc_data' and `id'.
4860         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4861         rather than `info.tdep_info'.
4862         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4863         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4864         * i386-tdep.c (i386_gdbarch_init): Likewise.
4865         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4866         * mips-tdep.c (mips_gdbarch_init): Likewise.
4867         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4868         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4869         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4870         `info.tdep_info'.
4871         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4872         `info.tdep_info'.
4873         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4874         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4875         `info.tdep_info'.
4876         * spu-tdep.c (spu_gdbarch_init): Likewise.
4877         * gdbarch.h: Regenerate.
4878
4879 2017-08-07  Leszek Swirski  <leszeks@google.com>
4880
4881         PR symtab/20899
4882         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4883
4884 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4885
4886         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4887         (gdbsim_open): Rename gdb_argv args object to argv.
4888
4889 2017-08-05  Tom Tromey  <tom@tromey.com>
4890
4891         * compile/compile-object-load.c (compile_object_load): Use
4892         gdb::unique_xmalloc_ptr.
4893         * cli/cli-dump.c (scan_filename): Rename from
4894         scan_filename_with_cleanup.  Change return type.
4895         (scan_expression): Rename from scan_expression_with_cleanup.
4896         Change return type.
4897         (dump_memory_to_file, dump_value_to_file, restore_command):
4898         Use gdb::unique_xmalloc_ptr.  Update.
4899         * cli/cli-cmds.c (find_and_open_script): Use
4900         gdb::unique_xmalloc_ptr.
4901         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4902         * symmisc.c (maintenance_print_symbols)
4903         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4904         * symfile.c (symfile_bfd_open, generic_load)
4905         (add_symbol_file_command, remove_symbol_file_command): Use
4906         gdb::unique_xmalloc_ptr.
4907         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4908         * psymtab.c (maintenance_print_psymbols): Use
4909         gdb::unique_xmalloc_ptr.
4910         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4911         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4912         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4913         (reload_shared_libraries_1): Likewise.
4914
4915 2017-08-05  Tom Tromey  <tom@tromey.com>
4916
4917         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4918         (rust_op_vector, rust_set_vector): New typedefs.
4919         (current_parser): New global.
4920         (work_obstack): Change to pointer type.  Update all users.
4921         (rust_ast, pstate): Remove globals.
4922         (struct rust_parser): New.
4923         (%union) <params, field_inits>: Change type.
4924         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4925         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4926         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4927         (convert_params_to_types, convert_params_to_expression): Change
4928         type of "params".
4929         (ast_string): Change type of "fields".
4930         (rust_parse): Make a rust_parser.  Remove cleanups.
4931         (rust_lex_tests): Make and install an auto_obstack.
4932
4933 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4934
4935         * configure.srv (ipa_x32_linux_regobj): New.
4936         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4937         instead of X86_TDESC_AVX512.
4938         (initialize_low_tracepoint): Call
4939         init_registers_x32_avx_avx512_linux.
4940
4941 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4942
4943         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4944
4945 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4946
4947         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4948
4949 2017-08-03  Tom Tromey  <tom@tromey.com>
4950
4951         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4952         Remove.
4953         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4954
4955 2017-08-03  Tom Tromey  <tom@tromey.com>
4956
4957         * python/py-param.c (compute_enum_values): Use gdb_argv.
4958
4959 2017-08-03  Tom Tromey  <tom@tromey.com>
4960
4961         * utils.h (struct gdb_argv_deleter): New.
4962         (gdb_argv): New class.
4963         * utils.c (gdb_argv::reset): New method.
4964         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4965         * tracefile.c (tsave_command): Use gdb_argv.
4966         * top.c (new_ui_command): Use gdb_argv.
4967         * symmisc.c (maintenance_print_symbols)
4968         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4969         * symfile.c (symbol_file_command, generic_load)
4970         (remove_symbol_file_command): Use gdb_argv.
4971         * stack.c (backtrace_command): Use gdb_argv.
4972         * source.c (add_path, show_substitute_path_command)
4973         (unset_substitute_path_command, set_substitute_path_command):
4974         Use gdb_argv.
4975         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4976         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4977         * remote.c (extended_remote_run, remote_put_command)
4978         (remote_get_command, remote_delete_command): Use gdb_argv.
4979         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4980         (gdbsim_open): Use gdb_argv.
4981         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4982         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4983         * procfs.c (procfs_info_proc): Use gdb_argv.
4984         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4985         * infrun.c (handle_command): Use gdb_argv.
4986         * inferior.c (add_inferior_command, clone_inferior_command):
4987         Use gdb_argv.
4988         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4989         * exec.c (exec_file_command): Use gdb_argv.
4990         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4991         * compile/compile.c (build_argc_argv): Use gdb_argv.
4992
4993 2017-08-03  Tom Tromey  <tom@tromey.com>
4994
4995         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4996
4997 2017-08-03  Tom Tromey  <tom@tromey.com>
4998
4999         * python/python.c (compute_python_string): Return std::string.
5000         (gdbpy_eval_from_control_command): Update.
5001         (do_start_initialization): Use std::string.
5002         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5003         xstrprintf.
5004         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5005         xstrprintf.
5006
5007 2017-08-03  Tom Tromey  <tom@tromey.com>
5008
5009         * top.h (do_restore_instream_cleanup): Remove.
5010         * top.c (do_restore_instream_cleanup): Remove.
5011         (read_command_file): Use scoped_restore.
5012         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5013
5014 2017-08-03  Tom Tromey  <tom@tromey.com>
5015
5016         * cli/cli-script.c (execute_user_command)
5017         (execute_control_command): Use scoped_restore.
5018
5019 2017-08-03  Tom Tromey  <tom@tromey.com>
5020
5021         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5022         (execute_user_command): Remove user_call_depth; use
5023         user_args_stack's size instead.
5024
5025 2017-08-03  Tom Tromey  <tom@tromey.com>
5026
5027         * top.h (in_user_command): Remove.
5028         * top.c (in_user_command): Remove.
5029         * cli/cli-script.c (do_restore_user_call_depth)
5030         (execute_user_command): Update.
5031
5032 2017-08-03  Tom Tromey  <tom@tromey.com>
5033
5034         * valops.c (search_struct_method): Use gdb::byte_vector.
5035         * valarith.c (value_concat): Use std::vector.
5036         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5037         (simple_search_memory): Likewise.
5038         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5039         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5040         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5041         * elfread.c (elf_rel_plt_read): Use std::string.
5042         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5043         * cli/cli-dump.c (restore_section_callback): Use
5044         gdb::byte_vector.
5045
5046 2017-08-03  Tom Tromey  <tom@tromey.com>
5047
5048         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5049
5050 2017-08-03  Tom Tromey  <tom@tromey.com>
5051
5052         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5053         (tui_register_format): Use scoped_restore.
5054
5055 2017-08-03  Tom Tromey  <tom@tromey.com>
5056
5057         * reverse.c (exec_direction_default): Remove.
5058         (exec_reverse_once): Use scoped_restore.
5059         * remote.c (restore_remote_timeout): Remove.
5060         (remote_flash_erase, remote_flash_write, remote_flash_done)
5061         (readchar, remote_serial_write): Use scoped_restore.
5062         * cli/cli-script.c (struct source_cleanup_lines_args)
5063         (source_cleanup_lines): Remove.
5064         (script_from_file): Use scoped_restore.
5065         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5066         (source_command): Use scoped_restore.
5067
5068 2017-08-03  Tom Tromey  <tom@tromey.com>
5069
5070         * utils.h (make_cleanup_free_so): Remove.
5071         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5072         * solist.h (struct so_deleter): New.
5073         (so_list_up): New typedef.
5074         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5075
5076 2017-08-03  Tom Tromey  <tom@tromey.com>
5077
5078         * utils.h (make_cleanup_restore_current_language): Remove.
5079         * utils.c (do_restore_current_language)
5080         (make_cleanup_restore_current_language): Remove.
5081         * parse.c (parse_exp_in_context_1)
5082         (parse_expression_with_language): Use
5083         scoped_restore_current_language.
5084         * mi/mi-main.c (mi_cmd_execute): Use
5085         scoped_restore_current_language.
5086         * language.h (scoped_restore_current_language): New class.
5087
5088 2017-08-03  Tom Tromey  <tom@tromey.com>
5089
5090         * compile/compile.c (cleanup_unlink_file): Remove.
5091         (compile_to_object): Use gdb::unlinker.
5092         (eval_compile_command): Likewise.
5093
5094 2017-08-03  Tom Tromey  <tom@tromey.com>
5095
5096         * utils.h (make_cleanup_fclose): Remove.
5097         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5098
5099 2017-08-03  Tom Tromey  <tom@tromey.com>
5100
5101         * top.c (open_terminal_stream): Return gdb_file_up.
5102         (new_ui_command): Update.
5103
5104 2017-08-03  Tom Tromey  <tom@tromey.com>
5105
5106         * source.c (print_source_lines_base, forward_search_command)
5107         (reverse_search_command): Use gdb_file_up.
5108
5109 2017-08-03  Tom Tromey  <tom@tromey.com>
5110
5111         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5112
5113 2017-08-03  Tom Tromey  <tom@tromey.com>
5114
5115         * cli/cli-cmds.c (find_and_open_script): Change return type.
5116         Remove "streamp" and "full_path" parameters.
5117         (source_script_with_search): Update.
5118         * auto-load.c (source_script_file): Update.
5119         * cli/cli-cmds.h (find_and_open_script): Change type.
5120         (open_script): New struct.
5121
5122 2017-08-03  Tom Tromey  <tom@tromey.com>
5123
5124         * xml-support.c (xml_fetch_content_from_file): Update.
5125         * ui-file.c (stdio_file::open): Update.
5126         * tracefile-tfile.c (tfile_start): Update.
5127         * remote.c (remote_file_put, remote_file_get): Update.
5128         * nat/linux-procfs.c (linux_proc_get_int)
5129         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5130         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5131         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5132         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5133         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5134         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5135         * linux-nat.c (linux_proc_pending_signals): Update.
5136         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5137         (file_closer): Remove.
5138         * compile/compile.c (compile_to_object): Update.
5139         * common/filestuff.h (struct gdb_file_deleter): New.
5140         (gdb_file_up): New typedef.
5141         (gdb_fopen_cloexec): Change return type.
5142         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5143         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5144         (dump_binary_file, restore_binary_file): Update.
5145         * auto-load.c (auto_load_objfile_script_1): Update.
5146
5147 2017-08-03  Tom Tromey  <tom@tromey.com>
5148
5149         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5150         (info_static_tracepoint_markers_command): Likewise.
5151         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5152         * skip.c (skip_info): Use ui_out_emit_table.
5153         * progspace.c (print_program_space): Use ui_out_emit_table.
5154         * osdata.c (info_osdata): Use ui_out_emit_table.
5155         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5156         ui_out_emit_table.
5157         * linux-thread-db.c (info_auto_load_libthread_db): Use
5158         ui_out_emit_table.
5159         * inferior.c (print_inferior): Use ui_out_emit_table.
5160         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5161         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5162         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5163         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5164         * ui-out.h (class ui_out_emit_table): New.
5165
5166 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5167
5168         * mips-tdep.c (mips_fpu_type_str): New function.
5169         (mips_dump_tdep): Call it.
5170
5171 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5172
5173         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5174         `->mips_fpu_type'.
5175
5176 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5177
5178         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5179
5180 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5181
5182         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5183
5184 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5185
5186         * cli/cli-cmds.c (maintenancechecklist): New variable.
5187         * gdbcmd.h (maintenancechecklist): Declare it.
5188         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5189         Call i386_linux_read_description with different masks.
5190         * maint.c (maintenance_check_command): New function.
5191         (_initialize_maint_cmds): Call add_prefix_cmd.
5192         * target-descriptions.c (tdesc_reg): override operator != and ==.
5193         (tdesc_type): Likewise.
5194         (tdesc_feature): Likewise.
5195         (target_desc): Likewise.
5196         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5197         (maintenance_check_xml_descriptions): New function.
5198         (_initialize_target_descriptions) Add command "xml-descriptions".
5199         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5200
5201 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5202
5203         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5204         Include features/i386/32bit-*.c.
5205         (i386_linux_read_description): Generate target description if it
5206         doesn't exist.
5207         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5208         functions.
5209         * features/i386/32bit-linux.c: Re-generated.
5210         * features/i386/32bit-sse.c: Likewise.
5211         * target-descriptions.c (print_c_feature::visit): Print code to
5212         set register number if needed.
5213         (print_c_feature) <m_next_regnum>: New field.
5214
5215 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5216
5217         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5218         (FEATURE_XMLFILES): New.
5219         (FEATURE_CFILES): New.
5220         New rules.
5221         (clean-cfiles): Remove generated c files.
5222         * features/i386/32bit-avx.c: Generated.
5223         * features/i386/32bit-avx512.c: Generated.
5224         * features/i386/32bit-core.c: Generated.
5225         * features/i386/32bit-linux.c: Generated.
5226         * features/i386/32bit-mpx.c: Generated.
5227         * features/i386/32bit-pkeys.c: Generated.
5228         * features/i386/32bit-sse.c: Generated.
5229         * target-descriptions.c: Include algorithm.
5230         (tdesc_element_visitor): Add method visit_end.
5231         (print_c_tdesc): Implement visit_end.
5232         (print_c_tdesc:: m_filename_after_features): Move it to
5233         protected.
5234         (print_c_feature): New class.
5235         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5236         name starts with "i386/32bit-".
5237
5238 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5239
5240         * target-descriptions.c (tdesc_element_visitor): New class.
5241         (tdesc_element): New class.
5242         (tdesc_reg): Inherit from tdesc_element.
5243         (tdesc_reg::accept): New function.
5244         (tdesc_type): Inherit from tdesc_element.
5245         (tdesc_type::accept): New function.
5246         (tdesc_feature): Inherit from tdesc_element.
5247         (tdesc_feature::accept): New function.
5248         (target_desc): Inherit from tdesc_element.
5249         (target_desc::target_desc): New.
5250         (target_desc::~target_desc): New.
5251         (target_desc::accept): New.
5252         (allocate_target_description): Use new.
5253         (free_target_description): Use delete.
5254         (print_c_tdesc): New class.
5255         (maint_print_c_tdesc_cmd): Adjust.
5256
5257         * features/aarch64.c: Re-generated.
5258         * features/arc-arcompact.c: Re-generated.
5259         * features/arc-v2.c: Re-generated.
5260         * features/arm/arm-with-iwmmxt.c: Re-generated.
5261         * features/arm/arm-with-m.c: Re-generated.
5262         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5263         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5264         * features/arm/arm-with-neon.c: Re-generated.
5265         * features/arm/arm-with-vfpv2.c: Re-generated.
5266         * features/arm/arm-with-vfpv3.c: Re-generated.
5267         * features/i386/amd64-avx-avx512.c: Re-generated.
5268         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5269         * features/i386/amd64-avx.c: Re-generated.
5270         * features/i386/amd64-avx-linux.c: Re-generated.
5271         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5272         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5273         * features/i386/amd64-avx-mpx.c: Re-generated.
5274         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5275         * features/i386/amd64.c: Re-generated.
5276         * features/i386/amd64-linux.c: Re-generated.
5277         * features/i386/amd64-mpx.c: Re-generated.
5278         * features/i386/amd64-mpx-linux.c: Re-generated.
5279         * features/i386/i386-avx-avx512.c: Re-generated.
5280         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5281         * features/i386/i386-avx.c: Re-generated.
5282         * features/i386/i386-avx-linux.c: Re-generated.
5283         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5284         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5285         * features/i386/i386-avx-mpx.c: Re-generated.
5286         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5287         * features/i386/i386.c: Re-generated.
5288         * features/i386/i386-linux.c: Re-generated.
5289         * features/i386/i386-mmx.c: Re-generated.
5290         * features/i386/i386-mmx-linux.c: Re-generated.
5291         * features/i386/i386-mpx.c: Re-generated.
5292         * features/i386/i386-mpx-linux.c: Re-generated.
5293         * features/i386/x32-avx-avx512.c: Re-generated.
5294         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5295         * features/i386/x32-avx.c: Re-generated.
5296         * features/i386/x32-avx-linux.c: Re-generated.
5297         * features/i386/x32.c: Re-generated.
5298         * features/i386/x32-linux.c: Re-generated.
5299         * features/microblaze.c: Re-generated.
5300         * features/microblaze-with-stack-protect.c: Re-generated.
5301         * features/mips64-dsp-linux.c: Re-generated.
5302         * features/mips64-linux.c: Re-generated.
5303         * features/mips-dsp-linux.c: Re-generated.
5304         * features/mips-linux.c: Re-generated.
5305         * features/nds32.c: Re-generated.
5306         * features/nios2.c: Re-generated.
5307         * features/nios2-linux.c: Re-generated.
5308         * features/rs6000/powerpc-32.c: Re-generated.
5309         * features/rs6000/powerpc-32l.c: Re-generated.
5310         * features/rs6000/powerpc-403.c: Re-generated.
5311         * features/rs6000/powerpc-403gc.c : Re-generated.
5312         * features/rs6000/powerpc-405.c: Re-generated.
5313         * features/rs6000/powerpc-505.c: Re-generated.
5314         * features/rs6000/powerpc-601.c: Re-generated.
5315         * features/rs6000/powerpc-602.c: Re-generated.
5316         * features/rs6000/powerpc-603.c: Re-generated.
5317         * features/rs6000/powerpc-604.c: Re-generated.
5318         * features/rs6000/powerpc-64.c: Re-generated.
5319         * features/rs6000/powerpc-64l.c: Re-generated.
5320         * features/rs6000/powerpc-7400.c: Re-generated.
5321         * features/rs6000/powerpc-750.c: Re-generated.
5322         * features/rs6000/powerpc-860.c: Re-generated.
5323         * features/rs6000/powerpc-altivec32.c: Re-generated.
5324         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5325         * features/rs6000/powerpc-altivec64.c: Re-generated.
5326         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5327         * features/rs6000/powerpc-cell32l.c: Re-generated.
5328         * features/rs6000/powerpc-cell64l.c: Re-generated.
5329         * features/rs6000/powerpc-e500.c: Re-generated.
5330         * features/rs6000/powerpc-e500l.c: Re-generated.
5331         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5332         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5333         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5334         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5335         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5336         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5337         * features/rs6000/powerpc-vsx32.c: Re-generated.
5338         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5339         * features/rs6000/powerpc-vsx64.c: Re-generated.
5340         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5341         * features/rs6000/rs6000.c: Re-generated.
5342         * features/s390-linux32.c: Re-generated.
5343         * features/s390-linux32v1.c: Re-generated.
5344         * features/s390-linux32v2.c: Re-generated.
5345         * features/s390-linux64.c: Re-generated.
5346         * features/s390-linux64v1.c: Re-generated.
5347         * features/s390-linux64v2.c: Re-generated.
5348         * features/s390-te-linux64.c: Re-generated.
5349         * features/s390-tevx-linux64.c: Re-generated.
5350         * features/s390-vx-linux64.c: Re-generated.
5351         * features/s390x-linux64.c: Re-generated.
5352         * features/s390x-linux64v1.c: Re-generated.
5353         * features/s390x-linux64v2.c: Re-generated.
5354         * features/s390x-te-linux64.c: Re-generated.
5355         * features/s390x-tevx-linux64.c: Re-generated.
5356         * features/s390x-vx-linux64.c: Re-generated.
5357         * features/sparc/sparc32-solaris.c: Re-generated.
5358         * features/sparc/sparc64-solaris.c: Re-generated.
5359         * features/tic6x-c62x.c: Re-generated.
5360         * features/tic6x-c62x-linux.c: Re-generated.
5361         * features/tic6x-c64x.c: Re-generated.
5362         * features/tic6x-c64x-linux.c: Re-generated.
5363         * features/tic6x-c64xp.c: Re-generated.
5364         * features/tic6x-c64xp-linux.c: Re-generated.
5365
5366 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5367
5368         * i386-linux-tdep.c (i386_linux_read_description): New function.
5369         (i386_linux_core_read_description): Call
5370         i386_linux_read_description.
5371         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5372         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5373         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5374         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5375         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5376         * x86-linux-nat.c (x86_linux_read_description): Call
5377         i386_linux_read_description.
5378
5379 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5380
5381         * NEWS: Mention it.
5382         * features/Makefile (%.c: %.xml): Pass the xml file name to
5383         command "maint print c-tdesc".
5384         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5385         name from 'arg'.
5386
5387 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5388
5389         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5390         in-class initialization.
5391         (tdesc_create_feature): Call new instead of XCNEW.
5392         (free_target_description): Ue delete.
5393
5394 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5395
5396         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5397
5398 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5399
5400         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5401         constant.
5402         (amd64_x32_init_abi): Likewise.
5403         * amd64-tdep.h (amd64_init_abi): Update declaration.
5404         (amd64_x32_init_abi): Likewise.
5405
5406 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5407
5408         PR tdep/21717
5409         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5410         condition for FPSCR.
5411         (arm_linux_store_inferior_registers): Likewise.
5412
5413 2017-07-22  Tom Tromey  <tom@tromey.com>
5414
5415         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5416         <syscalls_counts>: Now a std::vector.
5417         (get_catch_syscall_inferior_data): Use "new".
5418         (catch_syscall_inferior_data_cleanup): Use "delete".
5419         (insert_catch_syscall, remove_catch_syscall)
5420         (clear_syscall_counts): Update.
5421
5422 2017-07-22  Tom Tromey  <tom@tromey.com>
5423
5424         * break-catch-syscall.c (syscall_catchpoint)
5425         <syscalls_to_be_caught>: Now a std::vector<int>
5426         (~syscall_catchpoint): Remove.
5427         (insert_catch_syscall, remove_catch_syscall)
5428         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5429         (print_mention_catch_syscall, print_recreate_catch_syscall):
5430         Update.
5431         (create_syscall_event_catchpoint): Change type of "filter"
5432         parameter.
5433         (catch_syscall_split_args): Return a std::vector.
5434         (catch_syscall_command_1, catching_syscall_number_1): Update.
5435
5436 2017-07-22  Tom Tromey  <tom@tromey.com>
5437
5438         * break-catch-throw.c (struct exception_catchpoint)
5439         <exception_rx>: Now a std::string.
5440         (~exception_catchpoint): Remove.
5441         (print_one_detail_exception_catchpoint): Update.
5442         (handle_gnu_v3_exceptions): Change type of except_rx.
5443         (extract_exception_regexp): Return a std::string.
5444         (catch_exception_command_1): Update.
5445
5446 2017-07-22  Tom Tromey  <tom@tromey.com>
5447
5448         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5449         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5450         std::vector.
5451         <catch_all>: Now a bool.
5452         (~signal_catchpoint): Remove.
5453         (signal_catchpoint_insert_location)
5454         (signal_catchpoint_remove_location)
5455         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5456         (signal_catchpoint_print_mention)
5457         (signal_catchpoint_print_recreate)
5458         (signal_catchpoint_explains_signal): Update.
5459         (create_signal_catchpoint): Change type of "filter" and
5460         "catch_all".
5461         (catch_signal_split_args): Return a std::vector.  Change type of
5462         "catch_all".
5463         (catch_signal_command): Update.
5464
5465 2017-07-20  Pedro Alves  <palves@redhat.com>
5466
5467         * ada-lang.c (ada_language_defn): Make extern.
5468         (_initialize_ada_language): Remove add_language call.
5469         * c-lang.c (c_language_defn, cplus_language_defn)
5470         (asm_language_defn, minimal_language_defn): Make extern.
5471         (_initialize_c_language): Delete.
5472         * completer.c (compare_cstrings): Delete, moved to utils.h.
5473         * d-lang.c (d_language_defn): Make extern.
5474         (_initialize_d_language): Remove add_language calls.
5475         * defs.h (enum language): Add comment.
5476         * f-lang.c (f_language_defn): Make extern.
5477         (_initialize_f_language): Remove add_language call.
5478         * go-lang.c (go_language_defn): Make extern.
5479         (_initialize_go_language): Remove add_language call.
5480         * language.c: Include <algorithm>.
5481         (languages): Redefine as const array.
5482         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5483         (set_language_command): Handle "local".  Use for-range loop.
5484         (set_language): Remove loop.
5485         (language_enum): Rewrite.
5486         (language_def, language_str): Remove loops.
5487         (add_language): Delete.
5488         (add_set_language_command): New, based on add_languages.
5489         (skip_language_trampoline): Adjust.
5490         (local_language_defn): Delete.
5491         (language_gdbarch_post_init): Adjust.
5492         (_initialize_language): Remove add_language calls.  Call
5493         add_set_language_command.
5494         * language.h (add_language): Delete.
5495         (auto_language_defn)
5496         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5497         (asm_language_defn, c_language_defn, cplus_language_defn)
5498         (d_language_defn, f_language_defn, go_language_defn)
5499         (m2_language_defn, objc_language_defn, opencl_language_defn)
5500         (pascal_language_defn, rust_language_defn): Declare.
5501         * m2-lang.c (m2_language_defn): Make extern.
5502         (_initialize_m2_language): Remove add_language call.
5503         * objc-lang.c (objc_language_defn): Make extern.
5504         (_initialize_objc_language): Remove add_language call.
5505         * opencl-lang.c (opencl_language_defn): Make extern.
5506         (_initialize_opencl_language): Remove add_language call.
5507         * p-lang.c (pascal_language_defn): Make extern.
5508         (_initialize_pascal_language): Delete.
5509         * rust-lang.c (rust_language_defn): Make extern.
5510         (_initialize_rust_language): Delete.
5511         * utils.h (compare_cstrings): New static inline function.
5512
5513 2017-07-20  Pedro Alves  <palves@redhat.com>
5514
5515         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5516         (get_var_value): Constify parameters.
5517         (get_int_var_value): Change prototype.
5518         (to_fixed_range_type): Adjust.
5519         * ada-lang.h (get_int_var_value): Change prototype.
5520
5521 2017-07-20  Pedro Alves  <palves@redhat.com>
5522
5523         * dwarf2read.c (dw2_lookup_symbol): Use
5524         SYMBOL_MATCHES_SEARCH_NAME.
5525         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5526
5527 2017-07-20  Pedro Alves  <palves@redhat.com>
5528
5529         * block.c (block_iter_name_step, block_iter_name_first)
5530         (block_iter_name_next): Delete.
5531         (block_lookup_symbol_primary): Adjust to use
5532         dict_iter_match_first/dict_iter_match_next.
5533         * block.h (block_iter_name_first, block_iter_name_next): Delete
5534         declarations.
5535         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5536         dict_iter_match_first/dict_iter_match_next.
5537
5538 2017-07-20  Pedro Alves  <palves@redhat.com>
5539
5540         * cp-support.c (cp_find_first_component_aux): Add missing case for
5541         end of string.
5542
5543 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5544
5545         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5546         of dwo_cu's dwo_file.
5547
5548 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5549
5550         * remote.c (store_registers_using_G): Remove one line comment.
5551
5552 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5553
5554         * regcache.c (regcache_cpy): Simplify it.
5555         (regcache::cpy_no_passthrough): Remove it.
5556         * regcache.h (cpy_no_passthrough): Remove it.
5557         (regcache_dup, regcache_cpy): Update comments.
5558
5559 2017-07-18  Pedro Alves  <palves@redhat.com>
5560
5561         * remote-sim.c (sim_command_completer): Adjust to work with a
5562         completion_tracker instead of a VEC.
5563
5564 2017-07-17  Pedro Alves  <palves@redhat.com>
5565
5566         * completer.c (complete_source_filenames): New function.
5567         (complete_address_and_linespec_locations): New function.
5568         (location_completer): Use complete_address_and_linespec_locations.
5569         (completion_tracker::build_completion_result): Honor the tracker's
5570         request to suppress append.
5571         * completer.h (completion_tracker::suppress_append_ws)
5572         (completion_tracker::set_suppress_append_ws): New methods.
5573         (completion_tracker::m_suppress_append_ws): New field.
5574         (complete_source_filenames): New declaration.
5575         * linespec.c (linespec_complete_what): New.
5576         (struct ls_parser) <complete_what, completion_word,
5577         completion_quote_char, completion_quote_end, completion_tracker>:
5578         New fields.
5579         (string_find_incomplete_keyword_at_end): New.
5580         (linespec_lexer_lex_string): Record quote char.  If in completion
5581         mode, don't throw.
5582         (linespec_lexer_consume_token): Advance the completion word point.
5583         (linespec_lexer_peek_token): Save/restore completion info.
5584         (save_stream_and_consume_token): New.
5585         (set_completion_after_number): New.
5586         (linespec_parse_basic): Set what to complete next depending on
5587         token.  Handle function and label completions specially.
5588         (parse_linespec): Disable objc shortcut in completion mode.  Set
5589         what to complete next depending on token type.  Skip keyword if in
5590         completion mode.
5591         (complete_linespec_component, linespec_complete): New.
5592         * linespec.h (linespec_complete): Declare.
5593
5594 2017-07-17  Pedro Alves  <palves@redhat.com>
5595
5596         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5597         Handle 'operator<' / 'operator<<'.
5598
5599 2017-07-17  Pedro Alves  <palves@redhat.com>
5600
5601         * completer.c (collect_explicit_location_matches): Handle
5602         MATCH_LABEL.
5603         (convert_explicit_location_to_linespec): New, factored out from
5604         ...
5605         (convert_explicit_location_to_sals): ... this.
5606         (complete_label): New.
5607         (linespec_complete_label, find_label_symbols_in_block): New.
5608         (find_label_symbols): Add completion_mode parameter and adjust to
5609         call find_label_symbols_in_block.
5610         * linespec.h (linespec_complete_label): Declare.
5611
5612 2017-07-17  Pedro Alves  <palves@redhat.com>
5613
5614         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5615         complete_symbol_mode parameter.
5616         * cli/cli-cmds.c (complete_command): Get the completion result out
5617         of the handle_brkchars tracker if used a custom word point.
5618         * completer.c: Include "linespec.h".
5619         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5620         (advance_to_expression_complete_word_point): New.
5621         (completion_tracker::completes_to_completion_word): New.
5622         (complete_files_symbols): Pass down
5623         complete_symbol_mode::EXPRESSION.
5624         (explicit_options, probe_options): New.
5625         (collect_explicit_location_matches): Complete on the
5626         explictit_loc->foo instead of word.  Use
5627         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5628         keyword and options completions.
5629         (backup_text_ptr): Delete.
5630         (skip_keyword): New.
5631         (complete_explicit_location): Remove 'word' parameter.  Add
5632         language, quoted_arg_start and quoted_arg_end parameters.
5633         Rewrite, parsing left to right.
5634         (location_completer): Rewrite.
5635         (location_completer_handle_brkchars): New function.
5636         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5637         (enum complete_line_internal_reason): Adjust comments.
5638         (completion_tracker::discard_completions): New.
5639         (completer_handle_brkchars_func_for_completer): Handle
5640         location_completer.
5641         (gdb_custom_word_point_brkchars)
5642         (gdb_org_rl_basic_quote_characters): New.
5643         (gdb_completion_word_break_characters_throw)
5644         (completion_find_completion_word): Handle trackers that use a
5645         custom word point.
5646         (completion_tracker::advance_custom_word_point_by): New.
5647         (completion_tracker::build_completion_result): Don't rely on
5648         readline appending the quote char.
5649         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5650         use a custom word point.
5651         (gdb_rl_attempted_completion_function): Restore
5652         rl_basic_quote_characters.
5653         * completer.h (class completion_tracker): Extend intro comment.
5654         (completion_tracker::set_quote_char)
5655         (completion_tracker::quote_char)
5656         (completion_tracker::set_use_custom_word_point)
5657         (completion_tracker::use_custom_word_point)
5658         (completion_tracker::custom_word_point)
5659         (completion_tracker::set_custom_word_point)
5660         (completion_tracker::advance_custom_word_point_by)
5661         (completion_tracker::completes_to_completion_word)
5662         (completion_tracker::discard_completions): New methods.
5663         (completion_tracker::m_quote_char)
5664         (completion_tracker::m_use_custom_word_point)
5665         (completion_tracker::m_custom_word_point): New fields.
5666         (advance_to_expression_complete_word_point): Declare.
5667         * f-lang.c (f_collect_symbol_completion_matches): Add
5668         complete_symbol_mode parameter.
5669         * language.h (struct language_defn)
5670         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5671         parameter.
5672         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5673         (linespec_complete_function): New function.
5674         (linespec_lexer_lex_keyword): Adjust.
5675         * linespec.h (linespec_keywords, linespec_complete_function): New
5676         declarations.
5677         * location.c (find_end_quote): New function.
5678         (explicit_location_lex_one): Add explicit_completion_info
5679         parameter.  Save quoting info.  Don't throw if being called for
5680         completion.  Don't handle Ada operators here.
5681         (is_cp_operator, skip_op_false_positives, first_of)
5682         (explicit_location_lex_one_function): New function.
5683         (string_to_explicit_location): Replace 'dont_throw' parameter with
5684         an explicit_completion_info pointer parameter.  Handle it.  Don't
5685         use explicit_location_lex_one to lex function names.  Use
5686         explicit_location_lex_one_function instead.
5687         * location.h (struct explicit_completion_info): New.
5688         (string_to_explicit_location): Replace 'dont_throw' parameter with
5689         an explicit_completion_info pointer parameter.
5690         * symtab.c (default_collect_symbol_completion_matches_break_on):
5691         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5692         (default_collect_symbol_completion_matches)
5693         (collect_symbol_completion_matches): Add complete_symbol_mode
5694         parameter.
5695         (collect_symbol_completion_matches_type): Pass down
5696         complete_symbol_mode::EXPRESSION.
5697         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5698         parameter.  Handle LINESPEC mode.
5699         * symtab.h (complete_symbol_mode): New.
5700         (default_collect_symbol_completion_matches_break_on)
5701         (default_collect_symbol_completion_matches)
5702         (collect_symbol_completion_matches)
5703         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5704         parameter.
5705
5706 2017-07-17  Pedro Alves  <palves@redhat.com>
5707
5708         * utils.c (enum class strncmp_iw_mode): New.
5709         (strcmp_iw): Rename to ...
5710         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5711         parameters.  Handle them.
5712         (strncmp_iw): New.
5713         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5714         * utils.h (strncmp_iw): Declare.
5715         (strcmp_iw): Move describing comments here.
5716
5717 2017-07-17  Pedro Alves  <palves@redhat.com>
5718
5719         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5720         CP_OPERATOR_STR.
5721         * c-typeprint.c (is_type_conversion_operator): Use
5722         CP_OPERATOR_STR.
5723         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5724         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5725         CP_OPERATOR_LEN.
5726         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5727         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5728         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5729         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5730         CP_OPERATOR_STR.
5731         * location.c: Include "cp-support.h".
5732         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5733         CP_OPERATOR_STR.
5734         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5735         CP_OPERATOR_LEN.
5736
5737 2017-07-17  Pedro Alves  <palves@redhat.com>
5738
5739         * cli/cli-cmds.c (complete_command): Use a completion tracker
5740         along with completion_find_completion_word for handle_brkchars
5741         phase.
5742         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5743         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5744         (struct gdb_rl_completion_word_info): New.
5745         (gdb_rl_find_completion_word): New.
5746         (completion_find_completion_word): New.
5747         * completer.h (completion_find_completion_word): Declare.
5748
5749 2017-07-17  Pedro Alves  <palves@redhat.com>
5750
5751         * ada-lang.c (symbol_completion_match): Adjust comments.
5752         (symbol_completion_add): Replace vector parameter with
5753         completion_tracker parameter.  Use it.
5754         (ada_make_symbol_completion_list): Rename to...
5755         (ada_collect_symbol_completion_matches): ... this.  Add
5756         completion_tracker parameter and use it.
5757         (ada_language_defn): Adjust.
5758         * break-catch-syscall.c (catch_syscall_completer): Adjust
5759         prototype and work with completion_tracker instead of VEC.
5760         * breakpoint.c (condition_completer): Adjust prototype and work
5761         with completion_tracker instead of VEC.
5762         * c-lang.c (c_language_defn, cplus_language_defn)
5763         (asm_language_defn, minimal_language_defn): Adjust to renames.
5764         * cli/cli-cmds.c (complete_command): Rework using
5765         completion_tracker.  Catch exceptions when completing.
5766         * cli/cli-decode.c (integer_unlimited_completer)
5767         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5768         with completion_tracker instead of VEC.
5769         * command.h (struct completion_tracker): Forward declare.
5770         (completer_ftype, completer_handle_brkchars_ftype): Change
5771         types.
5772         (complete_on_cmdlist, complete_on_enum): Adjust.
5773         * completer.c: Include <algorithm>.
5774         (struct gdb_completer_state): New.
5775         (current_completion): New global.
5776         (readline_line_completion_function): Delete.
5777         (noop_completer, filename_completer)
5778         (filename_completer_handle_brkchars, complete_files_symbols)
5779         (linespec_location_completer): Adjust to work with a
5780         completion_tracker instead of a VEC.
5781         (string_or_empty): New.
5782         (collect_explicit_location_matches): Adjust to work with a
5783         completion_tracker instead of a VEC.
5784         (explicit_location_completer): Rename to ...
5785         (complete_explicit_location): ... this and adjust to work with a
5786         completion_tracker instead of a VEC.
5787         (location_completer): Adjust to work with a completion_tracker
5788         instead of a VEC.
5789         (add_struct_fields): Adjust to work with a completion_list instead
5790         of VEC.
5791         (expression_completer): Rename to ...
5792         (complete_expression): ... this and adjust to work with a
5793         completion_tracker instead of a VEC.  Use complete_files_symbols.
5794         (expression_completer): Reimplement on top of complete_expression.
5795         (symbol_completer): Adjust to work with a completion_tracker
5796         instead of a VEC.
5797         (enum complete_line_internal_reason): Add describing comments.
5798         (complete_line_internal_normal_command): Adjust to work with a
5799         completion_tracker instead of a VEC.
5800         (complete_line_internal): Rename to ...
5801         (complete_line_internal_1): ... this and adjust to work with a
5802         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5803         handle_brkchars phase.
5804         (new_completion_tracker): Delete.
5805         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5806         complete_line_internal_1.
5807         (free_completion_tracker): Delete.
5808         (INITIAL_COMPLETION_HTAB_SIZE): New.
5809         (completion_tracker::completion_tracker)
5810         (completion_tracker::~completion_tracker): New.
5811         (maybe_add_completion): Delete.
5812         (completion_tracker::maybe_add_completion)
5813         (completion_tracker::add_completion)
5814         (completion_tracker::add_completions): New.
5815         (throw_max_completions_reached_error): Delete.
5816         (complete_line): Adjust to work with a completion_tracker instead
5817         of a VEC.  Don't create a completion_tracker_t or check for max
5818         completions here.
5819         (command_completer, command_completer_handle_brkchars)
5820         (signal_completer, reg_or_group_completer_1)
5821         (reg_or_group_completer, default_completer_handle_brkchars):
5822         Adjust to work with a completion_tracker.
5823         (gdb_completion_word_break_characters_throw): New.
5824         (gdb_completion_word_break_characters): Reimplement.
5825         (line_completion_function): Delete.
5826         (completion_tracker::recompute_lowest_common_denominator)
5827         (expand_preserving_ws)
5828         (completion_tracker::build_completion_result)
5829         (completion_result::completion_result)
5830         (completion_result::completion_result)
5831         (completion_result::~completion_result)
5832         (completion_result::completion_result)
5833         (completion_result::release_match_list, compare_cstrings)
5834         (completion_result::sort_match_list)
5835         (completion_result::reset_match_list)
5836         (gdb_rl_attempted_completion_function_throw)
5837         (gdb_rl_attempted_completion_function): New.
5838         * completer.h (completion_list, struct completion_result)
5839         (class completion_tracker): New.
5840         (complete_line): Add completion_tracker parameter.
5841         (readline_line_completion_function): Delete.
5842         (gdb_rl_attempted_completion_function): New.
5843         (noop_completer, filename_completer, expression_completer)
5844         (location_completer, symbol_completer, command_completer)
5845         (signal_completer, reg_or_group_completer): Update prototypes.
5846         (completion_tracker_t, new_completion_tracker)
5847         (make_cleanup_free_completion_tracker): Delete.
5848         (enum maybe_add_completion_enum): Delete.
5849         (maybe_add_completion): Delete.
5850         (throw_max_completions_reached_error): Delete.
5851         * corefile.c (complete_set_gnutarget): Adjust to work with a
5852         completion_tracker instead of a VEC.
5853         * cp-abi.c (cp_abi_completer): Adjust to work with a
5854         completion_tracker instead of a VEC.
5855         * d-lang.c (d_language_defn): Adjust.
5856         * disasm.c (disassembler_options_completer): Adjust to work with a
5857         completion_tracker instead of a VEC.
5858         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5859         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5860         with a completion_tracker instead of a VEC.
5861         (f_language_defn): Adjust.
5862         * go-lang.c (go_language_defn): Adjust.
5863         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5864         Adjust to work with a completion_tracker instead of a VEC.
5865         * infrun.c (handle_completer): Likewise.
5866         * interps.c (interpreter_completer): Likewise.
5867         * interps.h (interpreter_completer): Likewise.
5868         * language.c (unknown_language_defn, auto_language_defn)
5869         (local_language_defn): Adjust.
5870         * language.h (language_defn::la_make_symbol_completion_list):
5871         Rename to ...
5872         (language_defn::la_collect_symbol_completion_matches): ... this
5873         and adjust to work with a completion_tracker instead of a VEC.
5874         * m2-lang.c (m2_language_defn): Adjust.
5875         * objc-lang.c (objc_language_defn): Adjust.
5876         * opencl-lang.c (opencl_language_defn): Adjust.
5877         * p-lang.c (pascal_language_defn): Adjust.
5878         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5879         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5880         with a completion_tracker.
5881         * rust-lang.c (rust_language_defn): Adjust.
5882         * symtab.c (free_completion_list, do_free_completion_list)
5883         (return_val, completion_tracker): Delete.
5884         (completion_list_add_name, completion_list_add_symbol)
5885         (completion_list_add_msymbol, completion_list_objc_symbol)
5886         (completion_list_add_fields, add_symtab_completions): Add
5887         completion_tracker parameter and use it.
5888         (default_make_symbol_completion_list_break_on_1): Rename to...
5889         (default_collect_symbol_completion_matches_break_on): ... this.
5890         Add completion_tracker parameter and use it instead of allocating
5891         a completion tracker here.
5892         (default_make_symbol_completion_list_break_on): Delete old
5893         implementation.
5894         (default_make_symbol_completion_list): Delete.
5895         (default_collect_symbol_completion_matches): New.
5896         (make_symbol_completion_list): Delete.
5897         (collect_symbol_completion_matches): New.
5898         (make_symbol_completion_type): Rename to ...
5899         (collect_symbol_completion_matches_type): ... this.  Add
5900         completion_tracker parameter and use it instead of VEC.
5901         (make_file_symbol_completion_list_1): Rename to...
5902         (collect_file_symbol_completion_matches): ... this.  Add
5903         completion_tracker parameter and use it instead of VEC.
5904         (make_file_symbol_completion_list): Delete.
5905         (add_filename_to_list): Use completion_list instead of a VEC.
5906         (add_partial_filename_data::list): Now a completion_list.
5907         (make_source_files_completion_list): Work with a completion_list
5908         instead of a VEC.
5909         * symtab.h: Include "completer.h".
5910         (default_make_symbol_completion_list_break_on)
5911         (default_make_symbol_completion_list, make_symbol_completion_list)
5912         (make_symbol_completion_type, make_file_symbol_completion_list)
5913         (make_source_files_completion_list): Delete.
5914         (default_collect_symbol_completion_matches_break_on)
5915         (default_collect_symbol_completion_matches)
5916         (collect_symbol_completion_matches)
5917         (collect_symbol_completion_matches_type)
5918         (collect_file_symbol_completion_matches)
5919         (make_source_files_completion_list): New.
5920         * top.c (init_main): Don't install a rl_completion_entry_function
5921         hook.  Install a rl_attempted_completion_function hook instead.
5922         * tui/tui-layout.c (layout_completer): Adjust to work with a
5923         completion_tracker.
5924         * tui/tui-regs.c (tui_reggroup_completer):
5925         * tui/tui-win.c (window_name_completer, focus_completer)
5926         (winheight_completer): Adjust to work with a completion_tracker.
5927         * value.c: Include "completer.h".
5928         (complete_internalvar): Adjust to work with a completion_tracker.
5929         * value.h (complete_internalvar): Likewise.
5930
5931 2017-07-17  Pedro Alves  <palves@redhat.com>
5932
5933         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5934         renames.
5935         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5936         comments to completer_ftype's declaration.
5937         <completer_handle_brkchars>: Change type to
5938         completer_handle_brkchars_ftype.
5939         * command.h (completer_ftype): Add describing comment and give
5940         names to parameters.
5941         (completer_ftype_void): Rename to ...
5942         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5943         (set_cmd_completer_handle_brkchars): Adjust.
5944         * completer.c (filename_completer_handle_brkchars): New function.
5945         (complete_line_internal_normal_command): New function, factored
5946         out from ...
5947         (complete_line_internal): ... here.
5948         (command_completer_handle_brkchars)
5949         (default_completer_handle_brkchars)
5950         (completer_handle_brkchars_func_for_completer): New functions.
5951         * completer.h (set_gdb_completion_word_break_characters): Delete
5952         declaration.
5953         (completer_handle_brkchars_func_for_completer): New declaration.
5954         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5955         completer_handle_brkchars_func_for_completer.
5956
5957 2017-07-17  Pedro Alves  <palves@redhat.com>
5958
5959         * completer.c (symbol_completer): New function, based on
5960         make_symbol_completion_list_fn.
5961         * completer.h (symbol_completer): New declaration.
5962         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5963         * python/py-cmd.c (completers): Adjust.
5964         * symtab.c (make_symbol_completion_list_fn): Delete.
5965         * symtab.h (make_symbol_completion_list_fn): Delete.
5966         * cli/cli-decode.c (add_cmd): Adjust.
5967
5968 2017-07-17  Pedro Alves  <palves@redhat.com>
5969
5970         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5971         * dwarf2read.c: Include "filename-seen-cache.h".
5972         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5973         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5974         * filename-seen-cache.c: New file.
5975         * filename-seen-cache.h: New file.
5976         * symtab.c: Include "filename-seen-cache.h".
5977         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5978         (create_filename_seen_cache, clear_filename_seen_cache)
5979         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5980         to filename-seen-cache.h/filename-seen-cache.c.
5981         (output_source_filename, sources_info)
5982         (maybe_add_partial_symtab_filename)
5983         (make_source_files_completion_list): Adjust to use
5984         filename_seen_cache.
5985
5986 2017-07-17  Pedro Alves  <palves@redhat.com>
5987
5988         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5989         fields.
5990         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5991         dwarf2_debug_sections*)): New.
5992         (dwarf2_per_objfile::dwarf2_per_objfile(const
5993         dwarf2_per_objfile&)): Declare as deleted.
5994         (dwarf2_per_objfile::operator=): Declare as deleted.
5995         (dwarf2_per_objfile::dwarf2_per_objfile)
5996         (dwarf2_per_objfile::~dwarf2_per_objfile)
5997         (dwarf2_per_objfile::free_cached_comp_units): New.
5998         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5999         ctor.  Call dwarf2_per_objfile's ctor manually.
6000         (dwarf2_locate_sections): Deleted/refactored as ...
6001         (dwarf2_per_objfile::locate_sections): ... this new method.
6002         (free_cached_comp_units): Defer to
6003         dwarf2_per_objfile::free_cached_comp_units.
6004         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6005
6006 2017-07-14  Tom Tromey  <tom@tromey.com>
6007
6008         PR rust/21764:
6009         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6010         parameter.
6011         <UNOP_SIZEOF>: Split into separate case.
6012         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6013
6014 2017-07-14  Tom Tromey  <tom@tromey.com>
6015
6016         PR rust/21763:
6017         * symtab.c (symbol_matches_domain): Add language_rust to special
6018         case.
6019         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6020         treat LOC_TYPEDEF symbols as variables.
6021
6022 2017-07-14  Pedro Alves  <palves@redhat.com>
6023
6024         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6025         symtabs matching all symtabs with SRCFILE as file name instead of
6026         only considering the first hit, with lookup_symtab.
6027
6028 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6029
6030         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6031         operator_name parameters.
6032         (gen_expr): Update function call.
6033
6034 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6035
6036         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6037         parameter.
6038         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6039         Likewise.
6040         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6041         parameter, use agent_expr::gdbarch instead, update function
6042         calls.
6043         (locexpr_tracepoint_var_ref): Likewise.
6044         (loclist_tracepoint_var_ref): Likewise.
6045         * ax-gdb.c (gen_trace_static_fields): Likewise.
6046         (gen_traced_pop): Likewise.
6047         (gen_frame_args_address): Likewise.
6048         (gen_frame_locals_address): Likewise.
6049         (gen_var_ref): Likewise.
6050         (gen_struct_ref_recursive): Likewise.
6051         (gen_static_field): Likewise.
6052         (gen_maybe_namespace_elt): Likewise.
6053         (gen_expr): Likewise.
6054         (gen_trace_for_var): Likewise.
6055         (gen_trace_for_expr): Likewise.
6056         (gen_trace_for_return_address): Likewise.
6057
6058 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6059
6060         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6061         parameter.
6062         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6063
6064 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6065
6066         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6067         from ax, update calls.
6068         (gen_usual_arithmetic): Likewise.
6069         (gen_integral_promotions): Likewise.
6070         (gen_bitfield_ref): Likewise.
6071         (gen_primitive_field): Likewise.
6072         (gen_struct_ref_recursive): Likewise.
6073         (gen_struct_ref): Likewise.
6074         (gen_maybe_namespace_elt): Likewise.
6075         (gen_struct_elt_for_reference): Likewise.
6076         (gen_namespace_elt): Likewise.
6077         (gen_aggregate_elt_ref): Likewise.
6078         (gen_expr): Get gdbarch from ax, update calls.
6079         (gen_expr_binop_rest): Likewise.
6080
6081 2017-07-13  Pedro Alves  <palves@redhat.com>
6082
6083         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6084         as default tdesc.
6085         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6086         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6087         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6088         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6089         tdep.
6090         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6091         Get final tdesc from the tdep.
6092         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6093         default tdesc.
6094         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6095         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6096         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6097         Use it as default tdesc.
6098         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6099         down to amd_init_abi.  No longer handle fallback tdesc here.
6100         * amd64-tdep.h (tdesc_x32): Declare.
6101         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6102         parameter.
6103         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6104         as default tdesc.
6105
6106 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6107
6108         * s390-linux-tdep.c (s390_process_record): Add support for
6109         instructions new in arch12.
6110
6111 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6112
6113         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6114         PT_GETFSBASE and PT_GETGSBASE.
6115         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6116         PT_SETGSBASE.
6117
6118 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6119
6120         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6121         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6122         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6123         those rules.
6124         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6125         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6126         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6127         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6128         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6129         * features/i386/amd64.xml: Add 64bit-segments.xml.
6130         * features/i386/amd64-avx-avx512.c: Regenerated.
6131         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6132         * features/i386/amd64-avx-mpx.c: Regenerated.
6133         * features/i386/amd64-avx.c: Regenerated.
6134         * features/i386/amd64-mpx.c: Regenerated.
6135         * features/i386/amd64.c: Regenerated.
6136         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6137         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6138         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6139         * regformats/i386/amd64-avx.dat: Regenerated.
6140         * regformats/i386/amd64-mpx.dat: Regenerated.
6141         * regformats/i386/amd64.dat: Regenerated.
6142
6143 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6144
6145         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6146         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6147
6148 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6149
6150         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6151         unsetenv.
6152         * gnulib/aclocal.m4: Regenerate.
6153         * gnulib/config.in: Regenerate.
6154         * gnulib/configure: Regenerate.
6155         * gnulib/import/Makefile.am: Regenerate.
6156         * gnulib/import/Makefile.in: Regenerate.
6157         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6158         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6159         * gnulib/import/m4/environ.m4: New file.
6160         * gnulib/import/m4/setenv.m4: New file.
6161         * gnulib/import/setenv.c: New file.
6162         * gnulib/import/unsetenv.c: New file.
6163
6164 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6165
6166         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6167         address when op is DW_OP_addr.
6168
6169 2017-07-09  Tom Tromey  <tom@tromey.com>
6170
6171         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6172         check and apply to outer type.
6173
6174 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6175
6176         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6177         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6178         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6179         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6180
6181 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6182
6183         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6184
6185 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6186
6187         * corelow.c (get_core_siginfo): Remove.
6188         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6189         instead of get_core_siginfo.
6190         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6191         * gdbarch.h: Re-generate.
6192         * gdbarch.c: Re-generate.
6193         * linux-tdep.c (linux_core_xfer_siginfo): New.
6194         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6195
6196 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6197
6198         * corelow.c (thread_section_name): Move to ...
6199         * gdbcore.h (thread_section_name): ... here.
6200
6201 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6202
6203         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6204         (struct siginfo32): New.
6205         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6206         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6207         via ptrace(PT_LWPINFO).
6208
6209 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6210
6211         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6212         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6213         (fbsd_get_siginfo_type): New.
6214         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6215         (_initialize_fbsd_tdep): New.
6216
6217 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6218
6219         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6220         a singular dwo_unit*) to support multiple CUs in the same way that
6221         multiple TUs are supported.
6222         (create_cus_hash_table): Replace create_dwo_cu with a function for
6223         parsing multiple CUs from a DWO file.
6224         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6225         create_dwo_cu.
6226         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6227         htab_find, rather than comparing the signature to a singleton CU in
6228         the dwo_file.
6229
6230 2017-07-06  Pedro Alves  <palves@redhat.com>
6231
6232         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6233
6234 2017-07-04  Pedro Alves  <palves@redhat.com>
6235
6236         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6237         * gdbtypes.h (TYPE_STATIC): Delete.
6238         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6239         is_synchronized, is_native>: Delete.
6240         <dummy>: Bump.
6241         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6242         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6243         (TYPE_FN_FIELD_ABSTRACT): Delete.
6244
6245 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6246
6247         * buffer.h (buffer_finish): Fix spelling mistakes.
6248
6249 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6250
6251         * .dir-locals.el: Automatically switch to C-style comments in
6252         versions of Emacs that support the feature.
6253
6254 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6255             Pedro Alves  <palves@redhat.com>
6256
6257         PR cli/21688
6258         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6259         (process_next_line): New variable 'inline_cmd'.
6260         Adjust 'if' clauses for "python", "compile" and "guile" to use
6261         'command_name_equals' and check for '!inline_cmd'.
6262
6263 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6264
6265         PR cli/21688
6266         * cli/cli-script.c (command_name_equals_not_inline): New function.
6267         (process_next_line): Adjust 'if' clauses for "python", "compile"
6268         and "guile" to use command_name_equals_not_inline.
6269
6270 2017-06-29  Pedro Alves  <palves@redhat.com>
6271
6272         * completer.c (expression_completer): Call
6273         linespec_location_completer instead of location_completer.
6274
6275 2017-06-29  Pedro Alves  <palves@redhat.com>
6276
6277         * completer.c (expression_completer): Remove code that recomputes
6278         'text' from 'word'.
6279
6280 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6281
6282         * regformats/regdat.sh: Generate code with
6283         "ifndef IN_PROCESS_AGENT".
6284
6285 2017-06-28  Pedro Alves  <palves@redhat.com>
6286
6287         * command.h: Include "common/scoped_restore.h".
6288
6289 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6290
6291         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6292         instead of obstack_grow.
6293
6294 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6295
6296         PR gdb/21337
6297         * symfile.c (reread_symbols): Call objfiles_changed just before
6298         read_symbols.
6299
6300 2017-06-27  Pedro Alves  <palves@redhat.com>
6301
6302         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6303         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6304         (completion_list_add_symbol, completion_list_add_msymbol):
6305         ... these new functions.
6306         (add_symtab_completions)
6307         (default_make_symbol_completion_list_break_on_1): Adjust.
6308
6309 2017-06-27  Pedro Alves  <palves@redhat.com>
6310
6311         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6312         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6313         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6314         dtor.
6315         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6316         'storage_obstack' field an auto_obstack.  In-class initialize all
6317         non-bitfield fields.  Make minsyms_read bool.
6318         * symfile.c (read_symbols): Adjust.
6319
6320 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6321
6322         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6323         (gdbsim_store_register): Likewise.
6324
6325 2017-06-27  Pedro Alves  <palves@redhat.com>
6326
6327         * c-exp.y (name_obstack): Now an auto_obstack.
6328         (yylex): Use auto_obstack::clear.
6329         (c_parse): Use auto_obstack::clear instead of reinitializing and
6330         freeing the obstack.
6331         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6332         * d-exp.y (name_obstack): Now an auto_obstack.
6333         (yylex): Use auto_obstack::clear.
6334         (d_parse): Use auto_obstack::clear instead of reinitializing and
6335         freeing the obstack.
6336         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6337         auto_obstack.
6338         * dwarf2read.c (create_addrmap_from_index)
6339         (dwarf2_build_psymtabs_hard)
6340         (update_enumeration_type_from_children): Likewise.
6341         * gdb_obstack.h (auto_obstack): New type.
6342         * go-exp.y (name_obstack): Now an auto_obstack.
6343         (build_packaged_name): Use auto_obstack::clear.
6344         (go_parse): Use auto_obstack::clear instead of reinitializing and
6345         freeing the obstack.
6346         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6347         auto_obstack.
6348         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6349         * rust-exp.y (work_obstack): Now an auto_obstack.
6350         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6351         reinitializing and freeing the obstack.
6352         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6353         (host_char_to_target): Use auto_obstack.
6354         * utils.h (make_cleanup_obstack_free): Delete declaration.
6355         * valprint.c (generic_emit_char, generic_printstr): Use
6356         auto_obstack.
6357
6358 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6359
6360         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6361         thread.
6362         (darwin_init_thread_list): Don't update dummy thread.
6363         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6364
6365 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6366
6367         * record-full.c (netorder16): Remove.
6368
6369 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6370
6371         * common/diagnostics.h: Define macros for GCC.
6372         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6373         * common/vec.h: Include diagnostics.h.
6374         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6375         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6376         warning.
6377
6378 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6379
6380         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6381         New macro.
6382         * ada-lex.l: Ignore deprecated register warnings.
6383
6384 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6385
6386         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6387         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6388
6389 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6390
6391         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6392         its own line.
6393
6394 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6395
6396         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6397
6398 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6399
6400         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6401         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6402         (xtensa_register_read_masked): Likewise.
6403
6404 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6405
6406         * common/environ.c (gdb_environ::unset): Update comment.
6407
6408 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6409
6410         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6411         registers.
6412
6413 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6414
6415         * record-full.c (record_full_exec_insn): Use byte_vector.
6416
6417 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6418
6419         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6420         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6421
6422 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6423
6424         * remote.c (cached_reg): Move from here...
6425         * regcache.h (cached_reg): ...to here.
6426         * python/py-unwind.c (struct reg_info): Remove.
6427         (cached_frame_info): Use cached_reg_t.
6428         (pyuw_prev_register): Likewise.
6429         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6430         (pyuw_dealloc_cache): Free all registers.
6431
6432 2017-06-22  Pedro Alves  <palves@redhat.com>
6433             Simon Marchi  <simon.marchi@ericsson.com>
6434
6435         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6436         warning.
6437         * common/diagnostics.h: New file.
6438
6439 2017-06-22  Pedro Alves  <palves@redhat.com>
6440
6441         * common/agent.h: Add include guards.
6442
6443 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6444
6445         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6446         talk about addressable units instead of bytes.
6447
6448 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6449
6450         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6451         of '::const_iterator'.
6452
6453 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6454
6455         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6456         'unittests/environ-selftests.c'.
6457         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6458         * charset.c (find_charset_names): Declare object 'iconv_env'.
6459         Update code to use 'iconv_env' object.  Remove call to
6460         'free_environ'.
6461         * common/environ.c: Include <utility>.
6462         (make_environ): Delete function.
6463         (free_environ): Delete function.
6464         (gdb_environ::clear): New function.
6465         (gdb_environ::operator=): New function.
6466         (gdb_environ::get): Likewise.
6467         (environ_vector): Delete function.
6468         (set_in_environ): Delete function.
6469         (gdb_environ::set): New function.
6470         (unset_in_environ): Delete function.
6471         (gdb_environ::unset): New function.
6472         (gdb_environ::envp): Likewise.
6473         * common/environ.h: Include <vector>.
6474         (struct gdb_environ): Delete; transform into...
6475         (class gdb_environ): ... this class.
6476         (free_environ): Delete prototype.
6477         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6478         environ_vector): Likewise.
6479         * infcmd.c (run_command_1): Update code to call
6480         'envp' from 'gdb_environ' class.
6481         (environment_info): Update code to call methods from 'gdb_environ'
6482         class.
6483         (unset_environment_command): Likewise.
6484         (path_info): Likewise.
6485         (path_command): Likewise.
6486         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6487         (inferior::inferior): Initialize 'environment' using the host's
6488         information.
6489         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6490         Include "environ.h".
6491         (class inferior) <environment>: Change type from 'struct
6492         gdb_environ' to 'gdb_environ'.
6493         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6494         methods from 'gdb_environ' class.
6495         * solib.c (solib_find_1): Likewise
6496         * unittests/environ-selftests.c: New file.
6497
6498 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6499
6500         * features/i386/i386-linux.xml: Exchange the order of including
6501         32bit-linux.xml and 32bit-sse.xml.
6502         * features/i386/i386-linux.c: Regenerated.
6503
6504 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6505
6506         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6507         Delete copy ctor and assignment operator.
6508         (tdesc_type): Likewise.
6509         (tdesc_feature): Likewise.
6510         (tdesc_free_reg): Remove.
6511         (tdesc_create_reg): Use new.
6512         (tdesc_free_type): Remove.
6513         (tdesc_create_vector): Use new.
6514         (tdesc_create_union): Likewise.
6515         (tdesc_create_flags): Likewise.
6516         (tdesc_create_enum): Likewise.
6517         (tdesc_free_feature): Delete.
6518         (free_target_description): Use delete.
6519
6520 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6521
6522         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6523         registers.
6524
6525 2017-06-19  Pedro Alves  <palves@redhat.com>
6526
6527         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6528         after gdb::unlinker.
6529
6530 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6531
6532         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6533         gdb_environ to access an environment variable.
6534
6535 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6536
6537         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6538         gdb_byte*.
6539
6540 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6541
6542         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6543
6544 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6545
6546         * configure: Re-generate.
6547         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6548
6549 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6550
6551         * configure: Re-generate.
6552         * warning.m4: Pass -Werror to compiler when checking for
6553         supported warning flags.
6554
6555 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6556
6557         * Makefile.in (COMPILE.pre): Add "-x c++".
6558
6559 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6560             Pedro Alves  <palves@redhat.com>
6561             Yao Qi  <yao.qi@linaro.org>
6562
6563         * defs.h (RequireLongest): New.
6564         (extract_integer): Declare function template.
6565         (extract_signed_integer): Remove the declaration, but define it
6566         static inline.
6567         (extract_unsigned_integer): Likewise.
6568         (store_integer): Declare function template.
6569         (store_signed_integer): Remove the declaration, but define it
6570         static inline.
6571         (store_unsigned_integer): Likewise.
6572         * findvar.c (extract_integer): New function template.
6573         (extract_signed_integer): Remove.
6574         (extract_unsigned_integer): Remove.
6575         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6576         instantiations.
6577         (store_integer): New function template.
6578         (store_signed_integer): Remove.
6579         (store_unsigned_integer): Remove.
6580         (store_integer): Explicit instantiations.
6581         * regcache.c (regcache_raw_read_signed): Update.
6582         (regcache::raw_read): New function.
6583         (regcache::raw_read_signed): Remove.
6584         (regcache::raw_read_unsigned): Remove.
6585         (regcache_raw_read_unsigned): Update.
6586         (regcache_raw_write_unsigned): Update.
6587         (regcache::raw_write_signed): Remove.
6588         (regcache::raw_write): New function.
6589         (regcache_cooked_read_signed): Update.
6590         (regcache::raw_write_unsigned): Remove.
6591         (regcache::cooked_read_signed): Remove.
6592         (regcache_cooked_read_unsigned): Update.
6593         (regcache::cooked_read_unsigned): Remove.
6594         (regcache_cooked_write_signed): Update.
6595         (regcache_cooked_write_unsigned): Update.
6596         * regcache.h (regcache) <raw_read_signed>: Remove.
6597         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6598         <raw_read, raw_write>: New.
6599         <cooked_read_signed, cooked_write_signed>: Remove.
6600         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6601         <cooked_read, cooked_write>: New.
6602         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6603         (sh64_pseudo_register_write): Update.
6604
6605 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6606
6607         * arc-tdep.c (arc_disassembler_options): New variable.
6608         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6609         of default_print_insn.
6610         (arc_delayed_print_insn): Set info->section when needed,
6611         use default_print_insn to retrieve a disassembler.
6612
6613 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6614
6615         PR gdb/21574
6616         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6617         to mention $SHELL and startup-with-shell.
6618
6619 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6620
6621         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6622
6623 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6624
6625         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6626         default_print_insn instead of print_insn_aarch64.
6627         * arm-tdep.c (gdb_print_insn_arm): Call
6628         default_print_insn instead of print_insn_big_arm
6629         and print_insn_little_arm.
6630         * i386-tdep.c (i386_print_insn): Call default_print_insn
6631         instead of print_insn_i386.
6632         * ia64-tdep.c (ia64_print_insn): Call
6633         default_print_insn instead of print_insn_ia64.
6634         * mips-tdep.c (gdb_print_insn_mips): Call
6635         default_print_insn instead of print_insn_big_mips
6636         and print_insn_little_mips.
6637         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6638         instead of print_insn_spu.
6639
6640 2017-06-14  Pedro Alves  <palves@redhat.com>
6641
6642         * ada-lang.c: Include "common/byte-vector.h".
6643         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6644         * charset.c (wchar_iterator::iterate): Resize the vector instead
6645         of reserving it.
6646         * common/byte-vector.h: Include "common/def-vector.h".
6647         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6648         * cli/cli-dump.c: Include "common/byte-vector.h".
6649         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6650         * common/byte-vector.h: New file.
6651         * common/def-vector.h: New file.
6652         * common/default-init-alloc.h: New file.
6653         * dwarf2loc.c: Include "common/byte-vector.h".
6654         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6655         instead of reserving it.
6656         * dwarf2read.c: Include "common/byte-vector.h".
6657         (data_buf::m_vec): Now a gdb::byte_vector.
6658         * gdb_regex.c: Include "common/def-vector.h".
6659         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6660         * mi/mi-main.c: Include "common/byte-vector.h".
6661         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6662         * printcmd.c: Include "common/byte-vector.h".
6663         (print_scalar_formatted): Use gdb::byte_vector.
6664         * valprint.c: Include "common/byte-vector.h".
6665         (maybe_negate_by_bytes, print_decimal_chars): Use
6666         gdb::byte_vector.
6667
6668 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6669
6670         * darwin-nat.c: Include "nat/fork-inferior.h".
6671
6672 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6673
6674         * configure.nat: Factor out Darwin bits that are not
6675         architecture-specific.  Add fork-inferior.o.
6676
6677 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6678
6679         * configure.nat: Factor out AIX bits that are not
6680         architecture-specific.  Add fork-inferior.o.
6681
6682 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6683
6684         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6685         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6686         wrappers that just call rw_pieced_value.
6687
6688 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6689
6690         * dwarf2loc.c (write_pieced_value): When writing the data for a
6691         memory piece, use write_memory_with_notification instead of
6692         write_memory.
6693
6694 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6695
6696         * valops.c (read_value_memory): Change embedded_offset to
6697         represent a bit offset instead of a byte offset.
6698         * value.h (read_value_memory): Adjust comment.
6699
6700 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6701
6702         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6703         dest_offset_bits and source_offset_bits.
6704         (write_pieced_value): Likewise.
6705
6706 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6707
6708         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6709         given by DW_OP_bit_piece.
6710         (write_pieced_value): Likewise.
6711
6712 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6713
6714         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6715         some other preparations to the places where sufficient information
6716         is available.
6717         (write_pieced_value): Likewise.
6718
6719 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6720
6721         * dwarf2loc.c (bits_to_bytes): New function.
6722         (read_pieced_value): Fix offset calculations for register pieces
6723         on big-endian targets.
6724         (write_pieced_value): Likewise.
6725
6726 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6727
6728         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6729         (write_pieced_value): Likewise.
6730
6731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6732
6733         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6734         transfer the source value's least significant bits, instead of its
6735         lowest-addressed ones.  Rename type_len to max_offset.
6736         (read_pieced_value): Mirror above changes to write_pieced_value as
6737         applicable.
6738
6739 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6740
6741         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6742         truncate full bytes from dest_offset_bits before using it as an
6743         offset into the buffer.
6744
6745 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6746
6747         * dwarf2loc.c (write_pieced_value): Include transfer size in
6748         byte-wise check.
6749
6750 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6751
6752         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6753         calculation of this_size.
6754
6755 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6756
6757         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6758         when targeting a bit-field.
6759         (write_pieced_value): Likewise.
6760
6761 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6762
6763         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6764         (allocate_piece_closure): Drop addr_size parameter.
6765         (dwarf2_evaluate_loc_desc_full): Adjust call to
6766         allocate_piece_closure.
6767
6768 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6769
6770         PR gdb/21226
6771         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6772         the LSB end, independent of endianness.
6773
6774 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6775
6776         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6777         size capping.
6778
6779 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6780
6781         * mips-linux-nat.c: Move include features/mips*-linux.c to
6782         mips-linux-tdep.c.
6783         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6784         to mips-linux-tdep.c.
6785         * mips-linux-tdep.c: Include features/mips*-linux.c
6786         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6787         functions.
6788         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6789         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6790         (tdesc_mips64_dsp_linux): Declare.
6791
6792 2017-06-12  Tom Tromey  <tom@tromey.com>
6793
6794         * valprint.h (val_print_type_code_int): Remove.
6795         * valprint.c (generic_val_print_int): Always call
6796         val_print_scalar_formatted.
6797         (val_print_type_code_int): Remove.
6798         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6799         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6800         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6801         * ada-valprint.c (ada_val_print_num): Use
6802         val_print_scalar_formatted.
6803
6804 2017-06-12  Tom Tromey  <tom@tromey.com>
6805
6806         * printcmd.c (print_scalar_formatted): Unify the two switches.
6807         Don't convert scalars to LONGEST.
6808
6809 2017-06-12  Tom Tromey  <tom@tromey.com>
6810
6811         PR exp/16225:
6812         * valprint.h (print_decimal_chars): Update.
6813         * valprint.c (maybe_negate_by_bytes): New function.
6814         (print_decimal_chars): Add "is_signed" argument.
6815         * printcmd.c (print_scalar_formatted): Update.
6816
6817 2017-06-12  Tom Tromey  <tom@tromey.com>
6818
6819         PR exp/16225:
6820         * valprint.h (print_binary_chars, print_hex_chars): Update.
6821         * valprint.c (val_print_type_code_int): Update.
6822         (print_binary_chars): Add "zero_pad" argument.
6823         (emit_octal_digit): New function.
6824         (print_octal_chars): Don't zero-pad.
6825         (print_decimal_chars): Likewise.
6826         (print_hex_chars): Add "zero_pad" argument.
6827         * sh64-tdep.c (sh64_do_fp_register): Update.
6828         * regcache.c (regcache::dump): Update.
6829         * printcmd.c (print_scalar_formatted): Update.
6830         * infcmd.c (default_print_one_register_info): Update.
6831
6832 2017-06-12  Pedro Alves  <palves@redhat.com>
6833             Alan Hayward  <alan.hayward@arm.com>
6834
6835         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6836         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6837         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6838         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6839         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6840
6841 2017-06-12  Pedro Alves  <palves@redhat.com>
6842
6843         * dwarf2read.c (mapped_symtab::data): Now a vector of
6844         symtab_index_entry instead of vector of
6845         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6846         whether an element's name is NULL instead of checking whether the
6847         element itself is NULL.
6848         (find_slot): Change return type.  Adjust.
6849         (hash_expand, , add_index_entry, uniquify_cu_indices)
6850         (write_hash_table): Adjust.
6851
6852 2017-06-12  Pedro Alves  <palves@redhat.com>
6853
6854         * dwarf2read.c (recursively_count_psymbols): New function.
6855         (write_psymtabs_to_index): Call it to compute number of psyms and
6856         pass estimate size of psyms_seen to unordered_set's ctor.
6857
6858 2017-06-12  Pedro Alves  <palves@redhat.com>
6859
6860         * dwarf2read.c (write_hash_table): Check if key already exists
6861         before emplacing.
6862
6863 2017-06-12  Pedro Alves  <palves@redhat.com>
6864
6865         * dwarf2read.c (data_buf::append_space): Rename to...
6866         (data_buf::grow): ... this, and make private.  Adjust all callers.
6867         (data_buf::append_uint): New method.
6868         (add_address_entry, write_one_signatured_type)
6869         (write_psymtabs_to_index): Use it.
6870
6871 2017-06-12  Pedro Alves  <palves@redhat.com>
6872
6873         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6874         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6875         (data_buf::file_write): Call ::fwrite directly.
6876
6877 2017-06-12  Pedro Alves  <palves@redhat.com>
6878
6879         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6880         std::vector::erase.
6881
6882 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6883
6884         Code cleanup: C++ify .gdb_index producer.
6885         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6886         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6887         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6888         (create_strtab, add_string): Remove.
6889         (file_write, data_buf): New.
6890         (struct symtab_index_entry): Use std::vector for cu_indices.
6891         (struct mapped_symtab): Use std::vector for data.
6892         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6893         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6894         Remove.
6895         (find_slot): Change return type.  Update it to the new data structures.
6896         (hash_expand, add_index_entry): Update it to the new data structures.
6897         (offset_type_compare): Remove.
6898         (uniquify_cu_indices): Update it to the new data structures.
6899         (c_str_view, c_str_view_hasher, vector_hasher): New.
6900         (add_indices_to_cpool): Remove.
6901         (write_hash_table): Update it to the new data structures.
6902         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6903         (eq_psymtab_cu_index): Remove.
6904         (psym_index_map): New typedef.
6905         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6906         reference and std::unordered_map for cu_index_htab.
6907         (add_address_entry, add_address_entry_worker, write_address_map)
6908         (write_psymbols): Update it to the new data structures.
6909         (write_obstack): Remove.
6910         (struct signatured_type_index_data): Change types_list to a data_buf
6911         reference and psyms_seen to a std::unordered_set reference.
6912         (write_one_signatured_type, recursively_write_psymbols)
6913         (write_psymtabs_to_index): Update it to the new data structures.
6914
6915 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6916
6917         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6918         separate-debug-file commands.
6919         * symfile.h (separate_debug_file_debug): New global.
6920         * symfile.c (separate_debug_file_debug): New global.
6921         (separate_debug_file_exists, find_separate_debug_file): Add
6922         debug output.
6923         (_initialize_symfile): Add "set debug separate-debug-file"
6924         command.
6925         * build-id.c (build_id_to_debug_bfd,
6926         find_separate_debug_file_by_buildid): Add debug output.
6927
6928 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6929
6930         * gdbarch.sh (displaced_step_free_closure): Remove.
6931         * gdbarch.h, gdbarch.c: Re-generate.
6932         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6933         displaced_step_free_closure.
6934         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6935         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6936         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6937         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6938         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6939         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6940         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6941         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6942         * infrun.c (displaced_step_clear): Call xfree instead of
6943         gdbarch_displaced_step_free_closure.
6944
6945 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6946
6947         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6948         NULL".
6949
6950 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6951
6952         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6953         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6954         (mn10300_push_dummy_call): Likewise.
6955
6956 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6957
6958         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6959
6960 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6961
6962         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6963
6964 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6965
6966         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6967         able to start inferiors using a shell.
6968         (New remote packets): Announce new packet "QStartupWithShell".
6969         * remote.c: Add PACKET_QStartupWithShell.
6970         (extended_remote_create_inferior): Handle new
6971         PACKET_QStartupWithShell.
6972         (remote_protocol_features) <QStartupWithShell>: New entry for
6973         PACKET_QStartupWithShell.
6974         (_initialize_remote): Call "add_packet_config_cmd" for
6975         QStartupShell.
6976
6977 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6978             Pedro Alves  <palves@redhat.com>
6979
6980         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6981         and "nat/fork-inferior.h".
6982         * common/common-inferior.h: New file, with contents from
6983         "gdb/inferior.h".
6984         * commom/common-utils.c: Include "common-utils.h".
6985         (stringify_argv): New function.
6986         * common/common-utils.h (stringify_argv): New prototype.
6987         * configure.nat: Add "fork-inferior.o" as a dependency for
6988         "*linux*", "fbsd*" and "nbsd*" hosts.
6989         * corefile.c (get_exec_file): Update comment.
6990         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6991         instead of "startup_inferior".
6992         (darwin_create_inferior): Call "add_thread_silent" after
6993         "fork_inferior".
6994         * fork-child.c: Cleanup unnecessary includes.
6995         (SHELL_FILE): Move to "common/common-fork-child.c".
6996         (environ): Likewise.
6997         (exec_wrapper): Initialize.
6998         (get_exec_wrapper): New function.
6999         (breakup_args): Move to "common/common-fork-child.c"; rename to
7000         "breakup_args_for_exec".
7001         (escape_bang_in_quoted_argument): Move to
7002         "common/common-fork-child.c".
7003         (saved_ui): New variable.
7004         (prefork_hook): New function.
7005         (postfork_hook): Likewise.
7006         (postfork_child_hook): Likewise.
7007         (gdb_startup_inferior): Likewise.
7008         (fork_inferior): Move to "common/common-fork-child.c".  Update
7009         function to support gdbserver.
7010         (startup_inferior): Likewise.
7011         * gdbcore.h (get_exec_file): Remove declaration.
7012         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7013         instead of "startup_inferior".  Call "add_thread_silent" after
7014         "fork_inferior".
7015         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7016         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7017         instead of "startup_inferior".  Call "add_thread_silent" after
7018         "fork_inferior".
7019         * inferior.h: Include "common-inferior.h".
7020         (trace_start_error): Move to "common/common-utils.h".
7021         (trace_start_error_with_name): Likewise.
7022         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7023         (startup_inferior): Likewise.
7024         (gdb_startup_inferior): New prototype.
7025         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7026         * nat/fork-inferior.h: New file.
7027         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7028         instead of "startup_inferior".  Call "add_thread_silent" after
7029         "fork_inferior".
7030         * target.h (target_terminal_init): Move prototype to
7031         "target/target.h".
7032         (target_terminal_inferior): Likewise.
7033         (target_terminal_ours): Likewise.
7034         * target/target.h (target_terminal_init): New prototype, moved
7035         from "target.h".
7036         (target_terminal_inferior): Likewise.
7037         (target_terminal_ours): Likewise.
7038         * utils.c (gdb_flush_out_err): New function.
7039
7040 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7041
7042         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7043         * common/common-gdbthread.h: New file, with parts from
7044         "gdb/gdbthread.h".
7045         * gdbthread.h: Include "common-gdbthread.h".
7046         (switch_to_thread): Moved to "common/common-gdbthread.h".
7047
7048 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7049
7050         * Makefile.in (SFILES): Add "common/job-control.c".
7051         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7052         (COMMON_OBS): Add "job-control.o".
7053         * common/job-control.c: New file, with contents from
7054         "gdb/inflow.c".
7055         * common/job-control.h: New file, with contents from "terminal.h".
7056         * fork-child.c: Include "job-control.h".
7057         * inflow.c: Include "job-control.h".
7058         (gdb_setpgid): Move to "common/common-inflow.c".
7059         (_initialize_inflow): Move setting of "job_control" to
7060         "handle_job_control".
7061         * terminal.h (job_control): Moved to "common/common-terminal.h".
7062         (gdb_setpgid): Likewise.
7063         * top.c: Include "job_control.h".
7064         * utils.c: Likewise.
7065         (job_control): Moved to "job-control.c".
7066
7067 2017-06-07  Pedro Alves  <palves@redhat.com>
7068
7069         * Makefile.in (SFILES): Add gdb_regex.c.
7070         (COMMON_OBS): Add gdb_regex.o.
7071         * ada-lang.c (ada_add_standard_exceptions)
7072         (ada_add_exceptions_from_frame, name_matches_regex)
7073         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7074         parameter type to compiled_regex.  Adjust.
7075         (ada_exceptions_list): Use compiled_regex.
7076         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7077         std::unique_ptr<compiled_regex>.
7078         (exception_catchpoint::~exception_catchpoint): Remove regfree
7079         call.
7080         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7081         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7082         * breakpoint.c (solib_catchpoint::compiled): Now a
7083         std::unique_ptr<compiled_regex>.
7084         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7085         (check_status_catch_solib): Adjust to use compiled_regex.
7086         (add_solib_catchpoint): Adjust to use compiled_regex.
7087         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7088         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7089         compiled_regex reference.  Adjust to use it.
7090         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7091         declaration.  Include "gdb_regex.h".
7092         (apropos_cmd): Change regex parameter to compiled_regex reference.
7093         * gdb_regex.c: New file.
7094         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7095         declarations.
7096         (class compiled_regex): New.
7097         * linux-tdep.c: Include "common/gdb_optional.h".
7098         (struct mapping_regexes): New, factored out from
7099         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7100         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7101         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7102         * probe.c: Include "common/gdb_optional.h".
7103         (collect_probes): Use compiled_regex and gdb::optional and remove
7104         cleanups.
7105         * skip.c: Include "common/gdb_optional.h".
7106         (skiplist_entry::compiled_function_regexp): Now a
7107         gdb::optional<compiled_regex>.
7108         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7109         (free_skiplist_entry): Remove regfree call.
7110         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7111         compiled_regex and gdb::optional.
7112         * symtab.c: Include "common/gdb_optional.h".
7113         (search_symbols): Use compiled_regex and gdb::optional.
7114         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7115         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7116         to gdb_regex.c.
7117
7118 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7119
7120         * regcache.c (regcache::save): Avoid buffer use.
7121         (regcache::dump): Likewise.
7122
7123 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7124
7125         * sh-tdep.c (sh_pseudo_register_read): Remove
7126         MAX_REGISTER_SIZE.
7127         (sh_pseudo_register_write): Likewise.
7128         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7129         (sh64_pseudo_register_write): Likewise
7130
7131 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7132
7133         * aarch64-tdep.c (aarch64_store_return_value): Use
7134         V_REGISTER_SIZE.
7135         (aarch64_pseudo_read_value): Likewise.
7136         (aarch64_pseudo_write): Likewise.
7137
7138 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7139
7140         * regformats/regdef.h (set_register_cache): Remove the
7141         declaration.
7142
7143 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7144
7145         * frame.c (frame_unwind_register_signed): Use
7146         frame_unwind_register_value.
7147
7148 2017-06-06  Pedro Alves  <palves@redhat.com>
7149
7150         PR breakpoints/21553
7151         * breakpoint.c (create_breakpoints_sal_default)
7152         (init_breakpoint_sal, create_breakpoint_sal): Use
7153         gdb::unique_xmalloc_ptr for string parameters.
7154         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7155         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7156         (base_breakpoint_create_breakpoints_sal)
7157         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7158         (strace_marker_create_breakpoints_sal)
7159         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7160         string parameters.
7161         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7162         gdb::unique_xmalloc_ptr for string parameters.
7163         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7164         parameters.
7165
7166 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7167
7168         * alpha-tdep.c (alpha_register_to_value): Use
7169         get_frame_register_value.
7170         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7171
7172 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7173
7174         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7175         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7176         (ia64_value_to_register): Likewise.
7177         (ia64_extract_return_value): Likewise.
7178         (ia64_store_return_value): Likewise.
7179         (ia64_push_dummy_call): Likewise.
7180
7181 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7182
7183         GDB 8.0 released.
7184
7185 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7186
7187         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7188
7189 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7190
7191         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7192         parameter.
7193         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7194
7195 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7196
7197         * event-loop.c (poll_timers): Unallocate timer using delete
7198         instead of xfree.
7199
7200 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7201
7202         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7203         (struct breakpoint) <~breakpoint>: New.
7204         (struct watchpoint): Inherit from breakpoint.
7205         <~watchpoint>: New.
7206         <base>: Remove.
7207         (struct tracepoint): Inherit from breakpoint.
7208         <base>: Remove.
7209         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7210         (struct longjmp_breakpoint): Inherit from breakpoint.
7211         <~longjmp_breakpoint>: New.
7212         <base>: Remove.
7213         (new_breakpoint_from_type): Remove casts.
7214         (watchpoint_in_thread_scope): Remove reference to base field.
7215         (watchpoint_del_at_next_stop): Likewise.
7216         (update_watchpoint): Likewise.
7217         (watchpoint_check): Likewise.
7218         (bpstat_check_watchpoint): Likewise.
7219         (set_longjmp_breakpoint): Likewise.
7220         (struct fork_catchpoint): Inherit from breakpoint.
7221         <base>: Remove.
7222         (struct solib_catchpoint): Inherit from breakpoint.
7223         <~solib_catchpoint>: New.
7224         <base>: Remove.
7225         (dtor_catch_solib): Change to ...
7226         (solib_catchpoint::~solib_catchpoint): ... this.
7227         (breakpoint_hit_catch_solib): Remove reference to base field.
7228         (add_solib_catchpoint): Likewise.
7229         (create_fork_vfork_event_catchpoint): Likewise.
7230         (struct exec_catchpoint): Inherit from breakpoint.
7231         <~exec_catchpoint>: New.
7232         <base>: Remove.
7233         (dtor_catch_exec): Change to ...
7234         (exec_catchpoint::~exec_catchpoint): ... this.
7235         (dtor_watchpoint): Change to ...
7236         (watchpoint::~watchpoint): ... this.
7237         (watch_command_1): Remove reference to base field.
7238         (catch_exec_command_1): Likewise.
7239         (base_breakpoint_dtor): Change to ...
7240         (breakpoint::~breakpoint): ... this.
7241         (base_breakpoint_ops): Remove dtor field value.
7242         (longjmp_bkpt_dtor): Change to ...
7243         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7244         (strace_marker_create_breakpoints_sal): Remove reference to base
7245         field.
7246         (delete_breakpoint): Don't manually call breakpoint destructor.
7247         (create_tracepoint_from_upload): Remove reference to base field.
7248         (trace_pass_set_count): Likewise.
7249         (initialize_breakpoint_ops): Don't initialize
7250         momentary_breakpoint_ops, don't set dtors.
7251         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7252         <~ada_catchpoint>: New.
7253         <base>: Remove.
7254         (create_excep_cond_exprs): Remove reference to base field.
7255         (dtor_exception): Change to ...
7256         (ada_catchpoint::~ada_catchpoint): ... this.
7257         (dtor_catch_exception): Remove.
7258         (dtor_catch_exception_unhandled): Remove.
7259         (dtor_catch_assert): Remove.
7260         (create_ada_exception_catchpoint): Remove reference to base
7261         field.
7262         (initialize_ada_catchpoint_ops): Don't set dtors.
7263         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7264         breakpoint.
7265         <~signal_catchpoint>: New.
7266         <base>: Remove.
7267         (signal_catchpoint_dtor): Change to ...
7268         (signal_catchpoint::~signal_catchpoint): ... this.
7269         (create_signal_catchpoint): Remove reference to base field.
7270         (initialize_signal_catchpoint_ops): Don't set dtor.
7271         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7272         from breakpoint.
7273         <~syscall_catchpoint>: New.
7274         <base>: Remove.
7275         (dtor_catch_syscall): Change to ...
7276         (syscall_catchpoint::~syscall_catchpoint): ... this.
7277         (create_syscall_event_catchpoint): Remove reference to base
7278         field.
7279         (initialize_syscall_catchpoint_ops): Don't set dtor.
7280         * break-catch-throw.c (struct exception_catchpoint): Inherit
7281         from breakpoint.
7282         <~exception_catchpoint>: New.
7283         <base>: Remove.
7284         (dtor_exception_catchpoint): Change to ...
7285         (exception_catchpoint::~exception_catchpoint): ... this.
7286         (handle_gnu_v3_exceptions): Remove reference to base field.
7287         (initialize_throw_catchpoint_ops): Don't set dtor.
7288         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7289         field.
7290         * remote.c (remote_get_tracepoint_status): Likewise.
7291         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7292         * tracefile.c (tracefile_fetch_registers): Likewise.
7293         * tracepoint.c (actions_command): Likewise.
7294         (validate_actionline): Likewise.
7295         (tfind_1): Likewise.
7296         (get_traceframe_location): Likewise.
7297         (find_matching_tracepoint_location): Likewise.
7298         (parse_tracepoint_status): Likewise.
7299         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7300
7301 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7302
7303         * breakpoint.c (struct longjmp_breakpoint): New struct.
7304         (is_tracepoint_type): Change return type to bool.
7305         (is_longjmp_type): New function.
7306         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7307         (set_raw_breakpoint_without_location): Use
7308         new_breakpoint_from_type.
7309         (set_raw_breakpoint): Likewise.
7310
7311 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7312
7313         * breakpoint.c (new_breakpoint_from_type): New function.
7314         (create_breakpoint_sal): Use new_breakpoint_from_type and
7315         unique_ptr.
7316         (create_breakpoint): Likewise.
7317
7318 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7319
7320         * memattr.c (mem_info_command): Rename to ...
7321         (info_mem_command): ... this.
7322         (mem_enable_command): Rename to ...
7323         (enable_mem_command): ... this.
7324         (mem_disable_command): Rename to ...
7325         (disable_mem_command): ... this.
7326         (mem_delete_command): Rename to ...
7327         (delete_mem_command): ... this.
7328         (_initialize_mem): Adjust function names.
7329
7330 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7331
7332         * btrace.c (handle_pt_insn_events): New.
7333         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7334         STATUS.  Split into this and ...
7335         (handle_pt_insn_event_flags): ... this.
7336
7337 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7338
7339         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7340         and struct pt_insn.resynced.
7341         * configure: Regenerated.
7342         * config.in: Regenerated.
7343
7344 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7345
7346         * btrace.c (ftrace_find_call_by_number): New function.
7347         (ftrace_new_function): Store objects, not pointers.
7348         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7349         ftrace_new_gap, ftrace_update_function,
7350         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7351         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7352         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7353         btrace_ends_with_single_insn, btrace_call_get): Account for
7354         btrace_thread_info::functions now storing objects.
7355         * btrace.h (struct btrace_thread_info): Add constructor.
7356         (struct btrace_thread_info) <functions>: Make std::vector.
7357         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7358         Initialize with default values.
7359         * record-btrace.c (record_btrace_frame_sniffer): Account for
7360         btrace_thread_info::functions now storing objects.
7361
7362 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7363
7364         * btrace.c: Remove typedef bfun_s.
7365         (ftrace_new_gap): Directly add gaps to the list of gaps.
7366         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7367         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7368         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7369         instead of gdb VEC.
7370
7371 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7372
7373         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7374         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7375         with btrace_thread_info::next_segment and
7376         btrace_thread_info::prev_segment.
7377         * btrace.h: Remove struct btrace_func_link.
7378         (struct btrace_function): Replace pair of function segment pointers
7379         with pair of indices.
7380         * python/py-record-btrace.c (btpy_call_prev_sibling,
7381         btpy_call_next_sibling): Replace references to
7382         btrace_thread_info::segment with btrace_thread_info::next_segment and
7383         btrace_thread_info::prev_segment.
7384         * record-btrace.c (record_btrace_frame_this_id): Use
7385         btrace_find_call_by_number.
7386
7387 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7388
7389         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7390         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7391         btrace_insn_next, btrace_insn_prev): Remove references to
7392         btrace_thread_info::flow.
7393         * btrace.h (struct btrace_function): Remove FLOW.
7394
7395 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7396
7397         * btrace.c (ftrace_find_call_by_number): New function.
7398         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7399         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7400         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7401         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7402         index.
7403         * btrace.h (struct btrace_function): Turn UP into an index.
7404         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7405         as an index.
7406         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7407         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7408         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7409
7410 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7411
7412         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7413         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7414         ftrace_update_function, ftrace_compute_global_level_offset,
7415         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7416         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7417         btrace_insn_end, btrace_is_empty): Remove references to
7418         btrace_thread_info::begin and btrace_thread_info::end.
7419         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7420         (struct btrace_thread_info) <functions>: Adjust comment.
7421         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7422         btrace_thread_info::begin.
7423
7424 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7425
7426         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7427         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7428         ftrace_update_function): Remove arguments that implicitly were always
7429         BTINFO->END.
7430         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7431         Don't pass BTINFO->END.
7432
7433 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7434
7435         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7436         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7437         btrace_find_insn_by_number): Replace function segment pointer with
7438         index.
7439         (btrace_insn_cmp): Simplify.
7440         * btrace.h: (struct btrace_insn_iterator) Rename index to
7441         insn_index.  Replace function segment pointer with index into function
7442         segment vector.
7443         * record-btrace.c (record_btrace_call_history): Replace function
7444         segment pointer use with index.
7445         (record_btrace_frame_sniffer): Retrieve function call segment through
7446         vector.
7447         (record_btrace_set_replay): Remove defunc't safety check.
7448
7449 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7450
7451         * btrace.c (btrace_ends_with_single_insn): New function.
7452         (btrace_call_get, btrace_call_number, btrace_call_begin,
7453         btrace_call_end, btrace_call_next, btrace_call_prev,
7454         btrace_find_call_by_number): Use index into call segment vector
7455         instead of pointer.
7456         (btrace_call_cmp): Simplify.
7457         * btrace.h (struct btrace_call_iterator): Replace function call segment
7458         pointer with index into vector.
7459         * record-btrace.c (record_btrace_call_history): Use index instead of
7460         pointer.
7461
7462 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7463
7464         * btrace.c (btrace_insn_begin, btrace_insn_end,
7465         btrace_find_insn_by_number): Add btinfo to iterator.
7466         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7467
7468 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7469
7470         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7471         and save pointers directly.
7472         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7473         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7474         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7475         changed signature of functions.
7476         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7477         (btrace_fetch): Remove code that adds btrace_function pointers to
7478         vector of btrace_functions.
7479         (btrace_clear): Simplify freeing vector of btrace_functions.
7480
7481 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7482
7483         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7484         Replace VEC_* with std::vector functions.
7485         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7486         (struct btrace_thread_info)<functions>: Change type to std::vector.
7487
7488 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7489
7490         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7491         "Removed targets and native configurations" up.  Merge duplicate
7492         "New commands" sub-sections.  Add "New options" sub-sections.
7493
7494 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7495
7496         * defs.h (copy_integer_to_size): New declaration.
7497         * findvar.c (copy_integer_to_size): New function.
7498         (do_cint_test): New selftest function.
7499         (copy_integer_to_size_test): Likewise.
7500         (_initialize_findvar): Likewise.
7501         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7502         (mips_fbsd_collect_reg): Use raw_collect_integer.
7503         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7504         (mips64_fill_gregset): Use raw_collect_integer
7505         (mips64_fill_fpregset): Use raw_supply_integer.
7506         * regcache.c (regcache::raw_supply_integer): New function.
7507         (regcache::raw_collect_integer): Likewise.
7508         * regcache.h: (regcache::raw_supply_integer): New declaration.
7509         (regcache::raw_collect_integer): Likewise.
7510
7511 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7512
7513         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7514         (COMMON_OBS): Add gdbarch-selftests.o.
7515         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7516         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7517         * gdbarch-selftests.c: New file.
7518         * regcache.h (regcache) <~regcache>: Mark it virtual if
7519         GDB_SELF_TEST.
7520         <raw_write>: Likewise.
7521
7522 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7523
7524         * regcache.c (current_regcache): Change it to
7525         regcache::current_regcache.
7526         (regcache_observer_target_changed): Update.
7527         (regcache_thread_ptid_changed): Make it a regcache static
7528         method.
7529         (regcache_thread_ptid_changed): Update.
7530         (class regcache_access): New.
7531         (current_regcache_test): Update.
7532         (_initialize_regcache): Update.
7533         * regcache.h: Include forward_list.
7534         (regcache): Declare regcache_thread_ptid_changed and declare
7535         registers_changed_ptid as friend.
7536
7537 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7538
7539         * i387-tdep.c (i387_register_to_value): Use register_size
7540         instead of TYPE_LENGTH.
7541         * m68k-tdep.c (m68k_register_to_value): Likewise.
7542
7543 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7544
7545         * i387-tdep.c (i387_convert_register_p): Return false if type
7546         code isn't TYPE_CODE_FLT.
7547
7548 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7549
7550         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7551         length is 4.
7552         (alpha_register_to_value): Remove type length check.
7553         (alpha_value_to_register): Likewise.
7554
7555 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7556
7557         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7558         TYPE_CODE_FLT.
7559
7560 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7561
7562         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7563         TYPE_CODE_FLT or not.
7564
7565 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7566
7567         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7568         * avr-tdep.c (avr_gdbarch_init): Likewise.
7569         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7570         * cris-tdep.c (cris_gdbarch_init): Likewise.
7571         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7572         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7573         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7574         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7575         * mep-tdep.c (mep_gdbarch_init): Likewise.
7576         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7577         * mips-tdep.c (mips_gdbarch_init): Likewise.
7578         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7579         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7580         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7581         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7582         * v850-tdep.c (v850_gdbarch_init): Likewise.
7583
7584 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7585
7586         * selftest-arch.c (tests_with_arch): Call registers_changed
7587         and reinit_frame_cache.
7588         * selftest.c (run_self_tests): Likewise.
7589
7590 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7591
7592         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7593         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7594
7595 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7596
7597         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7598         set_gdbarch_print_insn.
7599
7600 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7601
7602         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7603         set_gdbarch_print_insn.
7604
7605 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7606
7607         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7608         set_gdbarch_print_insn.
7609         * arc-tdep.c (arc_gdbarch_init): Likewise.
7610         * arch-utils.c: include dis-asm.h.
7611         (default_print_insn): New function.
7612         * arch-utils.h (default_print_insn): Declare.
7613         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7614         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7615         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7616         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7617         * frv-tdep.c (frv_gdbarch_init): Likewise.
7618         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7619         * gdbarch.sh (print_insn): Use default_print_insn.
7620         * gdbarch.c: Regenerated.
7621         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7622         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7623         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7624         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7625         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7626         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7627         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7628         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7629         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7630         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7631         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7632         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7633         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7634         * mt-tdep.c (mt_gdbarch_init): Likewise.
7635         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7636         * nios2-tdep.c (nios2_print_insn): Remove.
7637         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7638         * rx-tdep.c (rx_gdbarch_init): Likewise.
7639         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7640         * score-tdep.c (score_print_insn): Remove.
7641         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7642         * sh-tdep.c (sh_gdbarch_init): Likewise.
7643         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7644         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7645         * tic6x-tdep.c (tic6x_print_insn): Remove.
7646         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7647         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7648         * v850-tdep.c (v850_gdbarch_init): Likewise.
7649         * vax-tdep.c (vax_gdbarch_init): Likewise.
7650         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7651         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7652
7653 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7654
7655         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7656         (MIPS_FP0_REGNUM): Remove.
7657         (MIPS_FSR_REGNUM): Remove.
7658         (mips_fbsd_supply_fpregs): Use mips_regnum.
7659         (mips_fbsd_supply_gregs): Likewise.
7660         (mips_fbsd_collect_fpregs): Likewise.
7661         (mips_fbsd_collect_gregs): Likewise.
7662
7663 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7664
7665         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7666         (getpfpregs_supplies): New function.
7667         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7668         getfpregs_supplies.
7669         (mips_fbsd_store_inferior_registers): Likewise.
7670
7671 2017-05-22  Pedro Alves <palves@redhat.com>
7672
7673         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7674         maintainer.
7675
7676 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7677
7678         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7679         (store_register): Likewise.
7680         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7681         (get_decimal_float_return_value): Likewise.
7682         (do_ppc_sysv_return_value): Likewise.
7683         (ppc64_sysv_abi_push_integer): Likewise.
7684         (ppc64_sysv_abi_push_freg): Likewise.
7685         (ppc64_sysv_abi_return_value_base): Likewise.
7686         (ppc64_sysv_abi_return_value): Likewise.
7687         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7688         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7689         * rs6000-nat.c: Likewise.
7690         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7691         (rs6000_value_to_register): Likewise.
7692         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7693
7694 2017-05-21  Tom Tromey  <tom@tromey.com>
7695
7696         PR rust/21466:
7697         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7698         arrays as "[T]", not "[T; ]".
7699
7700 2017-05-19  Tom Tromey  <tom@tromey.com>
7701
7702         PR rust/21484:
7703         * rust-lang.c (exp_descriptor_rust): New function.
7704         (rust_language_defn): Use it.
7705         * p-lang.c (pascal_language_defn): Update.
7706         * opencl-lang.c (opencl_language_defn): Update.
7707         * objc-lang.c (objc_language_defn): Update.
7708         * m2-lang.c (m2_language_defn): Update.
7709         * language.h (struct language_defn)
7710         <la_watch_location_expression>: New member.
7711         * language.c (unknown_language_defn, auto_language_defn)
7712         (local_language_defn): Update.
7713         * go-lang.c (go_language_defn): Update.
7714         * f-lang.c (f_language_defn): Update.
7715         * d-lang.c (d_language_defn): Update.
7716         * c-lang.h (c_watch_location_expression): Declare.
7717         * c-lang.c (c_watch_location_expression): New function.
7718         (c_language_defn, cplus_language_defn, asm_language_defn)
7719         (minimal_language_defn): Use it.
7720         * breakpoint.c (watch_command_1): Call
7721         la_watch_location_expression.
7722         * ada-lang.c (ada_language_defn): Update.
7723
7724 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7725
7726         PR tui/21482
7727         * gdb_curses.h (NOMACROS): Define.
7728         (NCURSES_NOMACROS): Define.
7729
7730 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7731
7732         PR tui/21482
7733         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7734         arg to char *.
7735         * tui/tui-wingeneral.c (box_win): Likewise.
7736         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7737         (tui_show_source_line): Likewise.
7738         (tui_show_exec_info_content): Likewise.
7739
7740 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7741
7742         * sparc-tdep.c (sparc_structure_return_p)
7743         (sparc_arg_on_registers_p): New functions.
7744         (sparc32_store_arguments): Use them.
7745         * sparc64-tdep.c (sparc64_16_byte_align_p)
7746         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7747         Handle TYPE_CODE_ARRAY.
7748
7749 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7750
7751         * cli/cli-decode.c (add_alias_cmd): New function.
7752         * command.h (add_alias_cmd): Declare.
7753         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7754         instead call add_alias_cmd.
7755
7756 2017-05-17  Pedro Alves  <palves@redhat.com>
7757
7758         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7759         (nat_makefile_frag): ... this.  All references updated.
7760         * configure.ac: Likewise.
7761         * configure.nat: Likewise.  Enhance comments.
7762         * configure: Regenerate.
7763
7764 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7765
7766         * procfs.c (procfs_create_inferior): Change prototype to match
7767         definition.
7768
7769 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7770
7771         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7772         C++ compiler warning.
7773
7774 2017-05-12  Tom Tromey  <tom@tromey.com>
7775
7776         PR rust/21483:
7777         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7778         recurse, just call value_struct_elt directly.
7779
7780 2017-05-12  Tom Tromey  <tom@tromey.com>
7781
7782         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7783         OP_RUST_ARRAY>: Fix.
7784
7785 2017-05-12  Tom Tromey  <tom@tromey.com>
7786
7787         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7788
7789 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7790
7791         * regcache.c: Include <forward_list>.
7792         (struct regcache_list): Remove.
7793         (current_regcache): Update.
7794         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7795         (regcache_thread_ptid_changed): Likewise.
7796         (registers_changed_ptid): Likewise.
7797         (current_regcache_size): Likewise.
7798
7799 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7800
7801         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7802         (current_regcache_size): New function.
7803         (current_regcache_test): New function.
7804         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7805
7806 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7807
7808         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7809         (print_gp_register_row): Use get_frame_register_value.
7810
7811 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7812
7813         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7814         (mips_supply_fpregset): Likewise.
7815         (mips64_supply_gregset): Likewise.
7816
7817 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7818
7819         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7820         regcache->raw_supply_zeroed.
7821
7822 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7823
7824         * configure.nat: Rearrange 'case' statements to match
7825         host before cpu.
7826
7827 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7828
7829         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7830         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7831         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7832         "@nat_extra_makefile_frag@".
7833         (Makefile): Remove dependency on "@frags@".
7834         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7835         (data-directory/Makefile): Likewise.
7836         * config/aarch64/linux.mh: Deleted; moved contents to
7837         "gdb/configure.nat".
7838         * config/alpha/alpha-linux.mh: Likewise.
7839         * config/alpha/nbsd.mh: Likewise.
7840         * config/arm/linux.mh: Likewise.
7841         * config/arm/nbsdelf.mh: Likewise.
7842         * config/i386/cygwin.mh: Likewise.
7843         * config/i386/cygwin64.mh: Likewise.
7844         * config/i386/darwin.mh: Likewise.
7845         * config/i386/fbsd.mh: Likewise.
7846         * config/i386/fbsd64.mh: Likewise.
7847         * config/i386/go32.mh: Likewise.
7848         * config/i386/i386gnu.mh: Likewise.
7849         * config/i386/i386sol2.mh: Likewise.
7850         * config/i386/linux.mh: Likewise.
7851         * config/i386/linux64.mh: Likewise.
7852         * config/i386/mingw.mh: Likewise.
7853         * config/i386/mingw64.mh: Likewise.
7854         * config/i386/nbsd64.mh: Likewise.
7855         * config/i386/nbsdelf.mh: Likewise.
7856         * config/i386/nto.mh: Likewise.
7857         * config/i386/obsd.mh: Likewise.
7858         * config/i386/obsd64.mh: Likewise.
7859         * config/i386/sol2-64.mh: Likewise.
7860         * config/ia64/linux.mh: Likewise.
7861         * config/m32r/linux.mh: Likewise.
7862         * config/m68k/linux.mh: Likewise.
7863         * config/m68k/nbsdelf.mh: Likewise.
7864         * config/m68k/obsd.mh: Likewise.
7865         * config/m88k/obsd.mh: Likewise.
7866         * config/mips/fbsd.mh: Likewise.
7867         * config/mips/linux.mh: Likewise.
7868         * config/mips/nbsd.mh: Likewise.
7869         * config/mips/obsd64.mh: Likewise.
7870         * config/pa/linux.mh: Likewise.
7871         * config/pa/nbsd.mh: Likewise.
7872         * config/pa/obsd.mh: Likewise.
7873         * config/powerpc/aix.mh: Likewise.
7874         * config/powerpc/fbsd.mh: Likewise.
7875         * config/powerpc/linux.mh: Likewise.
7876         * config/powerpc/nbsd.mh: Likewise.
7877         * config/powerpc/obsd.mh: Likewise.
7878         * config/powerpc/ppc64-linux.mh: Likewise.
7879         * config/powerpc/spu-linux.mh: Likewise.
7880         * config/s390/linux.mh: Likewise.
7881         * config/sh/nbsd.mh: Likewise.
7882         * config/sparc/fbsd.mh: Likewise.
7883         * config/sparc/linux.mh: Likewise.
7884         * config/sparc/linux64.mh: Likewise.
7885         * config/sparc/nbsd64.mh: Likewise.
7886         * config/sparc/nbsdelf.mh: Likewise.
7887         * config/sparc/obsd64.mh: Likewise.
7888         * config/sparc/sol2.mh: Likewise.
7889         * config/tilegx/linux.mh: Likewise.
7890         * config/vax/nbsdelf.mh: Likewise.
7891         * config/vax/obsd.mh: Likewise.
7892         * config/xtensa/linux.mh: Likewise.
7893         * config/i386/i386gnu.mn: New file, with excerpts from
7894         "config/i386/i386gnu.mh".
7895         * configure: Regenerate.
7896         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7897         *.mh files under "gdb/config".
7898         * configure.nat: New file, with contents from the
7899         "gdb/config/*/*.mh" files.
7900
7901 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7902
7903         * btrace.c (btrace_clear): Free insn vector.
7904
7905 2017-05-05  Pedro Alves  <palves@redhat.com>
7906
7907         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7908         * configure: Regenerate.
7909
7910 2017-05-04  Pedro Alves  <palves@redhat.com>
7911
7912         * Makefile.in (SFILES): Add progspace-and-thread.c.
7913         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7914         (COMMON_OBS): Add progspace-and-thread.o.
7915         * breakpoint.c: Include "progspace-and-thread.h".
7916         (update_inserted_breakpoint_locations)
7917         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7918         Use scoped_restore_current_pspace_and_thread.
7919         (create_std_terminate_master_breakpoint): Use
7920         scoped_restore_current_program_space.
7921         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7922         (print_breakpoint_location): Use
7923         scoped_restore_current_program_space.
7924         (bp_loc_is_permanent): Use
7925         scoped_restore_current_pspace_and_thread.
7926         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7927         (download_tracepoint_locations): Use
7928         scoped_restore_current_pspace_and_thread.
7929         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7930         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7931         (enum step_over_calls_kind): Moved from inferior.h.
7932         (class scoped_restore_current_thread): New class.
7933         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7934         declaration.
7935         (scoped_restore_current_thread): New class.
7936         * infcmd.c: Include "common/gdb_optional.h".
7937         (continue_1, proceed_after_attach): Use
7938         scoped_restore_current_thread.
7939         (notice_new_inferior): Use scoped_restore_current_thread.
7940         * inferior.c: Include "progspace-and-thread.h".
7941         (restore_inferior, save_current_inferior): Delete.
7942         (add_inferior_command, clone_inferior_command): Use
7943         scoped_restore_current_pspace_and_thread.
7944         * inferior.h (scoped_restore_current_inferior): New class.
7945         * infrun.c: Include "progspace-and-thread.h" and
7946         "common/gdb_optional.h".
7947         (follow_fork_inferior): Use
7948         scoped_restore_current_pspace_and_thread.
7949         (scoped_restore_exited_inferior): New class.
7950         (handle_vfork_child_exec_or_exit): Use
7951         scoped_restore_exited_inferior,
7952         scoped_restore_current_pspace_and_thread,
7953         scoped_restore_current_thread and scoped_restore.
7954         (fetch_inferior_event): Use scoped_restore_current_thread.
7955         * linespec.c (decode_line_full, decode_line_1): Use
7956         scoped_restore_current_program_space.
7957         * mi/mi-main.c: Include "progspace-and-thread.h".
7958         (exec_continue): Use scoped_restore_current_thread.
7959         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7960         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7961         * proc-service.c (ps_pglobal_lookup): Use
7962         scoped_restore_current_program_space.
7963         * progspace-and-thread.c: New file.
7964         * progspace-and-thread.h: New file.
7965         * progspace.c (release_program_space, clone_program_space): Use
7966         scoped_restore_current_program_space.
7967         (restore_program_space, save_current_program_space)
7968         (save_current_space_and_thread): Delete.
7969         (switch_to_program_space_and_thread): Moved to
7970         progspace-and-thread.c.
7971         * progspace.h (save_current_program_space)
7972         (save_current_space_and_thread): Delete declarations.
7973         (scoped_restore_current_program_space): New class.
7974         * remote.c (remote_btrace_maybe_reopen): Use
7975         scoped_restore_current_thread.
7976         * symtab.c: Include "progspace-and-thread.h".
7977         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7978         * thread.c (print_thread_info_1): Use
7979         scoped_restore_current_thread.
7980         (struct current_thread_cleanup): Delete.
7981         (do_restore_current_thread_cleanup)
7982         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7983         (scoped_restore_current_thread::~scoped_restore_current_thread):
7984         ... this new dtor.
7985         (make_cleanup_restore_current_thread): Rename/convert to ...
7986         (scoped_restore_current_thread::scoped_restore_current_thread):
7987         ... this new ctor.
7988         (thread_apply_all_command): Use scoped_restore_current_thread.
7989         (thread_apply_command): Use scoped_restore_current_thread.
7990         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7991         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7992
7993 2017-05-04  Pedro Alves  <palves@redhat.com>
7994
7995         * thread.c (make_cleanup_restore_current_thread): Move
7996         find_thread_ptid call before the is_stopped call.  Assert that the
7997         thread is found.  Replace is_stopped call by checking the thread's
7998         state directly.  Remove unnecessary NULL-thread check.
7999
8000 2017-05-04  Pedro Alves  <palves@redhat.com>
8001
8002         * corelow.c (thread_section_name): New class.
8003         (get_core_register_section, get_core_siginfo): Use it.
8004
8005 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8006
8007         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8008         (get_core_register_section): Remove xfree of NULL pointer.
8009
8010 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8011
8012         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8013         * regcache.c (regcache::raw_supply_zeroed): New function.
8014         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8015
8016 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8017
8018         * gdbarch.sh: Remove commented out definition of
8019         TARGET_CHAR_BIT.
8020         * gdbarch.h: Re-generate.
8021
8022 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8023
8024         * configure: Regenerate.
8025
8026 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8027
8028         * solib-target.c (solib_target_relocate_section_addresses):
8029         Remove num_section_bases, num_bases, segment_bases variables.
8030
8031 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8032
8033         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8034
8035 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8036
8037         * solib-target.c: Include <vector>
8038         (struct lm_info_target) <~lm_info_target>: Remove.
8039         <segment_bases, section_bases>: Change type to
8040         std::vector<CORE_ADDR>.
8041         (library_list_start_segment, library_list_start_section,
8042         library_list_end_library,
8043         solib_target_relocate_section_addresses): Adjust.
8044
8045 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8046
8047         * gdbarch.sh (software_single_step): Change return type to
8048         std::vector<CORE_ADDR>.
8049         * gdbarch.c, gdbarch.h: Re-generate.
8050         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8051         Adjust.
8052         (arm_deal_with_atomic_sequence_raw): Adjust.
8053         (thumb_get_next_pcs_raw): Adjust.
8054         (arm_get_next_pcs_raw): Adjust.
8055         (arm_get_next_pcs): Adjust.
8056         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8057         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8058         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8059         (alpha_software_single_step): Adjust.
8060         * alpha-tdep.h (alpha_software_single_step): Adjust.
8061         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8062         * arm-tdep.c (arm_software_single_step): Adjust.
8063         (arm_breakpoint_kind_from_current_state): Adjust.
8064         * arm-tdep.h (arm_software_single_step): Adjust.
8065         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8066         * cris-tdep.c (cris_software_single_step): Adjust.
8067         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8068         (micromips_deal_with_atomic_sequence): Adjust.
8069         (deal_with_atomic_sequence): Adjust.
8070         (mips_software_single_step): Adjust.
8071         * mips-tdep.h (mips_software_single_step): Adjust.
8072         * moxie-tdep.c (moxie_software_single_step): Adjust.
8073         * nios2-tdep.c (nios2_software_single_step): Adjust.
8074         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8075         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8076         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8077         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8078         * sparc-tdep.c (sparc_software_single_step): Adjust.
8079         * spu-tdep.c (spu_software_single_step): Adjust.
8080         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8081
8082 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8083
8084         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8085         * gdbarch.h: Re-generate.
8086
8087 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8088
8089         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8090         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8091         * python/py-instruction.c, python/py-instruction.h: New file.
8092         * python/py-record.c: Add py-instruction.h include.
8093         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8094         gdb.RecordInstruction.
8095         * python/python-internal.h: Add gdbpy_initialize_instruction
8096         declaration.
8097         * python/python.c (do_start_initialization): Add
8098         gdbpy_initialize_instruction.
8099
8100 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8101
8102         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8103         Remove.
8104         (btrace_func_from_recpy_func): New function.
8105         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8106         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8107         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8108         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8109         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8110         Also, use new helper functions.
8111         (btpy_list_item): Use new helper functions.
8112         (recpy_bt_function_call_history): Use new type name.
8113         (btpy_call_getset): Remove.
8114         (gdbpy_initialize_btrace): Remove code to initialize
8115         gdb.BtraceFunctionCall.
8116         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8117         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8118         recpy_bt_func_prev, recpy_bt_func_next): New export.
8119         * python/py-record.c (recpy_func_type): New static object.
8120         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8121         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8122         recpy_func_next): New function.
8123         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8124         (recpy_func_getset): New static object.
8125         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8126         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8127
8128 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8129
8130         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8131         (btpy_object, btpy_insn_type, btpy_new): Remove.
8132         (btpy_list_object): Use gdb.RecordInstruction type instead of
8133         gdb.BtraceInstruction type.
8134         (btrace_insn_from_recpy_insn): New function.
8135         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8136         btpy_new.
8137         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8138         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8139         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8140         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8141         instead of btpy_object.
8142         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8143         btpy_insn_data, btpy_insn_decode): Rename to ...
8144         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8145         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8146         recpy_bt_insn_decode): This.  Also, use new helper functions.
8147         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8148         recpy_insn_type.
8149         (btpy_insn_getset): Remove.
8150         (gdbpy_initialize_btrace): Remove code to initialize
8151         gdb.BtraceInstruction.  Use recpy_element_object.
8152         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8153         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8154         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8155         * python/py-record.c (recpy_insn_type): New static object.
8156         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8157         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8158         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8159         New function.
8160         (recpy_insn_getset): New static object.
8161         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8162         * python/py-record.h (recpy_element_object): New typedef.
8163         (recpy_insn_type, recpy_insn_new): New export.
8164
8165 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8166
8167         * py-record-btrace.c (btpy_insn_new): Removed.
8168         (btpy_insn_or_gap_new): New function.
8169         (btpy_insn_error): Removed.
8170         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8171         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8172         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8173         btpy_insn_or_gap_new instead of btpy_insn_new.
8174         (btpy_insn_getset): Remove btpy_insn_error.
8175         * py-record.c (recpy_gap_type): New static object.
8176         (recpy_gap_object): New typedef.
8177         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8178         recpy_gap_reason_string): New function.
8179         (recpy_gap_getset): New static object.
8180         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8181         * py-record.h (recpy_gap_new): New export.
8182
8183 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8184
8185         * python/py-record.c (recpy_ptid): Remove.
8186         (recpy_record_getset): Remove recpy_ptid.
8187
8188 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8189
8190         * btrace.c (btrace_fetch): Set inferior_ptid.
8191         * python/py-record-btrace.c: Add "py-record.h" include.
8192         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8193         recpy_bt_end, recpy_bt_instruction_history,
8194         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8195         in gdb.Record object instead of current ptid.
8196         * python/py-record.c: Include new "py-record.h" file.
8197         (recpy_record_object): Moved to py-record.h.
8198         * python/py-record.h: New file.
8199
8200 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8201
8202         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8203         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8204         indentation.
8205
8206 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8207
8208         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8209         the past maintainers section.
8210
8211 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8212
8213         * infcmd.c (get_return_value): Use regcache ctor, and remove
8214         cleanup.
8215
8216 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8217             Pedro Alves  <palves@redhat.com>
8218
8219         * regcache.c (regcache::regcache): New tag dispatch ctor.
8220         (do_cooked_read): Moved above.
8221         (regcache_dup): Use the tag dispatch ctor..
8222         * regcache.h (regcache): Declare ctor, delete copy ctor and
8223         assignment operator, remove friend regcache_dup.
8224
8225 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8226
8227         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8228         call method save instead of regcache_cpy.
8229         * regcache.h (struct regcache): Make regcache_dup a friend.
8230
8231 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8232
8233         * regcache.c (struct regcache): Move to regcache.h
8234         (regcache::arch): New method.
8235         (regcache_get_ptid): Update.
8236         (get_regcache_arch): Call arch method.
8237         (get_regcache_aspace): Call method aspace.
8238         (register_buffer): Change it to method.
8239         (regcache_save): Change it to regcache::save.
8240         (regcache_restore): Likewise.
8241         (regcache_cpy_no_passthrough): Remove the declaration.
8242         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8243         (regcache_cpy_no_passthrough): Change it to method
8244         cpy_no_passthrough.
8245         (regcache_register_status): Change it to method
8246         get_register_status.
8247         (regcache_invalidate): Change it to method invalidate.
8248         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8249         (regcache_raw_update): Change it to method raw_update.
8250         (regcache_raw_read): Likewise.
8251         (regcache_raw_read_signed): Likewise.
8252         (regcache_raw_read_unsigned): Likewise.
8253         (regcache_raw_write_signed): Likewise.
8254         (regcache_raw_write_unsigned): Likewise.
8255         (regcache_cooked_read): Likewise.
8256         (regcache_cooked_read_value): Likewise.
8257         (regcache_cooked_read_signed): Likewise.
8258         (regcache_cooked_read_unsigned): Likewise.
8259         (regcache_cooked_write_signed): Likewise.
8260         (regcache_cooked_write_unsigned): Likewise.
8261         (regcache_raw_set_cached_value): Likewise.
8262         (regcache_raw_write): Likewise.
8263         (regcache_cooked_write): Likewise.
8264         (regcache_xfer_part): Likewise.
8265         (regcache_raw_read_part): Likewise.
8266         (regcache_raw_write_part): Likewise.
8267         (regcache_cooked_read_part): Likewise.
8268         (regcache_cooked_write_part): Likewise.
8269         (regcache_raw_supply): Likewise.
8270         (regcache_raw_collect): Likewise.
8271         (regcache_transfer_regset): Likewise.
8272         (regcache_supply_regset): Likewise.
8273         (regcache_collect_regset): Likewise.
8274         (regcache_debug_print_register): Likewise.
8275         (enum regcache_dump_what): Move it to regcache.h.
8276         (regcache_dump): Change it to method dump.
8277         * regcache.h (enum regcache_dump_what): New.
8278         (class regcache): New.
8279         * target.c (target_fetch_registers): Call method
8280         debug_print_register.
8281         (target_store_registers): Likewise.
8282
8283 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8284
8285         * windows-nat.c (struct lm_info_windows): Initialize field.
8286         (windows_make_so): Allocate lm_info_windows with new.
8287         (windows_free_so): Free lm_info_windows with delete.
8288
8289 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8290
8291         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8292         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8293         cleanup.
8294         (darwin_free_so): Free lm_info_darwin with delete.
8295
8296 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8297
8298         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8299         <l_addr_p>: Change type to bool.
8300         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8301         (svr4_free_so): Free lm_info_svr4 with delete.
8302         (svr4_copy_library_list): Replace memcpy with call to copy
8303         constructor.
8304         (library_list_start_library, svr4_default_sos): Allocate
8305         lm_info_svr4 with new.
8306
8307 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8308
8309         * solib-target.c (struct lm_info_target): Add destructor,
8310         initialize fields.
8311         <name>: Change type to std::string.
8312         (library_list_start_library): Allocate lm_info_target with new.
8313         (solib_target_free_library_list): Free lm_info_target with
8314         delete.
8315         (solib_target_current_sos): Adapt to std::string.
8316         (solib_target_free_so): Free lm_info_target with delete.
8317
8318 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8319
8320         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8321         fields.
8322         (frv_current_sos): Allocate lm_info_frv with new.
8323         (frv_relocate_main_executable): Free lm_info_frv with delete,
8324         allocate with new.
8325         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8326
8327 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8328
8329         * solib-frv.c (struct lm_info_frv): Fix indentation.
8330
8331 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8332
8333         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8334         map field.
8335         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8336         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8337         and allocate with new.
8338         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8339
8340 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8341
8342         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8343         <filename, member_name>: Change type to std::string.
8344         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8345         (library_list_start_library): Allocate lm_info_aix with new.
8346         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8347         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8348         with copy constructor.
8349
8350 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8351
8352         * solist.h (struct lm_info): Remove.
8353         (struct lm_info_base): New class.
8354         (struct so_list) <lm_info>: Change type to lm_info_base *.
8355         * nto-tdep.c (struct lm_info): Remove.
8356         (lm_addr): Adjust.
8357         * solib-aix.c (struct lm_info): Rename to ...
8358         (struct lm_info_aix): ... this.  Extend lm_info_base.
8359         (lm_info_p): Rename to ...
8360         (lm_info_aix_p): ... this, and adjust.
8361         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8362         solib_aix_parse_libraries, library_list_start_library,
8363         solib_aix_free_library_list, solib_aix_parse_libraries,
8364         solib_aix_get_library_list,
8365         solib_aix_relocate_section_addresses, solib_aix_free_so,
8366         solib_aix_get_section_offsets,
8367         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8368         Adjust.
8369         (struct solib_aix_inferior_data) <library_list>: Adjust.
8370         * solib-darwin.c (struct lm_info): Rename to ...
8371         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8372         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8373         * solib-dsbt.c (struct lm_info): Rename to ...
8374         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8375         (struct dsbt_info) <main_executable_lm_info): Adjust.
8376         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8377         dsbt_relocate_section_addresses): Adjust.
8378         * solib-frv.c (struct lm_info): Rename to ...
8379         (struct lm_info_frv): ... this.  Extend lm_info_base.
8380         (main_executable_lm_info): Adjust.
8381         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8382         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8383         find_canonical_descriptor_in_load_object,
8384         frv_fdpic_find_canonical_descriptor): Adjust.
8385         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8386         to lm_info_svr4.
8387         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8388         svr4_clear_so, svr4_copy_library_list,
8389         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8390         svr4_current_sos, svr4_fetch_objfile_link_map,
8391         solist_update_incremental): Adjust.
8392         * solib-svr4.h (struct lm_info_svr4): Move here from
8393         solib-svr4.c.
8394         * solib-target.c (struct lm_info): Rename to ...
8395         (struct lm_info_target): ... this.  Extend lm_info_base.
8396         (lm_info_p): Rename to ...
8397         (lm_info_target_p): ... this.
8398         (solib_target_parse_libraries, library_list_start_segment,
8399         library_list_start_section, library_list_start_library,
8400         library_list_end_library, solib_target_free_library_list,
8401         solib_target_current_sos, solib_target_free_so,
8402         solib_target_relocate_section_addresses): Adjust.
8403         * windows-nat.c (struct lm_info): Rename to ...
8404         (struct lm_info_windows): ... this.  Extend lm_info_base.
8405         (windows_make_so, handle_load_dll, handle_unload_dll,
8406         windows_xfer_shared_libraries): Adjust.
8407
8408 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8409
8410         * solib-darwin.c (struct darwin_so_list): Remove.
8411         (darwin_current_sos): Allocate an so_list object instead of a
8412         darwin_so_list, separately allocate an lm_info object.
8413         (darwin_free_so): Free lm_info.
8414
8415 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8416
8417         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8418         with fprintf_filtered.
8419
8420 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8421
8422         * regcache.c (regcache::regcache): New function.
8423         (regcache::~regcache): New function.
8424         (regcache_xmalloc_1): Remove.
8425         (regcache_xmalloc): Call new regcache.
8426         (regcache_xfree): Call delete regcache.
8427         (get_thread_arch_aspace_regcache): Call new regcache.
8428
8429 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8430
8431         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8432         lwp instead of ptid_get_lwp.
8433
8434 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8435
8436         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8437         lwp_info instead of getting from inferior_ptid.
8438
8439 2017-04-27  Keith Seitz  <keiths@redhat.com>
8440
8441         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8442         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8443         (CV_CONVERSION_BADNESS): Define.
8444         (rank_one_type): Remove overly restrictive rvalue reference
8445         rank checks.
8446         Add cv-qualifier checks and subranks for type equality.
8447         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8448         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8449         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8450
8451 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8452
8453         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8454         count when creating the object.
8455
8456 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8457             Ulrich Weigand  <uweigand@de.ibm.com>
8458
8459         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8460         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8461         is used in AIX.
8462         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8463         (process_xcoff_symbol): Likewise.
8464         (scan_xcoff_symtab): Likewise.
8465
8466 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8467
8468         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8469         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8470         (ia64_access_reg): Use get_frame_register_unsigned.
8471         (ia64_access_rse_reg): Likewise.
8472         (ia64_libunwind_frame_prev_register): Likewise.
8473
8474 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8475
8476         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8477         * gdbarch.c: Regenerated.
8478         * gdbarch.h: Regenerated.
8479         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8480         visibility external.
8481         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8482         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8483         (enum cfa_how_kind): Move to ...
8484         (struct dwarf2_frame_state_reg_info): Likewise.
8485         (struct dwarf2_frame_state): Likewise.
8486         * dwarf2-frame.h: ... here.
8487         (dwarf2_frame_state_alloc_regs): New declaration.
8488         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8489         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8490
8491 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8492
8493         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8494         regcache_raw_read_unsigned.
8495         (xtensa_pseudo_register_write): Likewise.
8496
8497 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8498
8499         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8500         (nds32_pseudo_register_write): Likewise.
8501
8502 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8503
8504         * regcache.c (struct regcache) <readonly_p>: Change its type
8505         to bool.
8506         (regcache_xmalloc_1): Update parameter type and callers update.
8507
8508 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8509
8510         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8511         set_gdbarch_wchar_bit.
8512         * arm-tdep.c (arm_gdbarch_init): Likewise.
8513
8514 2017-04-25  Pedro Alves  <palves@redhat.com>
8515
8516         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8517         (BothAreRelocatable, memcopy, memmove): Don't define.
8518         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8519         macros.
8520
8521 2017-04-25  Pedro Alves  <palves@redhat.com>
8522
8523         * common/common-defs.h: Include "common/poison.h".
8524         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8525         and adjust.
8526         * common/poison.h: New file.
8527         * common/traits.h: Include <type_traits>.
8528         (Not, Or, Requires): New, moved from common/function-view.h.
8529
8530 2017-04-25  Pedro Alves  <palves@redhat.com>
8531
8532         * breakpoint.h (struct breakpoint): In-class initialize all
8533         fields.  Make boolean fields "bool".
8534         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8535         memset call and initializations no longer necessary.
8536
8537 2017-04-25  Pedro Alves  <palves@redhat.com>
8538
8539         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8540         reference.
8541         (pt_btrace_insn): New function.
8542         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8543
8544 2017-04-25  Pedro Alves  <palves@redhat.com>
8545
8546         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8547         "base" field and inherit from "bp_location" instead.  Add
8548         non-default ctor.
8549         (allocate_location_exception): Use new non-default ctor.
8550         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8551         (init_bp_location): Convert to ...
8552         (bp_location::bp_location): ... this new ctor, and remove memset
8553         call.
8554         (base_breakpoint_allocate_location): Use the new non-default ctor.
8555         * breakpoint.h (bp_location): Now a class.  Declare default and
8556         non-default ctors.  In-class initialize all members.
8557         (init_bp_location): Remove declaration.
8558
8559 2017-04-25  Pedro Alves  <palves@redhat.com>
8560
8561         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8562         assignment operator.
8563
8564 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8565
8566         * doublest.c (convert_doublest_to_floatformat): Call
8567         floatformat_totalsize_bytes.
8568
8569 2017-04-22  Tom Tromey  <tom@tromey.com>
8570
8571         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8572         ui_out_emit_list.
8573         * stack.c (print_frame): Use ui_out_emit_list.
8574         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8575         ui_out_emit_list.
8576         * mi/mi-main.c (print_one_inferior)
8577         (mi_cmd_data_list_register_names)
8578         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8579         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8580         ui_out_emit_list.
8581         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8582         (mi_output_solib_attribs): Use ui_out_emit_list,
8583         ui_out_emit_tuple.
8584         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8585         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8586         (mi_cmd_stack_list_args, list_args_or_locals): Use
8587         ui_out_emit_list.
8588         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8589         * breakpoint.c (print_solib_event, output_thread_groups): Use
8590         ui_out_emit_list.
8591
8592 2017-04-22  Tom Tromey  <tom@tromey.com>
8593
8594         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8595         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8596         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8597
8598 2017-04-22  Tom Tromey  <tom@tromey.com>
8599
8600         * tracepoint.c (tvariables_info_1)
8601         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8602
8603 2017-04-22  Tom Tromey  <tom@tromey.com>
8604
8605         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8606         annotate_arg_emitter.
8607         * breakpoint.c (print_mention_watchpoint)
8608         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8609         * annotate.h (struct annotate_arg_emitter): New.
8610
8611 2017-04-22  Tom Tromey  <tom@tromey.com>
8612
8613         * record-btrace.c (record_btrace_insn_history)
8614         (record_btrace_insn_history_range, record_btrace_call_history)
8615         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8616         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8617         ui_out_emit_tuple.
8618         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8619         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8620         * skip.c (skip_info): Use ui_out_emit_tuple.
8621         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8622         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8623         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8624         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8625         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8626         ui_out_emit_tuple.
8627         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8628         (output_register, mi_cmd_data_read_memory)
8629         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8630         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8631         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8632         Use ui_out_emit_tuple.
8633         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8634         ui_out_emit_tuple.
8635         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8636         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8637         * linux-thread-db.c (info_auto_load_libthread_db): Use
8638         ui_out_emit_tuple.
8639         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8640         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8641         * disasm.c (do_mixed_source_and_assembly_deprecated)
8642         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8643         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8644         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8645         * breakpoint.c (print_one_breakpoint_location)
8646         (print_one_breakpoint): Use ui_out_emit_tuple.
8647         * auto-load.c (print_script, info_auto_load_cmd): Use
8648         ui_out_emit_tuple.
8649         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8650
8651 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8652
8653         * thread.c (print_thread_info_1): Remove dead code.
8654
8655 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8656
8657         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8658         GDB_SELF_TEST.
8659         * arm-tdep.c (selftests::arm_record_test): Likewise.
8660
8661 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8662
8663         * regcache.c (regcache_restore): Remove argument 2.  Replace
8664         argument 3 with regcache.  Get register status from
8665         src->register_status and get register contents from
8666         register_buffer (src, regnum).
8667         (regcache_cpy): Update.
8668
8669 2017-04-19  Pedro Alves  <palves@redhat.com>
8670
8671         * gdbthread.h (thread): Add missing closing parenthesis in
8672         comment.
8673
8674 2017-04-19  Pedro Alves  <palves@redhat.com>
8675
8676         * common/refcounted-object.h: New file.
8677         * gdbthread.h: Include "common/refcounted-object.h".
8678         (thread_info): Inherit from refcounted_object and add comments.
8679         (thread_info::incref, thread_info::decref)
8680         (thread_info::m_refcount): Delete.
8681         (thread_info::deletable): Use the refcounted_object::refcount()
8682         method.
8683         * inferior.c (current_inferior_): Add comment.
8684         (set_current_inferior): Increment/decrement refcounts.
8685         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8686         not-deletable instead of comparing with the current inferior.
8687         (initialize_inferiors): Increment the initial inferior's refcount.
8688         * inferior.h (struct inferior): Forward declare.
8689         Include "common/refcounted-object.h".
8690         (current_inferior, set_current_inferior): Move declaration to
8691         before struct inferior's definition, and fix comment.
8692         (inferior): Inherit from refcounted_object.  Add comments.
8693         * thread.c (switch_to_thread_no_regs): Reference the thread's
8694         inferior pointer directly instead of doing a ptid lookup.
8695         (switch_to_no_thread): New function.
8696         (switch_to_thread(thread_info *)): New function, factored out
8697         from ...
8698         (switch_to_thread(ptid_t)): ... this.
8699         (restore_current_thread): Delete.
8700         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8701         fields, and add 'inf' field.
8702         (do_restore_current_thread_cleanup): Check whether old->inf is
8703         alive instead of looking up an inferior by ptid.  Use
8704         switch_to_thread and switch_to_no_thread.
8705         (restore_current_thread_cleanup_dtor): Use old->inf directly
8706         instead of lookup up an inferior by id.  Decref the inferior.
8707         Don't restore 'removable'.
8708         (make_cleanup_restore_current_thread): Same the inferior pointer
8709         in old, instead of the inferior number.  Incref the inferior.
8710         Don't save/clear 'removable'.
8711
8712 2017-04-19  Pedro Alves  <palves@redhat.com>
8713
8714         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8715         unittests/scoped_restore-selftests.c.
8716         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8717         * common/scoped_restore.h (scoped_restore_base): Make "class".
8718         (scoped_restore_base::release): New public method.
8719         (scoped_restore_base::scoped_restore_base): New protected ctor.
8720         (scoped_restore_base::m_saved_var): New protected field.
8721         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8722         scoped_restore_base base class instead of m_saved_var directly.
8723         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8724         (scoped_restore_tmpl::scoped_restore_tmpl(const
8725         scoped_restore_tmpl<T>&)): Likewise.
8726         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8727         method.
8728         (scoped_restore_tmpl::saved_var): New method.
8729         (scoped_restore_tmpl::m_saved_var): Delete.
8730         * inferior.h (inferior::detaching): Now a bool.
8731         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8732         cleanup.
8733         * unittests/scoped_restore-selftests.c: New file.
8734
8735 2017-04-19  Pedro Alves  <palves@redhat.com>
8736
8737         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8738         Re-sort in alphabetic order.
8739
8740 2017-04-18  Pedro Alves  <palves@redhat.com>
8741
8742         * xml-support.c (obstack_xml_printf): Delete.
8743         * xml-support.h (obstack_xml_printf): Delete.
8744
8745 2017-04-18  Pedro Alves  <palves@redhat.com>
8746
8747         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8748         vdebug, verror, body_text, start_element, end_element, name,
8749         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8750         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8751         is_xinclude>: Make private and add m_ prefix.
8752         (gdb_xml_parser::body_text): New method, based on ...
8753         (gdb_xml_body_text): ... this.  Adjust.
8754         (gdb_xml_parser::vdebug): New method, based on ...
8755         (gdb_xml_debug): ... this.  Adjust.
8756         (gdb_xml_parser::verror): New method, based on ...
8757         (gdb_xml_error): ... this.  Adjust.
8758         (gdb_xml_parser::start_element): New method, based on ...
8759         (gdb_xml_start_element): ... this.  Adjust.
8760         (gdb_xml_start_element_wrapper): Defer to
8761         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8762         (gdb_xml_parser::end_element): New method, based on ...
8763         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8764         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8765         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8766         (gdb_xml_parser::use_dtd): New method, based on ...
8767         (gdb_xml_use_dtd): ... this.  Adjust.
8768         (gdb_xml_parser::parse): New method, based on ...
8769         (gdb_xml_parse): ... this.  Adjust.
8770         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8771         (xinclude_start_include): Adjust to call the parser's name method.
8772         (xml_xinclude_default, xml_xinclude_start_doctype)
8773         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8774         method.
8775         (xml_process_xincludes): Adjust to call parser methods.
8776         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8777         declarations.
8778
8779 2017-04-18  Pedro Alves  <palves@redhat.com>
8780
8781         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8782         gdb::optional<std::string>.
8783         * xml-support.c: Include <string>.
8784         (scope_level::scope_level(scope_level &&))
8785         (scope_level::~scope_level): Delete.
8786         (scope_level::body): Now a std::string.
8787         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8788         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8789         parameter.
8790         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8791         (xinclude_parsing_data::output): Now a std::string reference.
8792         (xinclude_start_include): Adjust.
8793         (xml_xinclude_default): Adjust.
8794         (xml_process_xincludes): Add 'output' parameter, and return bool.
8795         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8796         and return bool.
8797         * xml-tdesc.c: Include <unordered_map> and <string>.
8798         (tdesc_xml_cache): Delete.
8799         (tdesc_xml_cache_s): Delete.
8800         (xml_cache): Now an std::unordered_map.
8801         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8802         (target_fetch_description_xml): Change return type to
8803         gdb::optional<std::string>, and adjust.
8804         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8805         (target_fetch_description_xml): Change return type to
8806         gdb::optional<std::string>.
8807
8808 2017-04-18  Pedro Alves  <palves@redhat.com>
8809
8810         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8811         unittests/optional-selftests.c.
8812         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8813         * unittests/optional-selftests.c: New file.
8814         * unittests/optional/assignment/1.cc: New file.
8815         * unittests/optional/assignment/2.cc: New file.
8816         * unittests/optional/assignment/3.cc: New file.
8817         * unittests/optional/assignment/4.cc: New file.
8818         * unittests/optional/assignment/5.cc: New file.
8819         * unittests/optional/assignment/6.cc: New file.
8820         * unittests/optional/assignment/7.cc: New file.
8821         * unittests/optional/cons/copy.cc: New file.
8822         * unittests/optional/cons/default.cc: New file.
8823         * unittests/optional/cons/move.cc: New file.
8824         * unittests/optional/cons/value.cc: New file.
8825         * unittests/optional/in_place.cc: New file.
8826         * unittests/optional/observers/1.cc: New file.
8827         * unittests/optional/observers/2.cc: New file.
8828
8829 2017-04-18  Pedro Alves  <palves@redhat.com>
8830
8831         * common/gdb_optional.h: Include common/traits.h.
8832         (in_place_t): New type.
8833         (in_place): New constexpr variable.
8834         (optional::optional): Remove member initialization of
8835         m_instantiated.
8836         (optional::optional(in_place_t...)): New constructor.
8837         (optional::~optional): Use reset.
8838         (optional::optional(const optional&)): New.
8839         (optional::optional(const optional&&)): New.
8840         (optional::optional(T &)): New.
8841         (optional::optional(T &&)): New.
8842         (operator::operator=(const optional &)): New.
8843         (operator::operator=(optional &&)): New.
8844         (operator::operator= (const T &))
8845         (operator::operator= (T &&))
8846         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8847         (operator::reset): New.
8848         (operator::m_instantiated):: Add in-class initializer.
8849         * common/traits.h: Include <type_traits>.
8850         (struct And): New types.
8851
8852 2017-04-18  Pedro Alves  <palves@redhat.com>
8853
8854         * xml-support.c: Include <vector>.
8855         (scope_level::scope_level(const gdb_xml_element *))
8856         (scope_level::scope_level(scope_level&&)): New.
8857         (scope_level::~scope_level): New.
8858         (scope_level_s): Delete.
8859         (gdb_xml_parser::scopes): Now a std::vector.
8860         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8861         Use std::vector.
8862         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8863         scope cleanup code.
8864         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8865         of the scopes member.  Use std::vector::emplace_back.
8866
8867 2017-04-18  Pedro Alves  <palves@redhat.com>
8868
8869         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8870         a bool.
8871         (gdb_xml_end_element): Change type of first parameter.
8872         (gdb_xml_cleanup): Rename to ...
8873         (gdb_xml_parser::~gdb_xml_parser): ... this.
8874         (gdb_xml_create_parser_and_cleanup): Delete with ...
8875         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8876         to this new ctor.
8877         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8878         using gdb_xml_create_parser_and_cleanup.
8879         (xinclude_parsing_data): Add ctor/dtor.
8880         (xml_xinclude_cleanup): Delete.
8881         (xml_process_xincludes): Create a local xinclude_parsing_data
8882         instead of heap-allocating one.  Create a local gdb_xml_parser
8883         instead of heap-allocating one with
8884         gdb_xml_create_parser_and_cleanup.
8885
8886 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8887
8888         PR threads/20743
8889         * fbsd-nat.c (resume_one_thread_cb): Remove.
8890         (resume_all_threads_cb): Remove.
8891         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8892         iterate_over_threads.
8893
8894 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8895
8896         * NEWS: Create a new section for the next release branch.
8897         Rename the section of the current branch, now that it has
8898         been cut.
8899
8900 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8901
8902         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8903         * version.in: Bump version to 8.0.50.DATE-git.
8904
8905 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8906
8907         PR gdb/21385
8908         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8909         independently of the host, and fix build breakage on Cygwin.
8910
8911 2017-04-13  Pedro Alves  <palves@redhat.com>
8912
8913         * inferior.c (free_inferior): Convert to ...
8914         (inferior::~inferior): ... this dtor.
8915         (inferior::inferior): New ctor, factored out from ...
8916         (add_inferior_silent): ... here.  Allocate the inferior with a new
8917         expression.
8918         (delete_inferior): Call delete instead of free_inferior.
8919         * inferior.h (gdb_environ, continuation): Forward declare.
8920         (inferior): Now a class.  Add in-class initialization to all
8921         members.  Make boolean fields bool, except 'detaching'.
8922         (inferior::inferior): New explicit ctor.
8923         (inferior::~inferior): New.
8924
8925 2017-04-13  Pedro Alves  <palves@redhat.com>
8926
8927         * inferior.c (init_inferior_list): Delete.
8928         * inferior.h (init_inferior_list): Delete.
8929
8930 2017-04-13  Pedro Alves  <palves@redhat.com>
8931
8932         PR threads/13217
8933         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8934         (top level): Call it twice, with different thread sets.
8935
8936 2017-04-13  Pedro Alves  <palves@redhat.com>
8937
8938         * thread.c: Include <algorithm>.
8939         (thread_array_cleanup): Delete.
8940         (scoped_inc_dec_ref): New class.
8941         (live_threads_count): New function.
8942         (set_thread_refcount): Delete.
8943         (tp_array_compar_ascending): Now a bool.
8944         (tp_array_compar): Convert to a std::sort comparison function.
8945         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8946         and live_threads_count.
8947
8948 2017-04-13  Pedro Alves  <palves@redhat.com>
8949
8950         * infrun.c (follow_fork_inferior): Also switch the current
8951         inferior.
8952
8953 2017-04-13  Pedro Alves  <palves@redhat.com>
8954
8955         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8956         before calling create_internal_breakpoint.
8957
8958 2017-04-13  Pedro Alves  <palves@redhat.com>
8959
8960         * fork-child.c (execv_argv): New class.
8961         (breakup_args): Refactored as ...
8962         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8963         Copy arguments to storage and replace separators with NULL
8964         terminators in place.
8965         (escape_bang_in_quoted_argument): Adjust to return bool.
8966         (execv_argv::execv_argv): New ctor.
8967         (execv_argv::init_for_shell): New method, factored out from
8968         fork_inferior.  Don't strdup strings into the vector.
8969         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8970         Remove free_vector_argv call.
8971
8972 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8973
8974         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8975         tdep->rx_psw_type.
8976
8977 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8978
8979         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8980         * rx-tdep.c (rx_gdbarch_init): Likewise.
8981
8982 2017-04-13  Pedro Alves  <palves@redhat.com>
8983
8984         * breakpoint.h (struct breakpoint): Reindent.
8985
8986 2017-04-13  Pedro Alves  <palves@redhat.com>
8987
8988         * breakpoint.c (bp_location): Rename to ...
8989         (bp_locations): ... this.  All references updated.
8990         (bp_location_count): Rename to ...
8991         (bp_locations_count): ... this.  All references updated.
8992         (bp_location_placed_address_before_address_max): Rename to ...
8993         (bp_locations_placed_address_before_address_max): ... this.  All
8994         references updated.
8995         (bp_location_shadow_len_after_address_max): Rename to ...
8996         (bp_locations_shadow_len_after_address_max): ... this.  All
8997         references updated.
8998         (bp_location_compare_addrs): Rename to ...
8999         (bp_locations_compare_addrs): ... this.  All references updated.
9000         (bp_location_compare):Rename to ...
9001         (bp_locations_compare): ... this.  All references updated.
9002         (bp_location_target_extensions_update): Rename to ...
9003         (bp_locations_target_extensions_update): ... this.  All references
9004         updated.
9005
9006 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9007
9008         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9009         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9010         'sgtty.h'.
9011         * common/gdb_termios.h: New file, with parts of "terminal.h".
9012         * inflow.c: Include "gdb_termios.h".
9013         * ser-unix.c: Include "gdb_termios.h".
9014         * terminal.h: Move terminal-related defines to
9015         "common/gdb_termios.h".
9016
9017 2017-04-12  Tom Tromey  <tom@tromey.com>
9018
9019         * probe.c (parse_probes): Update.
9020         * location.h (delete_event_location): Don't declare.
9021         (event_location_deleter::operator()): Update.
9022         * location.c (event_location_deleter::operator()): Rename from
9023         delete_event_location.
9024         * linespec.h (linespec_result) <location>: Change type to
9025         event_location_up.
9026         * linespec.c (canonicalize_linespec, event_location_to_sals)
9027         (decode_objc): Update.
9028         (linespec_result): Don't call delete_event_location.
9029         * breakpoint.c (create_breakpoints_sal)
9030         (bkpt_probe_create_sals_from_location)
9031         (strace_marker_create_sals_from_location): Update.
9032
9033 2017-04-12  Tom Tromey  <tom@tromey.com>
9034
9035         * linespec.h (struct linespec_result): Add constructor and
9036         destructor.
9037         (init_linespec_result, destroy_linespec_result)
9038         (make_cleanup_destroy_linespec_result): Don't declare.
9039         * linespec.c (init_linespec_result): Remove.
9040         (linespec_result::~linespec_result): Rename from
9041         destroy_linespec_result.  Update.
9042         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9043         Remove.
9044         * breakpoint.c (create_breakpoint, break_range_command)
9045         (decode_location_default): Update.
9046         * ax-gdb.c (agent_command_1): Update.
9047
9048 2017-04-12  Tom Tromey  <tom@tromey.com>
9049
9050         * remote.c (remote_download_tracepoint): Update.
9051         * python/py-breakpoint.c (bppy_get_location): Update.
9052         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9053         (gdbscm_breakpoint_location): Update.
9054         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9055         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9056         Change type to event_location_up.
9057         * breakpoint.c (create_overlay_event_breakpoint)
9058         (create_longjmp_master_breakpoint)
9059         (create_std_terminate_master_breakpoint)
9060         (create_exception_master_breakpoint)
9061         (breakpoint_event_location_empty_p, print_breakpoint_location)
9062         (print_one_breakpoint_location, create_thread_event_breakpoint)
9063         (init_breakpoint_sal, create_breakpoint)
9064         (print_recreate_ranged_breakpoint, break_range_command)
9065         (init_ada_exception_breakpoint, say_where): Update.
9066         (base_breakpoint_dtor): Don't call delete_event_location.
9067         (bkpt_print_recreate, tracepoint_print_recreate)
9068         (dprintf_print_recreate, update_static_tracepoint)
9069         (breakpoint_re_set_default): Update.
9070
9071 2017-04-12  Tom Tromey  <tom@tromey.com>
9072
9073         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9074         type of "to_do".  Update.
9075         (compute_stack_depth): Use std::vector.
9076
9077 2017-04-12  Tom Tromey  <tom@tromey.com>
9078
9079         * printcmd.c (find_instruction_backward): Use std::vector.
9080
9081 2017-04-12  Tom Tromey  <tom@tromey.com>
9082
9083         * symfile.c (objfilep): Remove typedef.
9084         (reread_symbols): Use a std::vector.
9085
9086 2017-04-12  Tom Tromey  <tom@tromey.com>
9087
9088         * mi/mi-main.c (exec_direction_forward): Remove.
9089         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9090         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9091         scoped_restore.
9092         * guile/guile.c (guile_repl_command, guile_command)
9093         (gdbscm_execute_gdb_command): Use scoped_restore.
9094         * go-exp.y (go_parse): Use scoped_restore.
9095         * d-exp.y (d_parse): Use scoped_restore.
9096         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9097         * c-exp.y (c_parse): Use scoped_restore.
9098
9099 2017-04-12  Tom Tromey  <tom@tromey.com>
9100
9101         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9102         (mi_parse): Update return type.
9103         (mi_parse_free): Remove.
9104         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9105         (mi_parse::~mi_parse): Rename from mi_parse_free.
9106         (mi_parse_cleanup): Remove.
9107         (mi_parse): Return a unique_ptr.  Use new.
9108         * mi/mi-main.c (mi_execute_command): Update.
9109
9110 2017-04-12  Tom Tromey  <tom@tromey.com>
9111
9112         * location.c (explicit_location_lex_one): Return a
9113         unique_xmalloc_ptr.
9114         (string_to_explicit_location): Update.  Remove cleanups.
9115
9116 2017-04-12  Tom Tromey  <tom@tromey.com>
9117
9118         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9119         (compare_value_and_voffset): Change type.  Update.
9120         (compute_vtable_size): Change type of "offset_vec".
9121         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9122         (gnuv3_get_typeid): Remove extraneous declaration.
9123
9124 2017-04-12  Tom Tromey  <tom@tromey.com>
9125
9126         * charset.h (wchar_iterator): Fix comment.
9127
9128 2017-04-12  Tom Tromey  <tom@tromey.com>
9129
9130         * charset.c (iconv_wrapper): New class.
9131         (cleanup_iconv): Remove.
9132         (convert_between_encodings): Use it.
9133
9134 2017-04-12  Tom Tromey  <tom@tromey.com>
9135
9136         * symfile.h (increment_reading_symtab): Update type.
9137         * symfile.c (decrement_reading_symtab): Remove.
9138         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9139         * psymtab.c (psymtab_to_symtab): Update.
9140         * dwarf2read.c (dw2_instantiate_symtab): Update.
9141
9142 2017-04-12  Tom Tromey  <tom@tromey.com>
9143
9144         * jit.c (struct jit_reader): Declare separately.  Add constructor
9145         and destructor.  Change type of "handle".
9146         (loaded_jit_reader): Define separately.
9147         (jit_reader_load): Update.  New "new".
9148         (jit_reader_unload_command): Use "delete".
9149         * gdb-dlfcn.h (struct dlclose_deleter): New.
9150         (gdb_dlhandle_up): New typedef.
9151         (gdb_dlopen, gdb_dlsym): Update types.
9152         (gdb_dlclose): Remove.
9153         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9154         (gdb_dlsym): Change type of "handle".
9155         (make_cleanup_dlclose): Remove.
9156         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9157         * compile/compile-c-support.c (load_libcc): Update.
9158
9159 2017-04-12  Tom Tromey  <tom@tromey.com>
9160
9161         * symtab.h (find_pcs_for_symtab_line): Change return type.
9162         * symtab.c (find_pcs_for_symtab_line): Change return type.
9163         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9164         type of "vec".  Update.
9165         (ltpy_get_pcs_for_line): Update.
9166         * linespec.c (decode_digits_ordinary): Update.
9167
9168 2017-04-12  Tom Tromey  <tom@tromey.com>
9169
9170         * tracepoint.c (actions_command): Update.
9171         * python/python.c (python_command, python_interactive_command):
9172         Update.
9173         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9174         * guile/guile.c (guile_command): Update.
9175         * defs.h (read_command_lines, read_command_lines_1): Return
9176         command_line_up.
9177         (command_lines_deleter): New struct.
9178         (command_line_up): New typedef.
9179         * compile/compile.c (compile_code_command)
9180         (compile_print_command): Update.
9181         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9182         command_line_up.
9183         (make_cleanup_free_command_lines): Remove.
9184         * cli/cli-script.c (get_command_line, read_command_lines_1)
9185         (copy_command_lines): Return command_line_up.
9186         (while_command, if_command, read_command_lines, define_command)
9187         (document_command): Update.
9188         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9189         Remove.
9190         * breakpoint.h (breakpoint_set_commands): Change type of
9191         "commands".
9192         * breakpoint.c (breakpoint_set_commands): Change type of
9193         "commands".  Update.
9194         (do_map_commands_command, update_dprintf_command_list)
9195         (create_tracepoint_from_upload): Update.
9196
9197 2017-04-12  Tom Tromey  <tom@tromey.com>
9198
9199         * tracepoint.c (scope_info): Update.
9200         * spu-tdep.c (spu_catch_start): Update.
9201         * python/python.c (gdbpy_decode_line): Update.
9202         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9203         * python/py-breakpoint.c (bppy_init): Update.
9204         * probe.c (parse_probes): Update.
9205         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9206         * location.h (event_location_deleter): New struct.
9207         (event_location_up): New typedef.
9208         (new_linespec_location, new_address_location, new_probe_location)
9209         (new_explicit_location, copy_event_location)
9210         (string_to_event_location, string_to_event_location_basic)
9211         (string_to_explicit_location): Update return type.
9212         (make_cleanup_delete_event_location): Remove.
9213         * location.c (new_linespec_location, new_address_location)
9214         (new_probe_location, new_explicit_location, copy_event_location):
9215         Return event_location_up.
9216         (delete_event_location_cleanup)
9217         (make_cleanup_delete_event_location): Remove.
9218         (string_to_explicit_location, string_to_event_location_basic)
9219         (string_to_event_location): Return event_location_up.
9220         * linespec.c (canonicalize_linespec, event_location_to_sals)
9221         (decode_line_with_current_source)
9222         (decode_line_with_last_displayed, decode_objc): Update.
9223         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9224         * completer.c (location_completer): Update.
9225         * cli/cli-cmds.c (edit_command, list_command): Update.
9226         * breakpoint.c (create_overlay_event_breakpoint)
9227         (create_longjmp_master_breakpoint)
9228         (create_std_terminate_master_breakpoint)
9229         (create_exception_master_breakpoint)
9230         (create_thread_event_breakpoint): Update.
9231         (init_breakpoint_sal): Update.  Remove some dead code.
9232         (create_breakpoint_sal): Change type of "location".  Update.
9233         (create_breakpoints_sal, create_breakpoint, break_command_1)
9234         (dprintf_command, break_range_command, until_break_command)
9235         (init_ada_exception_breakpoint)
9236         (strace_marker_create_sals_from_location)
9237         (update_static_tracepoint, trace_command, ftrace_command)
9238         (strace_command, create_tracepoint_from_upload): Update.
9239         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9240         * ax-gdb.c (agent_command_1): Update.
9241
9242 2017-04-12  Pedro Alves  <palves@redhat.com>
9243
9244         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9245         * configure.tgt: Handle i[34567]86-*-go32* and
9246         i[34567]86-*-msdosdjgpp*.
9247         * i386-tdep.c (i386_svr4_reg_to_regnum):
9248         Make extern.
9249         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9250         i386-go32-tdep.c.
9251         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9252         * i386-go32-tdep.c: New file.
9253         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9254         declarations.
9255
9256 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9257
9258         * aix-thread.c (pd_status2str): Change return type to const char *.
9259
9260 2017-04-12  Pedro Alves  <palves@redhat.com>
9261
9262         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9263         calls to set_gdbarch_gnu_triplet_regexp.
9264
9265 2017-04-12  Pedro Alves  <palves@redhat.com>
9266
9267         PR gdb/21323
9268         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9269         New enum value.
9270         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9271         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9272         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9273         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9274         * gdbarch.h, gdbarch.c: Regenerate.
9275         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9276         gdbarch_wchar_bit and gdbarch_wchar_signed.
9277         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9278         * arm-tdep.c (arm_gdbarch_init): Likewise.
9279         * avr-tdep.c (avr_gdbarch_init): Likewise.
9280         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9281         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9282         * i386-tdep.c (i386_go32_init_abi): Likewise.
9283         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9284         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9285         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9286         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9287         * sh-tdep.c (sh_gdbarch_init): Likewise.
9288         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9289         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9290         * windows-tdep.c (windows_init_abi): Likewise.
9291         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9292
9293 2017-04-12  Pedro Alves  <palves@redhat.com>
9294
9295         PR c++/21323
9296         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9297         cplus_primitive_type_char32_t>: New enum values.
9298         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9299         and cplus_primitive_type_char32_t.
9300         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9301         32, use the archtecture's built-in type for char16_t and char32_t,
9302         respectively.  Otherwise, fallback to init_integer_type as before,
9303         but make the type unsigned, and issue a complaint.
9304         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9305
9306 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9307
9308         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9309         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9310
9311 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9312
9313         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9314         'const char *'.
9315
9316 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9317
9318         * common/common-utils.c (free_vector_argv): New function.
9319         * common/common-utils.h: Include <vector>.
9320         (free_vector_argv): New prototype.
9321         * darwin-nat.c (darwin_create_inferior): Rewrite function
9322         prototype in order to constify "exec_file" and accept a
9323         "std::string" for "allargs".
9324         * fork-child.c: Include <vector>.
9325         (breakup_args): Rewrite function, using C++.
9326         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9327         and accept "std::string" for "allargs".  Update the code to
9328         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9329         and "execvp".
9330         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9331         order to constify "exec_file" and accept a "std::string" for
9332         "allargs".
9333         * go32-nat.c (go32_create_inferior): Likewise.
9334         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9335         * infcmd.c (run_command_1): Constify "exec_file".  Use
9336         "std::string" for inferior arguments.
9337         * inferior.h (fork_inferior): Update prototype.
9338         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9339         prototype in order to constify "exec_file" and accept a
9340         "std::string" for "allargs".
9341         * nto-procfs.c (procfs_create_inferior): Likewise.
9342         * procfs.c (procfs_create_inferior): Likewise.
9343         * remote-sim.c (gdbsim_create_inferior): Likewise.
9344         * remote.c (extended_remote_run): Update code to accept
9345         "std::string" as argument.
9346         (extended_remote_create_inferior): Rewrite function prototype in
9347         order to constify "exec_file" and accept a "std::string" for
9348         "allargs".
9349         * rs6000-nat.c (super_create_inferior): Likewise.
9350         (rs6000_create_inferior): Likewise.
9351         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9352         * windows-nat.c (windows_create_inferior): Likewise.
9353
9354 2017-04-11  Pedro Alves  <palves@redhat.com>
9355
9356         * thread.c: Fix whitespace throughout.
9357
9358 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9359
9360         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9361
9362 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9363
9364         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9365
9366 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9367
9368         PR gdb/21364
9369         * osdata.c (info_osdata): Check if 'type' is an empty string
9370         instead of NULL.
9371
9372 2017-04-10  Pedro Alves  <palves@redhat.com>
9373
9374         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9375         (ptid_to_global_thread_id, in_thread_list)
9376         (do_captured_list_thread_ids, set_resumed, set_running)
9377         (set_executing, set_stop_requested, finish_thread_state)
9378         (validate_registers_access, can_access_registers_ptid)
9379         (print_thread_info_1, switch_to_thread)
9380         (do_restore_current_thread_cleanup)
9381         (make_cleanup_restore_current_thread, thread_command)
9382         (thread_name_command): Use operator== instead of ptid_equal.
9383
9384 2017-04-10  Pedro Alves  <palves@redhat.com>
9385
9386         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9387         (current_thread_cleanup_chain): Delete.
9388         (restore_current_thread_cleanup_dtor)
9389         (make_cleanup_restore_current_thread): Remove references to
9390         current_thread_cleanup_chain.
9391
9392 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9393
9394         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9395         REG_UNKNOWN.
9396
9397 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9398
9399         PR gdb/19942
9400         * gdbthread.h (thread_info::deletable): New method.
9401         (thread_info::incref): New method.
9402         (thread_info::decref): New method.
9403         (thread_info::refcount): Move it to private.
9404         * infrun.c (save_stop_context): Call inc_refcount.
9405         (release_stop_context_cleanup): Likewise.
9406         * thread.c (set_thread_exited): New function.
9407         (init_thread_list): Delete "tp" only it is deletable, otherwise
9408         call set_thread_exited.
9409         (delete_thread_1): Call set_thread_exited.
9410         (current_thread_cleanup) <inferior_pid>: Remove.
9411         <thread>: New field.
9412         (restore_current_thread_ptid_changed): Removed.
9413         (do_restore_current_thread_cleanup): Adjust.
9414         (restore_current_thread_cleanup_dtor): Don't call
9415         find_thread_ptid.
9416         (set_thread_refcount): Use dec_refcount.
9417         (make_cleanup_restore_current_thread): Adjust.
9418         (thread_apply_all_command): Call inc_refcount.
9419         (_initialize_thread): Don't call
9420         observer_attach_thread_ptid_changed.
9421
9422 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9423
9424         * thread.c (delete_thread_1): Hoist code on marking thread as
9425         exited.
9426
9427 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9428
9429         * windows-nat.c (windows_detach): Initialize ptid with
9430         minus_one_ptid.
9431
9432 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9433
9434         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9435
9436 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9437
9438         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9439         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9440         (bfin_pseudo_register_write): Likewise
9441
9442 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9443
9444         * common/ptid.h (struct ptid): Change to...
9445         (class ptid_t): ... this.
9446         <ptid_t>: New constructors.
9447         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9448         matches>: New methods.
9449         <make_null, make_minus_one>: New static methods.
9450         <pid>: Rename to...
9451         <m_pid>: ...this.
9452         <lwp>: Rename to...
9453         <m_lwp>: ...this.
9454         <tid>: Rename to...
9455         <m_tid>: ...this.
9456         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9457         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9458         as references, move comment to class ptid_t.
9459         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9460         ptid_t static methods.
9461         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9462         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9463         Take ptid arguments as references, implement using ptid_t methods.
9464         * unittests/ptid-selftests.c: New file.
9465         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9466         unittests/ptid-selftests.c.
9467         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9468
9469 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9470
9471         * python/python.c (python_run_simple_file): Cast mode literal to
9472         non-const char pointer as expected by PyFile_FromString.
9473
9474 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9475
9476         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9477         minus_one_ptid and null_ptid.
9478
9479 2017-04-05  Pedro Alves  <palves@redhat.com>
9480
9481         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9482         * configure: Regenerate.
9483
9484 2017-04-05  Pedro Alves  <palves@redhat.com>
9485
9486         * ada-exp.y (yyerror): Constify.
9487         * ada-lang.c (bound_name, get_selections)
9488         (ada_variant_discrim_type)
9489         (ada_variant_discrim_name, ada_value_struct_elt)
9490         (ada_lookup_struct_elt_type, is_unchecked_variant)
9491         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9492         (catch_ada_exception_command_split)
9493         (catch_ada_assert_command_split, catch_assert_command)
9494         (ada_op_name): Constify.
9495         * ada-lang.h (ada_yyerror, get_selections)
9496         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9497         * arc-tdep.c (arc_print_frame_cache): Constify.
9498         * arm-tdep.c (arm_skip_stub): Constify.
9499         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9500         (gen_aggregate_elt_ref): Constify.
9501         * bcache.c (print_bcache_statistics): Constify.
9502         * bcache.h (print_bcache_statistics): Constify.
9503         * break-catch-throw.c (catch_exception_command_1):
9504         * breakpoint.c (struct ep_type_description::description):
9505         Constify.
9506         (add_solib_catchpoint): Constify.
9507         (catch_fork_command_1): Add cast.
9508         (add_catch_command): Constify.
9509         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9510         Constify.
9511         * bsd-uthread.c (bsd_uthread_state): Constify.
9512         * buildsym.c (patch_subfile_names): Constify.
9513         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9514         Constify.
9515         * c-exp.y (yyerror): Constify.
9516         (token::oper): Constify.
9517         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9518         * c-varobj.c (cplus_describe_child): Constify.
9519         * charset.c (find_charset_names): Add cast.
9520         (find_charset_names): Constify array and add const_cast.
9521         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9522         (edit_command): Constify.
9523         * cli/cli-decode.c (lookup_cmd): Constify.
9524         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9525         Constify.
9526         (struct dump_context): Constify.
9527         (add_dump_command, restore_command): Constify.
9528         * cli/cli-script.c (get_command_line): Constify.
9529         * cli/cli-script.h (get_command_line): Constify.
9530         * cli/cli-utils.c (check_for_argument): Constify.
9531         * cli/cli-utils.h (check_for_argument): Constify.
9532         * coff-pe-read.c (struct read_pe_section_data): Constify.
9533         * command.h (lookup_cmd): Constify.
9534         * common/print-utils.c (decimal2str): Constify.
9535         * completer.c (gdb_print_filename): Constify.
9536         * corefile.c (set_gnutarget): Constify.
9537         * cp-name-parser.y (yyerror): Constify.
9538         * cp-valprint.c (cp_print_class_member): Constify.
9539         * cris-tdep.c (cris_register_name, crisv32_register_name):
9540         Constify.
9541         * d-exp.y (yyerror): Constify.
9542         (struct token::oper): Constify.
9543         * d-lang.h (d_yyerror): Constify.
9544         * dbxread.c (struct header_file_location::name): Constify.
9545         (add_old_header_file, add_new_header_file, last_function_name)
9546         (dbx_next_symbol_text, add_bincl_to_list)
9547         (find_corresponding_bincl_psymtab, set_namestring)
9548         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9549         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9550         * defs.h (command_line_input, print_address_symbolic)
9551         (deprecated_readline_begin_hook): Constify.
9552         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9553         Constify.
9554         * event-top.c (handle_line_of_input): Constify and add cast.
9555         * exceptions.c (catch_errors): Constify.
9556         * exceptions.h (catch_errors): Constify.
9557         * expprint.c (print_subexp_standard, op_string, op_name)
9558         (op_name_standard, dump_raw_expression, dump_raw_expression):
9559         * expression.h (op_name, op_string, dump_raw_expression):
9560         Constify.
9561         * f-exp.y (yyerror): Constify.
9562         (struct token::oper): Constify.
9563         (struct f77_boolean_val::name): Constify.
9564         * f-lang.c (f_word_break_characters): Constify.
9565         * f-lang.h (f_yyerror): Constify.
9566         * fork-child.c (fork_inferior): Add cast.
9567         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9568         (new_variant): Constify.
9569         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9570         * gdbarch.c: Regenerate.
9571         * gdbcore.h (set_gnutarget): Constify.
9572         * go-exp.y (yyerror): Constify.
9573         (token::oper): Constify.
9574         * go-lang.h (go_yyerror): Constify.
9575         * go32-nat.c (go32_sysinfo): Constify.
9576         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9577         * guile/scm-cmd.c (cmdscm_function): Constify.
9578         * guile/scm-param.c (pascm_param_value): Constify.
9579         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9580         (h8300sx_register_name): Constify.
9581         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9582         Constify.
9583         * ia64-tdep.c (ia64_register_names): Constify.
9584         * infcmd.c (construct_inferior_arguments): Constify.
9585         (path_command, attach_post_wait): Constify.
9586         * language.c (show_range_command, show_case_command)
9587         (unk_lang_error): Constify.
9588         * language.h (language_defn::la_error)
9589         (language_defn::la_name_of_this): Constify.
9590         * linespec.c (decode_line_2): Constify.
9591         * linux-thread-db.c (thread_db_err_str): Constify.
9592         * lm32-tdep.c (lm32_register_name): Constify.
9593         * m2-exp.y (yyerror): Constify.
9594         * m2-lang.h (m2_yyerror): Constify.
9595         * m32r-tdep.c (m32r_register_names): Constify and make static.
9596         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9597         * m88k-tdep.c (m88k_register_name): Constify.
9598         * macroexp.c (appendmem): Constify.
9599         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9600         (upgrade_type, parse_external, parse_partial_symbols)
9601         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9602         (new_symbol): Constify.
9603         * memattr.c (mem_info_command): Constify.
9604         * mep-tdep.c (register_name_from_keyword): Constify.
9605         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9606         Constify.
9607         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9608         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9609         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9610         cast.
9611         (mi_execute_async_cli_command): Constify.
9612         * mips-tdep.c (mips_register_name): Constify.
9613         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9614         (am33_register_name, am33_2_register_name)
9615         * moxie-tdep.c (moxie_register_names): Constify.
9616         * nat/linux-osdata.c (osdata_type): Constify fields.
9617         * nto-tdep.c (nto_parse_redirection): Constify.
9618         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9619         (lookup_child_selector): Constify.
9620         (objc_methcall::name): Constify.
9621         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9622         (lookup_struct_typedef): Constify.
9623         * objfiles.c (pc_in_section): Constify.
9624         * objfiles.h (pc_in_section): Constify.
9625         * p-exp.y (struct token::oper): Constify.
9626         (yyerror): Constify.
9627         * p-lang.h (pascal_yyerror): Constify.
9628         * parser-defs.h (op_name_standard): Constify.
9629         (op_print::string): Constify.
9630         (exp_descriptor::op_name): Constify.
9631         * printcmd.c (print_address_symbolic): Constify.
9632         * psymtab.c (print_partial_symbols): Constify.
9633         * python/py-breakpoint.c (stop_func): Constify.
9634         (bppy_get_expression): Constify.
9635         * python/py-cmd.c (cmdpy_completer::name): Constify.
9636         (cmdpy_function): Constify.
9637         * python/py-event.c (evpy_add_attribute)
9638         (gdbpy_initialize_event_generic): Constify.
9639         * python/py-event.h (evpy_add_attribute)
9640         (gdbpy_initialize_event_generic): Constify.
9641         * python/py-evts.c (add_new_registry): Constify.
9642         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9643         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9644         * python/py-inferior.c (get_buffer): Add cast.
9645         * python/py-param.c (parm_constant::name): Constify.
9646         * python/py-unwind.c (fprint_frame_id): Constify.
9647         * python/python.c (gdbpy_parameter_value): Constify.
9648         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9649         * remote.c (memory_packet_config::name): Constify.
9650         (show_packet_config_cmd, remote_write_bytes)
9651         (remote_buffer_add_string):
9652         * reverse.c (exec_reverse_once): Constify.
9653         * rs6000-tdep.c (variant::name, variant::description): Constify.
9654         * rust-exp.y (rustyyerror): Constify.
9655         * rust-lang.c (rust_op_name): Constify.
9656         * rust-lang.h (rustyyerror): Constify.
9657         * serial.h (serial_ops::name): Constify.
9658         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9659         (sh_sh3e_register_name, sh_sh2e_register_name)
9660         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9661         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9662         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9663         (sh_sh4al_dsp_register_name): Constify.
9664         * sh64-tdep.c (sh64_register_name): Constify.
9665         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9666         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9667         * stabsread.c (patch_block_stabs, read_type_number)
9668         (ref_map::stabs, ref_add, process_reference)
9669         (symbol_reference_defined, define_symbol, define_symbol)
9670         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9671         (read_one_struct_field, read_struct_fields, read_baseclasses)
9672         (read_tilde_fields, read_struct_type, read_array_type)
9673         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9674         (read_huge_number, read_range_type, read_args, common_block_start)
9675         (find_name_end): Constify.
9676         * stabsread.h (common_block_start, define_symbol)
9677         (process_one_symbol, symbol_reference_defined, ref_add):
9678         * symfile.c (get_section_index, add_symbol_file_command):
9679         * symfile.h (get_section_index): Constify.
9680         * target-descriptions.c (tdesc_type::name): Constify.
9681         (tdesc_free_type): Add cast.
9682         * target.c (find_default_run_target):
9683         (add_deprecated_target_alias, find_default_run_target)
9684         (target_announce_detach): Constify.
9685         (do_option): Constify.
9686         * target.h (add_deprecated_target_alias): Constify.
9687         * thread.c (print_thread_info_1): Constify.
9688         * top.c (deprecated_readline_begin_hook, command_line_input):
9689         Constify.
9690         (init_main): Add casts.
9691         * top.h (handle_line_of_input): Constify.
9692         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9693         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9694         (tfind_command): Rename to ...
9695         (tfind_command_1): ... this and constify.
9696         (tfind_command): New function.
9697         (tfind_end_command, tfind_start_command): Adjust.
9698         (encode_source_string): Constify.
9699         * tracepoint.h (encode_source_string): Constify.
9700         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9701         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9702         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9703         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9704         * tui/tui-win.c (parse_scrolling_args): Constify.
9705         * tui/tui-windata.c (tui_erase_data_content): Constify.
9706         * tui/tui-windata.h (tui_erase_data_content): Constify.
9707         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9708         * tui/tui.c (tui_enable): Add cast.
9709         * utils.c (defaulted_query): Constify.
9710         (init_page_info): Add cast.
9711         (puts_debug, subset_compare): Constify.
9712         * utils.h (subset_compare): Constify.
9713         * varobj.c (varobj_format_string): Constify.
9714         * varobj.h (varobj_format_string): Constify.
9715         * vax-tdep.c (vax_register_name): Constify.
9716         * windows-nat.c (windows_detach): Constify.
9717         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9718         * xml-support.c (gdb_xml_end_element): Constify.
9719         * xml-tdesc.c (tdesc_start_reg): Constify.
9720         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9721         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9722         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9723
9724 2017-04-05  Pedro Alves  <palves@redhat.com>
9725
9726         * proc-api.c (struct trans): Constify.
9727         (procfs_note): Constify.
9728         * proc-events.c (struct trans, syscall_table):
9729         * proc-flags.c (struct trans): Constify.
9730         * proc-utils.h (procfs_note): Constify.
9731         * proc-why.c (struct trans): Constify.
9732         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9733         (procfs_detach): Constify.
9734         * sol-thread.c (struct string_map): Constify.
9735         (td_err_string, td_state_string): Constify.
9736
9737 2017-04-05  Pedro Alves  <palves@redhat.com>
9738
9739         * proc-api.c (procfs_filename): Don't initialize
9740         procfs_filename.
9741         (prepare_to_trace): Assume procfs_filename is non-NULL.
9742         (_initialize_proc_api): Give procfs_filename a default value here.
9743
9744 2017-04-05  Pedro Alves  <palves@redhat.com>
9745
9746         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9747         'cond_string' parameter.
9748         (extract_exception_regexp): Constify 'string' parameter.
9749         (catch_exception_command_1): Constify.
9750         * breakpoint.c (init_catchpoint)
9751         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9752         parameter.
9753         (ep_parse_optional_if_clause, catch_fork_command_1)
9754         (catch_exec_command_1): Constify.
9755         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9756         parameter.
9757         (ep_parse_optional_if_clause): Constify.
9758         * cli/cli-utils.c (remove_trailing_whitespace)
9759         (check_for_argument): Constify.
9760         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9761         non-const overload.
9762         (check_for_argument): Likewise.
9763
9764 2017-04-05  Pedro Alves  <palves@redhat.com>
9765
9766         * event-top.c (command_line_handler): Add cast to execute_command
9767         call.
9768         * record-btrace.c (cmd_record_btrace_bts_start)
9769         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9770         (cmd_record_btrace_start): Add cast to execute_command call.
9771         * record-full.c (record_full_goto_insn):
9772         * record.c (record_start, record_stop): Add cast to
9773         execute_command_to_string calls.
9774         (cmd_record_start): Add cast to execute_command calls.
9775
9776 2017-04-05  Pedro Alves  <palves@redhat.com>
9777
9778         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9779         static inline function.
9780         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9781         array and use gdb_PyArg_ParseTupleAndKeywords.
9782         * python/py-cmd.c (cmdpy_init): Likewise.
9783         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9784         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9785         (infpy_search_memory): Likewise.
9786         * python/py-objfile.c (objfpy_add_separate_debug_file)
9787         (gdbpy_lookup_objfile): Likewise.
9788         * python/py-symbol.c (gdbpy_lookup_symbol)
9789         (gdbpy_lookup_global_symbol): Likewise.
9790         * python/py-type.c (gdbpy_lookup_type): Likewise.
9791         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9792         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9793         Likewise.
9794
9795 2017-04-05  Pedro Alves  <palves@redhat.com>
9796
9797         * python/python-internal.h (gdb_PyGetSetDef): New type.
9798         * python/py-block.c (block_object_getset)
9799         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9800         * python/py-event.c (event_object_getset)
9801         (finish_breakpoint_object_getset): Likewise.
9802         * python/py-inferior.c (inferior_object_getset): Likewise.
9803         * python/py-infthread.c (thread_object_getset): Likewise.
9804         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9805         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9806         * python/py-objfile.c (objfile_getset): Likewise.
9807         * python/py-progspace.c (pspace_getset): Likewise.
9808         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9809         Likewise.
9810         * python/py-record.c (recpy_record_getset): Likewise.
9811         * python/py-symbol.c (symbol_object_getset): Likewise.
9812         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9813         Likewise.
9814         * python/py-type.c (type_object_getset, field_object_getset):
9815         Likewise.
9816         * python/py-value.c (value_object_getset): Likewise.
9817
9818 2017-04-05  Pedro Alves  <palves@redhat.com>
9819
9820         * python/python-internal.h (gdb_PyObject_CallMethod)
9821         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9822         New functions.
9823         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9824         (PySys_GetObject, PySys_SetPath): New macros.
9825
9826 2017-04-05  Pedro Alves  <palves@redhat.com>
9827
9828         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9829         info_osdata_command.
9830         * osdata.c (info_osdata_command): Rename to ...
9831         (info_osdata): ... this.  Constify 'type' parameter, and remove
9832         the 'from_tty' parameter.  Accept NULL TYPE.
9833         (info_osdata_command): New function.
9834         * osdata.h (info_osdata_command): Remove declaration.
9835         (info_osdata): New declaration.
9836
9837 2017-04-05  Pedro Alves  <palves@redhat.com>
9838
9839         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9840         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9841         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9842         parameter.
9843         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9844         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9845         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9846         parameter.
9847         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9848         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9849         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9850         (mi_cmd_file_list_exec_source_files)
9851         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9852         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9853         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9854         parameter.
9855         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9856         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9857         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9858         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9859         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9860         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9861         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9862         'command' parameter.
9863         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9864         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9865         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9866         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9867         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9868         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9869         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9870         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9871         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9872         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9873         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9874         parameter.
9875         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9876         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9877         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9878         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9879         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9880         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9881         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9882         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9883         (mi_cmd_data_list_changed_registers)
9884         (mi_cmd_data_write_register_values)
9885         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9886         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9887         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9888         (mi_cmd_list_features, mi_cmd_list_target_features)
9889         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9890         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9891         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9892         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9893         (mi_cmd_trace_frame_collected): Constify 'command'
9894         parameter.
9895         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9896         'command' parameter.
9897
9898 2017-04-05  Pedro Alves  <palves@redhat.com>
9899
9900         * ada-lang.c (ada_completer_word_break_characters): Now a const
9901         array.
9902         (ada_get_gdb_completer_word_break_characters): Constify.
9903         * completer.c (gdb_completer_command_word_break_characters)
9904         (gdb_completer_file_name_break_characters)
9905         (gdb_completer_quote_characters): Now const arrays.
9906         (get_gdb_completer_quote_characters): Constify.
9907         (set_rl_completer_word_break_characters): New function.
9908         (set_gdb_completion_word_break_characters)
9909         (complete_line_internal): Use it.
9910         * completer.h (get_gdb_completer_quote_characters): Constify.
9911         (set_rl_completer_word_break_characters): Declare.
9912         * f-lang.c (f_word_break_characters): Constify.
9913         * language.c (default_word_break_characters): Constify.
9914         * language.h (language_defn::la_word_break_characters): Constify.
9915         (default_word_break_characters): Constify.
9916         * top.c (init_main): Use set_rl_completer_word_break_characters.
9917
9918 2017-04-05  Pedro Alves  <palves@redhat.com>
9919
9920         * aix-thread.c (aix_thread_pid_to_str)
9921         (aix_thread_extra_thread_info): Constify.
9922         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9923         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9924         (bsd_uthread_pid_to_str): Constify.
9925         * corelow.c (core_pid_to_str): Constify.
9926         * darwin-nat.c (darwin_pid_to_str): Constify.
9927         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9928         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9929         Constify.
9930         * gnu-nat.c (gnu_pid_to_str): Constify.
9931         * go32-nat.c (go32_pid_to_str): Constify.
9932         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9933         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9934         * inferior.c (inferior_pid_to_str): Constify.
9935         * linux-nat.c (linux_nat_pid_to_str): Constify.
9936         * linux-tdep.c (linux_core_pid_to_str): Constify.
9937         * linux-thread-db.c (thread_db_pid_to_str)
9938         (thread_db_extra_thread_info): Constify.
9939         * nto-tdep.c (nto_extra_thread_info): Constify.
9940         * nto-tdep.h (nto_extra_thread_info): Constify.
9941         * obsd-nat.c (obsd_pid_to_str): Constify.
9942         * procfs.c (procfs_pid_to_str): Constify.
9943         * ravenscar-thread.c (ravenscar_extra_thread_info)
9944         (ravenscar_pid_to_str): Constify.
9945         * remote-sim.c (gdbsim_pid_to_str): Constify.
9946         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9947         Constify.
9948         * sol-thread.c (solaris_pid_to_str): Constify.
9949         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9950         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9951         * target.c (default_pid_to_str, target_pid_to_str)
9952         (normal_pid_to_str, default_pid_to_str): Constify.
9953         * target.h (target_ops::to_pid_to_str)
9954         (target_ops::to_extra_thread_info): Constify.
9955         (target_pid_to_str, normal_pid_to_str): Constify.
9956         * windows-nat.c (windows_pid_to_str): Constify.
9957         * gdbarch.sh (core_pid_to_str): Constify.
9958         * target-delegates.c: Regenerate.
9959         * gdbarch.h, gdbarch.c: Regenerate.
9960
9961 2017-04-05  Pedro Alves  <palves@redhat.com>
9962
9963         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9964         the memory of the temporary warning_pre_print override.
9965         * utils.c (warning_pre_print): Constify.
9966         * utils.h (warning_pre_print): Constify.
9967
9968 2017-04-05  Pedro Alves  <palves@redhat.com>
9969
9970         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9971         (shell_command): New function.
9972         (make_command): Use std::string.
9973         (init_cli_cmds): Register shell_command instead of shell_escape.
9974
9975 2017-04-05  Pedro Alves  <palves@redhat.com>
9976
9977         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9978         * tracepoint.c (default_collect): Don't initialize.
9979
9980 2017-04-05  Pedro Alves  <palves@redhat.com>
9981
9982         * macroexp.c (macro_buffer::shared): Now a bool.
9983         (init_buffer): Update.
9984         (init_shared_buffer): Constify 'addr' parameter.
9985         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9986         casts.
9987
9988 2017-04-05  Pedro Alves  <palves@redhat.com>
9989
9990         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9991         * disasm.c (set_disassembler_options): Constify local.
9992         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9993
9994 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9995
9996         PR gdb/21352
9997         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9998         option.
9999
10000 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10001
10002         * frame.c (frame_unwind_register_unsigned): Call
10003         frame_unwind_register_value.
10004
10005 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10006
10007         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10008         Use gdb_test_multiple, and don't match anchor.
10009
10010 2017-04-05  Pedro Alves  <palves@redhat.com>
10011
10012         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10013         (Write After Approval): Remove Simon Marchi.
10014
10015 2017-04-05  Pedro Alves  <palves@redhat.com>
10016
10017         * common/gdb_optional.h (optional::optional): Make constexpr and
10018         initialize m_dummy.
10019
10020 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10021
10022         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10023         (amd64fbsd_jmp_buf_reg_offset): Remove.
10024         (amd64fbsd_supply_uthread): Remove function.
10025         (amd64fbsd_collect_uthread): Remove function.
10026         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10027         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10028         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10029         (fbsd-nat.c): Update comment.
10030         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10031         (i386fbsd_jmp_buf_reg_offset): Remove.
10032         (i386fbsd_supply_uthread): Remove function.
10033         (i386fbsd_collect_uthread): Remove function.
10034         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10035
10036 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10037
10038         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10039         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10040         * NEWS: Mention that support for FreeBSD/alpha was removed.
10041         * alpha-fbsd-tdep.c: Delete file.
10042         * config/alpha/fbsd.mh: Delete file.
10043         * configure.host: Delete alpha*-*-freebsd* and
10044         alpha*-*-kfreebsd*-gnu.
10045         * configure.tgt: Delete alpha*-*-freebsd* and
10046         alpha*-*-kfreebsd*-gnu.
10047
10048 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10049
10050         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10051         amd64bsd_store_inferior_registers): Use ptid from regcache.
10052
10053 2017-04-04  Pedro Alves  <palves@redhat.com>
10054
10055         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10056         data fields, make them private and add "m_" prefixes.
10057         (lnp_state_machine::lnp_state_machine): New ctor.
10058         (record_line, check_line_address, handle_set_discriminator)
10059         (handle_set_address, handle_advance_pc, handle_special_opcode)
10060         (handle_advance_line, handle_set_file, handle_negate_stmt)
10061         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10062         (end_sequence, advance_line): New methods.
10063         (m_gdbarch, m_record_lines_p): New fields.
10064         (lnp_reader_state): Delete.
10065         (dwarf_record_line): Rename to ...
10066         (lnp_state_machine::record_line): ... adjust.
10067         (init_lnp_state_machine): Delete.
10068         (lnp_state_machine::lnp_state_machine): New.
10069         (check_line_address): Rename to ...
10070         (lnp_state_machine::check_line_address): This.
10071         (dwarf_decode_lines_1): Remove reference to "reader_state".
10072         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10073         State machine internal state manipulation moved to
10074         lnp_state_machine methods.
10075
10076 2017-04-04  Pedro Alves  <palves@redhat.com>
10077
10078         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10079         unittests/offset-type-selftests.c.
10080         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10081         * common/offset-type.h: New file.
10082         * common/preprocessor.h: New file.
10083         * common/traits.h: New file.
10084         * common/valid-expr.h: New file.
10085         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10086         sect_offset and cu_offset strong typedefs throughout.
10087         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10088         typedefs throughout.
10089         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10090         sect_offset and cu_offset strong typedefs throughout.
10091         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10092         typedefs throughout.
10093         * gdbtypes.h: Include "common/offset-type.h".
10094         (cu_offset): Now an offset type (strong typedef) instead of a
10095         struct.
10096         (sect_offset): Likewise.
10097         (union call_site_parameter_u): Rename "param_offset" field to
10098         "param_cu_off".
10099         * unittests/offset-type-selftests.c: New file.
10100
10101 2017-04-04  Pedro Alves  <palves@redhat.com>
10102
10103         * common/underlying.h: New file.
10104         * dwarf2read.c: Include "common/gdb_optional.h" and
10105         "common/underlying.h".
10106         (dir_index, file_name_index): New types.
10107         (file_entry): Use them.
10108         (file_entry::include): Use to_underlying.
10109         (line_header::add_file_name): Use dir_index.
10110         (read_formatted_entries): Use gdb::optional.  Read form before
10111         writting to file_entry.
10112         (dwarf_decode_line_header): Use dir_index.
10113         (lnp_state_machine::current_file): Use to_underlying.
10114         (lnp_state_machine::file): Change type to file_name_index.
10115         (dwarf_record_line): Use to_underlying.
10116         (init_lnp_state_machine): Use file_name_index.
10117         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10118
10119 2017-04-04  Pedro Alves  <palves@redhat.com>
10120
10121         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10122         operator bool, has_value and get methods.
10123
10124 2017-04-04  Pedro Alves  <palves@redhat.com>
10125
10126         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10127         fields.
10128         (line_header): Initialize all data fields.  Change type of
10129         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10130         Change type of include_dirs to std::vector<const char *>.  Remove
10131         num_include_dirs, include_dirs_size.  Change type of file_names to
10132         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10133         (line_header::line_header): New.
10134         (line_header::add_include_dir, line_header::add_file_name): New
10135         methods.
10136         (line_header::include_dir_at): Remove NULL check.
10137         (line_header::file_name_at): Add const overload.
10138         (line_header_up): New unique_ptr typedef.
10139         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10140         std::vector.  Remove free_line_header call.
10141         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10142         free_line_header call.
10143         (free_cu_line_header): Delete.
10144         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10145         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10146         Adjust to use std::vector.
10147         (free_line_header): Delete.
10148         (free_line_header_voidp): Use delete.
10149         (add_include_dir): Replace with ...
10150         (line_header::add_include_dir): ... this method.  Use std::vector.
10151         (add_file_name): Replace with ...
10152         (line_header::add_file_name): ... this method.  Use std::vector.
10153         (add_include_dir_stub): Delete.
10154         (read_formatted_entries): Remove memset.
10155         (dwarf_decode_line_header): Return a line_header_up instead of a
10156         raw pointer.  Remove cleanup handling.  Pass lambdas to
10157         read_formatted_entries.  Adjust to use line_header methods.
10158         (dwarf_decode_lines_1): Adjust to use line_header methods.
10159         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10160         use std::vector.
10161
10162 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10163
10164         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10165         instead of struct ptid.
10166
10167 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10168
10169         * frame.c (get_frame_register_bytes): Unwind using value.
10170         (put_frame_register_bytes): Likewise.
10171
10172 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10173
10174         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10175         aggregate-like.
10176
10177 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10178
10179         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10180
10181 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10182
10183         * gdbthread.h (struct thread_info): Declare constructor and
10184         destructor.  Add some in-class member initializers.
10185         * thread.c (free_thread): Remove.
10186         (init_thread_list): Call delete instead of free_thread.
10187         (new_thread): Call thread_info constructor.
10188         (thread_info::thread_info): New function.
10189         (thread_info::~thread_info): New function.
10190         (delete_thread_1): Call delete instead of free_thread.
10191         (make_cleanup_restore_current_thread): Move tp and frame to
10192         inner block.
10193
10194 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10195
10196         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10197         (arc_skip_prologue): Likewise.
10198         (arc_make_frame_cache): Likewise.
10199         (arc_pv_get_operand): New function.
10200         (arc_is_in_prologue): Likewise.
10201         (arc_analyze_prologue): Likewise.
10202         (arc_print_frame_cache): Likewise.
10203         (MAX_PROLOGUE_LENGTH): New constant.
10204
10205 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10206
10207         * configure.tgt: Add arc-insn.o.
10208         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10209         (dump_arc_instruction_command): New function.
10210         (arc_fprintf_disasm): Likewise.
10211         (arc_disassemble_info): Likewise.
10212         (arc_insn_get_operand_value): Likewise.
10213         (arc_insn_get_operand_value_signed): Likewise.
10214         (arc_insn_get_memory_base_reg): Likewise.
10215         (arc_insn_get_memory_offset): Likewise.
10216         (arc_insn_get_branch_target): Likewise.
10217         (arc_insn_dump): Likewise.
10218         (arc_insn_get_linear_next_pc): Likewise.
10219         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10220         (arc_disassemble_info): Likewise.
10221         (arc_insn_get_branch_target): Likewise.
10222         (arc_insn_get_linear_next_pc): Likewise.
10223         * NEWS: Mention new "maint print arc arc-instruction".
10224
10225 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10226
10227         * arc-tdep (maintenance_print_arc_list): New variable.
10228         (maintenance_print_arc_command): New function.
10229
10230 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10231
10232         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10233         Add "limm" and "reserved".
10234         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10235         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10236         * arc-tdep.h (arc_regnum): Likewise.
10237
10238 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10239
10240         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10241         for THREADPTR register.
10242         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10243         register.
10244         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10245         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10246         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10247
10248 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10249
10250         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10251         registers above gdbarch_num_regs (gdbarch) as privileged in
10252         call0 ABI.
10253
10254 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10255
10256         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10257         for a single specified register or for all registers in
10258         a0_base..a0_base + C0_NREGS range.
10259         (supply_gregset_reg): Call regcache_raw_supply for a single
10260         specified register or for all registers in a0_base..a0_base +
10261         C0_NREGS range.
10262
10263 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10264
10265         * arch/xtensa.h (C0_NREGS): Add definition.
10266         * xtensa-tdep.c (C0_NREGS): Remove definition.
10267
10268 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10269
10270         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10271         Drop xtensa_default_isa initialization.
10272         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10273
10274 2017-03-27  Pedro Alves  <palves@redhat.com>
10275
10276         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10277         (file_entry::include_dir): New method.
10278         (line_header::include_dir_at, line_header::file_name_at): New
10279         methods.
10280         (setup_type_unit_groups, setup_type_unit_groups)
10281         (psymtab_include_file_name): Simplify using the new methods.
10282         (lnp_state_machine) <the_line_header>: New field.
10283         <file>: Add comment.
10284         (lnp_state_machine::current_file): New method.
10285         (dwarf_record_line): Simplify using the new methods.
10286         (init_lnp_state_machine): Initialize the "the_line_header" field.
10287         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10288         Simplify using the new methods.
10289
10290 2017-03-27  Pedro Alves  <palves@redhat.com>
10291
10292         * cp-name-parser.y (make_empty): Delete.
10293         (demangler_special, nested_name, ptr_operator, array_indicator)
10294         (direct_declarator, declarator_1): Use fill_comp instead of
10295         make_empty.
10296
10297 2017-03-27  Pedro Alves  <palves@redhat.com>
10298
10299         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10300         to ATTRIBUTE_PRINTF.
10301         * solib-target.c (library_list_start_list): Print "string" not
10302         "version".
10303         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10304         gdb_xml_error call.
10305
10306 2017-03-27  Pedro Alves  <palves@redhat.com>
10307
10308         * dwarf2read.c (struct file_and_directory): New.
10309         (dwarf2_get_dwz_file): Adjust to use std::string.
10310         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10311         (find_file_and_directory): Adjust to return a file_and_directory
10312         object.
10313         (read_file_scope): Adjust to use file_and_directory.  Remove
10314         make_cleanup/do_cleanups calls.
10315         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10316         make_cleanup/do_cleanups calls.
10317         * python/python.c (do_start_initialization): Adjust to ldirname
10318         returning a std::string.
10319         * utils.c (ldirname): Now returns a std::string.
10320         * utils.h (ldirname): Change return type to std::string.
10321         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10322         returning a std::string.
10323         * xml-tdesc.c (file_read_description_xml): Likewise.
10324
10325 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10326
10327         * regcache.c (regcache_debug_print_register): New function.
10328         * regcache.h (regcache_debug_print_register): New declaration.
10329         * target.c (debug_print_register): Remove.
10330         (target_fetch_registers): Call regcache_debug_print_register.
10331         (target_store_registers): Likewise.
10332
10333 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10334
10335         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10336         reference beyond the 'lh->include_dirs' array before accessing to
10337         it.
10338         (psymtab_include_file_name): Likewise.
10339         (dwarf_decode_lines_1): Likewise.
10340         (dwarf_decode_lines): Likewise.
10341         (file_file_name): Likewise.
10342
10343 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10344
10345         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10346         inferior_ptid.
10347         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10348         ps_lsetfpregs): Likewise.
10349         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10350         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10351         ps_lsetfpregs): Likewise.
10352         * target.c (target_fetch_registers, target_store_registers):
10353         Remove asserts.
10354
10355 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10356
10357         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10358
10359 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10360
10361         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10362         (_initialize_aarch64_tdep): Register it.
10363         (aarch64_record_load_store): Handle PRFM instruction.
10364         (aarch64_process_record_test): New function.
10365
10366 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10367
10368         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10369         indentation.
10370
10371 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10372
10373         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10374
10375 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10376
10377         python/python.c (do_start_initialization): Fix memory leak.
10378
10379 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10380
10381         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10382         using get_ptrace_pid.
10383         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10384         inferior_ptid.
10385         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10386         inferior_ptid instead of pid.
10387
10388 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10389
10390         * aarch64-tdep.c: Wrap locally used classes in anonymous
10391         namespace.
10392         * arm-tdep.c: Likewise.
10393         * linespec.c: Likewise.
10394         * ui-out.c: Likewise.
10395
10396 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10397
10398         PR gdb/19637
10399         * python/lib/gdb/printer/bound_registers.py: Import sys.
10400
10401 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10402
10403         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10404         windows_thread_info parameter and use it instead of
10405         current_thread.
10406         (windows_fetch_inferior_registers): Don't set current_thread,
10407         pass the thread to do_windows_fetch_inferior_registers.  Use
10408         ptid from regcache instead of inferior_ptid.
10409         (do_windows_store_inferior_registers): Add windows_thread_info
10410         parameter and use it instead of current_thread.
10411         (windows_store_inferior_registers): Don't set current_thread,
10412         pass the thread to do_windows_store_inferior_registers.  Use
10413         ptid from regcache instead of inferior_ptid.
10414
10415 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10416
10417         * ser-mingw.c (ser_windows_raw): Remove reference to
10418         struct serial::current_timeout.
10419
10420 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10421
10422         PR tdep/20928
10423         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10424         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10425         (sparc64_fsr_type): Fix %fsr decoding.
10426
10427 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10428
10429         * python/py-record-btrace.c (btpy_insn_data): Change return type
10430         for Python 2.
10431
10432 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10433
10434         * spu-linux-nat.c (spu_fetch_inferior_registers,
10435         spu_store_inferior_registers): Use ptid from regcache, set and
10436         restore inferior_ptid.
10437         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10438         Likewise.
10439
10440 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10441
10442         * i386-linux-nat.c (fetch_register, store_register,
10443         i386_linux_fetch_inferior_registers,
10444         i386_linux_store_inferior_registers): Use ptid from regcache.
10445         * ia64-linux-nat.c (ia64_linux_fetch_register,
10446         ia64_linux_store_register): Likewise.
10447         * inf-ptrace.c (inf_ptrace_fetch_register,
10448         inf_ptrace_store_register): Likewise.
10449         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10450         m32r_linux_store_inferior_registers): Likewise.
10451         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10452         m68kbsd_store_inferior_registers): Likewise.
10453         * m68k-linux-nat.c (fetch_register, store_register,
10454         m68k_linux_fetch_inferior_registers,
10455         m68k_linux_store_inferior_registers): Likewise.
10456         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10457         m88kbsd_store_inferior_registers): Likewise.
10458         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10459         mips_fbsd_store_inferior_registers): Likewise.
10460         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10461         mips64_linux_regsets_store_registers): Likewise.
10462         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10463         mipsnbsd_store_inferior_registers): Likewise.
10464         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10465         mips64obsd_store_inferior_registers): Likewise.
10466         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10467         Likewise.
10468         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10469         ppcfbsd_store_inferior_registers): Likewise.
10470         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10471         ppc_linux_store_inferior_registers): Likewise.
10472         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10473         ppcnbsd_store_inferior_registers): Likewise.
10474         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10475         ppcobsd_store_registers): Likewise.
10476         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10477         Likewise.
10478         * ravenscar-thread.c (ravenscar_fetch_registers,
10479         ravenscar_store_registers, ravenscar_prepare_to_store):
10480         Likewise.
10481         * record-btrace.c (record_btrace_fetch_registers,
10482         record_btrace_store_registers, record_btrace_prepare_to_store):
10483         Likewise.
10484         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10485         Lookup inferior using ptid from regcache, instead of
10486         current_inferior.
10487         * remote.c (remote_fetch_registers, remote_store_registers): Use
10488         ptid from regcache.
10489         * rs6000-nat.c (fetch_register, store_register): Likewise.
10490         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10491         s390_linux_store_inferior_registers): Likewise.
10492         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10493         shnbsd_store_inferior_registers): Likewise.
10494         * sol-thread.c (sol_thread_fetch_registers,
10495         sol_thread_store_registers): Likewise.
10496         * sparc-nat.c (sparc_fetch_inferior_registers,
10497         sparc_store_inferior_registers): Likewise.
10498         * tilegx-linux-nat.c (fetch_inferior_registers,
10499         store_inferior_registers): Likewise.
10500         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10501         vaxbsd_store_inferior_registers): Likewise.
10502         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10503         store_xtregs): Likewise.
10504
10505 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10506
10507         PR gdb/14441
10508         * NEWS: Mention support for rvalue references in GDB and python.
10509         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10510         supports both lvalue and rvalue references.
10511
10512 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10513
10514         PR gdb/14441
10515         * gdbtypes.c (rank_one_type): Implement overloading
10516         resolution rules regarding rvalue references.
10517
10518 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10519
10520         PR gdb/14441
10521         * aarch64-tdep.c (aarch64_type_align)
10522         (aarch64_extract_return_value, aarch64_store_return_value): Change
10523         lvalue reference type checks to general reference type checks.
10524         * amd64-tdep.c (amd64_classify): Likewise.
10525         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10526         Likewise.
10527         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10528         (arm_store_return_value): Likewise.
10529         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10530         * c-typeprint.c (c_print_type): Likewise.
10531         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10532         (cplus_number_of_children, cplus_describe_child): Likewise.
10533         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10534         * completer.c (expression_completer): Likewise.
10535         * cp-support.c (make_symbol_overload_list_adl_namespace):
10536         Likewise.
10537         * darwin-nat-info.c (info_mach_region_command): Likewise.
10538         * dwarf2loc.c (entry_data_value_coerce_ref)
10539         (value_of_dwarf_reg_entry): Likewise.
10540         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10541         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10542         Likewise.
10543         * findvar.c (extract_typed_address, store_typed_address):
10544         Likewise.
10545         * gdbtypes.c (rank_one_type): Likewise.
10546         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10547         * infcall.c (value_arg_coerce): Likewise.
10548         * language.c (pointer_type): Likewise.
10549         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10550         Likewise.
10551         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10552         * mn10300-tdep.c (mn10300_type_align): Likewise.
10553         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10554         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10555         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10556         Likewise.
10557         * printcmd.c (print_formatted, x_command): Likewise.
10558         * python/py-type.c (typy_get_composite, typy_template_argument):
10559         Likewise.
10560         * python/py-value.c (valpy_referenced_value)
10561         (valpy_get_dynamic_type, value_has_field): Likewise.
10562         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10563         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10564         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10565         * spu-tdep.c (spu_scalar_value_p): Likewise.
10566         * symtab.c (lookup_symbol_aux): Likewise.
10567         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10568         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10569         Likewise.
10570         * valops.c (value_cast_pointers, value_cast)
10571         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10572         (value_struct_elt, value_struct_elt_bitpos)
10573         (value_find_oload_method_list, find_overload_match)
10574         (value_rtti_indirect_type): Likewise.
10575         * valprint.c (val_print_scalar_type_p, generic_val_print):
10576         Likewise.
10577         * value.c (value_actual_type, value_as_address, unpack_long)
10578         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10579         (coerce_ref): Likewise.
10580         * varobj.c (varobj_get_value_type): Likewise.
10581
10582 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10583
10584         PR gdb/14441
10585         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10586         table of constants.
10587         * python/lib/gdb/command/explore.py: Support exploring values
10588         of rvalue reference types.
10589         * python/lib/gdb/types.py: Implement get_basic_type() for
10590         rvalue reference types.
10591         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10592         constant.
10593         * python/py-value.c (valpy_getitem): Add an rvalue reference
10594         check.
10595         (valpy_reference_value): Add new parameter "refcode".
10596         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10597         New wrappers for valpy_reference_value().
10598         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10599         (gdbpy_invoke_xmethod): Likewise.
10600
10601 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10602
10603         PR gdb/14441
10604         * dwarf2read.c (process_die, read_type_die_1): Handle the
10605         DW_TAG_rvalue_reference_type DIE.
10606         (read_tag_reference_type): Add new parameter "refcode".
10607
10608 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10609
10610         PR gdb/14441
10611         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10612         (c_type_print_modifier, c_type_print_varspec_suffix)
10613         (c_type_print_base): Support printing rvalue reference types.
10614         * c-valprint.c (c_val_print, c_value_print): Support printing
10615         rvalue reference values.
10616
10617 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10618
10619         PR gdb/14441
10620         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10621         typename.
10622         * cp-support.c (replace_typedefs): Handle
10623         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10624         * python/py-type.c (typy_lookup_type): Likewise.
10625
10626 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10627
10628         PR gdb/14441
10629         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10630         * parse.c (insert_type): Change assert statement.
10631         (follow_types): Handle rvalue reference types.
10632         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10633         constant.
10634
10635 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10636
10637         PR gdb/14441
10638         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10639         value_ref() interface.
10640         * c-valprint.c (c_value_print): Likewise.
10641         * infcall.c (value_arg_coerce): Likewise.
10642         * python/py-value.c (valpy_reference_value): Likewise.
10643         * valops.c (value_cast, value_reinterpret_cast)
10644         (value_dynamic_cast, typecmp): Likewise.
10645         (value_ref): Parameterize by kind of return value reference type.
10646         * value.h (value_ref): Add new parameter "refcode".
10647
10648 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10649
10650         PR gdb/14441
10651         * dwarf2read.c (read_tag_reference_type): Use
10652         lookup_lvalue_reference_type() instead of lookup_reference_type().
10653         * eval.c (evaluate_subexp_standard): Likewise.
10654         * f-exp.y: Likewise.
10655         * gdbtypes.c (make_reference_type, lookup_reference_type):
10656         Generalize with rvalue reference types.
10657         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10658         convenience wrappers for lookup_reference_type().
10659         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10660         reference kind parameter.
10661         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10662         wrappers for lookup_reference_type().
10663         * guile/scm-type.c (gdbscm_type_reference): Use
10664         lookup_lvalue_reference_type() instead of lookup_reference_type().
10665         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10666         * parse.c (follow_types): Likewise.
10667         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10668         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10669         Likewise.
10670         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10671         (gdbpy_invoke_xmethod): Likewise.
10672         * stabsread.c: Provide extra argument to make_reference_type()
10673         call.
10674         * valops.c (value_ref, value_rtti_indirect_type): Use
10675         lookup_lvalue_reference_type() instead of lookup_reference_type().
10676
10677 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10678
10679         PR gdb/14441
10680         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10681         (TYPE_IS_REFERENCE): New macro.
10682         (struct type): Add rvalue_reference_type field.
10683         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10684
10685 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10686
10687         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10688         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10689         New function definition.
10690         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10691         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10692         New function declaration.
10693         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10694         * mi/mi-interp.h: New file.
10695         * solib.c (info_sharedlibrary_command): Replace for loop with
10696         ALL_SO_LIBS macro
10697         * solib.h (update_solib_list): New function declaration.
10698         (so_list_head): Move macro.
10699         * solist.h (ALL_SO_LIBS): New macro.
10700
10701 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10702
10703         * infcmd.c (post_create_inferior): Remove unused argument in
10704         call to solib_add.
10705         * remote.c (remote_start_remote): Likewise.
10706         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10707         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10708         (enable_break): Likewise.
10709         * solib.c (update_solib_list): Remove unused target argument
10710         and its documentation.
10711         (solib_add): Remove unused target argument.  Remove unused
10712         argument in call to update_solib_list.
10713         (info_sharedlibrary_command): Remove unused argument in call
10714         to update_solib_list.
10715         (sharedlibrary_command): Remove unused argument in call to
10716         solib_add.
10717         (handle_solib_event): Likewise.
10718         (reload_shared_libraries): Likewise.
10719         * solib.h (solib_add): Remove unused target argument.
10720
10721 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10722
10723         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10724         (s390_displaced_step_fixup): Cover relative branches with the
10725         default fixup handling.  This fixes lack of support for some
10726         relative branch instructions.
10727
10728 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10729
10730         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10731         ptid from regcache.
10732
10733 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10734
10735         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10736         i386_darwin_store_inferior_registers): Use ptid from regcache.
10737
10738 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10741         i386bsd_store_inferior_registers): Use ptid from regcache.
10742
10743 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10744
10745         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10746         hppaobsd_store_registers): Use ptid from regcache.
10747
10748 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10749
10750         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10751         hppanbsd_store_registers): Use ptid from regcache.
10752
10753 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10754
10755         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10756         from regcache.  Use get_ptrace_pid.
10757
10758 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10759
10760         * corelow.c (get_core_register_section): Use ptid from regcache,
10761         update doc.
10762
10763 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10764
10765         * bsd-uthread.c (bsd_uthread_fetch_registers,
10766         bsd_uthread_store_registers): Use ptid from regcache, set and
10767         restore inferior_ptid.
10768
10769 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10770
10771         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10772         fetch_fp_regs, store_register, store_regs, store_fp_register,
10773         store_fp_regs): Use ptid from regcache.
10774
10775 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10776
10777         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10778         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10779         store_vfp_regs): Use ptid from regcache.
10780
10781 2017-03-17  Pedro Alves  <palves@redhat.com>
10782
10783         PR remote/21188
10784         * ser-base.c (ser_base_wait_for): Add comment.
10785         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10786         version.
10787         * ser-unix.c (hardwire_raw): Remove reference to
10788         scb->current_timeout.
10789         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10790         (hardwire_ops): Install ser_base_readchar instead of
10791         hardwire_readchar.
10792         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10793         Remove fields.
10794
10795 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10796
10797         PR gdb/19637
10798         * python/lib/gdb/printer/bound_registers.py: Add support for
10799         Python 3.
10800
10801 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10802
10803         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10804         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10805         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10806         byte_offset to subobj_byte_offset.  Fix the handling of
10807         DWARF_VALUE_STACK on big-endian targets when coming via an
10808         implicit pointer.
10809         (dwarf2_evaluate_loc_desc): Adjust call to
10810         dwarf2_evaluate_loc_desc_full.
10811         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10812         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10813
10814 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10815
10816         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10817         and REVSH instructions.
10818
10819 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10820
10821         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10822         (arm_record_test): Declare.
10823         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10824         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10825         align with the manual.
10826         (thumb_record_misc): Adjust the code order to align with the
10827         manual.
10828         (thumb2_record_decode_insn_handler): Fix instruction matching.
10829         (instruction_reader_thumb): New class.
10830         (arm_record_test): New function.
10831
10832 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10833
10834         * arm-tdep.c (abstract_memory_reader): New class.
10835         (instruction_reader): New class.
10836         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10837         (decode_insn): Likewise.
10838
10839 2017-03-16  Doug Evans  <dje@google.com>
10840
10841         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10842         member.  Change type of TYPE member to SCM.  All uses updated.
10843         (lsscm_make_lazy_string_smob): Add assert.
10844         (lsscm_make_lazy_string): Flag bad length values.
10845         (lsscm_elt_type): New function.
10846         (gdbscm_lazy_string_to_value): Rewrite to use
10847         lsscm_safe_lazy_string_to_value.
10848         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10849         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10850         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10851         in incoming type.
10852         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10853         * guile/scm-type.c (tyscm_scm_to_type): New function.
10854
10855 2017-03-15  Doug Evans  <dje@google.com>
10856
10857         PR python/17728, python/18439, python/18779
10858         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10859         member.  Change type of TYPE member to PyObject *.  All uses updated.
10860         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10861         (gdbpy_create_lazy_string_object): Flag bad length values.
10862         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10863         Handle typedefs in incoming type.
10864         (stpy_lazy_string_elt_type): New function.
10865         (gdbpy_extract_lazy_string): Call it.
10866         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10867         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10868         typedefs in incoming type.
10869
10870 2017-03-16  Doug Evans  <dje@google.com>
10871
10872         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10873         * guile/scm-type.c (tyscm_scm_to_type): New function.
10874
10875 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10876
10877         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10878         "ULONGEST" for "skip".
10879
10880 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10881
10882         PR gdb/21220
10883         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10884         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10885         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10886         over ptrace peek/poke until end of buffer or error.
10887
10888 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10889
10890         * parse.c (length_of_subexp): Make static.
10891         * parser-defs.h (length_of_subexp): Remove.
10892
10893 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10894
10895         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10896         as well.
10897
10898 2017-03-14  Pedro Alves  <palves@redhat.com>
10899
10900         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10901         (main): Use std::unique_ptr.  Remove calls to
10902         cp_demangled_name_parse_free.
10903
10904 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10905
10906         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10907         alphabsd_store_inferior_registers): Use regcache->ptid instead
10908         of inferior_ptid.
10909
10910 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10911
10912         * aix-thread.c (aix_thread_fetch_registers,
10913         aix_thread_store_registers): Use regcache->ptid instead of
10914         inferior_ptid.
10915
10916 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10917
10918         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10919         store_gregs_to_thread, fetch_fpregs_from_thread,
10920         store_fpregs_to_thread): Use regcache->ptid instead of
10921         inferior_ptid.
10922
10923 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10924
10925         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10926         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10927         instead of inferior_ptid.
10928
10929 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10930
10931         * target.c (target_fetch_registers, target_store_registers): Add
10932         assert.
10933
10934 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10935
10936         * regcache.h (regcache_get_ptid): New function.
10937         * regcache.c (regcache_get_ptid): New function.
10938
10939 2017-03-13  Mark Wielaard  <mark@klomp.org>
10940
10941         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10942
10943 2017-03-10  Keith Seitz  <keiths@redhat.com>
10944
10945         PR c++/8218
10946         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10947
10948 2017-03-08  Pedro Alves  <palves@redhat.com>
10949
10950         PR gdb/18360
10951         * infrun.c (start_step_over, do_target_resume, resume)
10952         (restart_threads): Assert we're not resuming a thread that is
10953         meant to be stopped.
10954         (infrun_thread_stop_requested_callback): Delete.
10955         (infrun_thread_stop_requested): If the thread is internally
10956         stopped, queue a pending stop event and clear the thread's
10957         inline-frame state.
10958         (handle_stop_requested): New function.
10959         (handle_syscall_event, handle_inferior_event_1): Use
10960         handle_stop_requested.
10961         (handle_stop_requested): New function.
10962         (handle_signal_stop): Set the thread's stop_signal here instead of
10963         at caller.
10964         (finish_step_over): Clear step over info unconditionally.
10965         (handle_signal_stop): If the user had interrupted the event
10966         thread, consider the stop a random signal.
10967         (handle_signal_stop) <signal arrived while stepping over
10968         breakpoint>: Don't restart threads here.
10969         (stop_waiting): Don't clear step-over info here.
10970
10971 2017-03-08  Pedro Alves  <palves@redhat.com>
10972
10973         PR 21206
10974         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10975         goes to argument 2, not 1.
10976
10977 2017-03-08  Pedro Alves  <palves@redhat.com>
10978
10979         PR cli/21218
10980         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10981         display_gdb_prompt.
10982         (command_line_input): Add comment.
10983
10984 2017-03-08  Pedro Alves  <palves@redhat.com>
10985
10986         PR tui/21216
10987         * tui/tui-file.c (tui_file::write): New.
10988         * tui/tui-file.h (tui_file): Override "write".
10989         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10990         factored out from ...
10991         (tui_puts): ... here.
10992         (tui_putc): Use them.
10993         (tui_write): New function.
10994         * tui/tui-io.h (tui_write): Declare.
10995
10996 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10997
10998         * Makefile.in (SFILES): Replace "environ.c" with
10999         "common/environ.c".
11000         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11001         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11002         to...
11003         * common/environ.c: ... here.
11004         * environ.h: Moved to...
11005         * common/environ.h: ... here.
11006
11007 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11008
11009         * gdbarch.sh (pstring_ptr): New static function.
11010         (gdbarch_disassembler_options): Use it.
11011         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11012         not valid_disassembler_option->name.
11013         * gdbarch.c: Regenerate.
11014
11015 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11016
11017         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11018
11019 2017-03-07  Pedro Alves  <palves@redhat.com>
11020
11021         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11022
11023 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11024
11025         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11026         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11027         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11028         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11029
11030 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11031
11032         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11033
11034 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11035
11036         * remote.c (remote_add_target_side_commands): Use range-based
11037         for loop.
11038
11039 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11040
11041         PR gdb/21165
11042         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11043         value is lazy.
11044         * valprint.c (common_val_print): Likewise.
11045
11046 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11047
11048         * NEWS: Mention new set/show disassembler-options commands.
11049         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11050         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11051         (prospective_options): New static variable.
11052         (gdb_disassembler::gdb_disassembler): Initialize
11053         m_di.disassembler_options.
11054         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11055         (get_disassembler_options): New function.
11056         (set_disassembler_options): Likewise.
11057         (set_disassembler_options_sfunc): Likewise.
11058         (show_disassembler_options_sfunc): Likewise.
11059         (disassembler_options_completer): Likewise.
11060         (_initialize_disasm): Likewise.
11061         * disasm.h (get_disassembler_options): New prototype.
11062         (set_disassembler_options): Likewise.
11063         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11064         (gdbarch_verify_disassembler_options): Likewise.
11065         * gdbarch.c: Regenerate.
11066         * gdbarch.h: Likewise.
11067         * arm-tdep.c (num_disassembly_options): Delete.
11068         (set_disassembly_style): Likewise.
11069         (arm_disassembler_options): New static variable.
11070         (set_disassembly_style_sfunc): Convert short style name into long
11071         option name.  Call set_disassembler_options.
11072         (show_disassembly_style_sfunc): New function.
11073         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11074         set_gdbarch_verify_disassembler_options.
11075         (_initialize_arm_tdep): Delete regnames variable and update callers.
11076         (arm_disassembler_options): Initialize.
11077         (disasm_options): New variable.
11078         (num_disassembly_options): Rename from this...
11079         (num_disassembly_styles): ...to this.  Compute by scanning through
11080         disasm_options.
11081         (valid_disassembly_styles): Initialize using disasm_options.
11082         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11083         set_arm_regname_option.
11084         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11085         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11086         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11087         set_gdbarch_verify_disassembler_options.
11088         * s390-tdep.c (s390_disassembler_options): New static variable.
11089         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11090         set_gdbarch_verify_disassembler_options.
11091
11092 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11093
11094         * remote.c (remote_add_target_side_condition): Remove "struct"
11095         keyword from range-based for loop.
11096
11097 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11098
11099         * remote.c (remote_add_target_side_condition): Use range-based
11100         for loop.  Update comment.
11101
11102 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11103
11104         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11105
11106 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11107
11108         * regcache.c (regcache_raw_update): New function.
11109         (regcache_raw_read): Move code to regcache_raw_update.
11110         * regcache.h (regcache_raw_update): New declaration.
11111         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11112
11113 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11114
11115         * dwarf2read.c (create_debug_type_hash_table): Initialize
11116         header.signature and header.type_offset_in_tu.
11117
11118 2017-02-24  Pedro Alves  <palves@redhat.com>
11119
11120         * symtab.c (make_file_symbol_completion_list_1): Use
11121         add_symtab_completions.
11122
11123 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11124
11125         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11126
11127 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11128
11129         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11130         I386_MAX_REGISTER_SIZE.
11131         (i386_pseudo_register_write): Likewise.
11132         (i386_process_record): Likewise.
11133         * i387-tdep.c (i387_supply_xsave): Likewise.
11134         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11135         (store_register): Likewise.
11136
11137 2017-02-23  Pedro Alves  <palves@redhat.com>
11138
11139         * ada-lang.c: Include "common/function-view.h".
11140         (ada_iterate_over_symbols): Adjust to use function_view as
11141         callback type.
11142         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11143         (ada_make_symbol_completion_list): Use a lambda.
11144         (ada_exc_search_name_matches): Delete.
11145         (name_matches_regex): New.
11146         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11147         * compile/compile-c-support.c: Include "common/function-view.h".
11148         (print_one_macro): Change prototype to accept a ui_file pointer.
11149         (write_macro_definitions): Use a lambda.
11150         * dwarf2read.c: Include "common/function-view.h".
11151         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11152         (dw2_expand_symtabs_matching): Adjust to use function_view as
11153         callback type.
11154         * language.h: Include "common/function-view.h".
11155         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11156         function_view as callback type.
11157         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11158         * linespec.c: Include "common/function-view.h".
11159         (collect_info::add_symbol): New method.
11160         (struct symbol_and_data_callback, iterate_inline_only, struct
11161         symbol_matcher_data, iterate_name_matcher): Delete.
11162         (iterate_over_all_matching_symtabs): Adjust to use function_view
11163         as callback type and lambdas.
11164         (iterate_over_file_blocks): Adjust to use function_view as
11165         callback type.
11166         (decode_compound_collector): Now a class with private fields.
11167         (decode_compound_collector::release_symbols): New method.
11168         (collect_one_symbol): Rename to...
11169         (decode_compound_collector::operator()): ... this and adjust.
11170         (lookup_prefix_sym): decode_compound_collector construction bits
11171         move to decode_compound_collector ctor.  Pass the
11172         decode_compound_collector object directly as callback.  Remove
11173         cleanups and use decode_compound_collector::release_symbols
11174         instead.
11175         (symtab_collector): Now a class with private fields.
11176         (symtab_collector::release_symtabs): New method.
11177         (add_symtabs_to_list): Rename to...
11178         (symtab_collector::operator()): ... this and adjust.
11179         (collect_symtabs_from_filename): symtab_collector construction
11180         bits move to symtab_collector ctor.  Pass the symtab_collector
11181         object directly as callback.  Remove cleanups and use
11182         symtab_collector::release_symtabs instead.
11183         (collect_symbols): Delete.
11184         (add_matching_symbols_to_info): Use lambdas.
11185         * macrocmd.c (print_macro_callback): Delete.
11186         (info_macro_command): Use a lambda.
11187         (info_macros_command): Pass print_macro_definition as callable
11188         directly.
11189         (print_one_macro): Remove 'ignore' parameter.
11190         (macro_list_command): Adjust.
11191         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11192         (macro_for_each_data::user_data): Delete field.
11193         (foreach_macro): Adjust to call the function_view.
11194         (macro_for_each): Adjust to use function_view as callback type.
11195         (foreach_macro_in_scope): Adjust to call the function_view.
11196         (macro_for_each_in_scope): Adjust to use function_view as callback
11197         type.
11198         * macrotab.h: Include "common/function-view.h".
11199         (macro_callback_fn): Declare a prototype instead of a pointer.
11200         Remove "user_data" parameter.
11201         (macro_for_each, macro_for_each_in_scope): Adjust to use
11202         function_view as callback type.
11203         * psymtab.c (partial_map_expand_apply)
11204         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11205         Adjust to use function_view as callback type and to return bool.
11206         (psym_expand_symtabs_matching): Adjust to use function_view as
11207         callback types.
11208         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11209         to use function_view as callback type and to return bool.
11210         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11211         callback types.
11212         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11213         as callback types.
11214         * symfile.h: Include "common/function-view.h".
11215         (expand_symtabs_file_matcher_ftype)
11216         (expand_symtabs_symbol_matcher_ftype)
11217         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11218         return bool.
11219         (quick_symbol_functions::map_symtabs_matching_filename)
11220         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11221         function_view as callback type and return bool.
11222         (expand_symtabs_matching): Adjust to use function_view as callback
11223         type.
11224         (maintenance_expand_name_matcher)
11225         (maintenance_expand_file_matcher): Delete.
11226         (maintenance_expand_symtabs): Use lambdas.
11227         * symtab.c (iterate_over_some_symtabs): Adjust to use
11228         function_view as callback types and return bool.
11229         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11230         of a cleanup.
11231         (lookup_symtab_callback): Delete.
11232         (lookup_symtab): Use a lambda.
11233         (iterate_over_symbols): Adjust to use function_view as callback
11234         type.
11235         (struct search_symbols_data, search_symbols_file_matches)
11236         (search_symbols_name_matches): Delete.
11237         (search_symbols): Use a pair of lambdas.
11238         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11239         (symtab_expansion_callback): Delete.
11240         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11241         * symtab.h: Include "common/function-view.h".
11242         (iterate_over_some_symtabs): Adjust to use function_view as
11243         callback type and return bool.
11244         (iterate_over_symtabs): Adjust to use function_view as callback
11245         type.
11246         (symbol_found_callback_ftype): Remove 'data' parameter and return
11247         bool.
11248         (iterate_over_symbols): Adjust to use function_view as callback
11249         type.
11250
11251 2017-02-23  Pedro Alves  <palves@redhat.com>
11252
11253         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11254         (%.o) <unittests/%.c>: New pattern.
11255         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11256         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11257         * common/function-view.h: New file.
11258         * unittests/function-view-selftests.c: New file.
11259         * configure: Regenerate.
11260
11261 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11262
11263         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11264         inferior_ptid.
11265         * go32-nat.c (go32_thread_alive): Likewise.
11266
11267 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11268
11269         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11270         delete.
11271
11272 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11273
11274         * varobj.c (varobj_clear_saved_item): Use delete instead of
11275         xfree.
11276         (update_dynamic_varobj_children): Likewise.
11277
11278 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11279
11280         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11281
11282 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11283
11284         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11285         m_enum_value to 0 in default constructor.
11286
11287 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11288
11289         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11290         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11291         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11292         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11293         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11294         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11295         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11296         IS_STORE_CONDITIONAL_INSN.
11297
11298 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11299
11300         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11301
11302 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11303
11304         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11305
11306 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11307
11308         * dwarf2read.c (skip_one_die, read_attribute_value)
11309         (dwarf2_const_value_attr, dump_die_shallow)
11310         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11311         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11312
11313 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11314
11315         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11316         (dwarf_parse_macro_header): Accept DWARF version 5.
11317         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11318
11319 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11320
11321         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11322         DW_AT_GNU_*.
11323         * common/common-exceptions.h (enum errors): Likewise.
11324         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11325         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11326         (dwarf_expr_context::execute_stack_op): Likewise.
11327         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11328         Likewise.
11329         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11330         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11331         (show_entry_values_debug, call_site_to_target_addr)
11332         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11333         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11334         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11335         (value_of_dwarf_block_entry, indirect_pieced_value)
11336         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11337         (disassemble_dwarf_expression): Likewise.
11338         * dwarf2read.c (process_die, inherit_abstract_dies)
11339         (read_call_site_scope): Likewise.
11340         * gdbtypes.h (struct func_type, struct call_site_parameter)
11341         (struct call_site): Likewise.
11342         * stack.c (read_frame_arg): Likewise.
11343         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11344
11345 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11346
11347         * defs.h (read_unsigned_leb128): New declaration.
11348         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11349         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11350         (dwarf2_find_location_expression): Call also
11351         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11352         * dwarf2loc.h (dwarf2_version): New declaration.
11353         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11354         rnglists.
11355         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11356         .debug_rnglists.
11357         (struct dwop_section_names): Add loclists_dwo.
11358         (dwop_section_names): Add .debug_loclists.dwo.
11359         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11360         (struct dwarf2_per_cu_data): Add dwarf_version.
11361         (struct dwo_sections): Add loclists.
11362         (struct attr_abbrev): Add implicit_const.
11363         (read_indirect_line_string): New declaration.
11364         (read_unsigned_leb128): Delete declaration.
11365         (rcuh_kind): New definition.
11366         (read_and_check_comp_unit_head): Change parameter
11367         is_debug_types_section to section_kind.
11368         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11369         (read_comp_unit_head): Change parameter abfd to section, add parameter
11370         section_kind.  Handle DWARF-5.
11371         (error_check_comp_unit_head): Accept also DWARF version 5.
11372         (read_and_check_comp_unit_head): Change parameter
11373         is_debug_types_section to section_kind.
11374         (read_and_check_type_unit_head): Delete function.
11375         (read_abbrev_offset): Handle DWARF-5.
11376         (create_debug_type_hash_table): Add parameter section_kind.  Process
11377         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11378         comp_unit_head.
11379         (create_debug_types_hash_table): Update create_debug_type_hash_table
11380         caller.
11381         (create_all_type_units): Call create_debug_type_hash_table.
11382         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11383         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11384         caller.
11385         (skip_one_die): Handle DW_FORM_implicit_const.
11386         (dwarf2_rnglists_process): New function.
11387         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11388         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11389         (read_attribute_value): Handle DW_FORM_implicit_const,
11390         DW_FORM_line_strp.
11391         (read_attribute): Handle DW_FORM_implicit_const.
11392         (read_indirect_string_at_offset_from): New function from
11393         read_indirect_string_at_offset.
11394         (read_indirect_string_at_offset): Call
11395         read_indirect_string_at_offset_from.
11396         (read_indirect_line_string_at_offset): New function.
11397         (read_indirect_string): New function comment.
11398         (read_indirect_line_string): New function.
11399         (read_unsigned_leb128): Make it global.
11400         (dwarf2_string_attr): Handle DWARF-5.
11401         (add_include_dir_stub, read_formatted_entries): New functions.
11402         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11403         Handle DWARF-5.
11404         (per_cu_header_read_in): Update read_comp_unit_head caller.
11405         (dwarf2_version): New function.
11406         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11407         rnglists.
11408         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11409         fields.
11410
11411 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11412
11413         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11414
11415 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11416
11417         * dwarf2read.c (dwarf2_ranges_process): New function from
11418         dwarf2_ranges_read.
11419         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11420         dwarf2_ranges_process.
11421
11422 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11423
11424         * dwarf2read.c (create_debug_type_hash_table): New function from
11425         create_debug_types_hash_table.
11426         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11427         (create_all_type_units, open_and_init_dwo_file): Update
11428         create_debug_types_hash_table callers.
11429
11430 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11431
11432         PR gdb/16188
11433         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11434         refer to 'ap', not 'args'.
11435
11436 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11437             Pedro Alves  <palves@redhat.com>
11438
11439         PR gdb/16188
11440         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11441         calls succeeded.
11442         * fork-child.c (trace_start_error): New function.
11443         (trace_start_error_with_name): Likewise.
11444         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11445         * inf-ptrace.c (inf_ptrace_me): Likewise.
11446         * inferior.h (trace_start_error): New prototype.
11447         (trace_start_error_with_name): Likewise.
11448
11449 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11450
11451         PR gdb/21164
11452         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11453         NULL before using it.
11454         * symmisc.c (maintenance_print_symbols): Likewise.
11455         (maintenance_print_msymbols): Likewise.
11456
11457 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11458
11459         * NEWS: Add record Python bindings entry.
11460
11461 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11462
11463         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11464         py-record-full.o.
11465         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11466         * python/py-record-btrace.c, python/py-record-btrace.h,
11467         python/py-record-full.c, python/py-record-full.h: New file.
11468         * python/py-record.c: Add include for py-record-btrace.h and
11469         py-record-full.h.
11470         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11471         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11472         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11473         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11474         New definition.
11475         (gdbpy_initialize_btrace): New export.
11476         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11477
11478 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11479
11480         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11481         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11482         * python/py-record.c: New file.
11483         * python/python-internal.h (gdbpy_start_recording,
11484         gdbpy_current_recording, gdpy_stop_recording,
11485         gdbpy_initialize_record): New export.
11486         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11487         (python_GdbMethods): Add gdbpy_start_recording,
11488         gdbpy_current_recording and gdbpy_stop_recording.
11489
11490 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11491
11492         * record-btrace.c (record_btrace_record_method): New function.
11493         (init_record_btrace_ops): Initialize to_record_method.
11494         * record-full.c (record_full_record_method): New function.
11495         (init_record_full_ops, init_record_full_core_ops): Add
11496         record_full_record_method.
11497         * record.h (enum record_method): New enum.
11498         * target-debug.h (target_debug_print_enum_record_method: New define.
11499         * target-delegates.c: Regenerate.
11500         * target.c (target_record_method): New function.
11501         * target.h: Include record.h.
11502         (struct target_ops) <to_record_method>: New field.
11503         (target_record_method): New export.
11504
11505 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11506
11507         * record.h (record_start, record_stop): New export.
11508         * record.c (record_start, record_stop): New function.
11509
11510 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11511
11512         * btrace.c (btrace_fetch): Copy function call segments pointer
11513         into a vector.
11514         (btrace_clear): Clear the vector.
11515         (btrace_find_insn_by_number): Use binary search to find the correct
11516         function call segment.
11517         * btrace.h (brace_fun_p): New typedef.
11518         (struct btrace_thread_info) <functions>: New field.
11519
11520 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11521
11522         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11523         * btrace.c (btrace_decode_error): ... here.  New function.
11524         * btrace.h (btrace_decode_error): New export.
11525
11526 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11527
11528         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11529         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11530         btrace_find_insn_by_number): Remove special case for gaps.
11531         * btrace.h (btrace_insn_get_error): New export.
11532         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11533         * record-btrace.c (btrace_insn_history): Print number for gaps.
11534         (record_btrace_info, record_btrace_goto): Handle gaps.
11535
11536 2017-02-14  Tom Tromey  <tom@tromey.com>
11537
11538         PR python/13598:
11539         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11540         event.
11541         * python/py-evts.c (gdbpy_initialize_py_events): Add
11542         before_prompt registry.
11543         * python/py-events.h (events_object) <before_prompt>: New field.
11544
11545 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11546
11547         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11548
11549 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11550
11551         * symfile (_initialize_symfile): Add usage text to the load command's
11552         help text.
11553
11554 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11555
11556         * utils.c (defaulted_query): Don't query on secondary UIs.
11557
11558 2017-02-10  Tom Tromey  <tom@tromey.com>
11559
11560         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11561
11562 2017-02-10  Tom Tromey  <tom@tromey.com>
11563
11564         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11565         "cleanup" local.
11566         * python/py-type.c (typy_legacy_template_argument): Remove
11567         unnecessary "cleanup" local.
11568
11569 2017-02-10  Tom Tromey  <tom@tromey.com>
11570
11571         * python/python.c (do_start_initialization): New function, from
11572         _initialize_python.
11573         (_initialize_python): Call do_start_initialization.
11574         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11575         goto.
11576
11577 2017-02-10  Tom Tromey  <tom@tromey.com>
11578
11579         * python/py-prettyprint.c (pretty_print_one_value): Use
11580         gdbpy_ref.
11581
11582 2017-02-10  Tom Tromey  <tom@tromey.com>
11583
11584         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11585         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11586         gdbpy_ref.
11587         * python/py-type.c (field_new): Use gdbpy_ref.
11588         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11589         gdbpy_ref.
11590         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11591         (py_free_pspace): Likewise.
11592         (pspace_to_pspace_object): Likewise.
11593         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11594         (py_free_objfile): Likewise.
11595         (objfile_to_objfile_object): Likewise.
11596         * python/py-inferior.c (delete_thread_object): Use
11597         gdbpy_ref.
11598         (infpy_read_memory): Likewise.
11599         (py_free_inferior): Likewise.
11600         * python/py-evtregistry.c (create_eventregistry_object): Use
11601         gdbpy_ref.
11602         * python/py-event.c (create_event_object): Use gdbpy_ref.
11603
11604 2017-02-10  Tom Tromey  <tom@tromey.com>
11605
11606         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11607         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11608         used.
11609         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11610         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11611         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11612         python/py-framefilter.c, python/py-function.c,
11613         python/py-inferior.c, python/py-infevents.c,
11614         python/py-linetable.c, python/py-newobjfileevent.c,
11615         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11616         python/py-signalevent.c, python/py-stopevent.c,
11617         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11618         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11619         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11620         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11621
11622 2017-02-10  Tom Tromey  <tom@tromey.com>
11623
11624         * ui-out.h (ui_out_emit_type): New class.
11625         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11626         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11627         and ui_out_emit_tuple.
11628         (enumerate_locals): Likewise.
11629         (py_mi_print_variables, py_print_locals, py_print_args): Use
11630         ui_out_emit_list.
11631         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11632         ui_out_emit_list.
11633         * common/gdb_optional.h: New file.
11634
11635 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11636
11637         * MAINTAINERS (Write After Approval): Update my e-mail address.
11638
11639 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11640
11641         PR gdb/21122
11642         * breakpoint.c (_initialize_breakpoint): Update the help description
11643         of the 'commands' command to indicate that it takes a list argument.
11644
11645 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11646
11647         * interps.c (current_interp_set_logging): Remove "return".
11648
11649 2017-02-09  Gary Benson  <gbenson@redhat.com>
11650
11651         * symtab.c (add_symtab_completions): Prevent NULL pointer
11652         dereference.
11653
11654 2017-02-08  Pedro Alves  <palves@redhat.com>
11655
11656         * interps.c (interp::interp): Remove reference to quiet_p.
11657         (interp_set): Make static.  Remove dead "Switching to" output
11658         code.
11659         (interp_quiet_p, interp_set_quiet): Delete.
11660         (interpreter_exec_cmd): Don't set the interpreter quiet.
11661         * interps.h (interp_quiet_p): Make static.
11662         (class interp) <quiet_p>: Remove field
11663
11664 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11665
11666         * cli/cli-decode.c (find_command_name_length): Make it extern.
11667         * cli/cli-decode.h (find_command_name_length): Declare.
11668         * cli/cli-script.c (command_name_equals, line_first_arg):
11669         New functions.
11670         (process_next_line): Use cli-decode to parse command names.
11671         (build_command_line): Make args a constant pointer.
11672
11673 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11674
11675         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11676         Remove case-insensitive search.
11677
11678 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11679
11680         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11681         at the end of the line.  Avoids an ARI warning.
11682
11683 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11684
11685         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11686         rdseed instructions.
11687         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11688
11689 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11690
11691         PR tdep/20936
11692         Provide and use sparc32 and sparc64 target description XML files.
11693         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11694         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11695         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11696         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11697         * features/sparc/sparc32-solaris.xml: New file.
11698         * features/sparc/sparc64-solaris.xml: New file.
11699         * features/sparc/sparc32-solaris.c: Generated.
11700         * features/sparc/sparc64-solaris.c: Generated.
11701         * sparc-tdep.h: Account for differences in target descriptions.
11702         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11703         (sparc32_register_type): Use target provided registers.
11704         (validate_tdesc_registers): New function.
11705         (sparc32_gdbarch_init): Use tdesc_has_registers.
11706         Set pseudoregister functions.
11707         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11708         (sparc64_register_type): Use target provided registers.
11709         (sparc64_init_abi): Set pseudoregister functions.
11710
11711 2017-02-03  Tom Tromey  <tom@tromey.com>
11712
11713         PR rust/21097:
11714         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11715         with a single member.
11716
11717 2017-02-03  Pedro Alves  <palves@redhat.com>
11718
11719         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11720         (cli_interp_base::~cli_interp_base): New.
11721         (cli_interp): New struct.
11722         (as_cli_interp): Cast the interp itself to cli_interp.
11723         (cli_interpreter_pre_command_loop): Rename to ...
11724         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11725         parameter.
11726         (cli_interpreter_init): Rename to ...
11727         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11728         boolean.  Make extern.
11729         (cli_interpreter_resume): Rename to ...
11730         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11731         extern.
11732         (cli_interpreter_suspend): Rename to ...
11733         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11734         extern.
11735         (cli_interpreter_exec): Rename to ...
11736         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11737         extern.
11738         (cli_interpreter_supports_command_editing): Rename to ...
11739         (cli_interp_base::supports_command_editing): ... this.  Remove
11740         'interp' parameter.  Make extern.
11741         (cli_ui_out): Rename to ...
11742         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11743         Make extern.
11744         (cli_set_logging): Rename to ...
11745         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11746         parameter.  Make extern.
11747         (cli_interp_procs): Delete.
11748         (cli_interp_factory): Adjust to use "new".
11749         * cli/cli-interp.h: Include "interps.h".
11750         (struct cli_interp_base): New struct.
11751         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11752         (interp_new): Delete.
11753         (interp::interp, interp::~interp): New.
11754         (interp_set): Use bool, and return void.  Assume the interpreter
11755         has suspend, init and resume methods, and that the all return
11756         void.
11757         (set_top_level_interpreter): interp_set returns void.
11758         (interp_ui_out): Adapt.
11759         (current_interp_set_logging): Adapt.
11760         (interp_data): Delete.
11761         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11762         (interp_exec): Adapt.
11763         (top_level_interpreter_data): Delete.
11764         * interps.h (interp_init_ftype, interp_resume_ftype)
11765         (interp_suspend_ftype, interp_exec_ftype)
11766         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11767         (class interp): New.
11768         (interp_new): Delete.
11769         (interp_set): Now returns void.  Use bool.
11770         (interp_data, top_level_interpreter_data): Delete.
11771         * mi/mi-common.h: Include interps.h.
11772         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11773         init, resume, suspect, exec, interp_ui_out, set_logging and
11774         pre_command_loop methods.
11775         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11776         (mi_interpreter_init): Rename to ...
11777         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11778         bool, return void and make extern.  Adjust.
11779         (mi_interpreter_resume): ... Rename to ...
11780         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11781         return void and make extern.  Adjust.
11782         (mi_interpreter_suspend): ... Rename to ...
11783         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11784         return void and make extern.  Adjust.
11785         (mi_interpreter_exec): ... Rename to ...
11786         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11787         extern.  Adjust.
11788         (mi_interpreter_pre_command_loop): ... Rename to ...
11789         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11790         parameter and make extern.
11791         (mi_on_normal_stop_1): Adjust.
11792         (mi_ui_out): Rename to ...
11793         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11794         parameter and make extern.  Adjust.
11795         (mi_set_logging): Rename to ...
11796         (mi_interp::set_logging): ... this.  Remove the 'interp'
11797         parameter and make extern.  Adjust.
11798         (mi_interp_procs): Delete.
11799         (mi_interp_factory): Adjust to use 'new'.
11800         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11801         (mi_print_exception, mi_execute_command, mi_load_progress):
11802         Adjust.
11803         * tui/tui-interp.c (tui_interp): New class.
11804         (as_tui_interp): Return a tui_interp pointer.
11805         (tui_on_normal_stop, tui_on_signal_received)
11806         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11807         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11808         to use interp::interp_ui_out.
11809         (tui_init): Rename to ...
11810         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11811         bool, return void and make extern.  Adjust.
11812         (tui_resume): Rename to ...
11813         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11814         return void and make extern.  Adjust.
11815         (tui_suspend): Rename to ...
11816         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11817         return void and make extern.  Adjust.
11818         (tui_ui_out): Rename to ...
11819         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11820         parameter, and make extern.  Adjust.
11821         (tui_exec): Rename to ...
11822         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11823         make extern.
11824         (tui_interp_procs): Delete.
11825         (tui_interp_factory): Use "new".
11826
11827 2017-02-02  Tom Tromey  <tom@tromey.com>
11828
11829         * rust-exp.y (ends_raw_string, space_then_number)
11830         (rust_identifier_start_p): Return bool.
11831         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11832         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11833         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11834         (rust_chartype_p): Return bool.
11835         (val_print_struct, rust_print_struct_def, rust_print_type):
11836         Update.
11837         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11838         Return bool.
11839
11840 2017-02-02  Tom Tromey  <tom@tromey.com>
11841
11842         * rust-lang.c: Reindent.
11843
11844 2017-02-02  Tom Tromey  <tom@tromey.com>
11845
11846         * rust-lang.h (rust_crate_for_block): Update.
11847         * rust-lang.c (rust_crate_for_block): Return std::string.
11848         (rust_get_disr_info): Use std:;string, not
11849         gdb::unique_xmalloc_ptr.
11850         * rust-exp.y (crate_name): Update.
11851
11852 2017-02-02  Pedro Alves  <palves@redhat.com>
11853
11854         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11855         field out of gdb_disassembler_test and make it static.
11856
11857 2017-02-02  Pedro Alves  <palves@redhat.com>
11858
11859         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11860         mi1_interp and mi_interp fields.
11861
11862 2017-02-02  Pedro Alves  <palves@redhat.com>
11863
11864         * cli/cli-interp.c (struct saved_output_files, saved_output):
11865         Moved from cli/cli-logging.c.
11866         (cli_set_logging): New function.
11867         (cli_interp_procs): Install cli_set_logging.
11868         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11869         Declare.
11870         * cli/cli-logging.c (struct saved_output_files, saved_output):
11871         Moved to cli/cli-interp.c.
11872         (pop_output_files): Don't save outputs here.
11873         (make_logging_output): New function.
11874         (handle_redirections): Don't build tee nor save previous outputs
11875         here.
11876         * interps.c (current_interp_set_logging): Change prototype.
11877         Assume there's always a set_logging_proc method installed.
11878         * interps.h (interp_set_logging_ftype): Change prototype.
11879         (current_interp_set_logging): Change prototype and adjust comment.
11880         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11881         use make_logging_output.
11882         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11883 2017-02-02  Pedro Alves  <palves@redhat.com>
11884
11885         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11886         from ...
11887         (set_logging_overwrite): ... here.
11888         (logging_no_redirect_file): Delete.
11889         (set_logging_redirect): Don't handle redirection on the fly.
11890         Instead warn that "logging off" / "logging on" is necessary.
11891         (pop_output_files): Delete references to logging_no_redirect_file.
11892         (show_logging_command): Always speak in terms of what will happen
11893         once logging is reenabled.
11894
11895 2017-02-02  Pedro Alves  <palves@redhat.com>
11896
11897         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11898
11899 2017-02-02  Pedro Alves  <palves@redhat.com>
11900
11901         * disasm.c (gdb_pretty_print_insn): Rename to ...
11902         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11903         Remove gdbarch parameter.  Adapt to clear the object's buffers
11904         instead of allocating new buffers, and to print using the object's
11905         gdb_disassembler instead of calling gdb_print_insn.
11906         (dump_insns): Use gdb_pretty_print_disassembler.
11907         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11908         (gdb_pretty_print_disassembler): New class.
11909         * record-btrace.c (btrace_insn_history): Use
11910         gdb_pretty_print_disassembler.
11911
11912 2017-02-02  Pedro Alves  <palves@redhat.com>
11913
11914         * ada-lang.c (type_as_string): Use string_file.
11915         * ada-valprint.c (ada_print_floating): Use string_file.
11916         * ada-varobj.c (ada_varobj_scalar_image)
11917         (ada_varobj_get_value_image): Use string_file.
11918         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11919         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11920         * breakpoint.c (update_inserted_breakpoint_locations)
11921         (insert_breakpoint_locations, reattach_breakpoints)
11922         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11923         (print_it_watchpoint): Use string_file.
11924         (save_breakpoints): Use stdio_file.
11925         * c-exp.y (oper): Use string_file.
11926         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11927         tee_file.
11928         (pop_output_files): Use delete.
11929         (handle_redirections): Use stdio_file and tee_file.
11930         * cli/cli-setshow.c (do_show_command): Use string_file.
11931         * compile/compile-c-support.c (c_compute_program): Use
11932         string_file.
11933         * compile/compile-c-symbols.c (generate_vla_size): Take a
11934         'string_file &' instead of a 'ui_file *'.
11935         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11936         of a 'ui_file *'.  Use string_file.
11937         (generate_c_for_variable_locations): Take a 'string_file &'
11938         instead of a 'ui_file *'.
11939         * compile/compile-internal.h (generate_c_for_for_one_variable):
11940         Take a 'string_file &' instead of a 'ui_file *'.
11941         * compile/compile-loc2c.c (push, pushf, unary, binary)
11942         (print_label, pushf_register_address, pushf_register)
11943         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11944         'ui_file *'.  Adjust.
11945         * compile/compile.c (compile_to_object): Use string_file.
11946         * compile/compile.h (compile_dwarf_expr_to_c)
11947         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11948         'ui_file *'.
11949         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11950         (replace_typedefs_qualified_name): Use string_file and
11951         obstack_copy0.
11952         * disasm.c (gdb_pretty_print_insn): Use string_file.
11953         (gdb_disassembly): Adjust reference the null_stream global.
11954         (do_ui_file_delete): Delete.
11955         (gdb_insn_length): Use null_stream.
11956         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11957         * dwarf2loc.c (dwarf2_compile_property_to_c)
11958         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11959         'string_file &' instead of a 'ui_file *'.
11960         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11961         * dwarf2read.c (do_ui_file_peek_last): Delete.
11962         (dwarf2_compute_name): Use string_file.
11963         * event-top.c (gdb_setup_readline): Use stdio_file.
11964         * gdbarch.sh (verify_gdbarch): Use string_file.
11965         * gdbtypes.c (safe_parse_type): Use null_stream.
11966         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11967         string_file.
11968         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11969         'string_file *' instead of a 'ui_file *'.
11970         (gdbscm_arch_disassemble): Use string_file.
11971         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11972         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11973         inherits from ui_file.
11974         (ioscm_file_port_delete, ioscm_file_port_rewind)
11975         (ioscm_file_port_put): Delete.
11976         (ioscm_file_port_write): Rename to ...
11977         (ioscm_file_port::write): ... this.  Remove file_port_magic
11978         checks.
11979         (ioscm_file_port_new): Delete.
11980         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11981         ui_file_up.
11982         * guile/scm-type.c (tyscm_type_name): Use string_file.
11983         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11984         Use string_file.
11985         * infcmd.c (print_return_value_1): Use string_file.
11986         * infrun.c (print_target_wait_results): Use string_file.
11987         * language.c (add_language): Use string_file.
11988         * location.c (explicit_to_string_internal): Use string_file.
11989         * main.c (captured_main_1): Use null_file.
11990         * maint.c (maintenance_print_architecture): Use stdio_file.
11991         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11992         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11993         event_channel>: Change type to mi_console_file pointer.
11994         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11995         (mi_console_file_delete): Delete.
11996         (struct mi_console_file): Delete.
11997         (mi_console_file_magic): Delete.
11998         (mi_console_file_new): Delete.
11999         (mi_console_file::mi_console_file): New.
12000         (mi_console_file_delete): Delete.
12001         (mi_console_file_fputs): Delete.
12002         (mi_console_file::write): New.
12003         (mi_console_raw_packet): Delete.
12004         (mi_console_file::flush): New.
12005         (mi_console_file_flush): Delete.
12006         (mi_console_set_raw): Rename to ...
12007         (mi_console_file::set_raw): ... this.
12008         * mi/mi-console.h (class mi_console_file): New class.
12009         (mi_console_file_new, mi_console_set_raw): Delete.
12010         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12011         (mi_set_logging): Use delete and tee_file.  Adjust.
12012         * mi/mi-main.c (output_register): Use string_file.
12013         (mi_cmd_data_evaluate_expression): Use string_file.
12014         (mi_cmd_data_read_memory): Use string_file.
12015         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12016         * mi/mi-out.c (mi_ui_out::main_stream): New.
12017         (mi_ui_out::rewind): Use main_stream and
12018         string_file.
12019         (mi_ui_out::put): Use main_stream and string_file.
12020         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12021         Allocate a 'string_file' instead.
12022         (mi_out_new): Don't allocate a mem_fileopen stream here.
12023         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12024         (mi_ui_out::main_stream): Declare method.
12025         * printcmd.c (eval_command): Use string_file.
12026         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12027         * python/py-arch.c (archpy_disassemble): Use string_file.
12028         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12029         * python/py-frame.c (frapy_str): Use string_file.
12030         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12031         Use string_file.
12032         * python/py-type.c (typy_str): Use string_file.
12033         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12034         * python/py-value.c (valpy_str): Use string_file.
12035         * record-btrace.c (btrace_insn_history): Use string_file.
12036         * regcache.c (regcache_print): Use stdio_file.
12037         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12038         * remote.c (escape_buffer): Use string_file.
12039         * rust-lang.c (rust_get_disr_info): Use string_file.
12040         * serial.c (serial_open_ops_1): Use stdio_file.
12041         (do_serial_close): Use delete.
12042         * stack.c (print_frame_arg): Use string_file.
12043         (print_frame_args): Remove local mem_fileopen stream, not used.
12044         (print_frame): Use string_file.
12045         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12046         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12047         Take a 'string_file *' instead of a 'ui_file *'.
12048         * top.c (new_ui): Use stdio_file and stderr_file.
12049         (free_ui): Use delete.
12050         (execute_command_to_string): Use string_file.
12051         (quit_confirm): Use string_file.
12052         * tracepoint.c (collection_list::append_exp): Use string_file.
12053         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12054         * tui/tui-file.c: Don't include "ui-file.h".
12055         (enum streamtype, struct tui_stream): Delete.
12056         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12057         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12058         (tui_file::tui_file): New method.
12059         (tui_file_fputs): Delete.
12060         (tui_file_get_strbuf): Delete.
12061         (tui_file::puts): New method.
12062         (tui_file_adjust_strbuf): Delete.
12063         (tui_file_flush): Delete.
12064         (tui_file::flush): New method.
12065         * tui/tui-file.h: Tweak intro comment.
12066         Include ui-file.h.
12067         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12068         (tui_file_adjust_strbuf): Delete declarations.
12069         (class tui_file): New class.
12070         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12071         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12072         (tui_register_format): Use string_stream.
12073         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12074         (tui_get_function_from_frame): Use string_file.
12075         * typeprint.c (type_to_string): Use string_file.
12076         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12077         (null_stream): New global.
12078         (ui_file_delete): Delete.
12079         (ui_file::ui_file): New.
12080         (null_file_isatty): Delete.
12081         (ui_file::~ui_file): New.
12082         (null_file_rewind): Delete.
12083         (ui_file::printf): New.
12084         (null_file_put): Delete.
12085         (null_file_flush): Delete.
12086         (ui_file::putstr): New.
12087         (null_file_write): Delete.
12088         (ui_file::putstrn): New.
12089         (null_file_read): Delete.
12090         (ui_file::putc): New.
12091         (null_file_fputs): Delete.
12092         (null_file_write_async_safe): Delete.
12093         (ui_file::vprintf): New.
12094         (null_file_delete): Delete.
12095         (null_file::write): New.
12096         (null_file_fseek): Delete.
12097         (null_file::puts): New.
12098         (ui_file_data): Delete.
12099         (null_file::write_async_safe): New.
12100         (gdb_flush, ui_file_isatty): Adjust.
12101         (ui_file_put, ui_file_rewind): Delete.
12102         (ui_file_write): Adjust.
12103         (ui_file_write_for_put): Delete.
12104         (ui_file_write_async_safe, ui_file_read): Adjust.
12105         (ui_file_fseek): Delete.
12106         (fputs_unfiltered): Adjust.
12107         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12108         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12109         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12110         (set_ui_file_data): Delete.
12111         (string_file::~string_file, string_file::write)
12112         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12113         (do_ui_file_as_string, ui_file_as_string): Delete.
12114         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12115         (struct mem_file): Delete.
12116         (mem_file_new): Delete.
12117         (stdio_file::stdio_file): New.
12118         (mem_file_delete): Delete.
12119         (stdio_file::stdio_file): New.
12120         (mem_fileopen): Delete.
12121         (stdio_file::~stdio_file): New.
12122         (mem_file_rewind): Delete.
12123         (stdio_file::set_stream): New.
12124         (mem_file_put): Delete.
12125         (stdio_file::open): New.
12126         (mem_file_write): Delete.
12127         (stdio_file_magic, struct stdio_file): Delete.
12128         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12129         (stdio_file::flush): New.
12130         (stdio_file_read): Rename to ...
12131         (stdio_file::read): ... this.  Adjust.
12132         (stdio_file_write): Rename to ...
12133         (stdio_file::write): ... this.  Adjust.
12134         (stdio_file_write_async_safe): Rename to ...
12135         (stdio_file::write_async_safe) ... this.  Adjust.
12136         (stdio_file_fputs): Rename to ...
12137         (stdio_file::puts) ... this.  Adjust.
12138         (stdio_file_isatty): Delete.
12139         (stdio_file_fseek): Delete.
12140         (stdio_file::isatty): New.
12141         (stderr_file_write): Rename to ...
12142         (stderr_file::write) ... this.  Adjust.
12143         (stderr_file_fputs): Rename to ...
12144         (stderr_file::puts) ... this.  Adjust.
12145         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12146         (stderr_file::stderr_file): New.
12147         (tee_file_magic): Delete.
12148         (struct tee_file): Delete.
12149         (tee_file::tee_file): New.
12150         (tee_file_new): Delete.
12151         (tee_file::~tee_file): New.
12152         (tee_file_delete): Delete.
12153         (tee_file_flush): Rename to ...
12154         (tee_file::flush): ... this.  Adjust.
12155         (tee_file_write): Rename to ...
12156         (tee_file::write): ... this.  Adjust.
12157         (tee_file::write_async_safe): New.
12158         (tee_file_fputs): Rename to ...
12159         (tee_file::puts): ... this.  Adjust.
12160         (tee_file_isatty): Rename to ...
12161         (tee_file::isatty): ... this.  Adjust.
12162         * ui-file.h (struct obstack, struct ui_file): Don't
12163         forward-declare.
12164         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12165         (ui_file_write_ftype)
12166         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12167         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12168         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12169         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12170         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12171         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12172         (set_ui_file_fseek): Delete.
12173         (ui_file_data, ui_file_delete, ui_file_rewind)
12174         (struct ui_file): New.
12175         (ui_file_up): New.
12176         (class null_file): New.
12177         (null_stream): Declare.
12178         (ui_file_write_for_put, ui_file_put): Delete.
12179         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12180         Delete.
12181         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12182         (gdb_fopen, tee_file_new): Delete.
12183         (struct string_file): New.
12184         (struct stdio_file): New.
12185         (stdio_file_up): New.
12186         (struct stderr_file): New.
12187         (class tee_file): New.
12188         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12189         of a 'ui_file *'.  Adjust.
12190         * ui-out.h (class ui_out) <field_stream>: Likewise.
12191         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12192         (null_stream): Delete.
12193         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12194         Adjust.
12195         * utils.h (struct ui_file): Delete forward declaration..
12196         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12197         (error_stream): Take a 'string_file &' instead of a
12198         'ui_file *'.
12199         * varobj.c (varobj_value_get_print_value): Use string_file.
12200         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12201         * gdbarch.c: Regenerate.
12202
12203 2017-02-02  Pedro Alves  <palves@redhat.com>
12204
12205         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12206         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12207         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12208         Adjust to call gdb_print_insn instead of
12209         gdb_disassembler::print_insn.
12210         (dump_insns, do_mixed_source_and_assembly_deprecated)
12211         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12212         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12213         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12214         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12215         declaration.
12216         (gdb_pretty_print_insn): Re-add declaration.
12217         * record-btrace.c (btrace_insn_history): Don't allocate a
12218         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12219
12220 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12221
12222         * disasm.h (gdb_disassembly): Remove file_string parameter.
12223         * disasm.c (gdb_disassembly): Likewise.
12224         * cli/cli-cmds.c (print_disassembly): Adapt.
12225         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12226         * stack.c (do_gdb_disassembly): Likewise.
12227
12228 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12229
12230         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12231         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12232         targets.  And if the implicit value is longer than needed, extract
12233         the first bytes instead of the "least significant" ones.
12234
12235 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12236
12237         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12238         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12239         (btrace_fetch): Assert can_access_registers_ptid.
12240         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12241         validate_registers_access.
12242
12243 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12244
12245         * gdbthread.h (can_access_registers_ptid): New.
12246         * thread.c (can_access_registers_ptid): New.
12247
12248 2017-02-01  Pedro Alves  <palves@redhat.com>
12249
12250         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12251
12252 2017-01-31  Pedro Alves  <palves@redhat.com>
12253
12254         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12255         Fix typos.
12256
12257 2017-01-31  Pedro Alves  <palves@redhat.com>
12258
12259         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12260         not used.
12261
12262 2017-01-31  Pedro Alves  <palves@redhat.com>
12263
12264         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12265
12266 2017-01-31  Pedro Alves  <palves@redhat.com>
12267
12268         * common/scoped_restore.h
12269         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12270         change the value's parameter type to T2.
12271         (make_scoped_restore): Likewise.
12272
12273 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12274             Richard Henderson  <rth@redhat.com>
12275
12276         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12277         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12278         GS_BASE for older kernels.
12279         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12280         GS_BASE for older kernels.
12281         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12282         and GS_BASE to the offset table.
12283         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12284         system register group.
12285         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12286         for older kernels.
12287         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12288         amd64 ABI.
12289         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12290         AMD64_GSBASE_REGNUM.
12291         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12292         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12293         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12294         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12295         i386/64bit-segments.xml in those rules.
12296         * features/i386/64bit-segments.xml: New file.
12297         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12298         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12299         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12300         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12301         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12302         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12303         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12304         * features/i386/amd64-avx-linux.c: Regenerated.
12305         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12306         * features/i386/amd64-avx-mpx.c: Regenerated.
12307         * features/i386/amd64-avx512-linux.c: Regenerated.
12308         * features/i386/amd64-linux.c: Regenerated.
12309         * features/i386/amd64-mpx-linux.c: Regenerated.
12310         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12311         * features/i386/i386-avx-mpx.c: Regenerated.
12312         * features/i386/x32-avx-linux.c: Regenerated.
12313         * features/i386/x32-avx512-linux.c: Regenerated.
12314         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12315         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12316         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12317         * regformats/i386/amd64-linux.dat: Regenerated.
12318         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12319         * regformats/i386/x32-avx-linux.dat: Regenerated.
12320         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12321         * regformats/i386/x32-linux.dat: Regenerated.
12322
12323 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12324
12325         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12326         Set to AMD64_NUM_REGS.
12327
12328 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12329
12330         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12331         that checks validity of a register number.
12332
12333 2017-01-27  Kees Cook  <keescook@google.com>
12334
12335         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12336         fetch_fpregs if target has fpa registers.
12337         (arm_linux_store_inferior_registers): Call store_fpregs if target
12338         has fpa registers.
12339
12340 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12341
12342         * cris-tdep.c (cris_gdbarch_init): Remove check for
12343         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12344
12345 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12346
12347         * corelow.c (get_core_register_section): Check for regset
12348         existence before checking for REGSET_VARIABLE_SIZE.
12349
12350 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12351             Pedro Alves  <palves@redhat.com>
12352
12353         PR gdb/20939
12354         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12355         call memory_error, save memaddr instead.
12356         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12357         negative, cal memory_error.
12358         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12359
12360 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12361
12362         * disasm-selftests.c (memory_error_test): New function.
12363         (_initialize_disasm_selftests): Register memory_error_test.
12364
12365 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12366
12367         * Makefile.in (SFILES): Add disasm-selftests.c and
12368         selftest-arch.c.
12369         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12370         * disasm-selftests.c: New file.
12371         * selftest-arch.c: New file.
12372         * selftest-arch.h: New file.
12373
12374 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12375
12376         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12377         to bfd_arch_mep.  Don't return 0 if section is not
12378         found.  Call print_insn_mep.
12379
12380 2017-01-26  Pedro Alves  <palves@redhat.com>
12381             Yao Qi  <yao.qi@linaro.org>
12382
12383         * arm-tdep.c: Include "disasm.h".
12384         (gdb_print_insn_arm): Update code to get gdbarch.
12385         * disasm.c (dis_asm_read_memory): Change it to
12386         gdb_disassembler::dis_asm_read_memory.
12387         (dis_asm_memory_error): Likewise.
12388         (dis_asm_print_address): Likewise.
12389         (gdb_pretty_print_insn): Change it to
12390         gdb_disassembler::pretty_print_insn.
12391         (dump_insns): Add one argument gdb_disassemlber.  All
12392         callers updated.
12393         (do_mixed_source_and_assembly_deprecated): Likewise.
12394         (do_mixed_source_and_assembly): Likewise.
12395         (do_assembly_only): Likewise.
12396         (gdb_disassembler::gdb_disassembler): New.
12397         (gdb_disassembler::print_insn): New.
12398         * disasm.h (class gdb_disassembler): New.
12399         (gdb_pretty_print_insn): Remove declaration.
12400         (gdb_disassemble_info): Likewise.
12401         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12402         (gdbscm_disasm_read_memory_worker): Update.
12403         (gdbscm_disasm_read_memory): Update.
12404         (gdbscm_disasm_memory_error): Remove.
12405         (gdbscm_disasm_print_address): Remove.
12406         (gdbscm_disassembler::gdbscm_disassembler): New.
12407         (gdbscm_print_insn_from_port): Update.
12408         * mips-tdep.c: Include disasm.h.
12409         (gdb_print_insn_mips): Update code to get gdbarch.
12410         * record-btrace.c (btrace_insn_history): Update.
12411         * spu-tdep.c: Include disasm.h.
12412         (struct spu_dis_asm_data): Remove.
12413         (struct spu_dis_asm_info): New.
12414         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12415         SPU id.
12416         (gdb_print_insn_spu): Cast disassemble_info to
12417         spu_dis_asm_info.
12418
12419 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12420
12421         * disasm.c (do_ui_file_delete): Delete.
12422         (gdb_insn_length): Move code creating stream to ...
12423         * utils.c (null_stream): ... here.  New function.
12424         * utils.h (null_stream): Declare.
12425
12426 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12427
12428         * python/py-inferior.c (find_thread_object): Return directly
12429         from the loop.  Remove "found" variable.
12430
12431 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12432
12433         GDB 7.12.1 released.
12434
12435 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12436
12437         * python/py-function.c (fnpy_call): Reorder declarations to have
12438         the gdbpy_enter object declared first.
12439         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12440
12441 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12442
12443         PR python/21068
12444         * python/python-internal.h (PyMem_RawMalloc): Define for
12445         Python < 3.4.
12446         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12447         PyMem_RawMalloc instead of PyMem_Malloc.
12448
12449 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12450             Luis Machado  <lgustavo@codesourcery.com>
12451
12452         * NEWS (New commands): Mention flash-erase.
12453         (New MI commands): Mention target-flash-erase.
12454         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12455         command.
12456         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12457         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12458         * target.c (flash_erase_command): New function.
12459         (initialize_targets): Add new flash-erase command.
12460         * target.h (flash_erase_command): New declaration.
12461
12462 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12463
12464         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12465         HAVE_SYS_PROCFS_H is defined.
12466
12467 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12468
12469         * remote.c (struct cached_reg): Change data into a pointer.
12470         * (stop_reply_dtr): Free data pointers before deleting vector.
12471         (process_stop_reply): Likewise.
12472         (remote_parse_stop_reply): Allocate space for data
12473
12474 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12475
12476         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12477         MAX_REGISTER_SIZE.
12478         (amd64_pseudo_register_read_value): Likewise.
12479         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12480         (store_register_using_P): Likewise.
12481         * regcache.c (regcache_xfer_part): Likewise.
12482
12483 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12484
12485         Split real and pseudo registers.
12486         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12487         (sparc32_pseudo_regnum): New enum.
12488         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12489         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12490         (SPARC32_CP0_REGISTERS): New macro.
12491         (sparc32_pseudo_register_name): New function.
12492         (sparc32_register_name): Use sparc32_pseudo_register_name.
12493         (sparc32_pseudo_register_type): New function.
12494         (sparc32_register_type): Use sparc32_pseudo_register_type.
12495         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12496         pseudo register numbers.
12497         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12498         (SPARC64_CP0_REGISTERS): New macro.
12499         (sparc64_pseudo_register_name): New function.
12500         (sparc64_register_name): Use sparc64_pseudo_register_name.
12501         (sparc64_pseudo_register_type): New function.
12502         (sparc64_register_type): Use sparc64_pseudo_register_type.
12503         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12504         pseudo register numbers.
12505         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12506         sparc64_store_arguments): Handle pseudo register numbers.
12507
12508 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12509
12510         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12511         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12512         output.
12513         (getpkt_or_notif_sane_1): Likewise.
12514
12515 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12516
12517         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12518         of CC.  Pass "-x c++-header" instead of "-x c".
12519
12520 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12521
12522         * remote.c (remote_can_async_p): Update comment.
12523
12524 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12525
12526         * linux-nat.c (linux_nat_can_async_p): Update comment.
12527
12528 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12529
12530         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12531
12532 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12533
12534         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12535
12536 2017-01-10  Tom Tromey  <tom@tromey.com>
12537
12538         * python/py-type.c (typy_legacy_template_argument): Update.
12539         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12540         ~demangle_parse_info): Declare new members.
12541         (cp_demangled_name_to_comp): Return unique_ptr.
12542         (cp_demangled_name_parse_free)
12543         (make_cleanup_cp_demangled_name_parse_free)
12544         (cp_new_demangle_parse_info): Remove.
12545         * cp-support.c (do_demangled_name_parse_free_cleanup)
12546         (make_cleanup_cp_demangled_name_parse_free): Remove.
12547         (inspect_type, cp_canonicalize_string_full)
12548         (cp_canonicalize_string): Update.
12549         (mangled_name_to_comp): Change return type.
12550         (cp_class_name_from_physname, method_name_from_physname)
12551         (cp_func_name, cp_remove_params): Update.
12552         * cp-name-parser.y (demangle_parse_info): New constructor, from
12553         cp_new_demangle_parse_info.
12554         (~demangle_parse_info): New destructor, from
12555         cp_demangled_name_parse_free.
12556         (cp_merge_demangle_parse_infos): Update.
12557         (cp_demangled_name_to_comp): Change return type.
12558
12559 2017-01-10  Tom Tromey  <tom@tromey.com>
12560
12561         * top.c (prevent_dont_repeat): Change return type.
12562         * python/python.c (execute_gdb_command): Use std::string.
12563         Update.
12564         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12565         * command.h (prevent_dont_repeat): Change return type.
12566         * breakpoint.c (bpstat_do_actions_1): Update.
12567
12568 2017-01-10  Tom Tromey  <tom@tromey.com>
12569
12570         * value.h (scoped_value_mark::~scoped_value_mark): Call
12571         free_to_mark.
12572         (scoped_value_mark::free_to_mark): New method.
12573         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12574         scoped_value_mark.
12575
12576 2017-01-10  Tom Tromey  <tom@tromey.com>
12577
12578         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12579         (valpy_reference_value, valpy_const_value, valpy_get_address)
12580         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12581         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12582         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12583         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12584         scoped_value_mark.
12585         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12586         * value.h (scoped_value_mark): New class.
12587
12588 2017-01-10  Tom Tromey  <tom@tromey.com>
12589
12590         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12591         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12592         * psymtab.c (discard_psymtabs_upto): Remove.
12593         (make_cleanup_discard_psymtabs): Remove.
12594         (struct psymtab_state): Remove.
12595
12596 2017-01-10  Tom Tromey  <tom@tromey.com>
12597
12598         * record-full.c (record_full_save_cleanups): Remove.
12599         (record_full_save): Use gdb::unlinker.
12600         * gcore.c (do_bfd_delete_cleanup): Remove.
12601         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12602         cleanups.
12603         * dwarf2read.c (unlink_if_set): Remove.
12604         (write_psymtabs_to_index): Use gdb::unlinker.
12605         * common/gdb_unlinker.h: New file.
12606
12607 2017-01-10  Tom Tromey  <tom@tromey.com>
12608
12609         * windows-tdep.c (windows_xfer_shared_library): Update.
12610         * windows-nat.c (windows_make_so): Update.
12611         * utils.h (make_cleanup_bfd_unref): Remove.
12612         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12613         * symfile.h (symfile_bfd_open)
12614         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12615         * symfile.c (read_symbols, symbol_file_add)
12616         (separate_debug_file_exists): Update.
12617         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12618         (generic_load, reread_symbols): Update.
12619         * symfile-mem.c (symbol_file_add_from_memory): Update.
12620         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12621         (spu_symbol_file_add_from_memory): Update.
12622         * solist.h (struct target_so_ops) <bfd_open>: Return
12623         gdb_bfd_ref_ptr.
12624         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12625         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12626         gdb_bfd_ref_ptr.
12627         (solib_map_sections, reload_shared_libraries_1): Update.
12628         * solib-svr4.c (enable_break): Update.
12629         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12630         * solib-frv.c (enable_break2): Update.
12631         * solib-dsbt.c (enable_break): Update.
12632         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12633         gdb_bfd_ref_ptr.
12634         (darwin_solib_get_all_image_info_addr_at_init): Update.
12635         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12636         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12637         * record-full.c (record_full_save): Update.
12638         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12639         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12640         * minidebug.c (find_separate_debug_file_in_section): Return
12641         gdb_bfd_ref_ptr.
12642         * machoread.c (macho_add_oso_symfile): Change abfd to
12643         gdb_bfd_ref_ptr.
12644         (macho_symfile_read_all_oso): Update.
12645         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12646         (macho_symfile_read): Update.
12647         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12648         (jit_bfd_try_read_symtab): Update.
12649         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12650         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12651         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12652         gdb_bfd_ref_ptr.
12653         (gdb_bfd_ref_policy): New struct.
12654         (gdb_bfd_ref_ptr): New typedef.
12655         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12656         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12657         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12658         gdb_bfd_ref_ptr.
12659         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12660         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12661         (gcore_command): Update.
12662         * exec.c (exec_file_attach): Update.
12663         * elfread.c (elf_symfile_read): Update.
12664         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12665         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12666         (open_and_init_dwo_file): Update.
12667         (open_dwp_file): Return gdb_bfd_ref_ptr.
12668         (open_and_init_dwp_file): Update.
12669         * corelow.c (core_open): Update.
12670         * compile/compile-object-load.c (compile_object_load): Update.
12671         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12672         * coffread.c (coff_symfile_read): Update.
12673         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12674         gdb_bfd_ref_ptr.  Rename.
12675         (dump_bfd_file, restore_command): Update.
12676         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12677         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12678         (find_separate_debug_file_by_buildid): Update.
12679
12680 2017-01-10  Tom Tromey  <tom@tromey.com>
12681
12682         * common/gdb_ref_ptr.h: New file.
12683         * python/py-ref.h (struct gdbpy_ref_policy): New.
12684         (gdbpy_ref): Now a typedef.
12685
12686 2017-01-10  Tom Tromey  <tom@tromey.com>
12687
12688         * utils.h (make_cleanup_htab_delete): Don't declare.
12689         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12690         Remove.
12691         * linespec.c (decode_compound_collector): Add constructor,
12692         destructor.
12693         (lookup_prefix_sym): Remove cleanup.
12694         (symtab_collector): Add constructor, destructor.
12695         (collect_symtabs_from_filename): Remove cleanup.
12696         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12697         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12698         Use htab_up.
12699         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12700         * dwarf2read.c (dw2_expand_symtabs_matching)
12701         (dw2_map_symbol_filenames, dwarf_decode_macros)
12702         (write_psymtabs_to_index): Use htab_up.
12703         * dwarf2loc.c (func_verify_no_selftailcall)
12704         (call_site_find_chain_1, func_verify_no_selftailcall)
12705         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12706         std::vector, gdb::unique_xmalloc_ptr.
12707         (call_sitep): Remove typedef.
12708         (dwarf2_locexpr_baton_eval): Remove unused variable.
12709
12710 2017-01-10  Tom Tromey  <tom@tromey.com>
12711
12712         * python/python-internal.h (make_cleanup_py_decref)
12713         (make_cleanup_py_xdecref): Don't declare.
12714         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12715         (py_xdecref, make_cleanup_py_xdecref): Remove.
12716
12717 2017-01-10  Tom Tromey  <tom@tromey.com>
12718
12719         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12720         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12721
12722 2017-01-10  Tom Tromey  <tom@tromey.com>
12723
12724         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12725
12726 2017-01-10  Tom Tromey  <tom@tromey.com>
12727
12728         * python/py-utils.c (unicode_to_encoded_string)
12729         (python_string_to_target_string)
12730         (python_string_to_target_python_string)
12731         (python_string_to_host_string, gdbpy_obj_to_string)
12732         (get_addr_from_python): Use gdbpy_ref.
12733
12734 2017-01-10  Tom Tromey  <tom@tromey.com>
12735
12736         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12737         gdbpy_ref.
12738
12739 2017-01-10  Tom Tromey  <tom@tromey.com>
12740
12741         * python/python.c (eval_python_command, gdbpy_decode_line)
12742         (gdbpy_run_events, gdbpy_start_type_printers)
12743         (gdbpy_apply_type_printers): Use gdbpy_ref.
12744
12745 2017-01-10  Tom Tromey  <tom@tromey.com>
12746
12747         * python/py-param.c (get_doc_string, compute_enum_values): Use
12748         gdbpy_ref.
12749
12750 2017-01-10  Tom Tromey  <tom@tromey.com>
12751
12752         * python/py-inferior.c (find_thread_object, build_inferior_list):
12753         Use gdbpy_ref.
12754
12755 2017-01-10  Tom Tromey  <tom@tromey.com>
12756
12757         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12758
12759 2017-01-10  Tom Tromey  <tom@tromey.com>
12760
12761         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12762         gdbpy_ref.
12763
12764 2017-01-10  Tom Tromey  <tom@tromey.com>
12765
12766         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12767         extra incref.
12768         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12769         Use gdbpy_ref.
12770
12771 2017-01-10  Tom Tromey  <tom@tromey.com>
12772
12773         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12774         gdbpy_ref.
12775
12776 2017-01-10  Tom Tromey  <tom@tromey.com>
12777
12778         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12779         decref results of PyArg_ParseTupleAndKeywords.
12780
12781 2017-01-10  Tom Tromey  <tom@tromey.com>
12782
12783         * python/python.c (python_run_simple_file): Use
12784         unique_xmalloc_ptr, gdbpy_ref.
12785
12786 2017-01-10  Tom Tromey  <tom@tromey.com>
12787
12788         * python/py-prettyprint.c (print_stack_unless_memory_error)
12789         (print_string_repr, print_children): Use gdbpy_ref.
12790         (dummy_python_frame): New class.
12791         (dummy_python_frame::dummy_python_frame): Rename from
12792         push_dummy_python_frame.
12793         (py_restore_tstate): Remove.
12794
12795 2017-01-10  Tom Tromey  <tom@tromey.com>
12796
12797         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12798
12799 2017-01-10  Tom Tromey  <tom@tromey.com>
12800
12801         * python/python.c (ensure_python_env, restore_python_env):
12802         Remove.
12803         * python/python-internal.h (ensure_python_env): Don't declare.
12804         * varobj.h (varobj_ensure_python_env): Don't declare.
12805         * varobj.c (varobj_ensure_python_env): Remove.
12806
12807 2017-01-10  Tom Tromey  <tom@tromey.com>
12808
12809         * varobj.c (varobj_value_get_print_value): Use
12810         gdbpy_enter_varobj.
12811
12812 2017-01-10  Tom Tromey  <tom@tromey.com>
12813
12814         * python/py-prettyprint.c (print_string_repr, print_children):
12815         Update.
12816         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12817         of "encoding".
12818         * varobj.c (varobj_value_get_print_value): Update.
12819         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12820
12821 2017-01-10  Tom Tromey  <tom@tromey.com>
12822
12823         * varobj.c (varobj_get_display_hint)
12824         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12825         (varobj_set_visualizer, free_variable): Use
12826         gdbpy_enter_varobj.
12827
12828 2017-01-10  Tom Tromey  <tom@tromey.com>
12829
12830         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12831         (do_finish_initialization): New function.  Use gdbpy_ref.
12832         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12833         do_finish_initialization.
12834
12835 2017-01-10  Tom Tromey  <tom@tromey.com>
12836
12837         * python/py-param.c (get_set_value, get_show_value): Use
12838         gdbpy_enter, gdbpy_ref.
12839
12840 2017-01-10  Tom Tromey  <tom@tromey.com>
12841
12842         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12843
12844 2017-01-10  Tom Tromey  <tom@tromey.com>
12845
12846         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12847
12848 2017-01-10  Tom Tromey  <tom@tromey.com>
12849
12850         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12851         Use gdbpy_enter_varobj.
12852
12853 2017-01-10  Tom Tromey  <tom@tromey.com>
12854
12855         * varobj.c (gdbpy_enter_varobj): New constructor.
12856         * python/python-internal.h (gdbpy_enter_varobj): New class.
12857         * python/py-varobj.c (py_varobj_get_iterator): Use
12858         gdbpy_enter_varobj.
12859
12860 2017-01-10  Tom Tromey  <tom@tromey.com>
12861
12862         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12863         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12864         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12865         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12866         unique_xmalloc_ptr.
12867         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12868
12869 2017-01-10  Tom Tromey  <tom@tromey.com>
12870
12871         * python/py-xmethods.c (invoke_match_method): Use
12872         gdbpy_ref.
12873
12874 2017-01-10  Tom Tromey  <tom@tromey.com>
12875
12876         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12877         gdbpy_enter, gdbpy_ref.
12878
12879 2017-01-10  Tom Tromey  <tom@tromey.com>
12880
12881         * python/python.c (python_interactive_command): Use gdbpy_enter.
12882
12883 2017-01-10  Tom Tromey  <tom@tromey.com>
12884
12885         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12886         gdbpy_ref.
12887
12888 2017-01-10  Tom Tromey  <tom@tromey.com>
12889
12890         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12891         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12892
12893 2017-01-10  Tom Tromey  <tom@tromey.com>
12894
12895         * utils.h (htab_deleter): New struct.
12896         (htab_up): New typedef.
12897         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12898         gdbpy_enter, gdbpy_ref, htab_up.
12899
12900 2017-01-10  Tom Tromey  <tom@tromey.com>
12901
12902         * python/py-unwind.c (pending_frame_invalidate): Remove.
12903         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12904
12905 2017-01-10  Tom Tromey  <tom@tromey.com>
12906
12907         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12908         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12909
12910 2017-01-10  Tom Tromey  <tom@tromey.com>
12911
12912         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12913
12914 2017-01-10  Tom Tromey  <tom@tromey.com>
12915
12916         * python/python.c (gdbpy_eval_from_control_command)
12917         (gdbpy_source_script, gdbpy_run_events)
12918         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12919         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12920         gdbpy_enter.
12921
12922 2017-01-10  Tom Tromey  <tom@tromey.com>
12923
12924         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12925
12926 2017-01-10  Tom Tromey  <tom@tromey.com>
12927
12928         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12929
12930 2017-01-10  Tom Tromey  <tom@tromey.com>
12931
12932         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12933         (python_on_inferior_call_pre, python_on_inferior_call_post)
12934         (python_on_memory_change, python_on_register_change)
12935         (python_inferior_exit, python_new_objfile, add_thread_object)
12936         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12937
12938 2017-01-10  Tom Tromey  <tom@tromey.com>
12939
12940         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12941         (bpfinishpy_handle_exit): Use gdbpy_enter.
12942
12943 2017-01-10  Tom Tromey  <tom@tromey.com>
12944
12945         * python/py-cmd.c (cmdpy_destroyer)
12946         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12947         gdbpy_enter.
12948
12949 2017-01-10  Tom Tromey  <tom@tromey.com>
12950
12951         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12952         gdbpy_enter.
12953         (gdbpy_breakpoint_has_cond): Likewise.
12954
12955 2017-01-10  Tom Tromey  <tom@tromey.com>
12956
12957         * python/python.c (gdbpy_enter): New constructor.
12958         (~gdbpy_enter): New destructor.
12959         (restore_python_env, ensure_python_env): Rewrite.
12960         * python/python-internal.h (gdbpy_enter): New class.
12961
12962 2017-01-10  Tom Tromey  <tom@tromey.com>
12963
12964         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12965
12966 2017-01-10  Tom Tromey  <tom@tromey.com>
12967
12968         * python/py-value.c (value_has_field, get_field_flag)
12969         (get_field_type, valpy_getitem, convert_value_from_python): Use
12970         gdbpy_ref.
12971
12972 2017-01-10  Tom Tromey  <tom@tromey.com>
12973
12974         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12975         gdbpy_ref.
12976
12977 2017-01-10  Tom Tromey  <tom@tromey.com>
12978
12979         * python/py-prettyprint.c (search_pp_list)
12980         (find_pretty_printer_from_objfiles)
12981         (find_pretty_printer_from_progspace)
12982         (find_pretty_printer_from_gdb, find_pretty_printer)
12983         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12984         gdbpy_ref.
12985
12986 2017-01-10  Tom Tromey  <tom@tromey.com>
12987
12988         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12989
12990 2017-01-10  Tom Tromey  <tom@tromey.com>
12991
12992         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12993         (ltpy_get_all_source_lines): Use gdbpy_ref.
12994
12995 2017-01-10  Tom Tromey  <tom@tromey.com>
12996
12997         * python/py-framefilter.c (extract_sym, extract_value)
12998         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12999         gdbpy_ref.
13000
13001 2017-01-10  Tom Tromey  <tom@tromey.com>
13002
13003         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13004
13005 2017-01-10  Tom Tromey  <tom@tromey.com>
13006
13007         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13008
13009 2017-01-10  Tom Tromey  <tom@tromey.com>
13010
13011         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13012         gdbpy_ref.
13013
13014 2017-01-10  Tom Tromey  <tom@tromey.com>
13015
13016         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13017
13018 2017-01-10  Tom Tromey  <tom@tromey.com>
13019
13020         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13021         (typy_range): Use gdbpy_ref.
13022
13023 2017-01-10  Tom Tromey  <tom@tromey.com>
13024
13025         * python/py-threadevent.c (create_thread_event_object): Use
13026         gdbpy_ref.
13027         * python/py-stopevent.c (create_stop_event_object): Simplify.
13028         (emit_stop_event): Use gdbpy_ref.
13029         * python/py-signalevent.c (create_signal_event_object): Use
13030         gdbpy_ref.
13031         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13032         (emit_new_objfile_event, create_clear_objfiles_event_object)
13033         (emit_clear_objfiles_event): Use gdbpy_ref.
13034         * python/py-infevents.c (create_inferior_call_event_object)
13035         (create_register_changed_event_object)
13036         (create_memory_changed_event_object, emit_inferior_call_event)
13037         (emit_memory_changed_event, emit_register_changed_event): Use
13038         gdbpy_ref.
13039         * python/py-exitedevent.c (create_exited_event_object)
13040         (emit_exited_event): Use gdbpy_ref.
13041         * python/py-event.h (evpy_emit_event): Remove
13042         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13043         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13044         * python/py-continueevent.c (emit_continue_event): Use
13045         gdbpy_ref.
13046         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13047         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13048         gdbpy_ref.
13049         * python/py-bpevent.c (create_breakpoint_event_object): Use
13050         gdbpy_ref.
13051
13052 2017-01-10  Tom Tromey  <tom@tromey.com>
13053
13054         * python/py-ref.h: New file.
13055
13056 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13057
13058         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13059         void.
13060         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13061         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13062         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13063         * ui-out.c (ui_out::redirect): Likewise.
13064         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13065         * cli/cli-logging.c (set_logging_redirect): Update call site of
13066         ui_out::redirect.
13067         (handle_redirections): Likewise.
13068         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13069         * top.c (execute_command_to_string): Likewise.
13070         * utils.c (do_ui_out_redirect_pop): Likewise.
13071
13072 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13073
13074         * stack.c (_initialize_stack): Update "frame" command help message.
13075
13076 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13077
13078         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13079
13080 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13081
13082         * x86-linux-nat.h: Include gdb_proc_service.h.
13083
13084 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13085
13086         * ser-base.h: Include serial.h.
13087
13088 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13089
13090         * ppc-linux-tdep.h: Include ppc-tdep.h.
13091
13092 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13093
13094         * nat/amd64-linux-siginfo.h: Include signal.h.
13095
13096 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13097
13098         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13099
13100 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13101
13102         * mi/mi-parse.h: Include mi-cmds.h.
13103
13104 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13105
13106         * inf-loop.c: Don't include "target.h".
13107         * inf-loop.h: Include it here.
13108
13109 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13110
13111         * dfp.h: Include "dboulest.h" and "expression.h".
13112
13113 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13114
13115         * ax-gdb.h: Include "ax.h".
13116
13117 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13118
13119         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13120         with nat/gdb_ptrace.h.
13121
13122 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13123
13124         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13125         new line.
13126         (mips64_fbsd_sigframe_init): Likewise.
13127
13128 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13129
13130         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13131         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13132
13133 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13134
13135         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13136         * NEWS: Mention new FreeBSD/mips native configuration.
13137         * config/mips/fbsd.mh: New file.
13138         * configure.host: Add mips*-*-freebsd*.
13139         * mips-fbsd-nat.c: New file.
13140
13141 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13142
13143         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13144         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13145         * NEWS: Mention new FreeBSD/mips target.
13146         * configure.tgt: Add mips*-*-freebsd*.
13147         * mips-fbsd-tdep.c: New file.
13148         * mips-fbsd-tdep.h: New file.
13149
13150 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13151
13152         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13153         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13154
13155 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13156
13157         Update copyright year range in all GDB files.
13158
13159 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13160
13161         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13162
13163 For older changes see ChangeLog-2016.
13164 \f
13165 Local Variables:
13166 mode: change-log
13167 left-margin: 8
13168 fill-column: 74
13169 version-control: never
13170 coding: utf-8
13171 End: