Canonicalize conversion operators
[external/binutils.git] / gdb / ChangeLog
1 2017-11-18  Keith Seitz  <keiths@redhat.com>
2
3         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4         types.
5         Add whitespace to front of type name.
6
7 2017-10-18  Keith Seitz  <keiths@redhat.com>
8
9         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
10         DW_AT_accessibility.
11
12 2017-10-18  Yao Qi  <yao.qi@linaro.org>
13
14         * features/tic6x-c62x-linux.c: Remove.
15
16 2017-10-17  Tom Tromey  <tom@tromey.com>
17
18         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
19         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
20         (do_mixed_source_and_assembly): Likewise.
21
22 2017-10-17  Tom Tromey  <tom@tromey.com>
23
24         * regcache.c (regcache::xfer_part): Remove assertion.
25
26 2017-10-17  Pedro Alves  <palves@redhat.com>
27
28         * xml-support.c (xml_fetch_content_from_file): Call
29         unique_ptr::release() instead unique_ptr::get() when passing
30         through xrealloc.
31
32 2017-10-17  Yao Qi  <yao.qi@linaro.org>
33
34         * regcache.c (regcache::xfer_part): Remove parameters read and
35         write, add parameter is_raw.  All callers are updated.
36
37 2017-10-16  Keith Seitz  <keiths@redhat.com>
38
39         * c-typeprint.c (enum access_specifier): Moved here from
40         c_type_print_base.
41         (output_access_specifier): New function.
42         (c_type_print_base): Consider typedefs when assessing
43         whether access labels are needed.
44         Use output_access_specifier as needed.
45         Output access specifier for typedefs, if needed.
46         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
47         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
48         fields.
49         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
50         accessor macros.
51
52 2017-10-16  Tom Tromey  <tom@tromey.com>
53
54         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
55         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
56         * target.c (target_fileio_read_stralloc): Update.
57         * sparc64-tdep.c (adi_is_addr_mapped): Update.
58         * target.h (target_fileio_read_stralloc): Return
59         unique_xmalloc_ptr.
60
61 2017-10-16  Tom Tromey  <tom@tromey.com>
62
63         * xml-syscall.c (xml_init_syscalls_info): Update.
64         * xml-support.c (xinclude_start_include): Update.
65         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
66         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
67         (xml_fetch_content_from_file): Likewise.
68         * osdata.c (get_osdata): Update.
69         * target.h (target_read_stralloc, target_get_osdata): Return
70         unique_xmalloc_ptr.
71         * solib-aix.c (solib_aix_get_library_list): Update.
72         * solib-target.c (solib_target_current_sos): Update.
73         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
74         * xml-tdesc.c (fetch_available_features_from_target): Update.
75         (target_fetch_description_xml): Update.
76         (file_read_description_xml): Update.
77         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
78         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
79         (remote_pid_to_exec_file): Update.
80         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
81         (target_get_osdata): Likewise.
82
83 2017-10-16  Tom Tromey  <tom@tromey.com>
84
85         * remote.c (remote_register_number_and_offset): Use std::vector.
86         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
87         (putpkt_binary): Use gdb::def_vector.
88         (compare_sections_command): Use gdb::byte_vector.
89
90 2017-10-16  Tom Tromey  <tom@tromey.com>
91
92         * ppc-linux-nat.c (hwdebug_insert_point): Use
93         gdb::unique_xmalloc_ptr, XDUP.
94
95 2017-10-16  Tom Tromey  <tom@tromey.com>
96
97         * probe.c (parse_probes): Use std::string.
98         (info_probes_for_ops, enable_probes_command)
99         (disable_probes_command): Remove cleanups.
100
101 2017-10-16  Tom Tromey  <tom@tromey.com>
102
103         * buildsym.c (block_compar): Remove.
104         (end_symtab_get_static_block): Use std::vector.
105
106 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
107
108         * memrange.h (struct mem_range): Define operator< and operator==.
109         (mem_range_s): Remove.
110         (DEF_VEC_O (mem_range_s)): Remove.
111         (normalize_mem_ranges): Change parameter type to std::vector.
112         * memrange.c (compare_mem_ranges): Remove.
113         (normalize_mem_ranges): Change parameter type to std::vector,
114         adjust to vector change.
115         * exec.c (section_table_available_memory): Return vector, remove
116         parameter.
117         (section_table_read_available_memory): Adjust to std::vector
118         change.
119         * remote.c (remote_read_bytes): Adjust to std::vector
120         change.
121         * tracepoint.h (traceframe_available_memory): Change parameter
122         type to std::vector.
123         * tracepoint.c (traceframe_available_memory): Change parameter
124         type to std::vector, adjust.
125         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
126         std::vector change.
127         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
128         unittests/memrange-selftests.c.
129         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
130         * gdb/unittests/memrange-selftests.c: New file.
131
132 2017-10-16  Pedro Alves  <palves@redhat.com>
133
134         * elfread.c (probe_key_free): Rename range-for variable.
135         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
136         (find_probe_by_pc, collect_probes): Rename range-for variable.
137
138 2017-10-16  Yao Qi  <yao.qi@linaro.org>
139
140         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
141         * features/tic6x-c62x.c: Remove.
142         * features/tic6x-c64x-linux.c: Remove.
143         * features/tic6x-c64x.c: Remove.
144         * features/tic6x-c64xp-linux.c: Remove.
145         * features/tic6x-c64xp.c: Remove.
146         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
147         initialize_tdesc_tic6x_*_linux functions.
148         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
149         initialize_tdesc_tic6x_* functions.
150
151 2017-10-16  Yao Qi  <yao.qi@linaro.org>
152
153         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
154         tic6x-c62x.
155         * regformats/tic6x-c62x.dat: Remove.
156         * regformats/tic6x-c64x.dat: Remove.
157         * regformats/tic6x-c64xp.dat: Remove.
158
159 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
160
161         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
162         (the !HAVE_LIBEXPAT version).
163
164 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
165
166         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
167         const.
168
169 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
170
171         * target.h: Include tracepoint.h.
172         (enum trace_find_type): Move to tracepoint.h.
173         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
174         * tracepoint.h: Don't include target.h
175         (enum trace_find_type): Move from target.h.
176         (parse_traceframe_info): Return a unique ptr.
177         * tracepoint.c (current_traceframe_info): Change type to unique
178         ptr.
179         (free_traceframe_info): Remove.
180         (clear_traceframe_info): Don't manually free
181         current_traceframe_info.
182         (free_result): Remove.
183         (parse_traceframe_info): Return a unique ptr.
184         (get_traceframe_info): Adjust to unique ptr.
185         * ctf.c (ctf_traceframe_info): Return a unique ptr.
186         * remote.c (remote_traceframe_info): Return a unique ptr.
187         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
188         ptr.
189         * target-debug.h (target_debug_print_traceframe_info_up): New
190         macro.
191         * target-delegates.c: Regenerate.
192
193 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
194
195         * memrange.h (struct mem_range): Add constructors.
196         * tracepoint.h (struct traceframe_info) <memory>: Change type to
197         std::vector<mem_range>.
198         * tracepoint.c (free_traceframe_info): Don't manually free
199         vector.
200         (traceframe_info_start_memory): Adjust to vector change.
201         (traceframe_available_memory): Likewise.
202         * tracefile-tfile.c (build_traceframe_info): Likewise.
203         * ctf.c (ctf_traceframe_info): Likewise.
204
205 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
206
207         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
208         std::vector<int>.
209         * tracepoint.c (free_traceframe_info): Deallocate with delete.
210         (traceframe_info_start_tvar): Adjust to vector change.
211         (parse_traceframe_info): Allocate with new.
212         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
213         vector change.
214         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
215         change.
216         tfile_traceframe_info): Allocate with new.
217         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
218         change.
219
220 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
221
222         * tracepoint.c (traceframe_info): Rename to...
223         (current_traceframe_info): ...this.
224         (clear_traceframe_info): Adjust.
225         (get_traceframe_info): Adjust.
226
227 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
228
229         * nat/linux-osdata.c: Include algorithm.
230         (compare_processes): Remove.
231         (struct pid_pgid_entry): New struct.
232         (linux_xfer_osdata_processgroups): Use std::vector instead of
233         XNEWVEC.
234
235 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
236
237         * objfiles.h: Don't include symfile.h.
238         (struct partial_symbol): Remove forward-declaration.
239         (struct objfile) <global_psymbols, static_psymbols>: Change type
240         to std::vector<partial_symbol *>.
241         * objfiles.c (objfile::objfile): Don't memset those fields.
242         (objfile::~objfile): Don't free those fields.
243         * psympriv.h (struct psymbol_allocation_list): Remove
244         forward-declaration.
245         (add_psymbol_to_list): Change psymbol_allocation_list parameter
246         to std::vector.
247         (start_psymtab_common): Change parameters to std::vector.
248         * psymtab.c: Include algorithm.
249         (require_partial_symbols): Call shrink_to_fit.
250         (find_pc_sect_psymbol): Adjust to vector change.
251         (match_partial_symbol): Likewise.
252         (lookup_partial_symbol): Likewise.
253         (psym_relocate): Likewise.
254         (dump_psymtab): Likewise.
255         (recursively_search_psymtabs): Likewise.
256         (compare_psymbols): Remove.
257         (sort_pst_symbols): Adjust to vector change.
258         (start_psymtab_common): Likewise.
259         (end_psymtab_common): Likewise.
260         (psymbol_bcache_full): De-constify return value.
261         (add_psymbol_to_bcache): Likewise.
262         (extend_psymbol_list): Remove.
263         (append_psymbol_to_list): Adjust to vector change.
264         (add_psymbol_to_list): Likewise.
265         (init_psymbol_list): Likewise.
266         (maintenance_info_psymtabs): Likewise.
267         (maintenance_check_psymtabs): Likewise.
268         * symfile.h (struct psymbol_allocation_list): Remove.
269         * symfile.c (reread_symbols): Adjust to vector change.
270         * dbxread.c (start_psymtab): Change type of parameters.
271         (dbx_symfile_read): Adjust to vector change.
272         (read_dbx_symtab): Likewise.
273         (start_psymtab): Change type of parameters.
274         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
275         (create_partial_symtab): Likewise.
276         (add_partial_symbol): Likewise.
277         (write_one_signatured_type): Likewise.
278         (recursively_write_psymbols): Likewise.
279         * mdebugread.c (parse_partial_symbols): Likewise.
280         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
281         (scan_xcoff_symtab): Adjust to vector change.
282         (xcoff_initial_scan): Likewise.
283
284 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
285
286         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
287
288 2017-10-13  Yao Qi  <yao.qi@linaro.org>
289
290         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
291         Remove s390x-*-expedite, add s390x-expedite.
292
293 2017-10-13  Yao Qi  <yao.qi@linaro.org>
294
295         * features/s390-gs-linux64.c: Regenerated.
296         * features/s390x-gs-linux64.c: Regenerated.
297
298 2017-10-13  Tom Tromey  <tom@tromey.com>
299
300         * compile/compile-object-run.c (do_module_cleanup): Use delete.
301         * solib.c (update_solib_list, reload_shared_libraries_1): Use
302         delete.
303         * symfile.c (symbol_file_add_with_addrs): Use new.
304         (symbol_file_add_separate): Update comment.
305         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
306         * jit.c (jit_object_close_impl): Use new.
307         (jit_unregister_code): Use delete.
308         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
309         (~objfile): Rename from free_objfile.
310         (free_objfile_separate_debug, do_free_objfile_cleanup)
311         (free_all_objfiles, objfile_purge_solibs): Use delete.
312         * objfiles.h (struct objfile): Add constructor and destructor.
313         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
314         (allocate_objfile, free_objfile): Don't declare.
315         (struct objstats): Add initializers.
316
317 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
318
319         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
320         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
321         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
322         * gdbarch.h: Regenerate.
323         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
324         Adjust comment.
325         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
326         (i386_displaced_step_fixup): Adjust comment.
327         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
328
329 2017-10-12  Tom Tromey  <tom@tromey.com>
330
331         * prologue-value.h (pv_area::store_would_trash): Return bool.
332         (pv_area::find_reg): Likewise.
333         * prologue-value.c (pv_area::store_would_trash): Return bool.
334         (pv_area::find_reg): Likewise.
335
336 2017-10-12  Tom Tromey  <tom@tromey.com>
337
338         * s390-linux-tdep.c (s390_store, s390_load)
339         (s390_check_for_saved, s390_analyze_prologue): Update.
340         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
341         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
342         * prologue-value.h (class pv_area): Move from prologue-value.c.
343         Change names of members.  Add constructor, destructor, member
344         functions.
345         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
346         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
347         (pv_area_fetch, pv_area_scan): Don't declare.
348         * prologue-value.c (struct pv_area::area_entry): Now member of
349         pv_area.
350         (struct pv_area): Move to prologue-value.h.
351         (pv_area::pv_area): Rename from make_pv_area.
352         (pv_area::~pv_area): Rename from free_pv_area.
353         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
354         (clear_entries, find_entry, overlaps, store_would_trash, store)
355         (fetch, find_reg, scan): Now member of pv_area.
356         Remove "area" argument.  Update.
357         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
358         Update.
359         * mn10300-tdep.c (push_reg, check_for_saved)
360         (mn10300_analyze_prologue): Update.
361         * mep-tdep.c (is_arg_spill, check_for_saved)
362         (mep_analyze_prologue): Update.
363         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
364         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
365         (m32c_is_struct_return, m32c_analyze_prologue): Update.
366         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
367         Update.
368         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
369         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
370
371 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
372
373         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
374         * linux-nat.c (linux_nat_delete_thread): New variable.
375         (lwp_free): Invoke linux_nat_delete_thread if set.
376         (linux_nat_set_delete_thread): New function.
377         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
378         thread delete callback.
379         * arm-linux-nat.c (arm_linux_delete_thread): New function.
380         (_initialize_arm_linux_nat): Assign thread delete callback.
381         * s390-linux-nat.c (s390_delete_thread): New function.
382         (_initialize_s390_nat): Assign thread delete callback.
383         * x86-linux-nat.c (x86_linux_add_target): Likewise.
384         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
385         function.
386         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
387         declaration.
388         * nat/x86-linux.c (x86_linux_delete_thread): New function.
389         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
390
391 2017-10-09  Tom Tromey  <tom@tromey.com>
392
393         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
394         std::string.
395         * tui/tui-layout.c (enum tui_status): Use std::string.
396
397 2017-10-11  Tom Tromey  <tom@tromey.com>
398
399         * gdbthread.h (thread_command): Constify.
400         * inferior.h (detach_command): Constify.
401         * top.h (set_history, show_history): Constify.
402         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
403         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
404         * bsd-kvm.c (bsd_kvm_cmd): Constify.
405         * printcmd.c (set_command): Constify.
406         (non_const_set_command): New function.
407         * dcache.c (set_dcache_command, show_dcache_command): Constify.
408         * breakpoint.c (enable_command, disable_command, delete_command)
409         (catch_command, tcatch_command, set_breakpoint_cmd)
410         (show_breakpoint_cmd): Constify.
411         * macrocmd.c (macro_command): Constify.
412         * infcmd.c (unset_command, kill_command, detach_command)
413         (info_proc_cmd): Constify.
414         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
415         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
416         (info_auto_load_cmd): Constify.
417         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
418         (unset_tdesc_cmd): Constify.
419         * ada-lang.c (set_ada_command, show_ada_command)
420         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
421         * guile/guile.c (set_guile_command, show_guile_command)
422         (info_guile_command): Constify.
423         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
424         Constify.
425         * skip.c (skip_command): Constify.
426         * compile/compile.c (_initialize_compile): Constify.
427         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
428         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
429         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
430         (maint_btrace_pt_show_cmd): Constify.
431         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
432         Constify.
433         * python/python.c (user_show_python, user_set_python): Constify.
434         * mips-tdep.c (set_mips_command, show_mips_command)
435         (set_mipsfpu_command): Constify.
436         * record-btrace.c (cmd_record_btrace_start)
437         (cmd_set_record_btrace, cmd_show_record_btrace)
438         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
439         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
440         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
441         Constify.
442         * symfile.c (overlay_command): Constify.
443         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
444         * cli/cli-logging.c (set_logging_command, show_logging_command):
445         Constify.
446         * cli/cli-dump.c (dump_command, append_command)
447         (srec_dump_command, ihex_dump_command, verilog_dump_command)
448         (tekhex_dump_command, binary_dump_command)
449         (binary_append_command): Constify.
450         * cli/cli-decode.c (struct cmd_list_element): Change type of
451         "fun".
452         * cli/cli-cmds.c (info_command, show_command, set_debug)
453         (show_debug): Constify.
454         (show_command): Add non-const overload.
455         * top.c (set_history, show_history): Constify.
456         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
457         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
458         * target.c (target_command): Constify.
459         * sparc64-tdep.c (info_adi_command): Constify.
460         * record-full.c (cmd_record_full_start): Constify.
461         (set_record_full_command): Constify.  Fix typo.
462         (show_record_full_command): Constify.
463         * thread.c (thread_command, thread_apply_command): Constify.
464         * memattr.c (dummy_cmd): Constify.
465         * value.c (function_command): Constify.
466         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
467         * probe.c (info_probes_command): Constify.
468         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
469         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
470         (show_thread_cmd, set_thread_default_cmd)
471         (show_thread_default_cmd): Constify.
472         (check_empty): Constify.
473         * tracepoint.c (tfind_command): Constify.
474         * cp-support.c (maint_cplus_command): Constify.
475         * windows-tdep.c (info_w32_command): Constify.
476         * record.c (cmd_record_start, set_record_command)
477         (show_record_command, info_record_command, cmd_record_goto):
478         Constify.
479         * ravenscar-thread.c (set_ravenscar_command)
480         (show_ravenscar_command): Constify.
481         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
482         Constify.
483         (add_internal_problem_command): Remove casts.
484         * arc-tdep.c (maintenance_print_arc_command): Constify.
485         * valprint.c (set_print, show_print, set_print_raw)
486         (show_print_raw): Constify.
487         * maint.c (maintenance_command, maintenance_info_command)
488         (maintenance_print_command, maintenance_set_cmd)
489         (maintenance_show_cmd, set_per_command_cmd)
490         (show_per_command_cmd, maintenance_check_command): Constify.
491         * language.c (set_check, show_check): Constify.
492         * typeprint.c (show_print_type, set_print_type): Constify.
493         * go32-nat.c (go32_info_dos_command): Constify.
494
495 2017-10-11  Tom Tromey  <tom@tromey.com>
496
497         * breakpoint.c (prepare_re_set_context): Remove.
498         (breakpoint_re_set_one): Update.  Don't use cleanups.
499         (breakpoint_re_set): Use scoped_restore, std::string, and
500         scoped_restore_current_language.
501
502 2017-10-11  Tom Tromey  <tom@tromey.com>
503
504         * breakpoint.c (commands_command_1): Use std::string.
505         (cleanup_executing_breakpoints): Remove.
506         (bpstat_do_actions_1): Use scoped_restore.
507         (bpstat_check_watchpoint): Use std::string.
508         (decode_static_tracepoint_spec): Likewise.
509         (break_range_command): Likewise.
510         (watch_command_1): Likewise.
511         (compare_breakpoints): Change argument types.
512         (clear_command): Use std::vector.
513         (cleanup_executing_breakpoints): Remove.
514         (update_global_location_list): Use unique_xmalloc_ptr.
515         (strace_command): Remove unused declaration.
516
517 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
518
519         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
520         * NEWS: Mention new FreeBSD/arm native configuration.
521         * configure.host: Add arm*-*-freebsd*.
522         * configure.nat: Likewise.
523         * arm-fbsd-nat.c: New file.
524
525 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
526
527         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
528         (ALLDEPFILES): Add arm-fbsd-tdep.c.
529         * NEWS: Mention new FreeBSD/arm target.
530         * configure.tgt: Add arm*-*-freebsd*.
531         * arm-fbsd-tdep.c: New file.
532         * arm-fbsd-tdep.h: New file.
533
534 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
535
536         * linux-tdep.c (linux_make_corefile_notes): Remove call to
537         `gdbarch_elfcore_write_linux_prpsinfo'.
538         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
539         method.
540         (elf_internal_linux_prpsinfo): Remove declaration.
541         * gdbarch.h: Regenerate.
542         * gdbarch.c: Regenerate.
543
544 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
545
546         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
547         `set_gdbarch_elfcore_write_linux_prpsinfo'.
548
549 2017-10-11  Pedro Alves  <palves@redhat.com>
550
551         * breakpoint.c (reattach_breakpoints): Delete.
552         * breakpoint.h (reattach_breakpoints): Delete.
553
554 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
555
556         * symfile.c (registered_sym_fns): Make struct, not typedef.
557         (DEF_VEC_O (registered_sym_fns)): Remove.
558         (symtab_fns): Change type to std::vector.
559         (add_symtab_fns): Adjust.
560         (find_sym_fns): Adjust.
561
562 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
563
564         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
565         * arc-tdep.h (arc_arch_is_em): New function.
566         (arc_arch_is_hs): Likewise.
567
568 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
569
570         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
571         parentheses in the declaration.
572         (macro_lookup_inclusion): Likewise.
573         (macro_lookup_definition): Likewise.
574         * p-lang.h (pascal_builtin_types): Likewise.
575         * tui/tui-data.c (tui_win_list): Likewise.
576         * tui/tui-data.h (tui_win_list): Likewise.
577         * utils.h (make_cleanup_free_section_addr_info): Likewise.
578
579 2017-10-11  Mark Rages  <markrages@gmail.com>
580
581         * target-memory.c (block_boundaries): Fix for block address not
582         aligned on block size.
583
584 2017-10-10  Pedro Alves <palves@redhat.com>
585             Tom Tromey  <tom@tromey.com>
586
587         * breakpoint.c (struct captured_breakpoint_query_args)
588         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
589         (print_breakpoint): New.
590         * breakpoint.h (print_breakpoint): Declare.
591         * common/common-exceptions.h (enum return_reason): Remove
592         references to catch_exceptions.
593         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
594         Delete.
595         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
596         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
597         * gdb.h: Delete.
598         * gdbthread.h (thread_select): Declare.
599         * mi/mi-cmd-break.c: Don't include gdb.h.
600         (breakpoint_notify): Use print_breakpoint.
601         * mi/mi-cmd-catch.c: Don't include gdb.h.
602         * mi/mi-interp.c: Don't include gdb.h.
603         (mi_print_breakpoint_for_event): New.
604         (mi_breakpoint_created, mi_breakpoint_modified): Use
605         mi_print_breakpoint_for_event.
606         * mi/mi-main.c: Don't include gdb.h.
607         (mi_cmd_thread_select): Parse the global thread ID here.  Use
608         thread_select instead of gdb_thread_select.
609         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
610         of using gdb_list_thread_ids.
611         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
612         FILEIO_ENOSYS here.
613         (remote_fileio_request): Use TRY/CATCH instead of
614         catch_exceptions.
615         * symfile-mem.c (struct symbol_file_add_from_memory_args)
616         (symbol_file_add_from_memory_wrapper): Delete.
617         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
618         * thread.c: Don't include gdb.h.
619         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
620         (thread_alive): Use thread_select.
621         (do_captured_thread_select): Delete, parts salvaged as ...
622         (thread_select): ... this new function.
623         (gdb_thread_select): Delete.
624
625 2017-10-10  Pedro Alves  <palves@redhat.com>
626             Tom Tromey  <tom@tromey.com>
627
628         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
629         and reverse logic.
630         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
631         No longer macros.  Instead ...
632         (enum wp_check_result): They're now values of this new
633         enumeration.
634         (watchpoint_check): Change return type to wp_check_result and
635         parameter type to bpstat.
636         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
637         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
638         catch_errors.  Reverse logic of watchpoint_check call.
639         (breakpoint_re_set_one): Now returns void and takes a breakpoint
640         pointer as parameter.
641         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
642         * common/common-exceptions.c (throw_exception_sjlj): Update
643         comments to avoid mentioning catch_errors.
644         * exceptions.c (catch_errors): Delete.
645         * exceptions.h: Update comments to avoid mentioning catch_errors.
646         (catch_errors_ftype, catch_errors): Delete.
647         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
648         (hook_stop_stub): Delete.
649         (restore_selected_frame): Change return type to void, and
650         parameter type to const frame_id &.
651         (restore_infcall_control_state): Use TRY/CATCH instead of
652         catch_errors.
653         * main.c (captured_command_loop): Return void and remove
654         parameter.  Remove references to catch_errors.
655         (captured_main): Use TRY/CATCH instead of catch_errors.
656         * objc-lang.c (objc_submethod_helper_data)
657         (find_objc_msgcall_submethod_helper): Delete.
658         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
659         catch_errors.
660         * record-full.c (record_full_message): Return void.
661         (record_full_message_args, record_full_message_wrapper): Delete.
662         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
663         instead of catch_errors.
664         * solib-aix.c (solib_aix_open_symbol_file_object): Change
665         parameter type to int.
666         * solib-darwin.c (open_symbol_file_object): Ditto.
667         * solib-dsbt.c (open_symbol_file_object): Ditto.
668         * solib-frv.c (open_symbol_file_object): Ditto.
669         * solib-svr4.c (open_symbol_file_object): Ditto.
670         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
671         * solib.c (update_solib_list): Use TRY/CATCH instead of
672         catch_errors.
673         * solist.h (struct target_so_ops) <open_symbol_file_object>:
674         Change type.
675         * symmisc.c (struct print_symbol_args): Remove.
676         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
677         (print_symbol): Change type.
678         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
679         and remove parameters.
680         (catch_errors): New.
681         (get_windows_debug_event): Adjust.
682
683 2017-10-09  Tom Tromey  <tom@tromey.com>
684
685         * mi/mi-main.c (free_splay_tree): Remove.
686         (list_available_thread_groups): Use splay_tree_up.
687         * common/gdb_splay_tree.h: New file.
688
689 2017-10-09  Tom Tromey  <tom@tromey.com>
690
691         * mi/mi-main.c (do_nothing): Remove.
692         (list_available_thread_groups): Update.
693
694 2017-10-09  Pedro Alves  <palves@redhat.com>
695
696         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
697         reading registers when switching context.
698
699 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
700
701         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
702         (fbsd_convert_siginfo): Likewise.
703         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
704
705 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
706
707         * configure.ac (try_guile_versions): Remove guile-2.2.
708         * configure: Regenerate.
709
710 2017-10-09  Tom Tromey  <tom@tromey.com>
711
712         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
713         (COMPILE.pre): Use $(CXX).
714
715 2017-10-09  Pedro Alves  <palves@redhat.com>
716
717         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
718         Use bool.
719         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
720         * cp-support.h (cp_remove_params): Now returns a
721         gdb::unique_xmalloc_ptr.
722         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
723         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
724         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
725         returning a gdb::unique_xmalloc_ptr.
726         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
727         * stack.c (find_frame_funname): Adjust to cp_remove_params
728         returning a gdb::unique_xmalloc_ptr.
729
730 2017-10-08  Tom Tromey  <tom@tromey.com>
731
732         * dwarf2read.c (dwarf2_get_dwz_file): Use
733         gdb::unique_xmalloc_ptr.
734         (find_slot_in_mapped_hash): Likewise.
735         (dwarf2_physname): Likewise.
736         (create_dwo_unit_in_dwp_v1): Use std::string.
737         (create_dwo_unit_in_dwp_v2): Likewise.
738         (lookup_dwo_cutu): Likewise.
739         (inherit_abstract_dies): Use std::vector.
740         (read_array_type): Likewise.
741         (dwarf_decode_macros): Remove unused declaration.
742         (unsigned_int_compar): Remove.
743         (dwarf2_build_psymtabs_hard): Use scoped_restore.
744         (psymtabs_addrmap_cleanup): Remove.
745
746 2017-10-08  Tom Tromey  <tom@tromey.com>
747
748         * frame-unwind.c (frame_unwind_try_unwinder): Update.
749         * frame.h (frame_cleanup_after_sniffer): Declare.
750         (frame_prepare_for_sniffer): Return void.
751         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
752         type of argument.
753         (frame_prepare_for_sniffer): Return void.
754
755 2017-10-08  Tom Tromey  <tom@tromey.com>
756
757         * utils.h (make_cleanup_value_free): Remove.
758         * utils.c (do_value_free, struct cleanup): Remove.
759         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
760         Use gdb_value_up.
761         * value.h (struct value_deleter): New.
762         (gdb_value_up): New typedef.
763
764 2017-10-08  Tom Tromey  <tom@tromey.com>
765
766         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
767         (make_cleanup_free_search_symbols): Remove.
768         (search_symbols): Return std::vector.
769         (symbol_search::compare_search_syms): Now member of
770         symbol_search.  Change arguments.
771         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
772         (symtab_symbol_info, rbreak_command): Update.
773         * symtab.h (struct symbol_search) <next>: Remove.
774         Add constructors.
775         (symbol_search::operator<): New function.
776         (symbol_search::operator==): New function.
777         (search_symbols): Remove std::vector.
778         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
779         (symbol_search::compare_search_syms): Declare.
780
781 2017-10-06  Yao Qi  <yao.qi@linaro.org>
782
783         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
784         arch/aarch64-insn.o.
785         Remove one rule.
786         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
787
788 2017-10-06  Yao Qi  <yao.qi@linaro.org>
789
790         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
791         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
792         arch/arm-linux.o respectively.
793         * configure.tgt: Likewise.
794
795 2017-10-06  Yao Qi  <yao.qi@linaro.org>
796
797         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
798         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
799
800 2017-10-06  Pedro Alves  <palves@redhat.com>
801
802         * windows-nat.c: Include <algorithm>.
803
804 2017-10-06  Yao Qi  <yao.qi@linaro.org>
805
806         * configure.tgt (i386_tobjs): New variable.
807         (amd64_tobjs): New variable.
808         Set $cpu_obs and $os_obs.
809
810 2017-10-06  Yao Qi  <yao.qi@linaro.org>
811
812         * Makefile.in (CONFIG_SRC_SUBDIR): New.
813         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
814         (clean): Remove object files and dependency files.
815         (distclean): Remove the directory.
816         * configure.ac: Invoke AC_CONFIG_COMMANDS.
817         * configure: Re-generated.
818         * configure.tgt: Replace amd64.o with arch/amd64.o.
819
820 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
821
822         PR build/22188
823         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
824         and SETEND.
825
826 2017-10-05  Pedro Alves  <palves@redhat.com>
827
828         * linux-nat.c (linux_child_follow_fork): When following the parent
829         and detaching the child, consult the parent thread's architecture
830         instead of the child's.
831
832 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
833
834         * ax.h: Do not include "doublest.h".
835         (union agent_val): Remove.
836
837 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
838
839         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
840         (decimal_to_string): Return std::string object.
841         (decimal_from_string): Accept std::string object.  Return bool.
842         (decimal_from_integral, decimal_from_doublest): Remove.
843         (decimal_from_longest): Add prototype.
844         (decimal_from_ulongest): Likewise.
845         (decimal_to_longest): Likewise.
846         (decimal_from_doublest): Likewise.
847         * dfp.c: Do not include "gdbtypes.h" or "value.h".
848         (MAX_DECIMAL_STRING): Move here.
849         (decimal_to_string): Return std::string object.
850         (decimal_from_string): Accept std::string object.  Return bool.
851         (decimal_from_integral): Remove, replace by ...
852         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
853         (decimal_to_longest): New function.
854         (decimal_from_floating): Remove, replace by ...
855         (decimal_from_doublest): ... this new function.
856         (decimal_to_doublest): Update to new decimal_to_string interface.
857
858         * value.c (unpack_long): Use decimal_to_longest.
859         * valops.c (value_cast): Use decimal_from_doublest instead of
860         decimal_from_floating.  Use decimal_from_[u]longest isntead of
861         decimal_from_integral.
862         * valarith.c (value_args_as_decimal): Likewise.
863         * valprint.c (print_decimal_floating): Update to new
864         decimal_to_string interface.
865         * printcmd.c (printf_decfloat): Likewise.
866         * c-exp.y (parse_number): Update to new decimal_from_string interface.
867
868 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
869
870         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
871         * gdbtypes.c: Include "floatformat.h".
872         * value.c: Likewise.
873         * m68k-tdep.c: Likewise.
874
875         * findvar.c: Do not include "floatformat.h".
876         * amd64-darwin-tdep.c: Likewise.
877         * arm-linux-tdep.c: Likewise.
878         * i386-darwin-tdep.c: Likewise.
879         * i387-tdep.c: Likewise.
880         * m68k-linux-tdep.c: Likewise.
881         * mep-tdep.c: Likewise.
882         * mips-tdep.c: Likewise.
883         * nios2-tdep.c: Likewise.
884         * s390-linux-tdep.c: Likewise.
885         * sparc-obsd-tdep.c: Likewise.
886         * sparc-tdep.c: Likewise.
887         * sparc64-tdep.c: Likewise.
888         * spu-tdep.c: Likewise.
889         * tic6x-tdep.c: Likewise.
890         * tilegx-tdep.c: Likewise.
891         * vax-tdep.c: Likewise.
892         * xstormy16-tdep.c: Likewise.
893         * xtensa-tdep.c: Likewise.
894
895         * top.c: Do not include "doublest.h".
896         * aarch64-tdep.c: Likewise.
897         * alpha-tdep.c: Likewise.
898         * arm-linux-tdep.c: Likewise.
899         * m68k-linux-tdep.c: Likewise.
900         * tilegx-tdep.c: Likewise.
901         * xstormy16-tdep.c: Likewise.
902
903 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
904
905         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
906         (mipsn32_fbsd_sigframe): Define.
907         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
908         for FreeBSD/mipsn32.
909
910 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
911
912         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
913         AT_HWCAP.
914
915 2017-10-05  Tristan Gingold  <tgingold@free.fr>
916
917         * MAINTAINERS (Misc): Update my email address.
918
919 2017-10-04  Pedro Alves  <palves@redhat.com>
920
921         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
922         it instead of target_gdbarch.
923         (get_remote_state, get_remote_packet_size): Adjust
924         get_remote_arch_state calls, passing down target_gdbarch
925         explicitly.
926         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
927         'gdbarch' and use it instead of target_gdbarch.
928         (get_memory_packet_size): Adjust get_remote_arch_state calls,
929         passing down target_gdbarch explicitly.
930         (struct stop_reply) <arch>: New field.
931         (remote_parse_stop_reply): Use the stopped thread's architecture,
932         not the current inferior's.  Save the architecture in the
933         stop_reply.
934         (process_stop_reply): Use the stop reply's architecture.
935         (process_g_packet, remote_fetch_registers)
936         (remote_prepare_to_store, store_registers_using_G)
937         (remote_store_registers): Adjust get_remote_arch_state calls,
938         using the regcache's architecture.
939         (remote_get_trace_status): Adjust get_remote_arch_state calls,
940         passing down target_gdbarch explicitly.
941         * spu-multiarch.c (spu_thread_architecture): Defer to the target
942         beneath instead of calling target_gdbarch.
943         * target.c (default_thread_architecture): Use the specified
944         inferior's architecture, instead of the current inferior's
945         architecture (via target_gdbarch).
946
947 2017-10-04  Pedro Alves  <palves@redhat.com>
948
949         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
950         case.
951         (regcache_print): Handle !target_has_registers here instead.
952
953 2017-10-04  Pedro Alves  <palves@redhat.com>
954
955         * frame.c (create_test_frame): Delete.
956         * frame.h (create_test_frame): Delete.
957         * gdbarch-selftests.c: Include gdbthread.h and target.h.
958         (class regcache_test): Delete.
959         (test_target_has_registers, test_target_has_stack)
960         (test_target_has_memory, test_target_prepare_to_store)
961         (test_target_store_registers): New functions.
962         (test_target_ops): New class.
963         (register_to_value_test): Error out if there's already a
964         process_stratum (or higher) target pushed.  Create a fuller mock
965         environment, with mock target_ops, inferior, address space, thread
966         and inferior_ptid.
967         * progspace.c (struct address_space): Move to ...
968         * progspace.h (struct address_space): ... here.
969         * regcache.h (regcache::~regcache, regcache::raw_write)
970         [GDB_SELF_TEST]: No longer virtual.
971
972 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
973
974         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
975
976 2017-10-04  Pedro Alves  <palves@redhat.com>
977
978         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
979         out of 'between TRY and CATCH'.
980
981 2017-10-04  Pedro Alves  <palves@redhat.com>
982
983         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
984         * common/common-exceptions.h (TRY): Open an outermost scope.
985         Expand intro comment.
986         (CATCH): Reindent.
987         (END_CATCH): Close the outermost scope.
988         * completer.c (complete_line_internal): Add missing END_CATCH.
989
990 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
991
992         * NEWS (Changes since GDB 8.0): Add entry about new
993         'set-cwd-on-gdbserver' feature.
994         (New remote packets): Add entry for QSetWorkingDir.
995         * common/common-inferior.h (set_inferior_cwd): New prototype.
996         * infcmd.c (set_inferior_cwd): Remove "static".
997         (show_cwd_command): Expand text to include remote debugging.
998         * remote.c: Add PACKET_QSetWorkingDir.
999         (remote_protocol_features) <QSetWorkingDir>: New entry for
1000         PACKET_QSetWorkingDir.
1001         (extended_remote_set_inferior_cwd): New function.
1002         (extended_remote_create_inferior): Call
1003         "extended_remote_set_inferior_cwd".
1004         (_initialize_remote): Call "add_packet_config_cmd" for
1005         QSetWorkingDir.
1006
1007 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1008
1009         * NEWS (New commands): Mention "set/show cwd".
1010         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1011         "cd" command's help text.
1012         * common/common-inferior.h (get_inferior_cwd): New prototype.
1013         * infcmd.c (inferior_cwd_scratch): New global variable.
1014         (set_inferior_cwd): New function.
1015         (get_inferior_cwd): Likewise.
1016         (set_cwd_command): Likewise.
1017         (show_cwd_command): Likewise.
1018         (_initialize_infcmd): Add "set/show cwd" commands.
1019         * inferior.h (class inferior) <cwd>: New field.
1020         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1021         (fork_inferior): Change inferior's cwd before its execution.
1022         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1023         to CreateProcess.
1024
1025 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1026
1027         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1028         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1029         (COMMON_OBS): Add gdb_tilde_expand.o.
1030         * common/gdb_tilde_expand.c: New file.
1031         * common/gdb_tilde_expand.h: Likewise.
1032
1033 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1034
1035         * gdbarch.sh (objfile): Remove duplicate declaration.
1036         * gdbarch.h: Regenerate.
1037
1038 2017-10-03  Tom Tromey  <tom@tromey.com>
1039
1040         * utils.c (internal_vproblem): Use string_vprintf.
1041
1042 2017-10-03  Tom Tromey  <tom@tromey.com>
1043
1044         * printcmd.c (info_symbol_command): Use std::string.
1045
1046 2017-10-03  Tom Tromey  <tom@tromey.com>
1047
1048         * top.c (gdb_safe_append_history): Use std::string.
1049
1050 2017-10-03  Tom Tromey  <tom@tromey.com>
1051
1052         * event-top.c (stdin_event_handler): Update.
1053         * main.c (captured_main_1): Update.
1054         * top.h (make_delete_ui_cleanup): Remove.
1055         (struct ui): Add constructor and destructor.
1056         (new_ui, delete_ui): Remove.
1057         * top.c (make_delete_ui_cleanup): Remove.
1058         (new_ui_command): Use std::unique_ptr.
1059         (delete_ui_cleanup): Remove.
1060         (ui::ui): Rename from new_ui.  Update.
1061         (free_ui): Remove.
1062         (ui::~ui): Rename from delete_ui.  Update.
1063
1064 2017-10-03  Tom Tromey  <tom@tromey.com>
1065
1066         * symfile.c (load_progress): Use gdb::byte_vector.
1067
1068 2017-10-03  Tom Tromey  <tom@tromey.com>
1069
1070         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1071         declaration.
1072         * printcmd.c (x_command): Remove unused declaration.
1073         * symfile.c (symbol_file_command): Remove unused declaration.
1074
1075 2017-10-03  Tom Tromey  <tom@tromey.com>
1076
1077         * utils.c (internal_vproblem): Use std::string.
1078         (defaulted_query): Likewise.
1079
1080 2017-10-03  Tom Tromey  <tom@tromey.com>
1081
1082         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1083         * top.c (execute_command_to_string): Update.
1084         * utils.c (make_cleanup_restore_page_info): Remove.
1085         (do_restore_page_info_cleanup): Remove.
1086         (set_batch_flag_and_restore_page_info):
1087         New.
1088         (make_cleanup_restore_page_info): Remove.
1089         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1090         (~set_batch_flag_and_restore_page_info): New
1091         (make_cleanup_restore_uinteger): Remove.
1092         (make_cleanup_restore_integer): Remove.
1093         (struct restore_integer_closure): Remove.
1094         (restore_integer): Remove.
1095         * utils.h (struct set_batch_flag_and_restore_page_info): New
1096         class.
1097         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1098         (make_cleanup_restore_page_info): Remove.
1099         (make_cleanup_restore_uinteger) Remove.
1100         (make_cleanup_restore_integer) Remove.
1101
1102 2017-10-03  Tom Tromey  <tom@tromey.com>
1103
1104         * record-full.h (record_full_gdb_operation_disable_set): Return
1105         scoped_restore_tmpl<int>.
1106         * infrun.c (adjust_pc_after_break): Update.
1107         (handle_signal_stop): Update.
1108         * record-full.c (record_full_gdb_operation_disable_set): Return
1109         scoped_restore_tmpl<int>.
1110         (record_full_wait_1, record_full_insert_breakpoint)
1111         (record_full_remove_breakpoint, record_full_save)
1112         (record_full_goto_insn): Update.
1113
1114 2017-10-02  Tom Tromey  <tom@tromey.com>
1115
1116         PR rust/22236:
1117         * rust-lang.c (rust_val_print_str): New function.
1118         (val_print_struct): Call it.
1119         (rust_subscript): Preserve name of slice type.
1120
1121 2017-10-02  Tom Tromey  <tom@tromey.com>
1122
1123         * rust-lang.c (rust_subscript): Handle slices in
1124         EVAL_AVOID_SIDE_EFFECTS case.
1125
1126 2017-10-02  Tom Tromey  <tom@tromey.com>
1127
1128         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1129
1130 2017-10-02  Tom Tromey  <tom@tromey.com>
1131
1132         * rust-lang.h (rust_slice_type): Add "extern".
1133
1134 2017-10-02  Tom Tromey  <tom@tromey.com>
1135             Pedro Alves  <palves@redhat.com>
1136
1137         * ada-lang.h (ada_exc_info::operator<): Make const.
1138         (ada_exc_info::operator==): Make const.
1139         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1140         Make const.
1141
1142 2017-09-29  Tom Tromey  <tom@tromey.com>
1143
1144         * target.c (read_whatever_is_readable): Change type of "result".
1145         Update.
1146         (free_memory_read_result_vector): Remove.
1147         (read_memory_robust): Change return type.  Update.
1148         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1149         bin2hex, std::string.
1150         * target.h (memory_read_result_s): Remove typedef.
1151         (free_memory_read_result_vector): Remove.
1152         (read_memory_robust): Return std::vector.
1153
1154 2017-09-29  Tom Tromey  <tom@tromey.com>
1155
1156         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1157
1158 2017-09-29  Tom Tromey  <tom@tromey.com>
1159
1160         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1161         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1162         operator< and operator==.
1163         (ada_exceptions_list): Return a std::vector.
1164         * ada-lang.c (ada_exc_info::operator<): Rename from
1165         compare_ada_exception_info.
1166         (ada_exc_info::operator==): New.
1167         (sort_remove_dups_ada_exceptions_list): Change type of
1168         "exceptions".
1169         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1170         (ada_add_global_exceptions): Likewise.
1171         (ada_exceptions_list_1): Return a std::vector.
1172         (ada_exceptions_list): Likewise.
1173
1174 2017-09-29  Tom Tromey  <tom@tromey.com>
1175
1176         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1177         'std::set *'.
1178         (print_one_inferior): Update.
1179         (free_vector_of_ints): Remove.
1180         (list_available_thread_groups): Change "ids" to std::set.
1181         (mi_cmd_list_thread_groups): Update.
1182         (struct collect_cores_data) <core>: Now a std::set.
1183         (collect_cores): Update.
1184         (unique): Remove.
1185         (print_one_inferior): Update.
1186
1187 2017-09-29  Tom Tromey  <tom@tromey.com>
1188
1189         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1190         (mi_execute_async_cli_command): Likewise.
1191         (mi_cmd_trace_frame_collected): Use field_fmt.
1192
1193 2017-09-29  Tom Tromey  <tom@tromey.com>
1194
1195         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1196         gdb::byte_vector.
1197
1198 2017-09-29  Tom Tromey  <tom@tromey.com>
1199
1200         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1201
1202 2017-09-29  Tom Tromey  <tom@tromey.com>
1203
1204         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1205
1206 2017-09-29  Tom Tromey  <tom@tromey.com>
1207
1208         * varobj.h (varobj_gen_name): Return std::string.
1209         * varobj.c (varobj_gen_name): Return std::string.
1210         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1211         (mi_cmd_var_delete): Don't copy "name".
1212
1213 2017-09-29  Tom Tromey  <tom@tromey.com>
1214
1215         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1216         (mi_cmd_break_insert_1): Update.
1217
1218 2017-09-29  Tom Tromey  <tom@tromey.com>
1219
1220         * target.h (make_scoped_defer_target_commit_resume): Update.
1221         * target.c (make_scoped_defer_target_commit_resume): Rename from
1222         make_cleanup_defer_target_commit_resume.  Return a
1223         scoped_restore.
1224         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1225
1226 2017-09-29  Tom Tromey  <tom@tromey.com>
1227
1228         * main.c (captured_main_1): Remove unused declaration.
1229         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1230
1231 2017-09-29  Tom Tromey  <tom@tromey.com>
1232
1233         * symtab.c (search_symbols): Remove unused outer cleanup.
1234         (make_source_files_completion_list): Remove unused declaration.
1235
1236 2017-09-29  Tom Tromey  <tom@tromey.com>
1237
1238         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1239
1240 2017-09-29  Tom Tromey  <tom@tromey.com>
1241
1242         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1243         gdb::byte_vector.
1244
1245 2017-09-29  Tom Tromey  <tom@tromey.com>
1246
1247         * complaints.c (vcomplaint): Use std::string.
1248
1249 2017-09-29  Tom Tromey  <tom@tromey.com>
1250
1251         * tracepoint.c (trace_variable_command): Use std::string.
1252         (encode_actions_1): Remove unused declarations.
1253         (create_tsv_from_upload): Use std::string.
1254
1255 2017-09-29  Tom Tromey  <tom@tromey.com>
1256
1257         * cp-support.c (gdb_demangle): Use std::string.
1258
1259 2017-09-29  Tom Tromey  <tom@tromey.com>
1260
1261         * stack.c (parse_frame_specification): Use std::string
1262         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1263
1264 2017-09-29  Tom Tromey  <tom@tromey.com>
1265
1266         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1267
1268 2017-09-29  Tom Tromey  <tom@tromey.com>
1269
1270         * utils.c (vfprintf_maybe_filtered): Use std::string.
1271         (vfprintf_unfiltered): Likewise.
1272
1273 2017-09-29  Tom Tromey  <tom@tromey.com>
1274
1275         * event-top.c (top_level_prompt): Return std::string.
1276         (display_gdb_prompt): Update.
1277
1278 2017-09-29  Tom Tromey  <tom@tromey.com>
1279
1280         * unittests/common-utils-selftests.c (format): New function.
1281         (string_vprintf_tests): New function.
1282         (_initialize_common_utils_selftests): Register new tests.
1283         * common/common-utils.c (string_vprintf): New function.
1284         * common/common-utils.h (string_vprintf): Declare.
1285
1286 2017-09-29  Pedro Alves  <palves@redhat.com>
1287
1288         * common/rsp-low.c (unpack_varlen_hex): Constify.
1289         * common/rsp-low.h (unpack_varlen_hex): Constify.
1290         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1291         Constify.
1292         * remote.c (remote_set_permissions, read_ptid)
1293         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1294         (remote_static_tracepoint_marker_at)
1295         (remote_static_tracepoint_markers_by_strid)
1296         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1297         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1298         (parse_tracepoint_definition, parse_tsv_definition)
1299         (parse_static_tracepoint_marker_definition): Constify.
1300         * tracepoint.h (parse_static_tracepoint_marker_definition)
1301         (parse_trace_status, parse_tracepoint_status)
1302         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1303
1304 2017-09-29  Pedro Alves  <palves@redhat.com>
1305
1306         * remote.c (target_buf, target_buf_size): Delete.
1307         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1308         Use the connection's packet buffer instead.
1309         All callers adjusted.
1310         (_initialize_remote): Remove references to target_buf and
1311         target_buf_size.
1312
1313 2017-09-28  Pedro Alves  <palves@redhat.com>
1314
1315         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1316         unittests/common-utils-selftests.c.
1317         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1318         (COMMON_OBS): Remove utils-selftests.o.
1319         * utils-selftests.c: Move to ...
1320         * unittests/common-utils-selftests.c: ... here and rename self
1321         test to "string_printf".
1322
1323 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1324
1325         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1326         having NULL cus or tus.
1327
1328 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1329
1330         * arm-tdep.c: (convert_from_extended): Remove.
1331         (convert_to_extended): Likewise.
1332         (arm_extract_return_value): Use convert_typed_floating.
1333         (arm_store_return_value): Likewise.
1334
1335         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1336         * sh-tdep.c: Do not include "floatformat.h".
1337         (sh_littlebyte_bigword_type): New function.
1338         (sh_register_convert_to_virtual): Use convert_typed_floating.
1339         (sh_register_convert_to_raw): Likewise.
1340         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1341         (sh64_littlebyte_bigword_type): New function.
1342         (sh64_extract_return_value): Use convert_typed_floating.
1343         (sh64_register_convert_to_virtual): Likewise.
1344         (sh64_register_convert_to_raw): Likewise.
1345
1346 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1347
1348         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1349         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1350
1351         * gdbtypes.h (union type_specific): Make field floatformat hold
1352         just a single struct floatformat, not an array.
1353         (floatformat_from_type): Move here.
1354         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1355         changed TYPE_FLOATFORMAT definition.
1356         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1357         (recursive_dump_type): Likewise.
1358         (init_float_type): Install correct floatformat for byte order.
1359         (arch_float_type): Likewise.
1360
1361 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1362
1363         * gdbtypes.c (init_type): Change incoming argument from
1364         length-in-bytes to length-in-bits.  Assert length is a
1365         multiple of TARGET_CHAR_BITS.
1366         (arch_type, arch_flags_type): Likewise.
1367         (init_integer_type): Update call to init_type.
1368         (init_character_type): Likewise.
1369         (init_boolean_type): Likewise.
1370         (init_float_type): Likewise.
1371         (init_decfloat_type): Likewise.
1372         (init_complex_type): Likewise.
1373         (init_pointer_type): Likewise.
1374         (objfile_type): Likewise.
1375         (arch_integer_type): Update call to arch_type.
1376         (arch_character_type): Likewise.
1377         (arch_boolean_type): Likewise.
1378         (arch_float_type): Likewise.
1379         (arch_decfloat_type): Likewise.
1380         (arch_complex_type): Likewise.
1381         (arch_pointer_type): Likewise.
1382         (gdbtypes_post_init): Likewise.
1383
1384         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1385         (read_base_type): Likewise.
1386         * mdebugread.c (basic_type): Likewise.
1387         * stabsread.c (dbx_init_float_type): Likewise.
1388         (rs6000_builtin_type): Likewise.
1389         (read_range_type): Likewise.  Also, fix call to init_integer_type
1390         with erroneous length argument.
1391
1392         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1393         * d-lang.c (build_d_types): Likewise.
1394         * f-lang.c (build_fortran_types): Likewise.
1395         * go-lang.c (build_go_types): Likewise.
1396         * opencl-lang.c (build_opencl_types): Likewise.
1397         * jit.c (finalize_symtab): Likewise.
1398         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1399         (build_std_type_info_type): Likewise.
1400         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1401         update call to arch_flags_type.
1402
1403         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1404         arch_type.
1405         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1406         * windows-tdep.c (windows_get_tlb_type): Likewise.
1407
1408         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1409         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1410         * m32c-tdep.c (make_types): Likewise.
1411         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1412         (rl78_psw_type): Update call to arch_flags_type.
1413         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1414         * rx-tdep.c (rx_psw_type): Likewise.
1415         (rx_fpsw_type): Likewise.
1416         * sparc-tdep.c (sparc_psr_type): Likewise.
1417         (sparc_fsr_type): Likewise.
1418         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1419         (sparc64_ccr_type): Likewise.
1420         (sparc64_fsr_type): Likewise.
1421         (sparc64_fprs_type): Likewise.
1422
1423 2017-09-27  Tom Tromey  <tom@tromey.com>
1424
1425         * findcmd.c (find_command): Constify.
1426
1427 2017-09-27  Tom Tromey  <tom@tromey.com>
1428
1429         * ada-tasks.c (task_command_1, task_command): Constify.
1430
1431 2017-09-27  Tom Tromey  <tom@tromey.com>
1432
1433         * symtab.c (maintenance_print_symbol_cache)
1434         (maintenance_flush_symbol_cache)
1435         (maintenance_print_symbol_cache_statistics): Constify.
1436
1437 2017-09-27  Tom Tromey  <tom@tromey.com>
1438
1439         * inferior.c (detach_inferior_command, kill_inferior_command)
1440         (inferior_command): Constify.
1441
1442 2017-09-27  Tom Tromey  <tom@tromey.com>
1443
1444         * regcache.c (regcache_print, maintenance_print_registers)
1445         (maintenance_print_raw_registers)
1446         (maintenance_print_cooked_registers)
1447         (maintenance_print_register_groups)
1448         (maintenance_print_remote_registers): Constify.
1449
1450 2017-09-27  Tom Tromey  <tom@tromey.com>
1451
1452         * printcmd.c (map_display_numbers, undisplay_command)
1453         (enable_disable_display_command, enable_display_command)
1454         (disable_display_command): Constify.
1455
1456 2017-09-27  Tom Tromey  <tom@tromey.com>
1457
1458         * breakpoint.h (delete_command): Don't declare.
1459         * breakpoint.c (delete_command, enable_once_command)
1460         (enable_count_command, enable_delete_command, breakpoint_1)
1461         (maintenance_info_breakpoints, stopin_command, stopat_command)
1462         (delete_command, delete_trace_command, save_breakpoints)
1463         (save_breakpoints_command, save_tracepoints_command): Constify.
1464
1465 2017-09-27  Tom Tromey  <tom@tromey.com>
1466
1467         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1468         (skip_ws, extract_identifier, macro_define_command)
1469         (macro_undef_command, macro_list_command): Constify.
1470
1471 2017-09-27  Tom Tromey  <tom@tromey.com>
1472
1473         * infcmd.c (environment_info, set_environment_command)
1474         (unset_environment_command, path_info, info_proc_cmd_1)
1475         (info_proc_cmd_mappings, info_proc_cmd_stat)
1476         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1477         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1478
1479 2017-09-27  Tom Tromey  <tom@tromey.com>
1480
1481         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1482         Constify.
1483
1484 2017-09-27  Tom Tromey  <tom@tromey.com>
1485
1486         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1487
1488 2017-09-27  Tom Tromey  <tom@tromey.com>
1489
1490         * demangle.c (demangle_command): Constify.
1491
1492 2017-09-27  Tom Tromey  <tom@tromey.com>
1493
1494         * progspace.c (maintenance_info_program_spaces_command):
1495         Constify.
1496
1497 2017-09-27  Tom Tromey  <tom@tromey.com>
1498
1499         * compile/compile.c (check_raw_argument, compile_file_command)
1500         (compile_code_command, compile_print_command): Constify.
1501
1502 2017-09-27  Tom Tromey  <tom@tromey.com>
1503
1504         * reggroups.c (maintenance_print_reggroups): Constify.
1505
1506 2017-09-27  Tom Tromey  <tom@tromey.com>
1507
1508         * dwarf2read.c (save_gdb_index_command): Constify.
1509
1510 2017-09-27  Tom Tromey  <tom@tromey.com>
1511
1512         * stap-probe.c (info_probes_stap_command): Constify.
1513
1514 2017-09-27  Tom Tromey  <tom@tromey.com>
1515
1516         * fork-child.c (unset_exec_wrapper_command): Constify.
1517
1518 2017-09-27  Tom Tromey  <tom@tromey.com>
1519
1520         * btrace.c (get_uint, get_context_size, no_chunk)
1521         (maint_btrace_packet_history_cmd)
1522         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1523         (maint_info_btrace_cmd): Constify.
1524
1525 2017-09-27  Tom Tromey  <tom@tromey.com>
1526
1527         * reverse.c (delete_bookmark_command): Constify.
1528
1529 2017-09-27  Tom Tromey  <tom@tromey.com>
1530
1531         * remote.c (set_memory_packet_size)
1532         (set_memory_write_packet_size, show_memory_write_packet_size)
1533         (set_memory_read_packet_size, show_memory_read_packet_size)
1534         (compare_sections_command, packet_command, remote_put_command)
1535         (remote_get_command, remote_delete_command): Constify.
1536
1537 2017-09-27  Tom Tromey  <tom@tromey.com>
1538
1539         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1540         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1541         (set_mipsfpu_auto_command): Constify.
1542
1543 2017-09-27  Tom Tromey  <tom@tromey.com>
1544
1545         * cli/cli-cmds.h (cd_command): Constify.
1546         * cli/cli-cmds.c (cd_command): Constify.
1547
1548 2017-09-27  Tom Tromey  <tom@tromey.com>
1549
1550         * thread.c (thread_name_command, thread_find_command): Constify.
1551
1552 2017-09-27  Tom Tromey  <tom@tromey.com>
1553
1554         * probe.c (enable_probes_command, disable_probes_command):
1555         Constify.
1556
1557 2017-09-27  Tom Tromey  <tom@tromey.com>
1558
1559         * symfile.c (symbol_file_command): Constify.
1560         * gdbcore.h (deprecated_file_changed_hook): Constify.
1561         * exec.c (deprecated_file_changed_hook, exec_file_command)
1562         (file_command): Constify.
1563         * defs.h (symbol_file_command): Constify.
1564
1565 2017-09-27  Tom Tromey  <tom@tromey.com>
1566
1567         * remote-fileio.c (set_system_call_allowed)
1568         (show_system_call_allowed): Constify.
1569
1570 2017-09-27  Tom Tromey  <tom@tromey.com>
1571
1572         * tracepoint.c (delete_trace_variable_command)
1573         (tfind_end_command, tfind_start_command, tfind_pc_command)
1574         (tfind_tracepoint_command, tfind_line_command)
1575         (tfind_range_command, tfind_outside_command): Constify.
1576
1577 2017-09-27  Tom Tromey  <tom@tromey.com>
1578
1579         * ax-gdb.c (maint_agent_printf_command, agent_command)
1580         (agent_eval_command): Constify.
1581
1582 2017-09-27  Tom Tromey  <tom@tromey.com>
1583
1584         * tracepoint.c (info_scope_command): Constify.
1585         * python/python.c (gdbpy_decode_line): Constify.
1586         * python/py-breakpoint.c (bppy_init): Constify.
1587         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1588         * location.h: (new_linespec_location)
1589         (string_to_event_location_basic, string_to_event_location):
1590         Constify.
1591         * location.c (new_linespec_location)
1592         (string_to_event_location_basic, string_to_event_location):
1593         Constify.
1594         * linespec.h (decode_line_with_current_source)
1595         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1596         * linespec.c (linespec_lex_to_end)
1597         (decode_line_with_current_source)
1598         (decode_line_with_last_displayed): Constify.
1599         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1600         Constify.
1601         * cli/cli-cmds.c (edit_command, list_command): Constify.
1602         * breakpoint.h (until_break_command, watch_command_wrapper)
1603         (awatch_command_wrapper, rwatch_command_wrapper)
1604         (init_ada_exception_breakpoint): Constify.
1605         * breakpoint.c (break_command_1, dprintf_command)
1606         (break_range_command, watch_command_wrapper)
1607         (rwatch_command_wrapper, awatch_command_wrapper)
1608         (until_break_command, init_ada_exception_breakpoint)
1609         (strace_marker_create_sals_from_location, trace_command)
1610         (ftrace_command, strace_command, struct tracepoint): Constify.
1611         * ax-gdb.c (agent_command_1): Constify.
1612         * ada-lang.c (ada_exception_sal): Constify.
1613
1614 2017-09-27  Tom Tromey  <tom@tromey.com>
1615
1616         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1617         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1618         (get_context_size, no_chunk, get_insn_history_modifiers)
1619         (cmd_record_insn_history, get_call_history_modifiers)
1620         (cmd_record_call_history): Constify.
1621
1622 2017-09-27  Tom Tromey  <tom@tromey.com>
1623
1624         * source.c (show_substitute_path_command)
1625         (unset_substitute_path_command, set_substitute_path_command):
1626         Constify.
1627
1628 2017-09-27  Tom Tromey  <tom@tromey.com>
1629
1630         * typeprint.c (maintenance_print_type): Constify.
1631         * maint.c (maintenance_dump_me, maintenance_demangle)
1632         (maintenance_time_display, maintenance_info_sections)
1633         (maintenance_print_statistics, maintenance_deprecate)
1634         (maintenance_undeprecate): Constify.
1635         (maintenance_do_deprecate): Constify.  Use std::string.
1636         (maintenance_selftest): Constify.
1637         * gdbtypes.h (maintenance_print_type): Constify.
1638
1639 2017-09-27  Tom Tromey  <tom@tromey.com>
1640
1641         * hppa-tdep.c (unwind_command): Constify.
1642
1643 2017-09-27  Tom Tromey  <tom@tromey.com>
1644
1645         * target-descriptions.c (unset_tdesc_filename_cmd)
1646         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1647         Constify.
1648
1649 2017-09-27  Tom Tromey  <tom@tromey.com>
1650
1651         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1652
1653 2017-09-27  Tom Tromey  <tom@tromey.com>
1654
1655         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1656
1657 2017-09-27  Tom Tromey  <tom@tromey.com>
1658
1659         * tui/tui-regs.c (tui_reg_command): Constify.
1660
1661 2017-09-27  Tom Tromey  <tom@tromey.com>
1662
1663         * skip.c (skip_file_command, skip_function_command)
1664         (skip_enable_command, skip_disable_command, skip_delete_command):
1665         Constify.
1666
1667 2017-09-27  Tom Tromey  <tom@tromey.com>
1668
1669         * record-btrace.c (cmd_record_btrace_bts_start)
1670         (cmd_record_btrace_pt_start): Constify.
1671
1672 2017-09-27  Tom Tromey  <tom@tromey.com>
1673
1674         * symmisc.c (maintenance_print_symbols)
1675         (maintenance_print_msymbols, maintenance_print_objfiles)
1676         (maintenance_info_symtabs, maintenance_check_symtabs)
1677         (maintenance_expand_symtabs, maintenance_info_line_tables):
1678         Constify.
1679
1680 2017-09-27  Tom Tromey  <tom@tromey.com>
1681
1682         * top.c (new_ui_command): Constify.
1683
1684 2017-09-27  Tom Tromey  <tom@tromey.com>
1685
1686         * symfile.c (add_symbol_file_command)
1687         (remove_symbol_file_command, list_overlays_command)
1688         (map_overlay_command, unmap_overlay_command)
1689         (overlay_auto_command, overlay_manual_command)
1690         (overlay_off_command, overlay_load_command): Constify.
1691
1692 2017-09-27  Tom Tromey  <tom@tromey.com>
1693
1694         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1695         (info_spu_mailbox_command, info_spu_dma_command)
1696         (info_spu_proxydma_command): Constify.
1697
1698 2017-09-27  Tom Tromey  <tom@tromey.com>
1699
1700         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1701
1702 2017-09-27  Tom Tromey  <tom@tromey.com>
1703
1704         * cli/cli-script.c (user_defined_command): Constify.
1705
1706 2017-09-27  Tom Tromey  <tom@tromey.com>
1707
1708         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1709         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1710         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1711         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1712         (dump_binary_value, append_binary_memory, append_binary_value):
1713         Constify.
1714         (struct dump_context) <func>: Constify.
1715         (add_dump_command): Update.
1716
1717 2017-09-27  Tom Tromey  <tom@tromey.com>
1718
1719         * cli/cli-cmds.c (show_version, show_configuration)
1720         (source_command, show_user): Constify.
1721
1722 2017-09-27  Tom Tromey  <tom@tromey.com>
1723
1724         * target.c (maintenance_print_target_stack): Constify.
1725
1726 2017-09-27  Tom Tromey  <tom@tromey.com>
1727
1728         * interps.c (interpreter_exec_cmd): Constify.
1729
1730 2017-09-27  Tom Tromey  <tom@tromey.com>
1731
1732         * record-full.c (cmd_record_full_restore): Constify.
1733
1734 2017-09-27  Tom Tromey  <tom@tromey.com>
1735
1736         * memattr.c (enable_mem_command, disable_mem_command)
1737         (delete_mem_command): Constify.
1738
1739 2017-09-27  Tom Tromey  <tom@tromey.com>
1740
1741         * value.c (show_convenience): Constify.
1742
1743 2017-09-27  Tom Tromey  <tom@tromey.com>
1744
1745         * gdbcore.h (core_file_command): Update.
1746         * corefile.c (core_file_command): Constify.
1747
1748 2017-09-27  Tom Tromey  <tom@tromey.com>
1749
1750         * user-regs.c (maintenance_print_user_registers): Constify.
1751
1752 2017-09-27  Tom Tromey  <tom@tromey.com>
1753
1754         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1755
1756 2017-09-27  Tom Tromey  <tom@tromey.com>
1757
1758         * cp-support.c (first_component_command): Constify.
1759
1760 2017-09-27  Tom Tromey  <tom@tromey.com>
1761
1762         * psymtab.c (maintenance_print_psymbols)
1763         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1764         Constify.
1765
1766 2017-09-27  Tom Tromey  <tom@tromey.com>
1767
1768         * windows-tdep.c (display_tib): Constify.
1769
1770 2017-09-27  Tom Tromey  <tom@tromey.com>
1771
1772         * linux-fork.c (delete_checkpoint_command)
1773         (detach_checkpoint_command): Constify.
1774
1775 2017-09-27  Tom Tromey  <tom@tromey.com>
1776
1777         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1778
1779 2017-09-27  Tom Tromey  <tom@tromey.com>
1780
1781         * arc-tdep.c (dump_arc_instruction_command): Constify.
1782
1783 2017-09-27  Tom Tromey  <tom@tromey.com>
1784
1785         * valprint.c (set_radix, show_radix): Constify.
1786
1787 2017-09-27  Tom Tromey  <tom@tromey.com>
1788
1789         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1790
1791 2017-09-27  Tom Tromey  <tom@tromey.com>
1792
1793         * command.h (not_just_help_class_command): Update.
1794         * cli/cli-decode.h (not_just_help_class_command): Update.
1795         * cli/cli-decode.c (not_just_help_class_command): Constify.
1796
1797 2017-09-27  Tom Tromey  <tom@tromey.com>
1798
1799         * gdb_bfd.c (maintenance_info_bfds): Constify.
1800
1801 2017-09-27  Tom Tromey  <tom@tromey.com>
1802
1803         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1804         overloads.
1805         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1806         (do_const_cfunc): New function.
1807         (cmd_cfunc_eq): New overload.
1808         (cli_user_command_p): Check do_const_cfunc.
1809         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1810         const_cfunc.
1811         * command.h (add_cmd): Add const overload and no-function
1812         overload.
1813         (set_cmd_cfunc): Add const overload.
1814         (cmd_const_cfunc_ftype): Declare.
1815         (cmd_cfunc_eq): Add const overload.
1816         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1817         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1818         overload.
1819
1820 2017-09-27  Tom Tromey  <tom@tromey.com>
1821
1822         * macroexp.c (get_next_token_for_substitution): New function.
1823         (substitute_args): Call it.  Check for __VA_OPT__.
1824
1825 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1826             Pedro Alves <palves@redhat.com>
1827
1828         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1829         producer_is_icc_lt_14.
1830         (producer_is_icc_lt_14): New function.
1831         (check_producer): Add code for checking version of ICC.
1832         (producer_is_icc): Move to producer.c.
1833         (read_structure_type): Restrict ICC workaround to ICC<14.
1834         * producer.c: Include selftest.h.
1835         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1836         New functions.
1837         * producer.h (producer_is_icc): New declaration.
1838
1839 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1840
1841         * Makefile.in (SFILES): Add producer.c.
1842         (COMMON_OBS): Add producer.o
1843         * amd64-tdep.c (producer.h): Add new include.
1844         * dwarf2read.c (producer.h): Add new include.
1845         * producer.c: New file.
1846         * producer.h: New file.
1847         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1848         producer.c.
1849         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1850         producer.h.
1851
1852 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1853
1854         * configure.ac: Search ncursesw before ncurses.
1855         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1856         * gdb_curses.h: Include <ncursesw/ncurses.h>
1857         * config.in, configure: Regenerate.
1858
1859 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1860
1861         PR gdb/22185
1862         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1863         obsolete.
1864         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1865         Remove i386sol2 support.
1866         * configure.nat <i386sol2>: Remove.
1867         <sol2-64>: Fold into ...
1868         <sol2>: ... this.
1869         Move common settings to default section.
1870         Add sol-thread.o.
1871         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1872         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1873         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1874         <i[34567]86-*-solaris*>: Remove.
1875         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1876
1877         * configure.ac: Remove wctype in libw check.
1878         (_MSE_INT_H): Don't define on Solaris 7-9.
1879         <solaris*>: Remove libthread_db.so.1 check.
1880         * configure: Regenerate.
1881         * config.in: Regenerate.
1882
1883         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1884         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1885         (gdb_ps_size_t): Remove.
1886         Use base types in users.
1887         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1888
1889         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1890
1891 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1892
1893         PR build/22206
1894         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1895         (adi_is_addr_mapped): Likewise.
1896         (PSR_ICC): Don't redefine.
1897         (PSR_IMPL): Likewise.
1898
1899 2017-09-25  Tom Tromey  <tom@tromey.com>
1900
1901         * regcache.c (regcache::dump): Use string_printf.
1902
1903 2017-09-25  Tom Tromey  <tom@tromey.com>
1904
1905         * regcache.c (class regcache_invalidator): New.
1906         (struct register_to_invalidate): Remove.
1907         (make_cleanup_regcache_invalidate): Remove.
1908         (regcache::raw_write): Use regcache_invalidator.
1909
1910 2017-09-25  Tom Tromey  <tom@tromey.com>
1911
1912         * spu-tdep.c (spu2ppu_sniffer): Update.
1913         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1914         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1915         Remove.
1916         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1917         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1918         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1919         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1920         (frame_pop): Update.
1921
1922 2017-09-25  Tom Tromey  <tom@tromey.com>
1923
1924         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1925         * regcache.h (regcache_xfree): Don't declare.
1926         * regcache.c (regcache_xfree): Remove.
1927         (do_regcache_xfree): Use delete.
1928         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1929         * linux-fork.c (free_fork): Use delete.
1930         (fork_save_infrun_state): Likewise.
1931         * jit.c (jit_dealloc_cache): Use delete.
1932         * infrun.c (discard_infcall_suspend_state): Use delete.
1933
1934 2017-09-25  Tom Tromey  <tom@tromey.com>
1935
1936         * regcache.h (regcache_xmalloc): Don't declare.
1937         (regcache_raw_set_cached_value): Update comment.
1938         * regcache.c (regcache_xmalloc): Remove.
1939         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1940         * jit.c (jit_frame_sniffer): Use new.
1941         * frame.c (frame_save_as_regcache): Use new.
1942
1943 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1944
1945         * NEWS: Advertise support for guarded-storage registers on IBM z.
1946
1947 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1948
1949         * s390-linux-nat.c (have_regset_gs): New static variable.
1950         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1951         control block and guarded-storage broadcast control regsets.
1952         (s390_read_description): Detect whether the target has
1953         guarded-storage support, return appropriate tdesc.
1954         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1955         (features/s390x-gs-linux64.c): Likewise.
1956         (struct gdbarch_tdep) <have_gs>: New field.
1957         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1958         (s390_gsbc_regset): New variables.
1959         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1960         and s390_gsbc_regset, if applicable.
1961         (s390_core_read_description): Check whether core file was from a
1962         target with guarded-storage support; include appropriate regsets.
1963         (s390_gdbarch_init): Add registers for guarded-storage support.
1964         (_initialize_s390_tdep): Initialize new target descriptions that
1965         include registers for guarded-storage support.
1966         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1967         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1968         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1969         (S390_NUM_REGS): Adjust macro definition.
1970         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1971         (tdesc_s390x_gs_linux64): New declarations.
1972
1973 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1974
1975         * features/s390-gs-linux64.xml: New file.
1976         * features/s390-gs.xml: New file.
1977         * features/s390-gsbc.xml: New file.
1978         * features/s390x-gs-linux64.xml: New file.
1979         * features/Makefile (WHICH): Add s390-gs-linux64 and
1980         s390x-gs-linux64.
1981         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1982         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1983         * features/s390-gs-linux64.c: New generated file.
1984         * features/s390x-gs-linux64.c: New file.
1985         * regformats/s390-gs-linux64.dat: New file.
1986         * regformats/s390x-gs-linux64.dat: New file.
1987
1988 2017-09-23  Tom Tromey  <tom@tromey.com>
1989
1990         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1991
1992 2017-09-22  Tom Tromey  <tom@tromey.com>
1993
1994         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1995         type to scoped_restore_tmpl.
1996         <scoped_input_handler>: Initialize m_quit_handler directly.
1997
1998 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1999
2000         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2001         (cd_command): Likewise.  Free "current_directory" before
2002         assigning to it.
2003         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2004         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2005         * top.c (gdb_dirbuf): Remove global declaration.
2006         * top.h (gdb_dirbuf): Likewise.
2007
2008 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2009
2010         * gnulib/aclocal.m4: Regenerate.
2011         * gnulib/config.in: Regenerate.
2012         * gnulib/configure: Regenerate.
2013         * gnulib/import/Makefile.am: Regenerate.
2014         * gnulib/import/Makefile.in: Regenerate.
2015         * gnulib/import/assure.h: New file.
2016         * gnulib/import/at-func.c: Likewise
2017         * gnulib/import/chdir-long.c: New file.
2018         * gnulib/import/chdir-long.h: New file.
2019         * gnulib/import/cloexec.c: New file.
2020         * gnulib/import/cloexec.h: New file.
2021         * gnulib/import/close.c: New file.
2022         * gnulib/import/closedir.c: New file.
2023         * gnulib/import/dirent-private.h: New file.
2024         * gnulib/import/dup-safer.c: New file.
2025         * gnulib/import/dup.c: New file.
2026         * gnulib/import/dup2.c: New file.
2027         * gnulib/import/error.c: New file.
2028         * gnulib/import/error.h: New file.
2029         * gnulib/import/exitfail.c: New file.
2030         * gnulib/import/exitfail.h: New file.
2031         * gnulib/import/fchdir.c: New file.
2032         * gnulib/import/fcntl.c: New file.
2033         * gnulib/import/fcntl.in.h: New file.
2034         * gnulib/import/fd-hook.c: New file.
2035         * gnulib/import/fd-hook.h: New file.
2036         * gnulib/import/fd-safer.c: New file.
2037         * gnulib/import/fdopendir.c: New file.
2038         * gnulib/import/filename.h: New file.
2039         * gnulib/import/filenamecat-lgpl.c: New file.
2040         * gnulib/import/filenamecat.h: New file.
2041         * gnulib/import/fstat.c: New file.
2042         * gnulib/import/fstatat.c: New file.
2043         * gnulib/import/getcwd-lgpl.c: New file.
2044         * gnulib/import/getcwd.c: New file.
2045         * gnulib/import/getdtablesize.c: New file.
2046         * gnulib/import/getlogin_r.c: New file.
2047         * gnulib/import/getprogname.c: New file.
2048         * gnulib/import/getprogname.h: New file.
2049         * gnulib/import/gettext.h: New file.
2050         * gnulib/import/glob-libc.h: New file.
2051         * gnulib/import/glob.c: New file.
2052         * gnulib/import/glob.in.h: New file.
2053         * gnulib/import/intprops.h: New file.
2054         * gnulib/import/m4/chdir-long.m4: New file.
2055         * gnulib/import/m4/close.m4: New file.
2056         * gnulib/import/m4/closedir.m4: New file.
2057         * gnulib/import/m4/d-ino.m4: New file.
2058         * gnulib/import/m4/d-type.m4: New file.
2059         * gnulib/import/m4/dup.m4: New file.
2060         * gnulib/import/m4/dup2.m4: New file.
2061         * gnulib/import/m4/error.m4: New file.
2062         * gnulib/import/m4/fchdir.m4: New file.
2063         * gnulib/import/m4/fcntl.m4: New file.
2064         * gnulib/import/m4/fcntl_h.m4: New file.
2065         * gnulib/import/m4/fdopendir.m4: New file.
2066         * gnulib/import/m4/filenamecat.m4: New file.
2067         * gnulib/import/m4/fstat.m4: New file.
2068         * gnulib/import/m4/fstatat.m4: New file.
2069         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2070         * gnulib/import/m4/getcwd-path-max.m4: New file.
2071         * gnulib/import/m4/getcwd.m4: New file.
2072         * gnulib/import/m4/getdtablesize.m4: New file.
2073         * gnulib/import/m4/getlogin_r.m4: New file.
2074         * gnulib/import/m4/getprogname.m4: New file.
2075         * gnulib/import/m4/glob.m4: New file.
2076         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2077         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2078         * gnulib/import/m4/mempcpy.m4: New file.
2079         * gnulib/import/m4/memrchr.m4: New file.
2080         * gnulib/import/m4/mode_t.m4: New file.
2081         * gnulib/import/m4/msvc-inval.m4: New file.
2082         * gnulib/import/m4/msvc-nothrow.m4: New file.
2083         * gnulib/import/m4/open.m4: New file.
2084         * gnulib/import/m4/openat.m4: New file.
2085         * gnulib/import/m4/opendir.m4: New file.
2086         * gnulib/import/m4/readdir.m4: New file.
2087         * gnulib/import/m4/realloc.m4: New file.
2088         * gnulib/import/m4/rewinddir.m4: New file.
2089         * gnulib/import/m4/save-cwd.m4: New file.
2090         * gnulib/import/m4/strdup.m4: New file.
2091         * gnulib/import/m4/strerror.m4: New file.
2092         * gnulib/import/m4/unistd-safer.m4: New file.
2093         * gnulib/import/mempcpy.c: New file.
2094         * gnulib/import/memrchr.c: New file.
2095         * gnulib/import/msvc-inval.c: New file.
2096         * gnulib/import/msvc-inval.h: New file.
2097         * gnulib/import/msvc-nothrow.c: New file.
2098         * gnulib/import/msvc-nothrow.h: New file.
2099         * gnulib/import/open.c: New file.
2100         * gnulib/import/openat-die.c: New file.
2101         * gnulib/import/openat-priv.h: New file.
2102         * gnulib/import/openat-proc.c: New file.
2103         * gnulib/import/openat.c: New file.
2104         * gnulib/import/openat.h: New file.
2105         * gnulib/import/opendir.c: New file.
2106         * gnulib/import/pipe-safer.c: New file.
2107         * gnulib/import/readdir.c: New file.
2108         * gnulib/import/realloc.c: New file.
2109         * gnulib/import/rewinddir.c: New file.
2110         * gnulib/import/save-cwd.c: New file.
2111         * gnulib/import/save-cwd.h: New file.
2112         * gnulib/import/strdup.c: New file.
2113         * gnulib/import/strerror-override.c: New file.
2114         * gnulib/import/strerror-override.h: New file.
2115         * gnulib/import/strerror.c: New file.
2116         * gnulib/import/unistd--.h: New file.
2117         * gnulib/import/unistd-safer.h: New file.
2118         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2119         "getcwd" and "glob".
2120         * ser-tcp.c: Undefine "close" before redefining it.
2121
2122 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2123
2124         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2125         get rid of res_val.
2126
2127 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2128
2129         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2130         <sol2,sparc>: Likewise.
2131         <sol2-64,i386>: Likewise.
2132
2133         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2134         -Wdeprecated-declarations on *-*-solaris*.
2135         * configure: Regenerate.
2136
2137         * procfs.c: Include "nat/inferior.h".
2138         (procfs_info_proc): Fix typo.
2139
2140 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2141
2142         * remote.c (vector): Include.
2143         (struct private_thread_info): Add field, thread_handle.
2144         (free_private_thread_info): Deallocate storage associated with
2145         thread handle.
2146         (get_private_info_thread): Initialize `thread_handle' field.
2147         (struct thread_item): Add field, thread_handle.
2148         (clear_threads_listing_context): Deallocate storage associated
2149         with thread handle.
2150         (start_thread): Add support for "handle" attribute.
2151         (thread_attributes): Add "handle".
2152         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2153         field.
2154         (remote_update_thread_list): Update thread_handle.
2155         (remote_thread_handle_to_thread_info): New function.
2156         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2157
2158 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2159
2160         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2161         function.
2162         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2163         * python/python-internal.h (thread_object_type): Declare.
2164
2165 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2166
2167         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2168         (target_thread_handle_to_thread_info): Declare.
2169         * target.c (target_thread_handle_to_thread_info): New function.
2170         * target-delegates.c: Regenerate.
2171         * gdbthread.h (find_thread_by_handle): Declare.
2172         * thread.c (find_thread_by_handle): New function.
2173         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2174         function.
2175         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2176
2177 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2178
2179         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2180
2181 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2182
2183         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2184
2185 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2186
2187         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2188         to gdb_target_obs.
2189
2190 2017-09-20  Tom Tromey  <tom@tromey.com>
2191
2192         * breakpoint.c (struct counted_command_line): Remove.
2193         (breakpoint_commands): Update.
2194         (alloc_counted_command_line, incref_counted_command_line)
2195         (decref_counted_command_line, do_cleanup_counted_command_line)
2196         (make_cleanup_decref_counted_command_line): Remove.
2197         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2198         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2199         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2200         (save_breakpoints): Update.
2201         * breakpoint.h (counted_command_line): Now a typedef to
2202         shared_ptr.
2203         (struct breakpoint) <commands>: Now a counted_command_line.
2204         (struct bpstats) <command>: Likewise.
2205
2206 2017-09-20  Tom Tromey  <tom@tromey.com>
2207
2208         * breakpoint.c (struct commands_info, do_map_commands_command):
2209         Remove.
2210         (commands_command_1): Update.
2211         (iterate_over_related_breakpoints): Take a function_view.
2212         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2213         (delete_command): Update.
2214         (map_breakpoint_numbers): Take a function_view.
2215         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2216         (disable_command): Update.
2217         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2218         (enable_command): Update.
2219         (struct disp_data, do_enable_breakpoint_disp)
2220         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2221         (do_map_enable_delete_breakpoint): Remove.
2222         (enable_once_command, enable_count_command, enable_delete_command)
2223         (delete_trace_variable_command): Update.
2224
2225 2017-09-20  Tom Tromey  <tom@tromey.com>
2226
2227         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2228         (bpstat_clear): Use delete.
2229         (bpstats): New constructors.
2230         (bpstat_copy, bpstat_stop_status): Use new.
2231         (dprintf_after_condition_true): Update.
2232         * breakpoint.h (bpstats::bpstats): Add constructors.
2233         (bpstats::~bpstats): Add destructor.
2234
2235 2017-09-20  Pedro Alves  <palves@redhat.com>
2236
2237         * eval.c (make_params): Delete, refactored as ...
2238         (class fake_method): ... this new type's ctor.
2239         (fake_method::~fake_method): New.
2240         (evaluate_subexp_standard): Use 'fake_method'.
2241
2242 2017-09-20  Tom Tromey  <tom@tromey.com>
2243
2244         * windows-nat.c (get_windows_debug_event, windows_wait)
2245         (do_initial_windows_stuff, windows_attach): Update.
2246         * utils.c (vwarning, internal_vproblem): Update.
2247         (ui_unregister_input_event_handler_cleanup)
2248         (prepare_to_handle_input): Remove.
2249         (class scoped_input_handler): New.
2250         (defaulted_query, prompt_for_continue): Update.
2251         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2252         Update.
2253         * top.c (undo_terminal_modifications_before_exit): Update.
2254         * target/target.h (target_terminal_init, target_terminal_inferior)
2255         (target_terminal_ours): Don't declare.
2256         (class target_terminal): New.
2257         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2258         (target_terminal_ours_for_output)
2259         (make_cleanup_restore_target_terminal): Don't declare.
2260         (target_terminal_info): Remove.
2261         * target.c (enum terminal_state, terminal_state): Remove.
2262         (target_terminal::terminal_state): Define.
2263         (target_terminal::init): Rename from target_terminal_init.
2264         (target_terminal::inferior): Rename from
2265         target_terminal_inferior.
2266         (target_terminal::ours): Rename from target_terminal_ours.
2267         (target_terminal::ours_for_output): Rename from
2268         target_terminal_ours_for_output.
2269         (target_terminal::info): New method.
2270         (cleanup_restore_target_terminal)
2271         (make_cleanup_restore_target_terminal): Remove.
2272         * solib.c (handle_solib_event): Update.
2273         * remote.c (remote_serial_quit_handler): Update.
2274         (remote_terminal_inferior, remote_wait_as): Update.
2275         * record-full.c (record_full_wait_1): Update.
2276         * nto-procfs.c (procfs_create_inferior): Update.
2277         * nat/fork-inferior.c (startup_inferior): Update.
2278         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2279         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2280         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2281         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2282         (mi_breakpoint_created, mi_breakpoint_deleted)
2283         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2284         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2285         (mi_user_selected_context_changed, report_initial_inferior):
2286         Update.
2287         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2288         (linux_nat_terminal_inferior): Update.
2289         * infrun.c (follow_fork_inferior)
2290         (handle_vfork_child_exec_or_exit, do_target_resume)
2291         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2292         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2293         Update.
2294         * inflow.c (child_terminal_init, info_terminal_command): Update.
2295         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2296         (attach_command): Update.
2297         * infcall.c (call_thread_fsm_should_stop): Update.
2298         * gnu-nat.c (gnu_attach): Update.
2299         * extension.c (struct active_ext_lang_state)
2300         (restore_active_ext_lang): Update.
2301         * exceptions.c (print_flush): Update.
2302         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2303         (struct quit_handler_cleanup_data, restore_quit_handler)
2304         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2305         Remove.
2306         * cp-support.c (gdb_demangle): Update.
2307         * breakpoint.c (update_inserted_breakpoint_locations)
2308         (insert_breakpoint_locations, handle_jit_event)
2309         (disable_breakpoints_in_unloaded_shlib): Update.
2310         * annotate.c (annotate_breakpoints_invalid)
2311         (annotate_frames_invalid): Update.
2312
2313 2017-09-20  Tom Tromey  <tom@tromey.com>
2314
2315         * main.c (catch_command_errors): Rename from
2316         catch_command_errors_const.
2317         (captured_main_1): Update.
2318
2319 2017-09-20  Pedro Alves  <palves@redhat.com>
2320
2321         * cli/cli-cmds.c (list_command): Use print_sal_location.
2322         (print_sal_location): New function.
2323         (ambiguous_line_spec): Use print_sal_location.
2324         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2325         * symtab.c (find_function_start_sal): Likewise.
2326         * symtab.h (symtab_and_line::symbol): New field.
2327
2328 2017-09-20  Pedro Alves  <palves@redhat.com>
2329
2330         * linespec.c (minsym_found): Handle non-text minsyms.
2331         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2332
2333 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2334
2335         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2336         backslash.
2337
2338 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2339
2340         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2341         vmovups instead vmovaps.
2342         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2343
2344 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2345
2346         * NEWS (Changes since GDB 8.0): Add starti.
2347         * infcmd.c (enum run_break): New.
2348         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2349         case.
2350         (run_command): Use enum run_how.
2351         (start_command): Likewise.
2352         (starti_command): New function.
2353         (RUN_ARGS_HELP): New macro.
2354         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2355         commands.  Add starti command.
2356
2357 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2358
2359         * Makefile.in (monitor.o): Remove the rule.
2360
2361 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2362
2363         * annotate.h (struct annotate_arg_emitter): Use
2364         DISABLE_COPY_AND_ASSIGN.
2365         * common/refcounted-object.h (refcounted_object): Likewise.
2366         * completer.h (struct completion_result): Likewise.
2367         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2368         * filename-seen-cache.h (filename_seen_cache): Likewise.
2369         * gdbcore.h (thread_section_name): Likewise.
2370         * gdb_regex.h (compiled_regex): Likewise.
2371         * gdbthread.h (scoped_restore_current_thread): Likewise.
2372         * inferior.h (scoped_restore_current_inferior): Likewise.
2373         * jit.c (jit_reader): Likewise.
2374         * linespec.h (struct linespec_result): Likewise.
2375         * mi/mi-parse.h (struct mi_parse): Likewise.
2376         * nat/fork-inferior.c (execv_argv): Likewise.
2377         * progspace.h (scoped_restore_current_program_space): Likewise.
2378         * python/python-internal.h (class gdbpy_enter): Likewise.
2379         * regcache.h (regcache): Likewise.
2380         * target-descriptions.c (struct tdesc_reg): Likewise.
2381         (struct tdesc_type): Likewise.
2382         (struct tdesc_feature): Likewise.
2383         * ui-out.h (ui_out_emit_type): Likewise.
2384
2385 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2386
2387         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2388         label abort_expression.
2389
2390 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * common/buffer.c (buffer_xml_printf): Adjust.
2393         * common/xml-utils.c (xml_escape_text): Change return type to
2394         std::string, update code accordingly.
2395         * common/xml-utils.h (xml_escape_text): Change return type to
2396         std::string.
2397         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2398         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2399         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2400         Adjust.
2401
2402 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2403
2404         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2405         (SUBDIR_UNITTESTS_OBS): Add new object file.
2406         * unittests/xml-utils-selftests.c: New file.
2407
2408 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2409
2410         * common/selftest.h (selftest): New struct/interface.
2411         (register_test): Add name parameter, add new overload.
2412         (run_tests): Add filter parameter.
2413         (for_each_selftest_ftype): New typedef.
2414         (for_each_selftest): New declaration.
2415         * common/selftest.c (tests): Change type to
2416         map<string, unique_ptr<selftest>>.
2417         (simple_selftest): New struct.
2418         (register_test): New function.
2419         (register_test): Add name parameter and use it.
2420         (run_tests): Add filter parameter and use it.  Add prints.
2421         Adjust to vector -> map change.
2422         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2423         registering selftests.
2424         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2425         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2426         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2427         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2428         * findvar.c (_initialize_findvar): Likewise.
2429         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2430         * maint.c (maintenance_selftest): Update call to run_tests.
2431         (maintenance_info_selftests): New function.
2432         (_initialize_maint_cmds): Register "maintenance info selftests"
2433         command.  Update "maintenance selftest" doc.
2434         * regcache.c (_initialize_regcache): Add names when registering
2435         selftests.
2436         * rust-exp.y (_initialize_rust_exp): Likewise.
2437         * selftest-arch.c (gdbarch_selftest): New struct.
2438         (gdbarch_tests): Remove.
2439         (register_test_foreach_arch): Add name parameter.  Call
2440         register_test.
2441         (tests_with_arch): Remove, move most content to
2442         gdbarch_selftest::operator().
2443         (_initialize_selftests_foreach_arch): Remove.
2444         * selftest-arch.h (register_test_foreach_arch): Add name
2445         parameter.
2446         (run_tests_with_arch): New declaration.
2447         * utils-selftests.c (_initialize_utils_selftests): Add names
2448         when registering selftests.
2449         * utils.c (_initialize_utils): Likewise.
2450         * unittests/array-view-selftests.c
2451         (_initialize_array_view_selftests): Likewise.
2452         * unittests/environ-selftests.c (_initialize_environ_selftests):
2453         Likewise.
2454         * unittests/function-view-selftests.c
2455         (_initialize_function_view_selftests): Likewise.
2456         * unittests/offset-type-selftests.c
2457         (_initialize_offset_type_selftests): Likewise.
2458         * unittests/optional-selftests.c
2459         (_initialize_optional_selftests): Likewise.
2460         * unittests/scoped_restore-selftests.c
2461         (_initialize_scoped_restore_selftests): Likewise.
2462         * NEWS: Document "maintenance selftest" and "maint info
2463         selftests".
2464
2465 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2466
2467         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2468         scoped_restore.
2469
2470 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2471
2472         * mi/mi-main.c (mi_load_progress): Make uiout variable
2473         a unique_ptr.
2474
2475 2017-09-15  Pedro Alves  <palves@redhat.com>
2476
2477         * compile/compile-c-types.c (convert_enum, convert_int)
2478         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2479
2480 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2481
2482         * dwarf2read.c (copy_string): Remove.
2483         (parse_macro_definition): Replace copy_string with savestring.
2484
2485 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2486
2487         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2488         gdb_target_obs.
2489         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2490         Likewise.
2491         (i[34567]86-*-linux*): Likewise.
2492
2493 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2494
2495         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2496         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2497         <stack>: Change type to std::vector.
2498         <stack_len, stack_allocated>: Remove.
2499         <grow_stack>: Remove.
2500         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2501         (dwarf_expr_context::~dwarf_expr_context): Remove.
2502         (dwarf_expr_context::grow_stack): Remove.
2503         (dwarf_expr_context::push): Adjust.
2504         (dwarf_expr_context::pop): Adjust.
2505         (dwarf_expr_context::fetch): Adjust.
2506         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2507         (dwarf_expr_context::stack_empty_p): Adjust.
2508         (dwarf_expr_context::execute_stack_op): Adjust.
2509
2510 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2511
2512         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2513         return type to bool.
2514         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2515
2516 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2517
2518         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2519         Change type to bool.
2520         (dwarf_stack_value) <in_stack_memory>: Likewise.
2521         (dwarf_expr_context) <push_address>: Change parameter type to
2522         bool.
2523         <fetch_in_stack_memory>: Change return type to bool.
2524         <push>: Change parameter type to bool.
2525         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2526         to bool.
2527         (dwarf_expr_context::push_address): Likewise.
2528         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2529         to bool.
2530         (dwarf_expr_context::execute_stack_op): Adjust.
2531         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2532
2533 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2534
2535         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2536         (struct dwarf_expr_context) <n_pieces>: Remove.
2537         <pieces>: Change type to std::vector.
2538         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2539         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2540         pieces.
2541         (dwarf_expr_context::add_piece): Adjust.
2542         * dwarf2loc.c (struct piece_closure): Initialize fields.
2543         <n_pieces>: Remove.
2544         <pieces>: Change type to std::vector.
2545         (allocate_piece_closure): Adjust, change parameter to
2546         std::vector rvalue and std::move it to piece_closure.
2547         (rw_pieced_value): Adjust.
2548         (check_pieced_synthetic_pointer): Adjust.
2549         (indirect_synthetic_pointer): Adjust.
2550         (coerce_pieced_ref): Adjust.
2551         (free_pieced_value_closure):  Adjust.  Use delete to free
2552         piece_closure.
2553         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2554         to allocate_piece_closure.
2555         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2556
2557 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2558
2559         * probe.h (probe_ops_cp): Remove typedef.
2560         (DEF_VEC_P (probe_ops_cp)): Remove.
2561         (all_probe_ops): Change type to std::vector.
2562         * probe.c (info_probes_for_ops): Adjust to vector change.
2563         (probe_linespec_to_ops): Likewise.
2564         (all_probe_ops): Change type to std::vector.
2565         (_initialize_probe): Adjust to vector change.
2566         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2567         * elfread.c (elf_get_probes): Likewise.
2568         * stap-probe.c (_initialize_stap_probe): Likewise.
2569
2570 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2571
2572         * probe.h (struct bound_probe): Define constructors.
2573         * probe.c (bound_probe_s): Remove typedef.
2574         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2575         (collect_probes): Change return type to std::vector, remove
2576         cleanup.
2577         (compare_probes): Return bool, change parameter type.  Change
2578         semantic to "less than".
2579         (gen_ui_out_table_header_info): Change parameter to std::vector
2580         and update.
2581         (exists_probe_with_pops): Likewise.
2582         (info_probes_for_ops): Update to std::vector change.
2583         (enable_probes_command): Likewise.
2584         (disable_probes_command): Likewise.
2585
2586 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2587
2588         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2589         vec to std::vector.
2590         * probe.c (parse_probes_in_pspace): Update.
2591         (find_probes_in_objfile): Update.
2592         (find_probe_by_pc): Update.
2593         (collect_probes): Update.
2594         (probe_any_get_probes): Update.
2595         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2596         return type to reference to std::vector.
2597         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2598         std::vector and update.
2599         (dtrace_process_dof): Likewise.
2600         (dtrace_get_probes): Likewise.
2601         * elfread.c (elf_get_probes): Change return type to std::vector,
2602         store an std::vector in bfd_data.
2603         (probe_key_free): Update to std::vector.
2604         * stap-probe.c (handle_stap_probe): Change parameter to
2605         std::vector and update.
2606         (stap_get_probes): Likewise.
2607         * symfile-debug.c (debug_sym_get_probes): Change return type to
2608         std::vector and update.
2609
2610 2017-09-11  Tom Tromey  <tom@tromey.com>
2611
2612         * breakpoint.c (program_breakpoint_here_p): Update.
2613         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2614         from make_show_memory_breakpoints_cleanup.  Return a
2615         scoped_restore_tmpl<int>.
2616         (restore_show_memory_breakpoints): Remove.
2617         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2618         * mem-break.c (memory_validate_breakpoint): Update.
2619         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2620         (ia64_memory_remove_breakpoint): Update.
2621         (ia64_breakpoint_from_pc): Update.
2622         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2623         from make_show_memory_breakpoints_cleanup.
2624
2625 2017-09-11  Tom Tromey  <tom@tromey.com>
2626
2627         * d-namespace.c (d_lookup_symbol): Use std::string.
2628         (find_symbol_in_baseclass): Likewise.
2629
2630 2017-09-11  Tom Tromey  <tom@tromey.com>
2631
2632         * ctf.c (ctf_start): Use std::string.
2633
2634 2017-09-11  Tom Tromey  <tom@tromey.com>
2635
2636         * ada-lang.c (is_known_support_routine): Update.
2637         (ada_unhandled_exception_name_addr_from_raise): Update.
2638         * guile/scm-frame.c (gdbscm_frame_name): Update.
2639         * python/py-frame.c (frapy_name): Update.
2640         (frapy_function): Update.
2641         * stack.h (find_frame_funname): Update.
2642         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2643         (print_frame): Update.
2644
2645 2017-09-11  Tom Tromey  <tom@tromey.com>
2646
2647         * findcmd.c (put_bits): Take a gdb::byte_vector.
2648         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2649         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2650         cleanups.
2651         (find_command): Update.
2652
2653 2017-09-11  Tom Tromey  <tom@tromey.com>
2654
2655         * cli/cli-script.c (class scoped_restore_hook_in): New.
2656         (clear_hook_in_cleanup): Remove.
2657         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2658         scoped_restore_hook_in.
2659
2660 2017-09-11  Tom Tromey  <tom@tromey.com>
2661
2662         * cli/cli-script.c (restore_interp): Remove.
2663         (read_command_lines): Use scoped_restore_interp.
2664         * interps.c (scoped_restore_interp::set_temp): Rename from
2665         interp_set_temp.
2666         * interps.h (class scoped_restore_interp): New.
2667         (interp_set_temp): Remove.
2668
2669 2017-09-11  Tom Tromey  <tom@tromey.com>
2670
2671         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2672         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2673         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2674         scoped_restore.
2675         (mi_cmd_break_insert_1): Update.
2676         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2677         scoped_restore.
2678
2679 2017-09-11  Tom Tromey  <tom@tromey.com>
2680
2681         * demangle.c (demangle_command): Update.
2682         * breakpoint.c (disable_command): Update.
2683         (enable_command): Update.
2684         (find_location_by_number): Make "number" const.  Use
2685         get_number_trailer.
2686         * cli/cli-utils.c (extract_arg): Return std::string.
2687         * probe.c (parse_probe_linespec): Update.  Change types.
2688         (collect_probes): Take string arguments.
2689         (parse_probe_linespec): Likewise.
2690         (info_probes_for_ops): Update.
2691         (enable_probes_command): Update.
2692         (disable_probes_command): Update.
2693         * break-catch-sig.c (catch_signal_split_args): Update.
2694         * mi/mi-parse.c (mi_parse): Update.
2695
2696 2017-09-11  Tom Tromey  <tom@tromey.com>
2697
2698         * language.h (language_enum): Make argument const.
2699         * language.c (language_enum): Make argument const.
2700
2701 2017-09-11  Tom Tromey  <tom@tromey.com>
2702
2703         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2704         as function.
2705         (skip_to_space): Rename from skip_to_space_const.
2706         * common/common-utils.c (skip_to_space): New function.
2707         (skip_to_space): Rename from skip_to_space_const.
2708         * cli/cli-utils.h (get_number): Rename from get_number_const.
2709         (extract_arg): Rename from extract_arg_const.
2710         * cli/cli-utils.c (get_number): Rename from get_number_const.
2711         (extract_arg): Rename from extract_arg_const.
2712         (number_or_range_parser::get_number): Use ::get_number.
2713         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2714         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2715         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2716         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2717         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2718         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2719         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2720         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2721
2722 2017-09-11  Tom Tromey  <tom@tromey.com>
2723
2724         * python/python.c (do_start_initialization): Use
2725         py-event-types.def to initialize types.
2726         Define all object type structures.
2727         * python/python-internal.h: Don't declare event initialization
2728         functions.
2729         * python/py-threadevent.c (thread_event_object_type): Don't
2730         define.
2731         * python/py-stopevent.c (stop_event_object_type): Don't define.
2732         * python/py-signalevent.c (signal_event_object_type): Don't
2733         declare or define.
2734         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2735         (clear_objfiles_event_object_type): Don't declare or define.
2736         * python/py-infevents.c (inferior_call_pre_event_object_type)
2737         (inferior_call_post_event_object_type)
2738         (register_changed_event_object_type)
2739         (memory_changed_event_object_type): Don't declare or define.
2740         * python/py-inferior.c (new_thread_event_object_type)
2741         (new_inferior_event_object_type)
2742         (inferior_deleted_event_object_type): Don't declare or define.
2743         * python/py-exitedevent.c (exited_event_object_type): Don't
2744         declare or define.
2745         * python/py-evts.c (gdbpy_initialize_py_events): Use
2746         py-all-events.def.
2747         * python/py-events.h (thread_event_object_type): Don't declare.
2748         (events_object): Use py-all-events.def.
2749         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2750         py-event-types.def.
2751         * python/py-event-types.def: New file.
2752         * python/py-continueevent.c (create_continue_event_object): Don't
2753         declare or define.
2754         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2755         declare or define.
2756         * python/py-all-events.def: New file.
2757
2758 2017-09-11  Tom Tromey  <tom@tromey.com>
2759
2760         * python/py-threadevent.c (create_thread_event_object): Return
2761         gdbpy_ref.
2762         * python/py-stopevent.h (create_stop_event_object)
2763         (create_breakpoint_event_object, create_signal_event_object):
2764         Update.
2765         * python/py-stopevent.c (create_stop_event_object): Return
2766         gdbpy_ref.
2767         (emit_stop_event): Update.
2768         * python/py-signalevent.c (create_signal_event_object): Return
2769         gdbpy_ref.
2770         * python/py-infevents.c (create_inferior_call_event_object):
2771         Update.
2772         * python/py-event.h (create_event_object)
2773         (create_thread_event_object): Update.
2774         * python/py-event.c (create_event_object): Return gdbpy_ref.
2775         * python/py-continueevent.c: Return gdbpy_ref.
2776         * python/py-bpevent.c (create_breakpoint_event_object): Return
2777         gdbpy_ref.
2778
2779 2017-09-11  Tom Tromey  <tom@tromey.com>
2780
2781         PR python/15622:
2782         * NEWS: Add entry.
2783         * python/python.c (do_start_initialization): Initialize new event
2784         types.
2785         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2786         (gdbpy_initialize_inferior_deleted_event)
2787         (gdbpy_initialize_new_thread_event): Declare.
2788         * python/py-threadevent.c (create_thread_event_object): Add option
2789         "thread" parameter.
2790         * python/py-inferior.c (new_thread_event_object_type)
2791         (new_inferior_event_object_type)
2792         (inferior_deleted_event_object_type): Declare.
2793         (python_new_inferior, python_inferior_deleted): New functions.
2794         (add_thread_object): Emit new_thread event.
2795         (gdbpy_initialize_inferior): Attach new functions to corresponding
2796         observers.
2797         (new_thread, new_inferior, inferior_deleted): Define new event
2798         types.
2799         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2800         registries.
2801         * python/py-events.h (events_object) <new_inferior,
2802         inferior_deleted, new_thread>: New fields.
2803         * python/py-event.h (create_thread_event_breakpoint): Add optional
2804         "thread" parameter.
2805
2806 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2807
2808         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2809         check current_ui instead.
2810         (internal_vproblem): Likewise.
2811
2812 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2813
2814         * thread.c (print_thread_info_1): Remove unnecessary calls to
2815         uiout->is_mi_like_p.
2816
2817 2017-09-09  Tom Tromey  <tom@tromey.com>
2818
2819         * namespace.h (add_using_directive): Update.
2820         * namespace.c (add_using_directive): Change type of excludes to
2821         std::vector.
2822         * dwarf2read.c (read_import_statement): Use std::vector.
2823         (read_namespace): Update.
2824         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2825
2826 2017-09-09  Tom Tromey  <tom@tromey.com>
2827
2828         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2829
2830 2017-09-09  Tom Tromey  <tom@tromey.com>
2831
2832         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2833
2834 2017-09-09  Tom Tromey  <tom@tromey.com>
2835
2836         * stack.c (func_command): Use gdb::def_vector.
2837
2838 2017-09-09  Tom Tromey  <tom@tromey.com>
2839
2840         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2841         ui_out_emit_list, ui_out_emit_tuple.
2842         (mi_cmd_var_update): Likewise.
2843
2844 2017-09-09  Tom Tromey  <tom@tromey.com>
2845
2846         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2847         ui_out_redirect_pop.
2848         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2849         ui_out_redirect_pop.
2850         * utils.c (do_ui_out_redirect_pop)
2851         (make_cleanup_ui_out_redirect_pop): Remove.
2852         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2853         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2854         * ui-out.h (ui_out_redirect_pop): New class.
2855
2856 2017-09-09  Tom Tromey  <tom@tromey.com>
2857
2858         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2859         (list_available_thread_groups, mi_cmd_list_thread_groups)
2860         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2861         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2862         Likewise.
2863
2864 2017-09-09  Tom Tromey  <tom@tromey.com>
2865
2866         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2867         ui_out_emit_tuple.
2868
2869 2017-09-09  Tom Tromey  <tom@tromey.com>
2870
2871         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2872         * stack.c (print_frame): Use ui_out_emit_tuple.
2873         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2874         (info_spu_mailbox_command, info_spu_dma_command)
2875         (info_spu_proxydma_command): Likewise.
2876         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2877         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2878         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2879         ui_out_emit_tuple.
2880         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2881
2882 2017-09-09  Tom Tromey  <tom@tromey.com>
2883
2884         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2885         (class ui_out_emit_table): Update comment.
2886         * ui-out.c (do_cleanup_table_end)
2887         (make_cleanup_ui_out_table_begin_end): Remove.
2888         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2889         (info_spu_dma_cmdlist): Likewise.
2890         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2891         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2892         ui_out_emit_table.
2893
2894 2017-09-09  Tom Tromey  <tom@tromey.com>
2895
2896         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2897         ui_out_emit_list, gdb::optional.
2898
2899 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2900
2901         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2902         prototype.
2903         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2904         prototype.
2905         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2906         prototype.
2907         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2908         * ada-exp.y: Remove _initialize_ada_exp prototype.
2909         * ada-lang.c: Remove _initialize_ada_language prototype.
2910         * ada-tasks.c: Remove _initialize_tasks prototype.
2911         * addrmap.c: Remove _initialize_addrmap prototype.
2912         * agent.c: Remove _initialize_agent prototype.
2913         * aix-thread.c: Remove _initialize_aix_thread prototype.
2914         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2915         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2916         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2917         prototype.
2918         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2919         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2920         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2921         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2922         prototype.
2923         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2924         prototype.
2925         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2926         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2927         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2928         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2929         prototype.
2930         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2931         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2932         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2933         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2934         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2935         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2936         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2937         prototype.
2938         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2939         prototype.
2940         * annotate.c: Remove _initialize_annotate prototype.
2941         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2942         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2943         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2944         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2945         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2946         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2947         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2948         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2949         prototype.
2950         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2951         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2952         * auto-load.c: Remove _initialize_auto_load prototype.
2953         * auxv.c: Remove _initialize_auxv prototype.
2954         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2955         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2956         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2957         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2958         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2959         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2960         prototype.
2961         * break-catch-throw.c: Remove _initialize_break_catch_throw
2962         prototype.
2963         * breakpoint.c: Remove _initialize_breakpoint prototype.
2964         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2965         * btrace.c: Remove _initialize_btrace prototype.
2966         * charset.c: Remove _initialize_charset prototype.
2967         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2968         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2969         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2970         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2971         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2972         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2973         * coffread.c: Remove _initialize_coffread prototype.
2974         * compile/compile.c: Remove _initialize_compile prototype.
2975         * complaints.c: Remove _initialize_complaints prototype.
2976         * completer.c: Remove _initialize_completer prototype.
2977         * copying.awk: Remove _initialize_copying prototype.
2978         * copying.c: Regenerate.
2979         * core-regset.c: Remove _initialize_core_regset prototype.
2980         * corefile.c: Remove _initialize_core prototype.
2981         * corelow.c: Remove _initialize_corelow prototype.
2982         * cp-abi.c: Remove _initialize_cp_abi prototype.
2983         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2984         * cp-support.c: Remove _initialize_cp_support prototype.
2985         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2986         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2987         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2988         * ctf.c: Remove _initialize_ctf prototype.
2989         * d-lang.c: Remove _initialize_d_language prototype.
2990         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2991         prototype.
2992         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2993         * dbxread.c: Remove _initialize_dbxread prototype.
2994         * dcache.c: Remove _initialize_dcache prototype.
2995         * demangle.c: Remove _initialize_demangler prototype.
2996         * disasm-selftests.c: Remove _initialize_disasm_selftests
2997         prototype.
2998         * disasm.c: Remove _initialize_disasm prototype.
2999         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3000         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3001         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3002         prototype.
3003         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3004         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3005         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3006         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3007         * elfread.c: Remove _initialize_elfread prototype.
3008         * exec.c: Remove _initialize_exec prototype.
3009         * extension.c: Remove _initialize_extension prototype.
3010         * f-lang.c: Remove _initialize_f_language prototype.
3011         * f-valprint.c: Remove _initialize_f_valprint prototype.
3012         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3013         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3014         * filesystem.c: Remove _initialize_filesystem prototype.
3015         * findcmd.c: Remove _initialize_mem_search prototype.
3016         * fork-child.c: Remove _initialize_fork_child prototype.
3017         * frame-base.c: Remove _initialize_frame_base prototype.
3018         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3019         * frame.c: Remove _initialize_frame prototype.
3020         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3021         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3022         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3023         * gcore.c: Remove _initialize_gcore prototype.
3024         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3025         * gdbarch.c: Regenerate.
3026         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3027         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3028         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3029         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3030         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3031         * go-lang.c: Remove _initialize_go_language prototype.
3032         * go32-nat.c: Remove _initialize_go32_nat prototype.
3033         * guile/guile.c: Remove _initialize_guile prototype.
3034         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3035         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3036         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3037         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3038         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3039         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3040         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3041         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3042         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3043         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3044         prototype.
3045         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3046         prototype.
3047         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3048         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3049         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3050         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3051         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3052         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3053         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3054         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3055         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3056         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3057         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3058         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3059         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3060         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3061         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3062         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3063         prototype.
3064         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3065         prototype.
3066         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3067         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3068         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3069         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3070         * infcall.c: Remove _initialize_infcall prototype.
3071         * infcmd.c: Remove _initialize_infcmd prototype.
3072         * inferior.c: Remove _initialize_inferiors prototype.
3073         * inflow.c: Remove _initialize_inflow prototype.
3074         * infrun.c: Remove _initialize_infrun prototype.
3075         * interps.c: Remove _initialize_interpreter prototype.
3076         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3077         * jit.c: Remove _initialize_jit prototype.
3078         * language.c: Remove _initialize_language prototype.
3079         * linux-fork.c: Remove _initialize_linux_fork prototype.
3080         * linux-nat.c: Remove _initialize_linux_nat prototype.
3081         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3082         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3083         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3084         * m2-lang.c: Remove _initialize_m2_language prototype.
3085         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3086         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3087         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3088         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3089         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3090         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3091         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3092         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3093         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3094         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3095         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3096         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3097         * machoread.c: Remove _initialize_machoread prototype.
3098         * macrocmd.c: Remove _initialize_macrocmd prototype.
3099         * macroscope.c: Remove _initialize_macroscope prototype.
3100         * maint.c: Remove _initialize_maint_cmds prototype.
3101         * mdebugread.c: Remove _initialize_mdebugread prototype.
3102         * memattr.c: Remove _initialize_mem prototype.
3103         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3104         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3105         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3106         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3107         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3108         * microblaze-linux-tdep.c: Remove
3109         _initialize_microblaze_linux_tdep prototype.
3110         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3111         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3112         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3113         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3114         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3115         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3116         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3117         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3118         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3119         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3120         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3121         prototype.
3122         * mipsread.c: Remove _initialize_mipsread prototype.
3123         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3124         prototype.
3125         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3126         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3127         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3128         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3129         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3130         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3131         prototype.
3132         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3133         * nto-procfs.c: Remove _initialize_procfs prototype.
3134         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3135         * objc-lang.c: Remove _initialize_objc_language prototype.
3136         * objfiles.c: Remove _initialize_objfiles prototype.
3137         * observer.c: Remove observer_test_first_notification_function,
3138         observer_test_second_notification_function,
3139         observer_test_third_notification_function, and
3140         _initialize_observer prototypes.
3141         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3142         * osabi.c: Remove _initialize_gdb_osabi prototype.
3143         * osdata.c: Remove _initialize_osdata prototype.
3144         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3145         * parse.c: Remove _initialize_parse prototype.
3146         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3147         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3148         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3149         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3150         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3151         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3152         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3153         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3154         * printcmd.c: Remove _initialize_printcmd prototype.
3155         * probe.c: Remove _initialize_probe prototype.
3156         * proc-api.c: Remove _initialize_proc_api prototype.
3157         * proc-events.c: Remove _initialize_proc_events prototype.
3158         * proc-service.c: Remove _initialize_proc_service prototype.
3159         * procfs.c: Remove _initialize_procfs prototype.
3160         * psymtab.c: Remove _initialize_psymtab prototype.
3161         * python/python.c: Remove _initialize_python prototype.
3162         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3163         * record-btrace.c: Remove _initialize_record_btrace prototype.
3164         * record-full.c: Remove _initialize_record_full prototype.
3165         * record.c: Remove _initialize_record prototype.
3166         * regcache.c: Remove _initialize_regcache prototype.
3167         * reggroups.c: Remove _initialize_reggroup prototype.
3168         * remote-notif.c: Remove _initialize_notif prototype.
3169         * remote-sim.c: Remove _initialize_remote_sim prototype.
3170         * remote.c: Remove _initialize_remote prototype.
3171         * reverse.c: Remove _initialize_reverse prototype.
3172         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3173         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3174         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3175         prototype.
3176         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3177         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3178         * rust-exp.y: Remove _initialize_rust_exp prototype.
3179         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3180         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3181         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3182         * score-tdep.c: Remove _initialize_score_tdep prototype.
3183         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3184         prototype.
3185         * ser-go32.c: Remove _initialize_ser_dos prototype.
3186         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3187         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3188         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3189         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3190         * serial.c: Remove _initialize_serial prototype.
3191         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3192         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3193         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3194         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3195         * skip.c: Remove _initialize_step_skip prototype.
3196         * sol-thread.c: Remove _initialize_sol_thread prototype.
3197         * solib-aix.c: Remove _initialize_solib_aix prototype.
3198         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3199         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3200         * solib-frv.c: Remove _initialize_frv_solib prototype.
3201         * solib-spu.c: Remove _initialize_spu_solib prototype.
3202         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3203         * solib-target.c: Remove _initialize_solib_target prototype.
3204         * solib.c: Remove _initialize_solib prototype.
3205         * source.c: Remove _initialize_source prototype.
3206         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3207         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3208         prototype.
3209         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3210         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3211         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3212         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3213         prototype.
3214         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3215         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3216         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3217         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3218         prototype.
3219         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3220         prototype.
3221         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3222         prototype.
3223         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3224         prototype.
3225         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3226         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3227         prototype.
3228         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3229         prototype.
3230         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3231         prototype.
3232         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3233         prototype.
3234         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3235         prototype.
3236         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3237         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3238         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3239         * stabsread.c: Remove _initialize_stabsread prototype.
3240         * stack.c: Remove _initialize_stack prototype.
3241         * stap-probe.c: Remove _initialize_stap_probe prototype.
3242         * std-regs.c: Remove _initialize_frame_reg prototype.
3243         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3244         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3245         * symfile.c: Remove _initialize_symfile prototype.
3246         * symmisc.c: Remove _initialize_symmisc prototype.
3247         * symtab.c: Remove _initialize_symtab prototype.
3248         * target-dcache.c: Remove _initialize_target_dcache prototype.
3249         * target-descriptions.c: Remove _initialize_target_descriptions
3250         prototype.
3251         * thread.c: Remove _initialize_thread prototype.
3252         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3253         prototype.
3254         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3255         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3256         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3257         prototype.
3258         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3259         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3260         * tracefile.c: Remove _initialize_tracefile prototype.
3261         * tracepoint.c: Remove _initialize_tracepoint prototype.
3262         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3263         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3264         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3265         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3266         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3267         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3268         * tui/tui.c: Remove _initialize_tui prototype.
3269         * typeprint.c: Remove _initialize_typeprint prototype.
3270         * user-regs.c: Remove _initialize_user_regs prototype.
3271         * utils.c: Remove _initialize_utils prototype.
3272         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3273         * valarith.c: Remove _initialize_valarith prototype.
3274         * valops.c: Remove _initialize_valops prototype.
3275         * valprint.c: Remove _initialize_valprint prototype.
3276         * value.c: Remove _initialize_values prototype.
3277         * varobj.c: Remove _initialize_varobj prototype.
3278         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3279         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3280         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3281         * windows-nat.c: Remove _initialize_windows_nat,
3282         _initialize_check_for_gdb_ini, and _initialize_loadable
3283         prototypes.
3284         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3285         * xcoffread.c: Remove _initialize_xcoffread prototype.
3286         * xml-support.c: Remove _initialize_xml_support prototype.
3287         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3288         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3289         prototype.
3290         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3291         prototype.
3292         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3293
3294 2017-09-08  Keith Seitz  <keiths@redhat.com>
3295
3296         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3297         field.
3298
3299 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3300
3301         * f-valprint.c (f_val_print): Remove check for one byte
3302         sized integers. Remove printing of character type.
3303
3304 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3305             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3306             Bernhard Heckel  <bernhard.heckel@intel.com>
3307
3308         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3309         to maintain proper indentation when printing pointers/refs.
3310
3311 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3312
3313         GDB 8.0.1 released.
3314
3315 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3316
3317         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3318
3319 2017-09-05  Tom Tromey  <tom@tromey.com>
3320
3321         * parse.c (funcall_chain): Now a std::vector.
3322         (start_arglist, end_arglist): Simplify.
3323         (free_funcalls): Remove.
3324         (parse_exp_in_context_1): Remove cleanup.
3325
3326 2017-09-05  Tom Tromey  <tom@tromey.com>
3327
3328         * go-exp.y (go_parse): Don't create a cleanup.
3329
3330 2017-09-05  Tom Tromey  <tom@tromey.com>
3331
3332         * d-exp.y (PrimaryExpression): Use std::string.
3333         (d_parse): Don't create a cleanup.
3334
3335 2017-09-05  Tom Tromey  <tom@tromey.com>
3336
3337         * utils.c (do_clear_parser_state): Remove.
3338         (make_cleanup_clear_parser_state): Remove.
3339         * p-exp.y (pascal_parse): Use scoped_restore.
3340         * m2-exp.y (m2_parse): Use scoped_restore.
3341         * f-exp.y (f_parse): Use scoped_restore.
3342         * d-exp.y (d_parse): Use scoped_restore.
3343         * c-exp.y (c_parse): Use scoped_restore.
3344         * ada-exp.y (ada_parse): Use scoped_restore.
3345         * utils.h (make_cleanup_clear_parser_state): Remove.
3346
3347 2017-09-06  Keith Seitz  <keiths@redhat.com>
3348
3349         * dwarf2read.c (dw2_linkage_name_attr): New function.
3350         (dw2_linkage_name): New function.
3351         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3352         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3353         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3354
3355 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3356
3357         * config/djgpp/djconfig.sh: Correct shell portability issue.
3358
3359 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3360
3361         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3362
3363 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3364
3365         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3366         * NEWS: Mention new FreeBSD/mips native configuration.
3367         * configure.host: Add aarch64*-*-freebsd*.
3368         * configure.nat: Likewise.
3369         * aarch64-fbsd-nat.c: New file.
3370
3371 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3372
3373         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3374         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3375         * NEWS: Mention new FreeBSD/aarch64 target.
3376         * configure.tgt: Add aarch64*-*-freebsd*.
3377         * aarch64-fbsd-tdep.c: New file.
3378         * aarch64-fbsd-tdep.h: New file.
3379
3380 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3381
3382         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3383
3384 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3385
3386         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3387         of TLS symbols.
3388
3389 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3390
3391         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3392         call.
3393
3394 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3395
3396         * infrun.c (follow_exec): Call add_thread after
3397         target_find_description.
3398
3399 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3400
3401         * infrun.c (handle_inferior_event_1): When exec'ing, read
3402         stop_pc after follow_exec.
3403
3404 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3405
3406         * remote.c (process_g_packet): Update error message.
3407
3408 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3409
3410         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3411         targets.
3412
3413 2017-09-05  Pedro Alves  <palves@redhat.com>
3414
3415         * eval.c (eval_call, evaluate_funcall): New functions, factored
3416         out from ...
3417         (evaluate_subexp_standard): ... this.
3418
3419 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3420
3421         * amd64-tdep.c (amd64_target_description): Create target
3422         descriptions.
3423         (_initialize_amd64_tdep): Don't call functions
3424         initialize_tdesc_amd64_*.  Add self tests.
3425         * arch/amd64.c (amd64_create_target_description): Add parameter
3426         is_linux.  Call set_tdesc_osabi if is_linux is true.
3427         * arch/amd64.h (amd64_create_target_description): Update the
3428         declaration.
3429         * arch/i386.c (i386_create_target_description): Add parameter
3430         is_linux.  Call set_tdesc_osabi if is_linux is true.
3431         * arch/i386.h (i386_create_target_description): Update
3432         declaration.
3433         * configure.tgt: Add i386.o to gdb_target_obs.
3434         * features/Makefile (XMLTOC): Remove i386/*.xml.
3435         * features/i386/amd64-avx-avx512.c: Remove.
3436         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3437         * features/i386/amd64-avx-mpx.c: Remove.
3438         * features/i386/amd64-avx.c: Remove.
3439         * features/i386/amd64-mpx.c: Remove.
3440         * features/i386/amd64.c: Remove.
3441         * features/i386/i386-avx-avx512.c: Remove.
3442         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3443         * features/i386/i386-avx-mpx.c: Remove.
3444         * features/i386/i386-avx.c: Remove.
3445         * features/i386/i386-mmx.c: Remove.
3446         * features/i386/i386-mpx.c: Remove.
3447         * features/i386/i386.c: Remove.
3448         * i386-tdep.c: Don't include features/i386/i386*.c., include
3449         target-descriptions.h and arch/i386.h.
3450         (i386_target_description): Create target descriptions.
3451         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3452         functions.  Do self tests.
3453
3454 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3455
3456         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3457         * features/i386/amd64-avx-avx512-linux.c: Removed.
3458         * features/i386/amd64-avx-linux.c: Removed.
3459         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3460         * features/i386/amd64-avx-mpx-linux.c: Removed.
3461         * features/i386/amd64-linux.c: Removed.
3462         * features/i386/amd64-mpx-linux.c: Removed.
3463         * features/i386/x32-avx-avx512-linux.c: Removed.
3464         * features/i386/x32-avx-linux.c: Removed.
3465         * features/i386/x32-linux.c: Removed.
3466
3467 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3468
3469         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3470         features/i386/*.c.
3471         (amd64_linux_read_description): Call
3472         amd64_create_target_description.
3473         * arch/amd64.c: New file.
3474         * arch/amd64.h: New file.
3475         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3476         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3477
3478 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3479
3480         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3481         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3482         (amd64_linux_read_description): Create target descriptions.
3483         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3484         functions.  Add unit tests.
3485         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3486         x32-core.xml.
3487         * features/i386/64bit-avx.c: Generated.
3488         * features/i386/64bit-avx512.c: Generated.
3489         * features/i386/64bit-core.c: Generated.
3490         * features/i386/64bit-linux.c: Generated.
3491         * features/i386/64bit-mpx.c: Generated.
3492         * features/i386/64bit-pkeys.c: Generated.
3493         * features/i386/64bit-segments.c: Generated.
3494         * features/i386/64bit-sse.c: Generated.
3495         * features/i386/x32-core.c: Generated.
3496         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3497         c files for amd64-linux and x32-linux.
3498
3499 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3500
3501         * amd64-linux-tdep.c (amd64_linux_read_description): New
3502         function.
3503         (amd64_linux_core_read_description): Call
3504         amd64_linux_read_description.
3505         (amd64_linux_init_abi): Likewise.
3506         (amd64_x32_linux_init_abi): Likewise.
3507         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3508         * x86-linux-nat.c (x86_linux_read_description): Call
3509         amd64_linux_read_description.
3510
3511 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3512
3513         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3514         comments.
3515
3516 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3517
3518         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3519         * features/i386/i386-avx-avx512-linux.c: Remove.
3520         * features/i386/i386-avx-linux.c: Remove.
3521         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3522         * features/i386/i386-avx-mpx-linux.c: Remove.
3523         * features/i386/i386-linux.c: Remove.
3524         * features/i386/i386-mmx-linux.c: Remove.
3525         * features/i386/i386-mpx-linux.c: Remove.
3526
3527 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3528
3529         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3530         (SFILES): Add arch/i386.c.
3531         (HFILES_NO_SRCDIR): Add arch/i386.h.
3532         * arch/i386.c: New file.
3533         * arch/i386.h: New file.
3534         * arch/tdesc.h (allocate_target_description): Declare.
3535         (set_tdesc_architecture): Declare.
3536         (set_tdesc_osabi): Declare.
3537         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3538         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3539         include arch/i386.h.
3540         (i386_linux_read_description): Remove code and call
3541         i386_create_target_description.
3542         (set_tdesc_architecture): New function.
3543         (set_tdesc_osabi): New function.
3544         * target-descriptions.h (allocate_target_description): Remove.
3545
3546 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3547
3548         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3549         * target-descriptions.c (tdesc_create_feature): Likewise, and
3550         adjust code.
3551         * features/i386/32bit-avx.c: Re-generated.
3552         * features/i386/32bit-avx512.c: Re-generated.
3553         * features/i386/32bit-core.c: Re-generated.
3554         * features/i386/32bit-linux.c: Re-generated.
3555         * features/i386/32bit-mpx.c: Re-generated.
3556         * features/i386/32bit-pkeys.c: Re-generated.
3557         * features/i386/32bit-sse.c: Re-generated.
3558
3559 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3560
3561         * regformats/regdef.h (struct reg): Override operator == and !=.
3562
3563 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3564
3565         * arch/tdesc.h: New file.
3566         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3567         * target-descriptions.c: Update comments.
3568         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3569         declarations.
3570         * features/i386/32bit-avx.c: Re-generated.
3571         * features/i386/32bit-avx512.c: Re-generated.
3572         * features/i386/32bit-core.c: Re-generated.
3573         * features/i386/32bit-linux.c: Re-generated.
3574         * features/i386/32bit-mpx.c: Re-generated.
3575         * features/i386/32bit-pkeys.c: Re-generated.
3576         * features/i386/32bit-sse.c: Re-generated.
3577
3578 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3579
3580         * regformats/regdat.sh: Update generated code.
3581
3582 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3583
3584         * regformats/regdat.sh: Adjust code order.
3585
3586 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3587
3588         * expprint.c (dump_subexp_body_standard): Use constant format
3589         string in fprintf_filtered call.
3590
3591 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3592
3593         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3594         NetBSD/i386.
3595         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3596
3597 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3598
3599         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3600
3601 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3602
3603         * bsd-kvm.o: Define _KMEMUSER.
3604         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3605         * configure: Regenerate.
3606
3607 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3608
3609         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3610         * i386-fbsd-nat.c: Likewise.
3611
3612 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3613
3614         * unittests/array-view-selftests.c: Add include of <array>.
3615
3616 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3617
3618         * spu-tdep.c (flush_ea_cache): Add missing argument to
3619         call_function_by_hand.
3620
3621 2017-09-04  Pedro Alves  <palves@redhat.com>
3622
3623         * NEWS (Safer support for debugging with no debug info): New.
3624
3625 2017-09-04  Pedro Alves  <palves@redhat.com>
3626
3627         * c-exp.y (function_method, function_method_void): Add current
3628         instance flags to TYPE_INSTANCE.
3629         * dwarf2read.c (check_modifier): New.
3630         (compute_delayed_physnames): Assert that only C++ adds delayed
3631         physnames.  Mark fn_fields as const/volatile depending on
3632         physname.
3633         * eval.c (make_params): New type_instance_flags parameter.  Use
3634         it as the new type's instance flags.
3635         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3636         flags element and pass it to make_params.
3637         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3638         instance flags element.
3639         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3640         * gdbtypes.h: Include "enum-flags.h".
3641         (type_instance_flags): New enum-flags type.
3642         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3643         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3644         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3645         (follow_type_instance_flags): New function.
3646         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3647         * parser-defs.h (follow_type_instance_flags): Declare.
3648         * valops.c (value_struct_elt_for_reference): const/volatile must
3649         match too.
3650
3651 2017-09-04  Pedro Alves  <palves@redhat.com>
3652
3653         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3654         function/method scopes; lookup the nested name as a function local
3655         static variable.
3656
3657 2017-09-04  Pedro Alves  <palves@redhat.com>
3658
3659         (%type <voidval>): Add function_method.
3660         * c-exp.y (exp): New production for calls with no arguments.
3661         (function_method, function_method_void_or_typelist): New
3662         productions.
3663         (exp): New production for "method()::static_var".
3664         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3665         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3666         Handle OP_FUNC_STATIC_VAR.
3667         * parse.c (operator_length_standard):
3668         Handle OP_FUNC_STATIC_VAR.
3669
3670 2017-09-04  Pedro Alves  <palves@redhat.com>
3671
3672         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3673         handling.
3674         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3675         Ditto.
3676         * parse.c (operator_length_standard, operator_check_standard):
3677         Ditto.
3678         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3679
3680 2017-09-04  Pedro Alves  <palves@redhat.com>
3681
3682         * ax-gdb.c: Include "typeprint.h".
3683         (gen_expr_for_cast): New function.
3684         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3685         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3686         type is unknown.
3687         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3688         nodebug_data_symbol.
3689         * eval.c: Include "typeprint.h".
3690         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3691         Error out if symbol has unknown type.
3692         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3693         evaluate_subexp_for_cast.
3694         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3695         OP_VAR_MSYM_VALUE.
3696         (evaluate_subexp_for_cast): New function.
3697         * gdbtypes.c (init_nodebug_var_type): New function.
3698         (objfile_type): Use it to initialize types of variables with no
3699         debug info.
3700         * typeprint.c (error_unknown_type): New.
3701         * typeprint.h (error_unknown_type): New declaration.
3702         * compile/compile-c-types.c (convert_type_basic): Handle
3703         TYPE_CODE_ERROR; warn and fallback to int for variables with
3704         unknown type.
3705
3706 2017-09-04  Pedro Alves  <palves@redhat.com>
3707
3708         * eval.c (evaluate_var_value): New function, factored out from ...
3709         (evaluate_subexp_standard): ... here.
3710
3711 2017-09-04  Pedro Alves  <palves@redhat.com>
3712
3713         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3714         Remove useless assignments to 'op'.
3715
3716 2017-09-04  Pedro Alves  <palves@redhat.com>
3717
3718         * eval.c (eval_skip_value): New function.
3719         (evaluate_subexp_standard): Use it.
3720
3721 2017-09-04  Pedro Alves  <palves@redhat.com>
3722
3723         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3724         function name from symbol/minsym and pass it to
3725         error_call_unknown_return_type.
3726
3727 2017-09-04  Pedro Alves  <palves@redhat.com>
3728
3729         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3730         * ax-gdb.c (gen_msym_var_ref): New function.
3731         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3732         * eval.c (evaluate_var_msym_value): New function.
3733         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3734         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3735         to call_function_by_hand.
3736         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3737         Handle OP_VAR_MSYM_VALUE.
3738         (union exp_element) <msymbol>: New field.
3739         * minsyms.h (struct type): Forward declare.
3740         (find_minsym_type_and_address): Declare.
3741         * parse.c (write_exp_elt_msym): New function.
3742         (write_exp_msymbol): Delete, refactored as ...
3743         (find_minsym_type_and_address): ... this new function.
3744         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3745         (operator_length_standard, operator_check_standard): Handle
3746         OP_VAR_MSYM_VALUE.
3747         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3748
3749 2017-09-04  Pedro Alves  <palves@redhat.com>
3750
3751         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3752         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3753         unknown.
3754         * ada-typeprint.c (print_func_type): Handle functions with unknown
3755         return type.
3756         * c-typeprint.c (c_type_print_base): Handle functions and methods
3757         with unknown return type.
3758         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3759         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3760         * compile/compile-c-types.c: Include "objfiles.h".
3761         (convert_func): For functions with unknown return type, warn and
3762         default to int.
3763         * compile/compile-object-run.c (compile_object_run): Adjust call
3764         to call_function_by_hand_dummy.
3765         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3766         call_function_by_hand.
3767         * eval.c (evaluate_subexp_standard): Adjust calls to
3768         call_function_by_hand.  Handle functions and methods with unknown
3769         return type.  Pass expect_type to call_function_by_hand.
3770         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3771         return type.
3772         * gcore.c (call_target_sbrk): Adjust call to
3773         call_function_by_hand.
3774         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3775         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3776         an integer address type instead of nodebug.
3777         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3778         call_function_by_hand.
3779         * infcall.c (error_call_unknown_return_type): New function.
3780         (call_function_by_hand): New "default_return_type" parameter.
3781         Pass it down.
3782         (call_function_by_hand_dummy): New "default_return_type"
3783         parameter.  Use it instead of defaulting to int.  If there's no
3784         default and the return type is unknown, throw an error.  If
3785         there's a default return type, and the called function has no
3786         debug info, then assume the function is prototyped.
3787         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3788         New "default_return_type" parameter.
3789         (error_call_unknown_return_type): New declaration.
3790         * linux-fork.c (call_lseek): Cast return type of lseek.
3791         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3792         call_function_by_hand.
3793         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3794         calls to call_function_by_hand.
3795         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3796         return type.
3797         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3798         (value_nsstring, print_object_command): Adjust calls to
3799         call_function_by_hand.
3800         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3801         functions with unknown return type.
3802         (pascal_type_print_func_varspec_suffix): New function.
3803         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3804         TYPE_CODE_METHOD>: Use it.
3805         * python/py-value.c (valpy_call): Adjust call to
3806         call_function_by_hand.
3807         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3808         call_function_by_hand.
3809         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3810         call_function_by_hand.
3811         * valops.c (value_allocate_space_in_inferior): Adjust call to
3812         call_function_by_hand.
3813         * typeprint.c (type_print_unknown_return_type): New function.
3814         * typeprint.h (type_print_unknown_return_type): New declaration.
3815
3816 2017-09-04  Pedro Alves  <palves@redhat.com>
3817
3818         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3819         types with more than one parameter as prototyped.
3820
3821 2017-09-04  Pedro Alves  <palves@redhat.com>
3822
3823         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3824         (disassemble_command): Use gdb_disassembly_flags instead of bare
3825         int.
3826         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3827         (dump_insns, do_mixed_source_and_assembly_deprecated)
3828         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3829         Use gdb_disassembly_flags instead of bare int.
3830         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3831         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3832         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3833         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3834         (enum gdb_disassembly_flag): ... values of this new enumeration.
3835         (gdb_disassembly_flags): Define.
3836         (gdb_disassembly)
3837         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3838         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3839         gdb_disassembly_flags instead of bare int.
3840         * record-btrace.c (btrace_insn_history)
3841         (record_btrace_insn_history, record_btrace_insn_history_range)
3842         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3843         instead of bare int.
3844         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3845         Use gdb_disassembly_flags instead of bare int.
3846         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3847         Define.
3848         * target-delegates.c: Regenerate.
3849         * target.c (target_insn_history, target_insn_history_from)
3850         (target_insn_history_range): Use gdb_disassembly_flags instead of
3851         bare int.
3852         * target.h: Include "disasm.h".
3853         (struct target_ops) <to_insn_history, to_insn_history_from,
3854         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3855         int.
3856         (target_insn_history, target_insn_history_from)
3857         (target_insn_history_range): Use gdb_disassembly_flags instead of
3858         bare int.
3859
3860 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3861
3862         * cli/cli-script.c (build_command_line): For if/while commands,
3863         check whether args is empty.
3864
3865 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3866
3867         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3868         (enum command_control_type): Likewise.
3869         (struct command_line): Likewise.
3870         (free_command_lines): Likewise.
3871         (struct command_lines_deleter): Likewise.
3872         (command_line_up): Likewise.
3873         (read_command_lines): Likewise.
3874         (read_command_lines_1): Likewise.
3875         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3876         (enum command_control_type): Likewise.
3877         (struct command_line): Likewise.
3878         (free_command_lines): Likewise.
3879         (struct command_lines_deleter): Likewise.
3880         (command_line_up): Likewise.
3881         (read_command_lines): Likewise.
3882         (read_command_lines_1): Likewise.
3883         * breakpoint.h: Include cli/cli-script.h.
3884         * extension-priv.h: Likewise.
3885         * gdbcmd.h: Likewise.
3886
3887 2017-09-04  Pedro Alves  <palves@redhat.com>
3888
3889         * ada-lang.c (is_known_support_routine): Move sal declaration to
3890         where it is initialized.
3891         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3892         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3893         (clear_command, update_static_tracepoint): Remove init_sal
3894         references.  Move declarations closer to initializations.
3895         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3896         initializations.
3897         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3898         references.  Move sal declarations closer to initializations.
3899         * frame.c (find_frame_sal): Return a symtab_and_line via function
3900         return instead of output parameter.  Remove init_sal references.
3901         * frame.h (find_frame_sal): Return a symtab_and_line via function
3902         return instead of output parameter.
3903         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3904         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3905         instead of memset.
3906         (gdbscm_find_pc_line): Remove init_sal reference.
3907         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3908         references.  Move declarations closer to initializations.
3909         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3910         initializations.
3911         (finish_backward): Remove init_sal references.  Move declarations
3912         closer to initializations.
3913         * infrun.c (process_event_stop_test, handle_step_into_function)
3914         (insert_hp_step_resume_breakpoint_at_frame)
3915         (insert_step_resume_breakpoint_at_caller): Likewise.
3916         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3917         (symbol_to_sal): Likewise.
3918         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3919         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3920         to its initialization.
3921         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3922         init_sal references.  Move declarations closer to initializations.
3923         * source.c (get_current_source_symtab_and_line): Remove brace
3924         initialization.
3925         (set_current_source_symtab_and_line): Now takes the sal by const
3926         reference.  Remove brace initialization.
3927         (line_info): Remove init_sal reference.
3928         * source.h (set_current_source_symtab_and_line): Now takes a
3929         symtab_and_line via const reference.
3930         * stack.c (set_current_sal_from_frame): Adjust.
3931         (print_frame_info): Adjust.
3932         (get_last_displayed_sal): Return the sal via function return
3933         instead of via output parameter.  Simplify.
3934         (frame_info): Adjust.
3935         * stack.h (get_last_displayed_sal): Return the sal via function
3936         return instead of via output parameter.
3937         * symtab.c (init_sal): Delete.
3938         (find_pc_sect_line): Remove init_sal references.  Move
3939         declarations closer to initializations.
3940         (find_function_start_sal): Remove init_sal references.  Move
3941         declarations closer to initializations.
3942         * symtab.h (struct symtab_and_line): In-class initialize all
3943         fields.
3944         * tracepoint.c (set_traceframe_context)
3945         (print_one_static_tracepoint_marker): Remove init_sal references.
3946         Move declarations closer to initializations.
3947         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3948         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3949         declarations closer to initializations.
3950         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3951         init_sal references.  Adjust.
3952
3953 2017-09-04  Pedro Alves  <palves@redhat.com>
3954
3955         * ax-gdb.c (agent_command_1): Use range-for.
3956         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3957         * breakpoint.c: Include "common/array-view.h".
3958         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3959         parameter from struct symtabs_and_lines to
3960         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3961         (breakpoint_sals_to_pc): Change sals parameter from struct
3962         symtabs_and_lines to std::vector reference.
3963         (check_fast_tracepoint_sals): Change sals parameter from struct
3964         symtabs_and_lines to std::array_view.  Use range-for.
3965         (decode_static_tracepoint_spec): Return a std::vector instead of
3966         symtabs_and_lines.  Update.
3967         (create_breakpoint): Update.
3968         (break_range_command, until_break_command, clear_command): Update.
3969         (base_breakpoint_decode_location, bkpt_decode_location)
3970         (bkpt_probe_create_sals_from_location)
3971         (bkpt_probe_decode_location, tracepoint_decode_location)
3972         (tracepoint_probe_decode_location)
3973         (strace_marker_create_sals_from_location): Return a std::vector
3974         instead of symtabs_and_lines.
3975         (strace_marker_create_breakpoints_sal): Update.
3976         (strace_marker_decode_location): Return a std::vector instead of
3977         symtabs_and_lines.  Update.
3978         (update_breakpoint_locations): Change struct symtabs_and_lines
3979         parameters to gdb::array_view.  Adjust.
3980         (location_to_sals): Return a std::vector instead of
3981         symtabs_and_lines.  Update.
3982         (breakpoint_re_set_default): Use std::vector instead of struct
3983         symtabs_and_lines.
3984         (decode_location_default): Return a std::vector instead of
3985         symtabs_and_lines.  Update.
3986         * breakpoint.h: Include "common/array-view.h".
3987         (struct breakpoint_ops) <decode_location>: Now returns a
3988         std::vector instead of returning a symtabs_and_lines via output
3989         parameter.
3990         (update_breakpoint_locations): Change sals parameters to use
3991         gdb::array_view.
3992         * cli/cli-cmds.c (edit_command, list_command): Update to use
3993         std::vector and gdb::array_view.
3994         (ambiguous_line_spec): Adjust to use gdb::array_view and
3995         range-for.
3996         (compare_symtabs): Rename to ...
3997         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3998         const reference and adjust.
3999         (filter_sals): Rewrite using std::vector and standard algorithms.
4000         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4001         (jump_command): Update to use std::vector.
4002         * linespec.c (struct linespec_state) <canonical_names>: Update
4003         comment.
4004         (add_sal_to_sals_basic): Delete.
4005         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4006         (decode_line_2, create_sals_line_offset)
4007         (convert_address_location_to_sals, convert_linespec_to_sals)
4008         (convert_explicit_location_to_sals, parse_linespec)
4009         (event_location_to_sals, decode_line_full, decode_line_1)
4010         (decode_line_with_current_source)
4011         (decode_line_with_last_displayed, decode_objc)
4012         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4013         (linespec_result::~linespec_result): Adjust to use std::vector
4014         instead of symtabs_and_lines.
4015         * linespec.h (linespec_sals::sals): Now a std::vector.
4016         (struct linespec_result): Use std::vector, bool, and in-class
4017         initialization.
4018         (decode_line_1, decode_line_with_current_source)
4019         (decode_line_with_last_displayed): Return std::vector.
4020         * macrocmd.c (info_macros_command): Use std::vector.
4021         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4022         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4023         std::vector.
4024         * probe.h (parse_probes): Return a std::vector.
4025         * python/python.c (gdbpy_decode_line): Use std::vector and
4026         gdb::array_view.
4027         * source.c (select_source_symtab, line_info): Use std::vector.
4028         * stack.c (func_command): Use std::vector.
4029         * symtab.h (struct symtabs_and_lines): Delete.
4030         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4031
4032 2017-09-04  Pedro Alves  <palves@redhat.com>
4033
4034         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4035         unittests/array-view-selftests.c.
4036         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4037         * common/array-view.h: New file.
4038         * unittests/array-view-selftests.c: New file.
4039
4040 2017-09-04  Pedro Alves  <palves@redhat.com>
4041
4042         * cli/cli-cmds.c (edit_command): Pass message to
4043         ambiguous_line_spec.
4044         (list_command): Pass message to ambiguous_line_spec.  Say
4045         "first"/"last" instead of "start" and "end" to be consistent with
4046         the manual.
4047         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4048         them to print formatted message.
4049
4050 2017-09-04  Pedro Alves  <palves@redhat.com>
4051
4052         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4053         ftrace_update_insns by reference instead of pointer.
4054
4055 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4056
4057         * i386-go32-tdep.c: Include x86-xstate.h.
4058         (i386_go32_init_abi): Call i386_target_description.
4059         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4060         if xcr0 is X86_XSTATE_X87_MASK.
4061         * i386-tdep.h (tdesc_i386): Remove the declaration.
4062         (tdesc_i386_mmx): Likewise.
4063
4064 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4065
4066         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4067         X86_XSTATE_SSE_MASK instead of 0.
4068
4069 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4070
4071         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4072         i386_target_description.
4073         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4074         i386_target_description.
4075         * i386-tdep.c (i386_gdbarch_init): Likewise.
4076
4077 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4078
4079         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4080         (x86_darwin_init_abi_64): Call amd64_target_description.
4081         * amd64-dicos-tdep.c: Likewise.
4082         * amd64-fbsd-nat.c: Likewise.
4083         * amd64-fbsd-tdep.c: Likewise.
4084         * amd64-nbsd-tdep.c: Likewise.
4085         * amd64-obsd-tdep.c: Likewise.
4086         * amd64-sol2-tdep.c: Likewise.
4087         * amd64-windows-tdep.c: Likewise.
4088         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4089
4090 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4091
4092         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4093         (btrace_function) <insn>: Change type to use std::vector.
4094         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4095         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4096         ftrace_update_insns, ftrace_compute_global_level_offset,
4097         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4098         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4099         change to std::vector.
4100         (ftrace_update_insns): Adjust to change to std::vector, change
4101         type of INSN parameter.
4102         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4103         * record-btrace.c (btrace_call_history_insn_range,
4104         btrace_compute_src_line_range,
4105         record_btrace_frame_prev_register): Adjust to change to
4106         std::vector.
4107         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4108         to change to std::vector.
4109
4110 2017-09-03  Tom Tromey  <tom@tromey.com>
4111
4112         * corefile.c (reopen_exec_file): Use std::string.
4113
4114 2017-09-03  Tom Tromey  <tom@tromey.com>
4115
4116         * compile/compile.c (compile_register_name_mangled): Return
4117         std::string.
4118         * compile/compile-loc2c.c (pushf_register_address): Update.
4119         (pushf_register): Update.
4120         * compile/compile-c-types.c (convert_array): Update.
4121         * compile/compile-c-symbols.c (generate_vla_size): Update.
4122         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4123         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4124         (convert_one_symbol): Update.
4125         (generate_c_for_for_one_variable): Update.
4126         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4127         std::string.
4128         (generate_register_struct): Update.
4129         * compile/compile-internal.h (c_get_range_decl_name): Return a
4130         std::string.
4131         (compile_register_name_mangled): Return std::string.
4132
4133 2017-09-03  Tom Tromey  <tom@tromey.com>
4134
4135         * utils.c (perror_string): Return a std::string.
4136         (throw_perror_with_name, perror_warning_with_name): Update.
4137
4138 2017-09-03  Tom Tromey  <tom@tromey.com>
4139
4140         * demangle.c (demangle_command): Use std::string,
4141         unique_xmalloc_ptr.
4142
4143 2017-09-03  Tom Tromey  <tom@tromey.com>
4144
4145         * cli/cli-setshow.c (do_set_command): Use std::string.
4146
4147 2017-09-03  Tom Tromey  <tom@tromey.com>
4148
4149         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4150
4151 2017-09-03  Tom Tromey  <tom@tromey.com>
4152
4153         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4154
4155 2017-09-03  Tom Tromey  <tom@tromey.com>
4156
4157         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4158         gdb::unique_xmalloc_ptr.
4159
4160 2017-09-03  Tom Tromey  <tom@tromey.com>
4161
4162         * thread.c (print_thread_info_1): Use string_printf.
4163         (thread_apply_command, thread_apply_all_command): Use
4164         std::string.
4165
4166 2017-09-03  Tom Tromey  <tom@tromey.com>
4167
4168         * valprint.c (val_print_string): Update.
4169         * gdbcore.h (memory_error_message): Return std::string.
4170         * corefile.c (memory_error_message): Return std::string.
4171         (memory_error): Update.
4172         * breakpoint.c (insert_bp_location): Update.
4173
4174 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4175
4176         * target/waitstatus.h (target_waitstatus_to_string): Change
4177         return type to std::string.
4178         * target/waitstatus.c (target_waitstatus_to_string): Return
4179         std::string.
4180         * target.h (target_waitstatus_to_string): Remove declaration.
4181         * infrun.c (resume, clear_proceed_status_thread,
4182         print_target_wait_results, do_target_wait, save_waitstatus,
4183         stop_all_threads): Adjust.
4184         * record-btrace.c (record_btrace_wait): Adjust.
4185         * target-debug.h
4186         (target_debug_print_struct_target_waitstatus_p): Adjust.
4187
4188 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4189
4190         PR gdb/22046
4191         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4192         detection.
4193
4194 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4195
4196         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4197         for setting/unsetting environment variables on the remote target.
4198         (New remote packets): Add entries for QEnvironmentHexEncoded,
4199         QEnvironmentUnset and QEnvironmentReset.
4200         * common/environ.c (gdb_environ::operator=): Extend method to
4201         handle m_user_set_env_list and m_user_unset_env_list.
4202         (gdb_environ::clear): Likewise.
4203         (match_var_in_string): Change type of first parameter from 'char
4204         *' to 'const char *'.
4205         (gdb_environ::set): Extend method to handle
4206         m_user_set_env_list and m_user_unset_env_list.
4207         (gdb_environ::unset): Likewise.
4208         (gdb_environ::clear_user_set_env): New method.
4209         (gdb_environ::user_set_envp): Likewise.
4210         (gdb_environ::user_unset_envp): Likewise.
4211         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4212         m_user_unset_env_list on move constructor/assignment.
4213         (unset): Add new default parameter 'update_unset_list = true'.
4214         (clear_user_set_env): New method.
4215         (user_set_envp): Likewise.
4216         (user_unset_envp): Likewise.
4217         (m_user_set_env_list): New std::set.
4218         (m_user_unset_env_list): Likewise.
4219         * common/rsp-low.c (hex2str): New function.
4220         (bin2hex): New overload for bin2hex function.
4221         * common/rsp-low.c (hex2str): New prototype.
4222         (str2hex): New overload prototype.
4223         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4224         QEnvironmentUnset and QEnvironmentReset.
4225         (remote_protocol_features): Add QEnvironmentHexEncoded,
4226         QEnvironmentUnset and QEnvironmentReset packets.
4227         (send_environment_packet): New function.
4228         (extended_remote_environment_support): Likewise.
4229         (extended_remote_create_inferior): Call
4230         extended_remote_environment_support.
4231         (_initialize_remote): Add QEnvironmentHexEncoded,
4232         QEnvironmentUnset and QEnvironmentReset packet configs.
4233         * unittests/environ-selftests.c (gdb_selftest_env_var):
4234         New variable.
4235         (test_vector_initialization): New function.
4236         (test_init_from_host_environ): Likewise.
4237         (test_reinit_from_host_environ): Likewise.
4238         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4239         Likewise.
4240         (test_unset_set_empty_vector): Likewise.
4241         (test_vector_clear): Likewise.
4242         (test_std_move): Likewise.
4243         (test_move_constructor):
4244         (test_self_move): Likewise.
4245         (test_set_unset_reset): Likewise.
4246         (run_tests): Rewrite in terms of the functions above.
4247
4248 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4249
4250         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4251         (adi_available): Use a temp variable of type CORE_ADDR as argument
4252         3 when calling target_auxv_search.
4253         (adi_normalize_address): Use masks and xor operators to calculate
4254         normalized address.
4255         (adi_read_versions, adi_write_versions, adi_print_versions)
4256         (do_examine, do_assign): Use paddress.
4257
4258 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4259
4260         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4261         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4262         out of loop and add supply of FIR.
4263         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4264         add collect of FIR.
4265
4266 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4267
4268         PR gdb/21827
4269         * cli/cli-script.c (define_command): Don't convert command name
4270         to lower case.
4271
4272 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4273
4274         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4275         Update all callers accordingly. Remove all code blocks handling
4276         the case where DISPP is not NULL.
4277
4278 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4279
4280         PR symtab/22003
4281         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4282         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4283         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4284
4285 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4286
4287         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4288         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4289         (read_comp_units_from_section): New parameter abbrev_section, use
4290         read_and_check_comp_unit_head, allocate signatured_type if needed.
4291         (create_all_comp_units): Update read_comp_units_from_section caller.
4292
4293 2017-08-23  Pedro Alves  <palves@redhat.com>
4294
4295         PR remote/21852
4296         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4297         to null_ptid and switch to thread without reading the registers
4298         after adding the inferior.
4299
4300 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4301
4302         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4303         compile-gcc.
4304         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4305         (compile_to_object): Implement compile_gcc.
4306         (_initialize_compile): Install "set compile-gcc".  Initialize
4307         compile_gcc.
4308
4309 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4310
4311         * compile/compile.c (compile_to_object): Conditionally call
4312         set_verbose.  Conditionally call compile or compile_v0.
4313
4314 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4315
4316         * sparc64-tdep.h: (adi_normalize_address): New export.
4317         * sparc-nat.h: (open_adi_tag_fd): New export.
4318         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4319         * sparc64-linux-tdep.c:
4320         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4321         (sparc64_linux_handle_segmentation_fault): New function.
4322         (sparc64_linux_init_abi): Register
4323         sparc64_linux_handle_segmentation_fault
4324         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4325         (sparc64_addr_bits_remove): New function.
4326         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4327         (MAX_PROC_NAME_SIZE): New macro.
4328         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4329         (sparc64adilist): New variable.
4330         (adi_proc_list): New variable.
4331         (find_adi_info): New function.
4332         (add_adi_info): New function.
4333         (get_adi_info_proc): New function.
4334         (get_adi_info): New function.
4335         (info_adi_command): New function.
4336         (read_maps_entry): New function.
4337         (adi_available): New function.
4338         (adi_normalize_address): New function.
4339         (adi_align_address): New function.
4340         (adi_convert_byte_count): New function.
4341         (adi_tag_fd): New function.
4342         (adi_is_addr_mapped): New function.
4343         (adi_read_versions): New function.
4344         (adi_write_versions): New function.
4345         (adi_print_versions): New function.
4346         (do_examine): New function.
4347         (do_assign): New function.
4348         (adi_examine_command): New function.
4349         (adi_assign_command): New function.
4350         (_initialize_sparc64_adi_tdep): New function.
4351
4352 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * breakpoint.c (breakpoints_info): Rename to ...
4355         (info_breakpoints_command): ... this.
4356         (watchpoints_info): Rename to ...
4357         (info_watchpoints_command): ... this.
4358         (tracepoints_info): Rename to ...
4359         (info_tracepoints_command): ... this.
4360         (_initialize_breakpoint): Adjust.
4361         * dcache.c (dcache_info): Rename to ...
4362         (info_display_command): ... this.
4363         (_initialize_dcache): Adjust.
4364         * frame.h (args_info): Rename to ...
4365         (info_args_command): ... this.
4366         (locals_info): Rename to ...
4367         (info_locals_command): ... this.
4368         * infcmd.c (nofp_registers_info): Rename to ...
4369         (info_registers_command): ... this.
4370         (float_info): Rename to ...
4371         (info_float_command): ... this.
4372         (program_info): Rename to ...
4373         (info_program_command): ... this.
4374         (all_registers_info): Rename to ...
4375         (info_all_registers_command): ... this.
4376         (vector_info): Rename to ...
4377         (info_vector_command): ... this.
4378         (float_info): Rename to ...
4379         (info_float_command): ... this.
4380         (_initialize_infcmd): Adjust.
4381         * inferior.h (term_info): Rename to ...
4382         (info_terminal_command): ... this.
4383         * inflow.c (term_info): Rename to ...
4384         (info_terminal_command): ... this.
4385         (_initialize_inflow): Adjust.
4386         * infrun.c (signals_info): Rename to ...
4387         (info_signals_command): ... this.
4388         (_initialize_infrun): Adjust.
4389         * objc-lang.c (classes_info): Rename to ...
4390         (info_classes_command): ... this.
4391         (selectors_info): Rename to ...
4392         (info_selectors_command): ... this.
4393         (_initialize_objc_language): Adjust.
4394         * printcmd.c (sym_info): Rename to ...
4395         (info_symbol_command): ... this.
4396         (address_info): Rename to ...
4397         (info_address_command): ... this.
4398         (display_info): Rename to ...
4399         (info_display_command): ... this.
4400         (_initialize_printcmd): Adjust.
4401         * reverse.c (bookmarks_info): Rename to ...
4402         (info_breakpoints_command): ... this.
4403         (_initialize_reverse): Adjust.
4404         * ser-go32.c (dos_info): Rename to ...
4405         (info_serial_command): ... this.
4406         (_initialize_ser_dos): Adjust.
4407         * skip.c (skip_info): Rename to ...
4408         (info_skip_command): ... this.
4409         (_initialize_step_skip): Adjust.
4410         * source.c (line_info): Rename to ...
4411         (info_line_command): ... this.
4412         (source_info): Rename to ...
4413         (info_source_command)
4414         * stack.c (frame_info): Rename to ...
4415         (info_frame_command): ... this.
4416         (locals_info): Rename to ...
4417         (info_locals_command): ... this.
4418         (args_info): Rename to ...
4419         (info_args_command): ... this.
4420         (_initialize_stack): Adjust.
4421         * symtab.c (sources_info): Rename to ...
4422         (info_sources_command): ... this.
4423         (variables_info): Rename to ...
4424         (info_variables_command): ... this.
4425         (functions_info): Rename to ...
4426         (info_functions_command): ... this.
4427         (types_info): Rename to ...
4428         (info_types_command): ... this.
4429         (_initialize_symtab): Adjust.
4430         * target.c (target_info): Rename to ...
4431         (info_target_command): ... this.
4432         (initialize_targets): Adjust.
4433         * tracepoint.c (tvariables_info): Rename to ...
4434         (info_tvariables_command): ... this.
4435         (scope_info): Rename to ...
4436         (info_scope_command): ... this.
4437         (trace_dump_actions): Adjust.
4438         (_initialize_tracepoint): Adjust.
4439
4440 2017-08-22  Tom Tromey  <tom@tromey.com>
4441
4442         * breakpoint.h (install_breakpoint): Update.
4443         * breakpoint.c (add_solib_catchpoint): Update.
4444         (install_breakpoint): Change argument to a std::unique_ptr.
4445         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4446         (create_breakpoint_sal, create_breakpoint): Update.
4447         (watch_command_1, catch_exec_command_1)
4448         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4449         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4450         Return the breakpoint.
4451         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4452         (new_single_step_breakpoint): Update.
4453         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4454         std::unique_ptr.
4455         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4456         std::unique_ptr.
4457         * break-catch-sig.c (create_signal_catchpoint): Use
4458         std::unique_ptr.
4459         * ada-lang.c (create_ada_exception_catchpoint): Use
4460         std::unique_ptr.
4461
4462 2017-08-22  Tom Tromey  <tom@tromey.com>
4463
4464         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4465
4466 2017-08-22  Tom Tromey  <tom@tromey.com>
4467
4468         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4469         (lookup_partial_symbol): Update.
4470
4471 2017-08-22  Tom Tromey  <tom@tromey.com>
4472
4473         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4474         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4475         (find_and_open_source, symtab_to_fullname): Update.
4476         * psymtab.c (psymtab_to_fullname): Update.
4477
4478 2017-08-22  Tom Tromey  <tom@tromey.com>
4479
4480         * exec.c (exec_file_attach): Update.
4481         * linux-thread-db.c (try_thread_db_load): Update.
4482         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4483         * utils.c (gdb_realpath): Change return type.
4484         (gdb_realpath_keepfile): Update.
4485         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4486         (_initialize_utils): Register the new self test.
4487         * source.c (openp): Update.
4488         (find_and_open_source): Update.
4489         * nto-tdep.c (nto_find_and_open_solib): Update.
4490         * main.c (set_gdb_data_directory): Update.
4491         (captured_main_1): Update.
4492         * dwarf2read.c (dwarf2_get_dwz_file): Update
4493         (dw2_map_symbol_filenames): Update.
4494         * auto-load.c (auto_load_safe_path_vec_update): Update.
4495         (filename_is_in_auto_load_safe_path_vec): Change type of
4496         "filename_realp".
4497         (auto_load_objfile_script): Update.
4498         (file_is_auto_load_safe): Update.  Use std::string.
4499         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4500
4501 2017-08-22  Tom Tromey  <tom@tromey.com>
4502
4503         * utils.c (gdb_realpath_keepfile): Return a
4504         gdb::unique_xmalloc_ptr.
4505         * exec.c (exec_file_attach): Update.
4506         * utils.h (gdb_realpath_keepfile): Return a
4507         gdb::unique_xmalloc_ptr.
4508
4509 2017-08-22  Tom Tromey  <tom@tromey.com>
4510
4511         * compile/compile.c (compile_file_command): Use
4512         gdb::unique_xmalloc_ptr, std::string.
4513         * utils.c (gdb_abspath): Change return type.
4514         * source.c (openp): Update.
4515         * objfiles.c (allocate_objfile): Update.
4516         * main.c (set_gdb_data_directory): Update.
4517         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4518
4519 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4520
4521         * cli-cmds.c (list_commands): List actual code around more than
4522         one location.
4523
4524 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4525
4526         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4527
4528 2017-08-21  Pedro Alves  <palves@redhat.com>
4529
4530         PR gdb/19487
4531         * c-exp.y (variable production): Handle function aliases.
4532         * minsyms.c (msymbol_is_text): New function.
4533         * minsyms.h (msymbol_is_text): Declare.
4534         * symtab.c (find_function_alias_target): New function.
4535         * symtab.h (find_function_alias_target): Declare.
4536
4537 2017-08-21  Pedro Alves  <palves@redhat.com>
4538
4539         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4540         typedefs.
4541         * typeprint.c (whatis_exp): If handling "whatis", and expression
4542         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4543         typedefs here.
4544         * valops.c (value_cast): Save "to" type before resolving
4545         stubs/typedefs.  Use that type as resulting value's type.
4546
4547 2017-08-18  Tom Tromey  <tom@tromey.com>
4548             Pedro Alves  <palves@redhat.com>
4549
4550         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4551         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4552         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4553         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4554         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4555         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4556         (linux_get_siginfo_data): Add "thread" argument.  Use
4557         scoped_restore.
4558         * linux-nat.c (linux_child_follow_fork)
4559         (check_stopped_by_watchpoint): Use scoped_restore.
4560         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4561         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4562         (restore_inferior_ptid, save_inferior_ptid): Remove.
4563         * btrace.c (btrace_fetch): Use scoped_restore.
4564         * bsd-uthread.c (bsd_uthread_fetch_registers)
4565         (bsd_uthread_store_registers): Use scoped_restore.
4566         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4567         scoped_restore.
4568         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4569         (aix_thread_xfer_partial): Use scoped_restore.
4570         * inferior.h (save_inferior_ptid): Remove.
4571
4572 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4573
4574         PR tdep/21818
4575         * arm-tdep.c (gdb_print_insn_arm): Mark
4576         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4577
4578 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4579
4580         * NEWS: Mention GDBserver's new option "--selftest".
4581         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4582         * selftest.c: Move it to common/selftest.c.
4583         * selftest.h: Move it to common/selftest.h.
4584         * selftest-arch.c (reset): New function.
4585         (tests_with_arch): Call reset.
4586
4587 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4588
4589         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4590         instead of exception_fprintf and printf_filtered.
4591
4592 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4593
4594         * selftest.c (register_self_test): Rename it to
4595         selftests::register_test.
4596         (run_self_tests): selftest::run_tests.
4597         * selftest.h: Update declarations.
4598         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4599         selftests::register_test_foreach_arch.
4600         * selftest-arch.h: Update declaration.
4601         * aarch64-tdep.c: Update.
4602         * arm-tdep.c: Likewise.
4603         * disasm-selftests.c: Likewise.
4604         * dwarf2loc.c: Likewise.
4605         * dwarf2-frame.c: Likewise.
4606         * findvar.c: Likewise.
4607         * gdbarch-selftests.c: Likewise.
4608         * maint.c (maintenance_selftest): Likewise.
4609         * regcache.c: Likewise.
4610         * rust-exp.y: Likewise.
4611         * selftest-arch.c: Likewise.
4612         * unittests/environ-selftests.c: Likewise.
4613         * unittests/function-view-selftests.c: Likewise.
4614         * unittests/offset-type-selftests.c: Likewise.
4615         * unittests/optional-selftests.c: Likewise.
4616         * unittests/scoped_restore-selftests.c: Likewise.
4617         * utils-selftests.c: Likewise.
4618
4619 2017-08-17  Pedro Alves  <palves@redhat.com>
4620
4621         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4622         local.
4623
4624 2017-08-17  Pedro Alves  <palves@redhat.com>
4625
4626         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4627         field.
4628         (reset_die_in_process): Delete, replaced by ...
4629         (process_die_scope): ... this new class.  Make it responsible for
4630         freeing cu->line_header too.
4631         (process_die): Use process_die_scope.
4632         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4633         cu->line_header_die_owner.  Don't release the line header if it's
4634         owned by the CU.
4635         (setup_type_unit_groups): Make the CU/DIE own the line header.
4636         Don't release the line header here.
4637
4638 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4639
4640         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4641
4642 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4643
4644         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4645         Single-Key mode
4646
4647 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4648
4649         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4650         mode command list.
4651
4652 2017-08-15  Stafford Horne  <shorne@gmail.com>
4653
4654         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4655
4656 2017-08-15  Stafford Horne  <shorne@gmail.com>
4657
4658         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4659
4660 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4661
4662         PR gdb/21954
4663         * infcmd.c (unset_environment_command): Use the 'clear' method on
4664         the environment instead of resetting it.
4665
4666 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4667
4668         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4669         platforms.
4670
4671 2017-08-14  Tom Tromey  <tom@tromey.com>
4672
4673         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4674         (print_binary_chars): Likewise.
4675         (BITS_IN_BYTES): Remove.
4676
4677 2017-08-14  Tom Tromey  <tom@tromey.com>
4678
4679         PR gdb/21675
4680         * valprint.c (LOW_ZERO): Change value to 034.
4681         (print_octal_chars): Add static_asserts for octal constants.
4682         * printcmd.c (print_scalar_formatted): Add 'd' case.
4683
4684 2017-08-11  Tom Tromey  <tom@tromey.com>
4685
4686         * symfile.c (add_symbol_file_command): Use std::vector.
4687
4688 2017-08-14  Tom Tromey  <tom@tromey.com>
4689
4690         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4691         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4692         std::move.
4693         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4694
4695 2017-08-11  Pedro Alves  <palves@redhat.com>
4696
4697         * infrun.c (process_event_stop_test): Adjust
4698         function_name_is_marked_for_skip call.
4699         * skip.c: Include <list>.
4700         (skiplist_entry): Make it a class with private fields, and
4701         getters/setters.
4702         (skiplist_entry_chain): Delete.
4703         (skiplist_entries): New.
4704         (skiplist_entry_count): Delete.
4705         (highest_skiplist_entry_num): New.
4706         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4707         (add_skiplist_entry): Delete.
4708         (skiplist_entry::skiplist_entry): New.
4709         (skiplist_entry::add_entry): New.
4710         (skip_file_command, skip_function): Adjust.
4711         (compile_skip_regexp): Delete.
4712         (skip_command): Don't compile regexp here.  Adjust to use
4713         skiplist_entry::add_entry.
4714         (skip_info): Adjust to use range-for and getters.
4715         (skip_enable_command, skip_disable_command): Adjust to use
4716         range-for and setters.
4717         (skip_delete_command): Adjust to use std::list.
4718         (add_skiplist_entry): Delete.
4719         (skip_file_p): Delete, refactored as ...
4720         (skiplist_entry::do_skip_file_p): ... this new method.
4721         (skip_gfile_p): Delete, refactored as ...
4722         (skiplist_entry::do_gskip_file_p): ... this new method.
4723         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4724         (skiplist_entry::skip_function_p): ... this new method.
4725         (function_name_is_marked_for_skip): Now returns bool, and takes
4726         the function sal by const reference.  Adjust to use range-for and
4727         skiplist_entry methods.
4728         (_initialize_step_skip): Remove references to
4729         skiplist_entry_chain, skiplist_entry_count.
4730         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4731         takes the function sal by const reference.
4732
4733 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4734
4735         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4736         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4737         (dwarf2_frame_cache):
4738         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4739         RETURN_MASK_ALL and set *this_case to NULL.
4740         * frame-unwind.h: Update comments.
4741
4742 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4743
4744         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4745         (dwarf2_frame_state_copy_regs): Remove.
4746         (dwarf2_frame_state_free_regs): Remove.
4747         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4748         (dwarf2_restore_rule): Call method .alloc_regs instead of
4749         dwarf2_frame_state_alloc_regs.
4750         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4751         constructor.  Call std::move.
4752         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4753         (dwarf2_frame_cache): Likewise.
4754
4755         [GDB_SELF_TEST]: Include selftest.h and
4756         selftest-arch.h.
4757         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4758         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4759         execute_cfa_program_test.
4760
4761         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4762         copy ctor, assignment operator, move assignment.
4763         <alloc_regs>: New method.
4764         <swap>: New method.
4765         (struct dwarf2_frame_state): Delete dtor.
4766         (dwarf2_frame_state_alloc_regs): Remove declaration.
4767         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4768         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4769
4770 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4771
4772         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4773         (dwarf2_frame_state::dwarf2_frame_state): New.
4774         (dwarf2_frame_state::~dwarf2_frame_state): New.
4775         (dwarf2_fetch_cfa_info): Update.
4776         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4777         rather than a pointer.  Update code.
4778         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4779         dtor.
4780         <data_align, code_align, retaddr_column>: Change them to const.
4781         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4782         to bool.
4783
4784 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4785
4786         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4787         <loc.exp>: New field.
4788         * dwarf2-frame.c (execute_cfa_program): Update.
4789         (dwarf2_frame_prev_register): Update.
4790
4791 2017-08-10  Pedro Alves  <palves@redhat.com>
4792
4793         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4794
4795 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4796
4797         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4798         (fbsd_pending_children): Use std::list.
4799         (fbsd_remember_child): Likewise.
4800         (fbsd_is_child_pending): Likewise.
4801         (fbsd_pending_vfork_done): Use std::forward_list.
4802         (fbsd_add_vfork_done): Likewise.
4803         (fbsd_is_vfork_done_pending): Likewise.
4804         (fbsd_next_vfork_done): Likewise.
4805
4806 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4807
4808         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4809         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4810         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4811         for `mapfilename'.
4812         (fbsd_xfer_partial): Use gdb::byte_vector.
4813         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4814
4815 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4816
4817         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4818         "filestuff.h".
4819         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4820
4821 2017-08-09  Tom Tromey  <tom@tromey.com>
4822
4823         * skip.c (skiplist_entry): New constructor.
4824         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4825         (skiplist_entry::file_is_glob): Now bool.
4826         (skiplist_entry::file, skiplist_entry::function): Now
4827         std::string.
4828         (make_skip_entry): Return a unique_ptr.  Use new.
4829         (free_skiplist_entry, free_skiplist_entry_cleanup)
4830         (make_free_skiplist_entry_cleanup): Remove.
4831         (skip_command, skip_disable_command, add_skiplist_entry)
4832         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4833         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4834         (function_name_is_marked_for_skip): Update.
4835         (skip_delete_command): Update.  Use delete.
4836
4837 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4838
4839         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4840         (aarch64_linux_core_read_description): New function.
4841         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4842
4843 2017-08-09  Pedro Alves  <palves@redhat.com>
4844
4845         * cp-name-parser.y (cp_comp_to_string): Return a
4846         gdb::unique_xmalloc_ptr<char>.
4847         * cp-support.c (replace_typedefs_qualified_name)
4848         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4849         (cp_canonicalize_string_full): Use op= instead of explicit
4850         convertion.
4851         (cp_class_name_from_physname, method_name_from_physname)
4852         (cp_func_name, cp_remove_params): Adjust to use
4853         gdb::unique_xmalloc_ptr<char>.
4854         * cp-support.h (cp_comp_to_string): Return a
4855         gdb::unique_xmalloc_ptr<char>.
4856         * python/py-type.c (typy_lookup_type): Adjust to use
4857         gdb::unique_xmalloc_ptr<char>.
4858
4859 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4860
4861         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4862
4863 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4864             Yao Qi  <yao.qi@linaro.org>
4865
4866         * cp-support.c (cp_canonicalize_string_full): Use
4867         gdb::unique_xmalloc_ptr<char>.
4868         (cp_canonicalize_string): Likewise.
4869
4870 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4871
4872         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4873         * regformats/i386/amd64-avx-avx512.dat: Remove.
4874         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4875         * regformats/i386/amd64-avx-mpx.dat:Remove.
4876         * regformats/i386/amd64-avx.dat: Remove.
4877         * regformats/i386/amd64-mpx.dat: Remove.
4878         * regformats/i386/i386-avx-avx512.dat: Remove.
4879         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4880         * regformats/i386/i386-avx-mpx.dat: Remove.
4881         * regformats/i386/i386-mmx.dat: Remove.
4882         * regformats/i386/i386-mpx.dat: Remove.
4883
4884 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4885
4886         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4887         * amd64-tdep.c: Don't include features/i386/x32*.c.
4888         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4889         functions.
4890         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4891         and i386/x32-avx-avx512.
4892         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4893         and i386/x32.xml.
4894         * features/i386/x32-avx-avx512.c: Removed.
4895         * features/i386/x32-avx-avx512.xml: Removed.
4896         * features/i386/x32-avx.c: Removed.
4897         * features/i386/x32-avx.xml: Removed.
4898         * features/i386/x32.c: Removed.
4899         * features/i386/x32.xml: Removed.
4900         * regformats/i386/x32-avx-avx512.dat: Removed.
4901         * regformats/i386/x32-avx.dat: Removed.
4902         * regformats/i386/x32.dat: Removed.
4903
4904 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4905
4906         PR breakpoints/21886
4907         * mem-break.c (default_memory_insert_breakpoint): Use
4908         `->placed_address' rather than `->reqstd_address' for the
4909         breakpoint location.
4910
4911 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4912
4913         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4914         assertions.
4915
4916 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4917
4918         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4919         a union of `tdep_info', `tdesc_data' and `id'.
4920         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4921         rather than `info.tdep_info'.
4922         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4923         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4924         * i386-tdep.c (i386_gdbarch_init): Likewise.
4925         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4926         * mips-tdep.c (mips_gdbarch_init): Likewise.
4927         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4928         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4929         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4930         `info.tdep_info'.
4931         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4932         `info.tdep_info'.
4933         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4934         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4935         `info.tdep_info'.
4936         * spu-tdep.c (spu_gdbarch_init): Likewise.
4937         * gdbarch.h: Regenerate.
4938
4939 2017-08-07  Leszek Swirski  <leszeks@google.com>
4940
4941         PR symtab/20899
4942         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4943
4944 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4945
4946         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4947         (gdbsim_open): Rename gdb_argv args object to argv.
4948
4949 2017-08-05  Tom Tromey  <tom@tromey.com>
4950
4951         * compile/compile-object-load.c (compile_object_load): Use
4952         gdb::unique_xmalloc_ptr.
4953         * cli/cli-dump.c (scan_filename): Rename from
4954         scan_filename_with_cleanup.  Change return type.
4955         (scan_expression): Rename from scan_expression_with_cleanup.
4956         Change return type.
4957         (dump_memory_to_file, dump_value_to_file, restore_command):
4958         Use gdb::unique_xmalloc_ptr.  Update.
4959         * cli/cli-cmds.c (find_and_open_script): Use
4960         gdb::unique_xmalloc_ptr.
4961         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4962         * symmisc.c (maintenance_print_symbols)
4963         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4964         * symfile.c (symfile_bfd_open, generic_load)
4965         (add_symbol_file_command, remove_symbol_file_command): Use
4966         gdb::unique_xmalloc_ptr.
4967         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4968         * psymtab.c (maintenance_print_psymbols): Use
4969         gdb::unique_xmalloc_ptr.
4970         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4971         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4972         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4973         (reload_shared_libraries_1): Likewise.
4974
4975 2017-08-05  Tom Tromey  <tom@tromey.com>
4976
4977         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4978         (rust_op_vector, rust_set_vector): New typedefs.
4979         (current_parser): New global.
4980         (work_obstack): Change to pointer type.  Update all users.
4981         (rust_ast, pstate): Remove globals.
4982         (struct rust_parser): New.
4983         (%union) <params, field_inits>: Change type.
4984         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4985         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4986         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4987         (convert_params_to_types, convert_params_to_expression): Change
4988         type of "params".
4989         (ast_string): Change type of "fields".
4990         (rust_parse): Make a rust_parser.  Remove cleanups.
4991         (rust_lex_tests): Make and install an auto_obstack.
4992
4993 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4994
4995         * configure.srv (ipa_x32_linux_regobj): New.
4996         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4997         instead of X86_TDESC_AVX512.
4998         (initialize_low_tracepoint): Call
4999         init_registers_x32_avx_avx512_linux.
5000
5001 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5002
5003         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5004
5005 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5006
5007         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5008
5009 2017-08-03  Tom Tromey  <tom@tromey.com>
5010
5011         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5012         Remove.
5013         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5014
5015 2017-08-03  Tom Tromey  <tom@tromey.com>
5016
5017         * python/py-param.c (compute_enum_values): Use gdb_argv.
5018
5019 2017-08-03  Tom Tromey  <tom@tromey.com>
5020
5021         * utils.h (struct gdb_argv_deleter): New.
5022         (gdb_argv): New class.
5023         * utils.c (gdb_argv::reset): New method.
5024         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5025         * tracefile.c (tsave_command): Use gdb_argv.
5026         * top.c (new_ui_command): Use gdb_argv.
5027         * symmisc.c (maintenance_print_symbols)
5028         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5029         * symfile.c (symbol_file_command, generic_load)
5030         (remove_symbol_file_command): Use gdb_argv.
5031         * stack.c (backtrace_command): Use gdb_argv.
5032         * source.c (add_path, show_substitute_path_command)
5033         (unset_substitute_path_command, set_substitute_path_command):
5034         Use gdb_argv.
5035         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5036         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5037         * remote.c (extended_remote_run, remote_put_command)
5038         (remote_get_command, remote_delete_command): Use gdb_argv.
5039         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5040         (gdbsim_open): Use gdb_argv.
5041         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5042         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5043         * procfs.c (procfs_info_proc): Use gdb_argv.
5044         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5045         * infrun.c (handle_command): Use gdb_argv.
5046         * inferior.c (add_inferior_command, clone_inferior_command):
5047         Use gdb_argv.
5048         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5049         * exec.c (exec_file_command): Use gdb_argv.
5050         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5051         * compile/compile.c (build_argc_argv): Use gdb_argv.
5052
5053 2017-08-03  Tom Tromey  <tom@tromey.com>
5054
5055         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5056
5057 2017-08-03  Tom Tromey  <tom@tromey.com>
5058
5059         * python/python.c (compute_python_string): Return std::string.
5060         (gdbpy_eval_from_control_command): Update.
5061         (do_start_initialization): Use std::string.
5062         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5063         xstrprintf.
5064         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5065         xstrprintf.
5066
5067 2017-08-03  Tom Tromey  <tom@tromey.com>
5068
5069         * top.h (do_restore_instream_cleanup): Remove.
5070         * top.c (do_restore_instream_cleanup): Remove.
5071         (read_command_file): Use scoped_restore.
5072         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5073
5074 2017-08-03  Tom Tromey  <tom@tromey.com>
5075
5076         * cli/cli-script.c (execute_user_command)
5077         (execute_control_command): Use scoped_restore.
5078
5079 2017-08-03  Tom Tromey  <tom@tromey.com>
5080
5081         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5082         (execute_user_command): Remove user_call_depth; use
5083         user_args_stack's size instead.
5084
5085 2017-08-03  Tom Tromey  <tom@tromey.com>
5086
5087         * top.h (in_user_command): Remove.
5088         * top.c (in_user_command): Remove.
5089         * cli/cli-script.c (do_restore_user_call_depth)
5090         (execute_user_command): Update.
5091
5092 2017-08-03  Tom Tromey  <tom@tromey.com>
5093
5094         * valops.c (search_struct_method): Use gdb::byte_vector.
5095         * valarith.c (value_concat): Use std::vector.
5096         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5097         (simple_search_memory): Likewise.
5098         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5099         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5100         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5101         * elfread.c (elf_rel_plt_read): Use std::string.
5102         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5103         * cli/cli-dump.c (restore_section_callback): Use
5104         gdb::byte_vector.
5105
5106 2017-08-03  Tom Tromey  <tom@tromey.com>
5107
5108         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5109
5110 2017-08-03  Tom Tromey  <tom@tromey.com>
5111
5112         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5113         (tui_register_format): Use scoped_restore.
5114
5115 2017-08-03  Tom Tromey  <tom@tromey.com>
5116
5117         * reverse.c (exec_direction_default): Remove.
5118         (exec_reverse_once): Use scoped_restore.
5119         * remote.c (restore_remote_timeout): Remove.
5120         (remote_flash_erase, remote_flash_write, remote_flash_done)
5121         (readchar, remote_serial_write): Use scoped_restore.
5122         * cli/cli-script.c (struct source_cleanup_lines_args)
5123         (source_cleanup_lines): Remove.
5124         (script_from_file): Use scoped_restore.
5125         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5126         (source_command): Use scoped_restore.
5127
5128 2017-08-03  Tom Tromey  <tom@tromey.com>
5129
5130         * utils.h (make_cleanup_free_so): Remove.
5131         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5132         * solist.h (struct so_deleter): New.
5133         (so_list_up): New typedef.
5134         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5135
5136 2017-08-03  Tom Tromey  <tom@tromey.com>
5137
5138         * utils.h (make_cleanup_restore_current_language): Remove.
5139         * utils.c (do_restore_current_language)
5140         (make_cleanup_restore_current_language): Remove.
5141         * parse.c (parse_exp_in_context_1)
5142         (parse_expression_with_language): Use
5143         scoped_restore_current_language.
5144         * mi/mi-main.c (mi_cmd_execute): Use
5145         scoped_restore_current_language.
5146         * language.h (scoped_restore_current_language): New class.
5147
5148 2017-08-03  Tom Tromey  <tom@tromey.com>
5149
5150         * compile/compile.c (cleanup_unlink_file): Remove.
5151         (compile_to_object): Use gdb::unlinker.
5152         (eval_compile_command): Likewise.
5153
5154 2017-08-03  Tom Tromey  <tom@tromey.com>
5155
5156         * utils.h (make_cleanup_fclose): Remove.
5157         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5158
5159 2017-08-03  Tom Tromey  <tom@tromey.com>
5160
5161         * top.c (open_terminal_stream): Return gdb_file_up.
5162         (new_ui_command): Update.
5163
5164 2017-08-03  Tom Tromey  <tom@tromey.com>
5165
5166         * source.c (print_source_lines_base, forward_search_command)
5167         (reverse_search_command): Use gdb_file_up.
5168
5169 2017-08-03  Tom Tromey  <tom@tromey.com>
5170
5171         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5172
5173 2017-08-03  Tom Tromey  <tom@tromey.com>
5174
5175         * cli/cli-cmds.c (find_and_open_script): Change return type.
5176         Remove "streamp" and "full_path" parameters.
5177         (source_script_with_search): Update.
5178         * auto-load.c (source_script_file): Update.
5179         * cli/cli-cmds.h (find_and_open_script): Change type.
5180         (open_script): New struct.
5181
5182 2017-08-03  Tom Tromey  <tom@tromey.com>
5183
5184         * xml-support.c (xml_fetch_content_from_file): Update.
5185         * ui-file.c (stdio_file::open): Update.
5186         * tracefile-tfile.c (tfile_start): Update.
5187         * remote.c (remote_file_put, remote_file_get): Update.
5188         * nat/linux-procfs.c (linux_proc_get_int)
5189         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5190         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5191         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5192         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5193         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5194         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5195         * linux-nat.c (linux_proc_pending_signals): Update.
5196         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5197         (file_closer): Remove.
5198         * compile/compile.c (compile_to_object): Update.
5199         * common/filestuff.h (struct gdb_file_deleter): New.
5200         (gdb_file_up): New typedef.
5201         (gdb_fopen_cloexec): Change return type.
5202         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5203         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5204         (dump_binary_file, restore_binary_file): Update.
5205         * auto-load.c (auto_load_objfile_script_1): Update.
5206
5207 2017-08-03  Tom Tromey  <tom@tromey.com>
5208
5209         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5210         (info_static_tracepoint_markers_command): Likewise.
5211         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5212         * skip.c (skip_info): Use ui_out_emit_table.
5213         * progspace.c (print_program_space): Use ui_out_emit_table.
5214         * osdata.c (info_osdata): Use ui_out_emit_table.
5215         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5216         ui_out_emit_table.
5217         * linux-thread-db.c (info_auto_load_libthread_db): Use
5218         ui_out_emit_table.
5219         * inferior.c (print_inferior): Use ui_out_emit_table.
5220         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5221         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5222         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5223         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5224         * ui-out.h (class ui_out_emit_table): New.
5225
5226 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5227
5228         * mips-tdep.c (mips_fpu_type_str): New function.
5229         (mips_dump_tdep): Call it.
5230
5231 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5232
5233         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5234         `->mips_fpu_type'.
5235
5236 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5237
5238         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5239
5240 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5241
5242         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5243
5244 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5245
5246         * cli/cli-cmds.c (maintenancechecklist): New variable.
5247         * gdbcmd.h (maintenancechecklist): Declare it.
5248         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5249         Call i386_linux_read_description with different masks.
5250         * maint.c (maintenance_check_command): New function.
5251         (_initialize_maint_cmds): Call add_prefix_cmd.
5252         * target-descriptions.c (tdesc_reg): override operator != and ==.
5253         (tdesc_type): Likewise.
5254         (tdesc_feature): Likewise.
5255         (target_desc): Likewise.
5256         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5257         (maintenance_check_xml_descriptions): New function.
5258         (_initialize_target_descriptions) Add command "xml-descriptions".
5259         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5260
5261 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5262
5263         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5264         Include features/i386/32bit-*.c.
5265         (i386_linux_read_description): Generate target description if it
5266         doesn't exist.
5267         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5268         functions.
5269         * features/i386/32bit-linux.c: Re-generated.
5270         * features/i386/32bit-sse.c: Likewise.
5271         * target-descriptions.c (print_c_feature::visit): Print code to
5272         set register number if needed.
5273         (print_c_feature) <m_next_regnum>: New field.
5274
5275 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5276
5277         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5278         (FEATURE_XMLFILES): New.
5279         (FEATURE_CFILES): New.
5280         New rules.
5281         (clean-cfiles): Remove generated c files.
5282         * features/i386/32bit-avx.c: Generated.
5283         * features/i386/32bit-avx512.c: Generated.
5284         * features/i386/32bit-core.c: Generated.
5285         * features/i386/32bit-linux.c: Generated.
5286         * features/i386/32bit-mpx.c: Generated.
5287         * features/i386/32bit-pkeys.c: Generated.
5288         * features/i386/32bit-sse.c: Generated.
5289         * target-descriptions.c: Include algorithm.
5290         (tdesc_element_visitor): Add method visit_end.
5291         (print_c_tdesc): Implement visit_end.
5292         (print_c_tdesc:: m_filename_after_features): Move it to
5293         protected.
5294         (print_c_feature): New class.
5295         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5296         name starts with "i386/32bit-".
5297
5298 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5299
5300         * target-descriptions.c (tdesc_element_visitor): New class.
5301         (tdesc_element): New class.
5302         (tdesc_reg): Inherit from tdesc_element.
5303         (tdesc_reg::accept): New function.
5304         (tdesc_type): Inherit from tdesc_element.
5305         (tdesc_type::accept): New function.
5306         (tdesc_feature): Inherit from tdesc_element.
5307         (tdesc_feature::accept): New function.
5308         (target_desc): Inherit from tdesc_element.
5309         (target_desc::target_desc): New.
5310         (target_desc::~target_desc): New.
5311         (target_desc::accept): New.
5312         (allocate_target_description): Use new.
5313         (free_target_description): Use delete.
5314         (print_c_tdesc): New class.
5315         (maint_print_c_tdesc_cmd): Adjust.
5316
5317         * features/aarch64.c: Re-generated.
5318         * features/arc-arcompact.c: Re-generated.
5319         * features/arc-v2.c: Re-generated.
5320         * features/arm/arm-with-iwmmxt.c: Re-generated.
5321         * features/arm/arm-with-m.c: Re-generated.
5322         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5323         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5324         * features/arm/arm-with-neon.c: Re-generated.
5325         * features/arm/arm-with-vfpv2.c: Re-generated.
5326         * features/arm/arm-with-vfpv3.c: Re-generated.
5327         * features/i386/amd64-avx-avx512.c: Re-generated.
5328         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5329         * features/i386/amd64-avx.c: Re-generated.
5330         * features/i386/amd64-avx-linux.c: Re-generated.
5331         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5332         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5333         * features/i386/amd64-avx-mpx.c: Re-generated.
5334         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5335         * features/i386/amd64.c: Re-generated.
5336         * features/i386/amd64-linux.c: Re-generated.
5337         * features/i386/amd64-mpx.c: Re-generated.
5338         * features/i386/amd64-mpx-linux.c: Re-generated.
5339         * features/i386/i386-avx-avx512.c: Re-generated.
5340         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5341         * features/i386/i386-avx.c: Re-generated.
5342         * features/i386/i386-avx-linux.c: Re-generated.
5343         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5344         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5345         * features/i386/i386-avx-mpx.c: Re-generated.
5346         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5347         * features/i386/i386.c: Re-generated.
5348         * features/i386/i386-linux.c: Re-generated.
5349         * features/i386/i386-mmx.c: Re-generated.
5350         * features/i386/i386-mmx-linux.c: Re-generated.
5351         * features/i386/i386-mpx.c: Re-generated.
5352         * features/i386/i386-mpx-linux.c: Re-generated.
5353         * features/i386/x32-avx-avx512.c: Re-generated.
5354         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5355         * features/i386/x32-avx.c: Re-generated.
5356         * features/i386/x32-avx-linux.c: Re-generated.
5357         * features/i386/x32.c: Re-generated.
5358         * features/i386/x32-linux.c: Re-generated.
5359         * features/microblaze.c: Re-generated.
5360         * features/microblaze-with-stack-protect.c: Re-generated.
5361         * features/mips64-dsp-linux.c: Re-generated.
5362         * features/mips64-linux.c: Re-generated.
5363         * features/mips-dsp-linux.c: Re-generated.
5364         * features/mips-linux.c: Re-generated.
5365         * features/nds32.c: Re-generated.
5366         * features/nios2.c: Re-generated.
5367         * features/nios2-linux.c: Re-generated.
5368         * features/rs6000/powerpc-32.c: Re-generated.
5369         * features/rs6000/powerpc-32l.c: Re-generated.
5370         * features/rs6000/powerpc-403.c: Re-generated.
5371         * features/rs6000/powerpc-403gc.c : Re-generated.
5372         * features/rs6000/powerpc-405.c: Re-generated.
5373         * features/rs6000/powerpc-505.c: Re-generated.
5374         * features/rs6000/powerpc-601.c: Re-generated.
5375         * features/rs6000/powerpc-602.c: Re-generated.
5376         * features/rs6000/powerpc-603.c: Re-generated.
5377         * features/rs6000/powerpc-604.c: Re-generated.
5378         * features/rs6000/powerpc-64.c: Re-generated.
5379         * features/rs6000/powerpc-64l.c: Re-generated.
5380         * features/rs6000/powerpc-7400.c: Re-generated.
5381         * features/rs6000/powerpc-750.c: Re-generated.
5382         * features/rs6000/powerpc-860.c: Re-generated.
5383         * features/rs6000/powerpc-altivec32.c: Re-generated.
5384         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5385         * features/rs6000/powerpc-altivec64.c: Re-generated.
5386         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5387         * features/rs6000/powerpc-cell32l.c: Re-generated.
5388         * features/rs6000/powerpc-cell64l.c: Re-generated.
5389         * features/rs6000/powerpc-e500.c: Re-generated.
5390         * features/rs6000/powerpc-e500l.c: Re-generated.
5391         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5392         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5393         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5394         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5395         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5396         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5397         * features/rs6000/powerpc-vsx32.c: Re-generated.
5398         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5399         * features/rs6000/powerpc-vsx64.c: Re-generated.
5400         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5401         * features/rs6000/rs6000.c: Re-generated.
5402         * features/s390-linux32.c: Re-generated.
5403         * features/s390-linux32v1.c: Re-generated.
5404         * features/s390-linux32v2.c: Re-generated.
5405         * features/s390-linux64.c: Re-generated.
5406         * features/s390-linux64v1.c: Re-generated.
5407         * features/s390-linux64v2.c: Re-generated.
5408         * features/s390-te-linux64.c: Re-generated.
5409         * features/s390-tevx-linux64.c: Re-generated.
5410         * features/s390-vx-linux64.c: Re-generated.
5411         * features/s390x-linux64.c: Re-generated.
5412         * features/s390x-linux64v1.c: Re-generated.
5413         * features/s390x-linux64v2.c: Re-generated.
5414         * features/s390x-te-linux64.c: Re-generated.
5415         * features/s390x-tevx-linux64.c: Re-generated.
5416         * features/s390x-vx-linux64.c: Re-generated.
5417         * features/sparc/sparc32-solaris.c: Re-generated.
5418         * features/sparc/sparc64-solaris.c: Re-generated.
5419         * features/tic6x-c62x.c: Re-generated.
5420         * features/tic6x-c62x-linux.c: Re-generated.
5421         * features/tic6x-c64x.c: Re-generated.
5422         * features/tic6x-c64x-linux.c: Re-generated.
5423         * features/tic6x-c64xp.c: Re-generated.
5424         * features/tic6x-c64xp-linux.c: Re-generated.
5425
5426 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5427
5428         * i386-linux-tdep.c (i386_linux_read_description): New function.
5429         (i386_linux_core_read_description): Call
5430         i386_linux_read_description.
5431         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5432         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5433         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5434         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5435         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5436         * x86-linux-nat.c (x86_linux_read_description): Call
5437         i386_linux_read_description.
5438
5439 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5440
5441         * NEWS: Mention it.
5442         * features/Makefile (%.c: %.xml): Pass the xml file name to
5443         command "maint print c-tdesc".
5444         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5445         name from 'arg'.
5446
5447 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5448
5449         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5450         in-class initialization.
5451         (tdesc_create_feature): Call new instead of XCNEW.
5452         (free_target_description): Ue delete.
5453
5454 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5455
5456         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5457
5458 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5459
5460         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5461         constant.
5462         (amd64_x32_init_abi): Likewise.
5463         * amd64-tdep.h (amd64_init_abi): Update declaration.
5464         (amd64_x32_init_abi): Likewise.
5465
5466 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5467
5468         PR tdep/21717
5469         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5470         condition for FPSCR.
5471         (arm_linux_store_inferior_registers): Likewise.
5472
5473 2017-07-22  Tom Tromey  <tom@tromey.com>
5474
5475         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5476         <syscalls_counts>: Now a std::vector.
5477         (get_catch_syscall_inferior_data): Use "new".
5478         (catch_syscall_inferior_data_cleanup): Use "delete".
5479         (insert_catch_syscall, remove_catch_syscall)
5480         (clear_syscall_counts): Update.
5481
5482 2017-07-22  Tom Tromey  <tom@tromey.com>
5483
5484         * break-catch-syscall.c (syscall_catchpoint)
5485         <syscalls_to_be_caught>: Now a std::vector<int>
5486         (~syscall_catchpoint): Remove.
5487         (insert_catch_syscall, remove_catch_syscall)
5488         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5489         (print_mention_catch_syscall, print_recreate_catch_syscall):
5490         Update.
5491         (create_syscall_event_catchpoint): Change type of "filter"
5492         parameter.
5493         (catch_syscall_split_args): Return a std::vector.
5494         (catch_syscall_command_1, catching_syscall_number_1): Update.
5495
5496 2017-07-22  Tom Tromey  <tom@tromey.com>
5497
5498         * break-catch-throw.c (struct exception_catchpoint)
5499         <exception_rx>: Now a std::string.
5500         (~exception_catchpoint): Remove.
5501         (print_one_detail_exception_catchpoint): Update.
5502         (handle_gnu_v3_exceptions): Change type of except_rx.
5503         (extract_exception_regexp): Return a std::string.
5504         (catch_exception_command_1): Update.
5505
5506 2017-07-22  Tom Tromey  <tom@tromey.com>
5507
5508         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5509         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5510         std::vector.
5511         <catch_all>: Now a bool.
5512         (~signal_catchpoint): Remove.
5513         (signal_catchpoint_insert_location)
5514         (signal_catchpoint_remove_location)
5515         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5516         (signal_catchpoint_print_mention)
5517         (signal_catchpoint_print_recreate)
5518         (signal_catchpoint_explains_signal): Update.
5519         (create_signal_catchpoint): Change type of "filter" and
5520         "catch_all".
5521         (catch_signal_split_args): Return a std::vector.  Change type of
5522         "catch_all".
5523         (catch_signal_command): Update.
5524
5525 2017-07-20  Pedro Alves  <palves@redhat.com>
5526
5527         * ada-lang.c (ada_language_defn): Make extern.
5528         (_initialize_ada_language): Remove add_language call.
5529         * c-lang.c (c_language_defn, cplus_language_defn)
5530         (asm_language_defn, minimal_language_defn): Make extern.
5531         (_initialize_c_language): Delete.
5532         * completer.c (compare_cstrings): Delete, moved to utils.h.
5533         * d-lang.c (d_language_defn): Make extern.
5534         (_initialize_d_language): Remove add_language calls.
5535         * defs.h (enum language): Add comment.
5536         * f-lang.c (f_language_defn): Make extern.
5537         (_initialize_f_language): Remove add_language call.
5538         * go-lang.c (go_language_defn): Make extern.
5539         (_initialize_go_language): Remove add_language call.
5540         * language.c: Include <algorithm>.
5541         (languages): Redefine as const array.
5542         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5543         (set_language_command): Handle "local".  Use for-range loop.
5544         (set_language): Remove loop.
5545         (language_enum): Rewrite.
5546         (language_def, language_str): Remove loops.
5547         (add_language): Delete.
5548         (add_set_language_command): New, based on add_languages.
5549         (skip_language_trampoline): Adjust.
5550         (local_language_defn): Delete.
5551         (language_gdbarch_post_init): Adjust.
5552         (_initialize_language): Remove add_language calls.  Call
5553         add_set_language_command.
5554         * language.h (add_language): Delete.
5555         (auto_language_defn)
5556         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5557         (asm_language_defn, c_language_defn, cplus_language_defn)
5558         (d_language_defn, f_language_defn, go_language_defn)
5559         (m2_language_defn, objc_language_defn, opencl_language_defn)
5560         (pascal_language_defn, rust_language_defn): Declare.
5561         * m2-lang.c (m2_language_defn): Make extern.
5562         (_initialize_m2_language): Remove add_language call.
5563         * objc-lang.c (objc_language_defn): Make extern.
5564         (_initialize_objc_language): Remove add_language call.
5565         * opencl-lang.c (opencl_language_defn): Make extern.
5566         (_initialize_opencl_language): Remove add_language call.
5567         * p-lang.c (pascal_language_defn): Make extern.
5568         (_initialize_pascal_language): Delete.
5569         * rust-lang.c (rust_language_defn): Make extern.
5570         (_initialize_rust_language): Delete.
5571         * utils.h (compare_cstrings): New static inline function.
5572
5573 2017-07-20  Pedro Alves  <palves@redhat.com>
5574
5575         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5576         (get_var_value): Constify parameters.
5577         (get_int_var_value): Change prototype.
5578         (to_fixed_range_type): Adjust.
5579         * ada-lang.h (get_int_var_value): Change prototype.
5580
5581 2017-07-20  Pedro Alves  <palves@redhat.com>
5582
5583         * dwarf2read.c (dw2_lookup_symbol): Use
5584         SYMBOL_MATCHES_SEARCH_NAME.
5585         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5586
5587 2017-07-20  Pedro Alves  <palves@redhat.com>
5588
5589         * block.c (block_iter_name_step, block_iter_name_first)
5590         (block_iter_name_next): Delete.
5591         (block_lookup_symbol_primary): Adjust to use
5592         dict_iter_match_first/dict_iter_match_next.
5593         * block.h (block_iter_name_first, block_iter_name_next): Delete
5594         declarations.
5595         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5596         dict_iter_match_first/dict_iter_match_next.
5597
5598 2017-07-20  Pedro Alves  <palves@redhat.com>
5599
5600         * cp-support.c (cp_find_first_component_aux): Add missing case for
5601         end of string.
5602
5603 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5604
5605         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5606         of dwo_cu's dwo_file.
5607
5608 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5609
5610         * remote.c (store_registers_using_G): Remove one line comment.
5611
5612 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5613
5614         * regcache.c (regcache_cpy): Simplify it.
5615         (regcache::cpy_no_passthrough): Remove it.
5616         * regcache.h (cpy_no_passthrough): Remove it.
5617         (regcache_dup, regcache_cpy): Update comments.
5618
5619 2017-07-18  Pedro Alves  <palves@redhat.com>
5620
5621         * remote-sim.c (sim_command_completer): Adjust to work with a
5622         completion_tracker instead of a VEC.
5623
5624 2017-07-17  Pedro Alves  <palves@redhat.com>
5625
5626         * completer.c (complete_source_filenames): New function.
5627         (complete_address_and_linespec_locations): New function.
5628         (location_completer): Use complete_address_and_linespec_locations.
5629         (completion_tracker::build_completion_result): Honor the tracker's
5630         request to suppress append.
5631         * completer.h (completion_tracker::suppress_append_ws)
5632         (completion_tracker::set_suppress_append_ws): New methods.
5633         (completion_tracker::m_suppress_append_ws): New field.
5634         (complete_source_filenames): New declaration.
5635         * linespec.c (linespec_complete_what): New.
5636         (struct ls_parser) <complete_what, completion_word,
5637         completion_quote_char, completion_quote_end, completion_tracker>:
5638         New fields.
5639         (string_find_incomplete_keyword_at_end): New.
5640         (linespec_lexer_lex_string): Record quote char.  If in completion
5641         mode, don't throw.
5642         (linespec_lexer_consume_token): Advance the completion word point.
5643         (linespec_lexer_peek_token): Save/restore completion info.
5644         (save_stream_and_consume_token): New.
5645         (set_completion_after_number): New.
5646         (linespec_parse_basic): Set what to complete next depending on
5647         token.  Handle function and label completions specially.
5648         (parse_linespec): Disable objc shortcut in completion mode.  Set
5649         what to complete next depending on token type.  Skip keyword if in
5650         completion mode.
5651         (complete_linespec_component, linespec_complete): New.
5652         * linespec.h (linespec_complete): Declare.
5653
5654 2017-07-17  Pedro Alves  <palves@redhat.com>
5655
5656         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5657         Handle 'operator<' / 'operator<<'.
5658
5659 2017-07-17  Pedro Alves  <palves@redhat.com>
5660
5661         * completer.c (collect_explicit_location_matches): Handle
5662         MATCH_LABEL.
5663         (convert_explicit_location_to_linespec): New, factored out from
5664         ...
5665         (convert_explicit_location_to_sals): ... this.
5666         (complete_label): New.
5667         (linespec_complete_label, find_label_symbols_in_block): New.
5668         (find_label_symbols): Add completion_mode parameter and adjust to
5669         call find_label_symbols_in_block.
5670         * linespec.h (linespec_complete_label): Declare.
5671
5672 2017-07-17  Pedro Alves  <palves@redhat.com>
5673
5674         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5675         complete_symbol_mode parameter.
5676         * cli/cli-cmds.c (complete_command): Get the completion result out
5677         of the handle_brkchars tracker if used a custom word point.
5678         * completer.c: Include "linespec.h".
5679         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5680         (advance_to_expression_complete_word_point): New.
5681         (completion_tracker::completes_to_completion_word): New.
5682         (complete_files_symbols): Pass down
5683         complete_symbol_mode::EXPRESSION.
5684         (explicit_options, probe_options): New.
5685         (collect_explicit_location_matches): Complete on the
5686         explictit_loc->foo instead of word.  Use
5687         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5688         keyword and options completions.
5689         (backup_text_ptr): Delete.
5690         (skip_keyword): New.
5691         (complete_explicit_location): Remove 'word' parameter.  Add
5692         language, quoted_arg_start and quoted_arg_end parameters.
5693         Rewrite, parsing left to right.
5694         (location_completer): Rewrite.
5695         (location_completer_handle_brkchars): New function.
5696         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5697         (enum complete_line_internal_reason): Adjust comments.
5698         (completion_tracker::discard_completions): New.
5699         (completer_handle_brkchars_func_for_completer): Handle
5700         location_completer.
5701         (gdb_custom_word_point_brkchars)
5702         (gdb_org_rl_basic_quote_characters): New.
5703         (gdb_completion_word_break_characters_throw)
5704         (completion_find_completion_word): Handle trackers that use a
5705         custom word point.
5706         (completion_tracker::advance_custom_word_point_by): New.
5707         (completion_tracker::build_completion_result): Don't rely on
5708         readline appending the quote char.
5709         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5710         use a custom word point.
5711         (gdb_rl_attempted_completion_function): Restore
5712         rl_basic_quote_characters.
5713         * completer.h (class completion_tracker): Extend intro comment.
5714         (completion_tracker::set_quote_char)
5715         (completion_tracker::quote_char)
5716         (completion_tracker::set_use_custom_word_point)
5717         (completion_tracker::use_custom_word_point)
5718         (completion_tracker::custom_word_point)
5719         (completion_tracker::set_custom_word_point)
5720         (completion_tracker::advance_custom_word_point_by)
5721         (completion_tracker::completes_to_completion_word)
5722         (completion_tracker::discard_completions): New methods.
5723         (completion_tracker::m_quote_char)
5724         (completion_tracker::m_use_custom_word_point)
5725         (completion_tracker::m_custom_word_point): New fields.
5726         (advance_to_expression_complete_word_point): Declare.
5727         * f-lang.c (f_collect_symbol_completion_matches): Add
5728         complete_symbol_mode parameter.
5729         * language.h (struct language_defn)
5730         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5731         parameter.
5732         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5733         (linespec_complete_function): New function.
5734         (linespec_lexer_lex_keyword): Adjust.
5735         * linespec.h (linespec_keywords, linespec_complete_function): New
5736         declarations.
5737         * location.c (find_end_quote): New function.
5738         (explicit_location_lex_one): Add explicit_completion_info
5739         parameter.  Save quoting info.  Don't throw if being called for
5740         completion.  Don't handle Ada operators here.
5741         (is_cp_operator, skip_op_false_positives, first_of)
5742         (explicit_location_lex_one_function): New function.
5743         (string_to_explicit_location): Replace 'dont_throw' parameter with
5744         an explicit_completion_info pointer parameter.  Handle it.  Don't
5745         use explicit_location_lex_one to lex function names.  Use
5746         explicit_location_lex_one_function instead.
5747         * location.h (struct explicit_completion_info): New.
5748         (string_to_explicit_location): Replace 'dont_throw' parameter with
5749         an explicit_completion_info pointer parameter.
5750         * symtab.c (default_collect_symbol_completion_matches_break_on):
5751         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5752         (default_collect_symbol_completion_matches)
5753         (collect_symbol_completion_matches): Add complete_symbol_mode
5754         parameter.
5755         (collect_symbol_completion_matches_type): Pass down
5756         complete_symbol_mode::EXPRESSION.
5757         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5758         parameter.  Handle LINESPEC mode.
5759         * symtab.h (complete_symbol_mode): New.
5760         (default_collect_symbol_completion_matches_break_on)
5761         (default_collect_symbol_completion_matches)
5762         (collect_symbol_completion_matches)
5763         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5764         parameter.
5765
5766 2017-07-17  Pedro Alves  <palves@redhat.com>
5767
5768         * utils.c (enum class strncmp_iw_mode): New.
5769         (strcmp_iw): Rename to ...
5770         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5771         parameters.  Handle them.
5772         (strncmp_iw): New.
5773         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5774         * utils.h (strncmp_iw): Declare.
5775         (strcmp_iw): Move describing comments here.
5776
5777 2017-07-17  Pedro Alves  <palves@redhat.com>
5778
5779         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5780         CP_OPERATOR_STR.
5781         * c-typeprint.c (is_type_conversion_operator): Use
5782         CP_OPERATOR_STR.
5783         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5784         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5785         CP_OPERATOR_LEN.
5786         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5787         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5788         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5789         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5790         CP_OPERATOR_STR.
5791         * location.c: Include "cp-support.h".
5792         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5793         CP_OPERATOR_STR.
5794         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5795         CP_OPERATOR_LEN.
5796
5797 2017-07-17  Pedro Alves  <palves@redhat.com>
5798
5799         * cli/cli-cmds.c (complete_command): Use a completion tracker
5800         along with completion_find_completion_word for handle_brkchars
5801         phase.
5802         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5803         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5804         (struct gdb_rl_completion_word_info): New.
5805         (gdb_rl_find_completion_word): New.
5806         (completion_find_completion_word): New.
5807         * completer.h (completion_find_completion_word): Declare.
5808
5809 2017-07-17  Pedro Alves  <palves@redhat.com>
5810
5811         * ada-lang.c (symbol_completion_match): Adjust comments.
5812         (symbol_completion_add): Replace vector parameter with
5813         completion_tracker parameter.  Use it.
5814         (ada_make_symbol_completion_list): Rename to...
5815         (ada_collect_symbol_completion_matches): ... this.  Add
5816         completion_tracker parameter and use it.
5817         (ada_language_defn): Adjust.
5818         * break-catch-syscall.c (catch_syscall_completer): Adjust
5819         prototype and work with completion_tracker instead of VEC.
5820         * breakpoint.c (condition_completer): Adjust prototype and work
5821         with completion_tracker instead of VEC.
5822         * c-lang.c (c_language_defn, cplus_language_defn)
5823         (asm_language_defn, minimal_language_defn): Adjust to renames.
5824         * cli/cli-cmds.c (complete_command): Rework using
5825         completion_tracker.  Catch exceptions when completing.
5826         * cli/cli-decode.c (integer_unlimited_completer)
5827         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5828         with completion_tracker instead of VEC.
5829         * command.h (struct completion_tracker): Forward declare.
5830         (completer_ftype, completer_handle_brkchars_ftype): Change
5831         types.
5832         (complete_on_cmdlist, complete_on_enum): Adjust.
5833         * completer.c: Include <algorithm>.
5834         (struct gdb_completer_state): New.
5835         (current_completion): New global.
5836         (readline_line_completion_function): Delete.
5837         (noop_completer, filename_completer)
5838         (filename_completer_handle_brkchars, complete_files_symbols)
5839         (linespec_location_completer): Adjust to work with a
5840         completion_tracker instead of a VEC.
5841         (string_or_empty): New.
5842         (collect_explicit_location_matches): Adjust to work with a
5843         completion_tracker instead of a VEC.
5844         (explicit_location_completer): Rename to ...
5845         (complete_explicit_location): ... this and adjust to work with a
5846         completion_tracker instead of a VEC.
5847         (location_completer): Adjust to work with a completion_tracker
5848         instead of a VEC.
5849         (add_struct_fields): Adjust to work with a completion_list instead
5850         of VEC.
5851         (expression_completer): Rename to ...
5852         (complete_expression): ... this and adjust to work with a
5853         completion_tracker instead of a VEC.  Use complete_files_symbols.
5854         (expression_completer): Reimplement on top of complete_expression.
5855         (symbol_completer): Adjust to work with a completion_tracker
5856         instead of a VEC.
5857         (enum complete_line_internal_reason): Add describing comments.
5858         (complete_line_internal_normal_command): Adjust to work with a
5859         completion_tracker instead of a VEC.
5860         (complete_line_internal): Rename to ...
5861         (complete_line_internal_1): ... this and adjust to work with a
5862         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5863         handle_brkchars phase.
5864         (new_completion_tracker): Delete.
5865         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5866         complete_line_internal_1.
5867         (free_completion_tracker): Delete.
5868         (INITIAL_COMPLETION_HTAB_SIZE): New.
5869         (completion_tracker::completion_tracker)
5870         (completion_tracker::~completion_tracker): New.
5871         (maybe_add_completion): Delete.
5872         (completion_tracker::maybe_add_completion)
5873         (completion_tracker::add_completion)
5874         (completion_tracker::add_completions): New.
5875         (throw_max_completions_reached_error): Delete.
5876         (complete_line): Adjust to work with a completion_tracker instead
5877         of a VEC.  Don't create a completion_tracker_t or check for max
5878         completions here.
5879         (command_completer, command_completer_handle_brkchars)
5880         (signal_completer, reg_or_group_completer_1)
5881         (reg_or_group_completer, default_completer_handle_brkchars):
5882         Adjust to work with a completion_tracker.
5883         (gdb_completion_word_break_characters_throw): New.
5884         (gdb_completion_word_break_characters): Reimplement.
5885         (line_completion_function): Delete.
5886         (completion_tracker::recompute_lowest_common_denominator)
5887         (expand_preserving_ws)
5888         (completion_tracker::build_completion_result)
5889         (completion_result::completion_result)
5890         (completion_result::completion_result)
5891         (completion_result::~completion_result)
5892         (completion_result::completion_result)
5893         (completion_result::release_match_list, compare_cstrings)
5894         (completion_result::sort_match_list)
5895         (completion_result::reset_match_list)
5896         (gdb_rl_attempted_completion_function_throw)
5897         (gdb_rl_attempted_completion_function): New.
5898         * completer.h (completion_list, struct completion_result)
5899         (class completion_tracker): New.
5900         (complete_line): Add completion_tracker parameter.
5901         (readline_line_completion_function): Delete.
5902         (gdb_rl_attempted_completion_function): New.
5903         (noop_completer, filename_completer, expression_completer)
5904         (location_completer, symbol_completer, command_completer)
5905         (signal_completer, reg_or_group_completer): Update prototypes.
5906         (completion_tracker_t, new_completion_tracker)
5907         (make_cleanup_free_completion_tracker): Delete.
5908         (enum maybe_add_completion_enum): Delete.
5909         (maybe_add_completion): Delete.
5910         (throw_max_completions_reached_error): Delete.
5911         * corefile.c (complete_set_gnutarget): Adjust to work with a
5912         completion_tracker instead of a VEC.
5913         * cp-abi.c (cp_abi_completer): Adjust to work with a
5914         completion_tracker instead of a VEC.
5915         * d-lang.c (d_language_defn): Adjust.
5916         * disasm.c (disassembler_options_completer): Adjust to work with a
5917         completion_tracker instead of a VEC.
5918         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5919         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5920         with a completion_tracker instead of a VEC.
5921         (f_language_defn): Adjust.
5922         * go-lang.c (go_language_defn): Adjust.
5923         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5924         Adjust to work with a completion_tracker instead of a VEC.
5925         * infrun.c (handle_completer): Likewise.
5926         * interps.c (interpreter_completer): Likewise.
5927         * interps.h (interpreter_completer): Likewise.
5928         * language.c (unknown_language_defn, auto_language_defn)
5929         (local_language_defn): Adjust.
5930         * language.h (language_defn::la_make_symbol_completion_list):
5931         Rename to ...
5932         (language_defn::la_collect_symbol_completion_matches): ... this
5933         and adjust to work with a completion_tracker instead of a VEC.
5934         * m2-lang.c (m2_language_defn): Adjust.
5935         * objc-lang.c (objc_language_defn): Adjust.
5936         * opencl-lang.c (opencl_language_defn): Adjust.
5937         * p-lang.c (pascal_language_defn): Adjust.
5938         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5939         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5940         with a completion_tracker.
5941         * rust-lang.c (rust_language_defn): Adjust.
5942         * symtab.c (free_completion_list, do_free_completion_list)
5943         (return_val, completion_tracker): Delete.
5944         (completion_list_add_name, completion_list_add_symbol)
5945         (completion_list_add_msymbol, completion_list_objc_symbol)
5946         (completion_list_add_fields, add_symtab_completions): Add
5947         completion_tracker parameter and use it.
5948         (default_make_symbol_completion_list_break_on_1): Rename to...
5949         (default_collect_symbol_completion_matches_break_on): ... this.
5950         Add completion_tracker parameter and use it instead of allocating
5951         a completion tracker here.
5952         (default_make_symbol_completion_list_break_on): Delete old
5953         implementation.
5954         (default_make_symbol_completion_list): Delete.
5955         (default_collect_symbol_completion_matches): New.
5956         (make_symbol_completion_list): Delete.
5957         (collect_symbol_completion_matches): New.
5958         (make_symbol_completion_type): Rename to ...
5959         (collect_symbol_completion_matches_type): ... this.  Add
5960         completion_tracker parameter and use it instead of VEC.
5961         (make_file_symbol_completion_list_1): Rename to...
5962         (collect_file_symbol_completion_matches): ... this.  Add
5963         completion_tracker parameter and use it instead of VEC.
5964         (make_file_symbol_completion_list): Delete.
5965         (add_filename_to_list): Use completion_list instead of a VEC.
5966         (add_partial_filename_data::list): Now a completion_list.
5967         (make_source_files_completion_list): Work with a completion_list
5968         instead of a VEC.
5969         * symtab.h: Include "completer.h".
5970         (default_make_symbol_completion_list_break_on)
5971         (default_make_symbol_completion_list, make_symbol_completion_list)
5972         (make_symbol_completion_type, make_file_symbol_completion_list)
5973         (make_source_files_completion_list): Delete.
5974         (default_collect_symbol_completion_matches_break_on)
5975         (default_collect_symbol_completion_matches)
5976         (collect_symbol_completion_matches)
5977         (collect_symbol_completion_matches_type)
5978         (collect_file_symbol_completion_matches)
5979         (make_source_files_completion_list): New.
5980         * top.c (init_main): Don't install a rl_completion_entry_function
5981         hook.  Install a rl_attempted_completion_function hook instead.
5982         * tui/tui-layout.c (layout_completer): Adjust to work with a
5983         completion_tracker.
5984         * tui/tui-regs.c (tui_reggroup_completer):
5985         * tui/tui-win.c (window_name_completer, focus_completer)
5986         (winheight_completer): Adjust to work with a completion_tracker.
5987         * value.c: Include "completer.h".
5988         (complete_internalvar): Adjust to work with a completion_tracker.
5989         * value.h (complete_internalvar): Likewise.
5990
5991 2017-07-17  Pedro Alves  <palves@redhat.com>
5992
5993         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5994         renames.
5995         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5996         comments to completer_ftype's declaration.
5997         <completer_handle_brkchars>: Change type to
5998         completer_handle_brkchars_ftype.
5999         * command.h (completer_ftype): Add describing comment and give
6000         names to parameters.
6001         (completer_ftype_void): Rename to ...
6002         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6003         (set_cmd_completer_handle_brkchars): Adjust.
6004         * completer.c (filename_completer_handle_brkchars): New function.
6005         (complete_line_internal_normal_command): New function, factored
6006         out from ...
6007         (complete_line_internal): ... here.
6008         (command_completer_handle_brkchars)
6009         (default_completer_handle_brkchars)
6010         (completer_handle_brkchars_func_for_completer): New functions.
6011         * completer.h (set_gdb_completion_word_break_characters): Delete
6012         declaration.
6013         (completer_handle_brkchars_func_for_completer): New declaration.
6014         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6015         completer_handle_brkchars_func_for_completer.
6016
6017 2017-07-17  Pedro Alves  <palves@redhat.com>
6018
6019         * completer.c (symbol_completer): New function, based on
6020         make_symbol_completion_list_fn.
6021         * completer.h (symbol_completer): New declaration.
6022         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6023         * python/py-cmd.c (completers): Adjust.
6024         * symtab.c (make_symbol_completion_list_fn): Delete.
6025         * symtab.h (make_symbol_completion_list_fn): Delete.
6026         * cli/cli-decode.c (add_cmd): Adjust.
6027
6028 2017-07-17  Pedro Alves  <palves@redhat.com>
6029
6030         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6031         * dwarf2read.c: Include "filename-seen-cache.h".
6032         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6033         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6034         * filename-seen-cache.c: New file.
6035         * filename-seen-cache.h: New file.
6036         * symtab.c: Include "filename-seen-cache.h".
6037         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6038         (create_filename_seen_cache, clear_filename_seen_cache)
6039         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6040         to filename-seen-cache.h/filename-seen-cache.c.
6041         (output_source_filename, sources_info)
6042         (maybe_add_partial_symtab_filename)
6043         (make_source_files_completion_list): Adjust to use
6044         filename_seen_cache.
6045
6046 2017-07-17  Pedro Alves  <palves@redhat.com>
6047
6048         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6049         fields.
6050         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6051         dwarf2_debug_sections*)): New.
6052         (dwarf2_per_objfile::dwarf2_per_objfile(const
6053         dwarf2_per_objfile&)): Declare as deleted.
6054         (dwarf2_per_objfile::operator=): Declare as deleted.
6055         (dwarf2_per_objfile::dwarf2_per_objfile)
6056         (dwarf2_per_objfile::~dwarf2_per_objfile)
6057         (dwarf2_per_objfile::free_cached_comp_units): New.
6058         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6059         ctor.  Call dwarf2_per_objfile's ctor manually.
6060         (dwarf2_locate_sections): Deleted/refactored as ...
6061         (dwarf2_per_objfile::locate_sections): ... this new method.
6062         (free_cached_comp_units): Defer to
6063         dwarf2_per_objfile::free_cached_comp_units.
6064         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6065
6066 2017-07-14  Tom Tromey  <tom@tromey.com>
6067
6068         PR rust/21764:
6069         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6070         parameter.
6071         <UNOP_SIZEOF>: Split into separate case.
6072         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6073
6074 2017-07-14  Tom Tromey  <tom@tromey.com>
6075
6076         PR rust/21763:
6077         * symtab.c (symbol_matches_domain): Add language_rust to special
6078         case.
6079         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6080         treat LOC_TYPEDEF symbols as variables.
6081
6082 2017-07-14  Pedro Alves  <palves@redhat.com>
6083
6084         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6085         symtabs matching all symtabs with SRCFILE as file name instead of
6086         only considering the first hit, with lookup_symtab.
6087
6088 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6089
6090         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6091         operator_name parameters.
6092         (gen_expr): Update function call.
6093
6094 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6095
6096         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6097         parameter.
6098         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6099         Likewise.
6100         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6101         parameter, use agent_expr::gdbarch instead, update function
6102         calls.
6103         (locexpr_tracepoint_var_ref): Likewise.
6104         (loclist_tracepoint_var_ref): Likewise.
6105         * ax-gdb.c (gen_trace_static_fields): Likewise.
6106         (gen_traced_pop): Likewise.
6107         (gen_frame_args_address): Likewise.
6108         (gen_frame_locals_address): Likewise.
6109         (gen_var_ref): Likewise.
6110         (gen_struct_ref_recursive): Likewise.
6111         (gen_static_field): Likewise.
6112         (gen_maybe_namespace_elt): Likewise.
6113         (gen_expr): Likewise.
6114         (gen_trace_for_var): Likewise.
6115         (gen_trace_for_expr): Likewise.
6116         (gen_trace_for_return_address): Likewise.
6117
6118 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6119
6120         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6121         parameter.
6122         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6123
6124 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6125
6126         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6127         from ax, update calls.
6128         (gen_usual_arithmetic): Likewise.
6129         (gen_integral_promotions): Likewise.
6130         (gen_bitfield_ref): Likewise.
6131         (gen_primitive_field): Likewise.
6132         (gen_struct_ref_recursive): Likewise.
6133         (gen_struct_ref): Likewise.
6134         (gen_maybe_namespace_elt): Likewise.
6135         (gen_struct_elt_for_reference): Likewise.
6136         (gen_namespace_elt): Likewise.
6137         (gen_aggregate_elt_ref): Likewise.
6138         (gen_expr): Get gdbarch from ax, update calls.
6139         (gen_expr_binop_rest): Likewise.
6140
6141 2017-07-13  Pedro Alves  <palves@redhat.com>
6142
6143         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6144         as default tdesc.
6145         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6146         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6147         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6148         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6149         tdep.
6150         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6151         Get final tdesc from the tdep.
6152         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6153         default tdesc.
6154         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6155         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6156         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6157         Use it as default tdesc.
6158         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6159         down to amd_init_abi.  No longer handle fallback tdesc here.
6160         * amd64-tdep.h (tdesc_x32): Declare.
6161         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6162         parameter.
6163         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6164         as default tdesc.
6165
6166 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6167
6168         * s390-linux-tdep.c (s390_process_record): Add support for
6169         instructions new in arch12.
6170
6171 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6172
6173         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6174         PT_GETFSBASE and PT_GETGSBASE.
6175         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6176         PT_SETGSBASE.
6177
6178 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6179
6180         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6181         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6182         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6183         those rules.
6184         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6185         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6186         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6187         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6188         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6189         * features/i386/amd64.xml: Add 64bit-segments.xml.
6190         * features/i386/amd64-avx-avx512.c: Regenerated.
6191         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6192         * features/i386/amd64-avx-mpx.c: Regenerated.
6193         * features/i386/amd64-avx.c: Regenerated.
6194         * features/i386/amd64-mpx.c: Regenerated.
6195         * features/i386/amd64.c: Regenerated.
6196         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6197         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6198         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6199         * regformats/i386/amd64-avx.dat: Regenerated.
6200         * regformats/i386/amd64-mpx.dat: Regenerated.
6201         * regformats/i386/amd64.dat: Regenerated.
6202
6203 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6204
6205         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6206         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6207
6208 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6209
6210         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6211         unsetenv.
6212         * gnulib/aclocal.m4: Regenerate.
6213         * gnulib/config.in: Regenerate.
6214         * gnulib/configure: Regenerate.
6215         * gnulib/import/Makefile.am: Regenerate.
6216         * gnulib/import/Makefile.in: Regenerate.
6217         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6218         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6219         * gnulib/import/m4/environ.m4: New file.
6220         * gnulib/import/m4/setenv.m4: New file.
6221         * gnulib/import/setenv.c: New file.
6222         * gnulib/import/unsetenv.c: New file.
6223
6224 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6225
6226         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6227         address when op is DW_OP_addr.
6228
6229 2017-07-09  Tom Tromey  <tom@tromey.com>
6230
6231         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6232         check and apply to outer type.
6233
6234 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6235
6236         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6237         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6238         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6239         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6240
6241 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6242
6243         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6244
6245 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6246
6247         * corelow.c (get_core_siginfo): Remove.
6248         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6249         instead of get_core_siginfo.
6250         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6251         * gdbarch.h: Re-generate.
6252         * gdbarch.c: Re-generate.
6253         * linux-tdep.c (linux_core_xfer_siginfo): New.
6254         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6255
6256 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6257
6258         * corelow.c (thread_section_name): Move to ...
6259         * gdbcore.h (thread_section_name): ... here.
6260
6261 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6262
6263         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6264         (struct siginfo32): New.
6265         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6266         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6267         via ptrace(PT_LWPINFO).
6268
6269 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6270
6271         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6272         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6273         (fbsd_get_siginfo_type): New.
6274         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6275         (_initialize_fbsd_tdep): New.
6276
6277 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6278
6279         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6280         a singular dwo_unit*) to support multiple CUs in the same way that
6281         multiple TUs are supported.
6282         (create_cus_hash_table): Replace create_dwo_cu with a function for
6283         parsing multiple CUs from a DWO file.
6284         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6285         create_dwo_cu.
6286         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6287         htab_find, rather than comparing the signature to a singleton CU in
6288         the dwo_file.
6289
6290 2017-07-06  Pedro Alves  <palves@redhat.com>
6291
6292         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6293
6294 2017-07-04  Pedro Alves  <palves@redhat.com>
6295
6296         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6297         * gdbtypes.h (TYPE_STATIC): Delete.
6298         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6299         is_synchronized, is_native>: Delete.
6300         <dummy>: Bump.
6301         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6302         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6303         (TYPE_FN_FIELD_ABSTRACT): Delete.
6304
6305 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6306
6307         * buffer.h (buffer_finish): Fix spelling mistakes.
6308
6309 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6310
6311         * .dir-locals.el: Automatically switch to C-style comments in
6312         versions of Emacs that support the feature.
6313
6314 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6315             Pedro Alves  <palves@redhat.com>
6316
6317         PR cli/21688
6318         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6319         (process_next_line): New variable 'inline_cmd'.
6320         Adjust 'if' clauses for "python", "compile" and "guile" to use
6321         'command_name_equals' and check for '!inline_cmd'.
6322
6323 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6324
6325         PR cli/21688
6326         * cli/cli-script.c (command_name_equals_not_inline): New function.
6327         (process_next_line): Adjust 'if' clauses for "python", "compile"
6328         and "guile" to use command_name_equals_not_inline.
6329
6330 2017-06-29  Pedro Alves  <palves@redhat.com>
6331
6332         * completer.c (expression_completer): Call
6333         linespec_location_completer instead of location_completer.
6334
6335 2017-06-29  Pedro Alves  <palves@redhat.com>
6336
6337         * completer.c (expression_completer): Remove code that recomputes
6338         'text' from 'word'.
6339
6340 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6341
6342         * regformats/regdat.sh: Generate code with
6343         "ifndef IN_PROCESS_AGENT".
6344
6345 2017-06-28  Pedro Alves  <palves@redhat.com>
6346
6347         * command.h: Include "common/scoped_restore.h".
6348
6349 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6350
6351         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6352         instead of obstack_grow.
6353
6354 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6355
6356         PR gdb/21337
6357         * symfile.c (reread_symbols): Call objfiles_changed just before
6358         read_symbols.
6359
6360 2017-06-27  Pedro Alves  <palves@redhat.com>
6361
6362         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6363         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6364         (completion_list_add_symbol, completion_list_add_msymbol):
6365         ... these new functions.
6366         (add_symtab_completions)
6367         (default_make_symbol_completion_list_break_on_1): Adjust.
6368
6369 2017-06-27  Pedro Alves  <palves@redhat.com>
6370
6371         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6372         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6373         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6374         dtor.
6375         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6376         'storage_obstack' field an auto_obstack.  In-class initialize all
6377         non-bitfield fields.  Make minsyms_read bool.
6378         * symfile.c (read_symbols): Adjust.
6379
6380 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6381
6382         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6383         (gdbsim_store_register): Likewise.
6384
6385 2017-06-27  Pedro Alves  <palves@redhat.com>
6386
6387         * c-exp.y (name_obstack): Now an auto_obstack.
6388         (yylex): Use auto_obstack::clear.
6389         (c_parse): Use auto_obstack::clear instead of reinitializing and
6390         freeing the obstack.
6391         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6392         * d-exp.y (name_obstack): Now an auto_obstack.
6393         (yylex): Use auto_obstack::clear.
6394         (d_parse): Use auto_obstack::clear instead of reinitializing and
6395         freeing the obstack.
6396         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6397         auto_obstack.
6398         * dwarf2read.c (create_addrmap_from_index)
6399         (dwarf2_build_psymtabs_hard)
6400         (update_enumeration_type_from_children): Likewise.
6401         * gdb_obstack.h (auto_obstack): New type.
6402         * go-exp.y (name_obstack): Now an auto_obstack.
6403         (build_packaged_name): Use auto_obstack::clear.
6404         (go_parse): Use auto_obstack::clear instead of reinitializing and
6405         freeing the obstack.
6406         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6407         auto_obstack.
6408         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6409         * rust-exp.y (work_obstack): Now an auto_obstack.
6410         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6411         reinitializing and freeing the obstack.
6412         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6413         (host_char_to_target): Use auto_obstack.
6414         * utils.h (make_cleanup_obstack_free): Delete declaration.
6415         * valprint.c (generic_emit_char, generic_printstr): Use
6416         auto_obstack.
6417
6418 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6419
6420         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6421         thread.
6422         (darwin_init_thread_list): Don't update dummy thread.
6423         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6424
6425 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6426
6427         * record-full.c (netorder16): Remove.
6428
6429 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6430
6431         * common/diagnostics.h: Define macros for GCC.
6432         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6433         * common/vec.h: Include diagnostics.h.
6434         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6435         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6436         warning.
6437
6438 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6439
6440         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6441         New macro.
6442         * ada-lex.l: Ignore deprecated register warnings.
6443
6444 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6445
6446         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6447         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6448
6449 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6450
6451         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6452         its own line.
6453
6454 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6455
6456         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6457
6458 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6459
6460         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6461         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6462         (xtensa_register_read_masked): Likewise.
6463
6464 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6465
6466         * common/environ.c (gdb_environ::unset): Update comment.
6467
6468 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6469
6470         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6471         registers.
6472
6473 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6474
6475         * record-full.c (record_full_exec_insn): Use byte_vector.
6476
6477 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6478
6479         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6480         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6481
6482 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6483
6484         * remote.c (cached_reg): Move from here...
6485         * regcache.h (cached_reg): ...to here.
6486         * python/py-unwind.c (struct reg_info): Remove.
6487         (cached_frame_info): Use cached_reg_t.
6488         (pyuw_prev_register): Likewise.
6489         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6490         (pyuw_dealloc_cache): Free all registers.
6491
6492 2017-06-22  Pedro Alves  <palves@redhat.com>
6493             Simon Marchi  <simon.marchi@ericsson.com>
6494
6495         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6496         warning.
6497         * common/diagnostics.h: New file.
6498
6499 2017-06-22  Pedro Alves  <palves@redhat.com>
6500
6501         * common/agent.h: Add include guards.
6502
6503 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6504
6505         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6506         talk about addressable units instead of bytes.
6507
6508 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6509
6510         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6511         of '::const_iterator'.
6512
6513 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6514
6515         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6516         'unittests/environ-selftests.c'.
6517         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6518         * charset.c (find_charset_names): Declare object 'iconv_env'.
6519         Update code to use 'iconv_env' object.  Remove call to
6520         'free_environ'.
6521         * common/environ.c: Include <utility>.
6522         (make_environ): Delete function.
6523         (free_environ): Delete function.
6524         (gdb_environ::clear): New function.
6525         (gdb_environ::operator=): New function.
6526         (gdb_environ::get): Likewise.
6527         (environ_vector): Delete function.
6528         (set_in_environ): Delete function.
6529         (gdb_environ::set): New function.
6530         (unset_in_environ): Delete function.
6531         (gdb_environ::unset): New function.
6532         (gdb_environ::envp): Likewise.
6533         * common/environ.h: Include <vector>.
6534         (struct gdb_environ): Delete; transform into...
6535         (class gdb_environ): ... this class.
6536         (free_environ): Delete prototype.
6537         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6538         environ_vector): Likewise.
6539         * infcmd.c (run_command_1): Update code to call
6540         'envp' from 'gdb_environ' class.
6541         (environment_info): Update code to call methods from 'gdb_environ'
6542         class.
6543         (unset_environment_command): Likewise.
6544         (path_info): Likewise.
6545         (path_command): Likewise.
6546         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6547         (inferior::inferior): Initialize 'environment' using the host's
6548         information.
6549         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6550         Include "environ.h".
6551         (class inferior) <environment>: Change type from 'struct
6552         gdb_environ' to 'gdb_environ'.
6553         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6554         methods from 'gdb_environ' class.
6555         * solib.c (solib_find_1): Likewise
6556         * unittests/environ-selftests.c: New file.
6557
6558 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6559
6560         * features/i386/i386-linux.xml: Exchange the order of including
6561         32bit-linux.xml and 32bit-sse.xml.
6562         * features/i386/i386-linux.c: Regenerated.
6563
6564 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6565
6566         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6567         Delete copy ctor and assignment operator.
6568         (tdesc_type): Likewise.
6569         (tdesc_feature): Likewise.
6570         (tdesc_free_reg): Remove.
6571         (tdesc_create_reg): Use new.
6572         (tdesc_free_type): Remove.
6573         (tdesc_create_vector): Use new.
6574         (tdesc_create_union): Likewise.
6575         (tdesc_create_flags): Likewise.
6576         (tdesc_create_enum): Likewise.
6577         (tdesc_free_feature): Delete.
6578         (free_target_description): Use delete.
6579
6580 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6581
6582         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6583         registers.
6584
6585 2017-06-19  Pedro Alves  <palves@redhat.com>
6586
6587         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6588         after gdb::unlinker.
6589
6590 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6591
6592         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6593         gdb_environ to access an environment variable.
6594
6595 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6596
6597         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6598         gdb_byte*.
6599
6600 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6601
6602         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6603
6604 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6605
6606         * configure: Re-generate.
6607         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6608
6609 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6610
6611         * configure: Re-generate.
6612         * warning.m4: Pass -Werror to compiler when checking for
6613         supported warning flags.
6614
6615 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6616
6617         * Makefile.in (COMPILE.pre): Add "-x c++".
6618
6619 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6620             Pedro Alves  <palves@redhat.com>
6621             Yao Qi  <yao.qi@linaro.org>
6622
6623         * defs.h (RequireLongest): New.
6624         (extract_integer): Declare function template.
6625         (extract_signed_integer): Remove the declaration, but define it
6626         static inline.
6627         (extract_unsigned_integer): Likewise.
6628         (store_integer): Declare function template.
6629         (store_signed_integer): Remove the declaration, but define it
6630         static inline.
6631         (store_unsigned_integer): Likewise.
6632         * findvar.c (extract_integer): New function template.
6633         (extract_signed_integer): Remove.
6634         (extract_unsigned_integer): Remove.
6635         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6636         instantiations.
6637         (store_integer): New function template.
6638         (store_signed_integer): Remove.
6639         (store_unsigned_integer): Remove.
6640         (store_integer): Explicit instantiations.
6641         * regcache.c (regcache_raw_read_signed): Update.
6642         (regcache::raw_read): New function.
6643         (regcache::raw_read_signed): Remove.
6644         (regcache::raw_read_unsigned): Remove.
6645         (regcache_raw_read_unsigned): Update.
6646         (regcache_raw_write_unsigned): Update.
6647         (regcache::raw_write_signed): Remove.
6648         (regcache::raw_write): New function.
6649         (regcache_cooked_read_signed): Update.
6650         (regcache::raw_write_unsigned): Remove.
6651         (regcache::cooked_read_signed): Remove.
6652         (regcache_cooked_read_unsigned): Update.
6653         (regcache::cooked_read_unsigned): Remove.
6654         (regcache_cooked_write_signed): Update.
6655         (regcache_cooked_write_unsigned): Update.
6656         * regcache.h (regcache) <raw_read_signed>: Remove.
6657         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6658         <raw_read, raw_write>: New.
6659         <cooked_read_signed, cooked_write_signed>: Remove.
6660         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6661         <cooked_read, cooked_write>: New.
6662         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6663         (sh64_pseudo_register_write): Update.
6664
6665 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6666
6667         * arc-tdep.c (arc_disassembler_options): New variable.
6668         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6669         of default_print_insn.
6670         (arc_delayed_print_insn): Set info->section when needed,
6671         use default_print_insn to retrieve a disassembler.
6672
6673 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6674
6675         PR gdb/21574
6676         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6677         to mention $SHELL and startup-with-shell.
6678
6679 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6680
6681         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6682
6683 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6684
6685         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6686         default_print_insn instead of print_insn_aarch64.
6687         * arm-tdep.c (gdb_print_insn_arm): Call
6688         default_print_insn instead of print_insn_big_arm
6689         and print_insn_little_arm.
6690         * i386-tdep.c (i386_print_insn): Call default_print_insn
6691         instead of print_insn_i386.
6692         * ia64-tdep.c (ia64_print_insn): Call
6693         default_print_insn instead of print_insn_ia64.
6694         * mips-tdep.c (gdb_print_insn_mips): Call
6695         default_print_insn instead of print_insn_big_mips
6696         and print_insn_little_mips.
6697         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6698         instead of print_insn_spu.
6699
6700 2017-06-14  Pedro Alves  <palves@redhat.com>
6701
6702         * ada-lang.c: Include "common/byte-vector.h".
6703         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6704         * charset.c (wchar_iterator::iterate): Resize the vector instead
6705         of reserving it.
6706         * common/byte-vector.h: Include "common/def-vector.h".
6707         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6708         * cli/cli-dump.c: Include "common/byte-vector.h".
6709         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6710         * common/byte-vector.h: New file.
6711         * common/def-vector.h: New file.
6712         * common/default-init-alloc.h: New file.
6713         * dwarf2loc.c: Include "common/byte-vector.h".
6714         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6715         instead of reserving it.
6716         * dwarf2read.c: Include "common/byte-vector.h".
6717         (data_buf::m_vec): Now a gdb::byte_vector.
6718         * gdb_regex.c: Include "common/def-vector.h".
6719         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6720         * mi/mi-main.c: Include "common/byte-vector.h".
6721         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6722         * printcmd.c: Include "common/byte-vector.h".
6723         (print_scalar_formatted): Use gdb::byte_vector.
6724         * valprint.c: Include "common/byte-vector.h".
6725         (maybe_negate_by_bytes, print_decimal_chars): Use
6726         gdb::byte_vector.
6727
6728 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6729
6730         * darwin-nat.c: Include "nat/fork-inferior.h".
6731
6732 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6733
6734         * configure.nat: Factor out Darwin bits that are not
6735         architecture-specific.  Add fork-inferior.o.
6736
6737 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6738
6739         * configure.nat: Factor out AIX bits that are not
6740         architecture-specific.  Add fork-inferior.o.
6741
6742 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6743
6744         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6745         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6746         wrappers that just call rw_pieced_value.
6747
6748 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6749
6750         * dwarf2loc.c (write_pieced_value): When writing the data for a
6751         memory piece, use write_memory_with_notification instead of
6752         write_memory.
6753
6754 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6755
6756         * valops.c (read_value_memory): Change embedded_offset to
6757         represent a bit offset instead of a byte offset.
6758         * value.h (read_value_memory): Adjust comment.
6759
6760 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6761
6762         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6763         dest_offset_bits and source_offset_bits.
6764         (write_pieced_value): Likewise.
6765
6766 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6767
6768         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6769         given by DW_OP_bit_piece.
6770         (write_pieced_value): Likewise.
6771
6772 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6773
6774         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6775         some other preparations to the places where sufficient information
6776         is available.
6777         (write_pieced_value): Likewise.
6778
6779 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6780
6781         * dwarf2loc.c (bits_to_bytes): New function.
6782         (read_pieced_value): Fix offset calculations for register pieces
6783         on big-endian targets.
6784         (write_pieced_value): Likewise.
6785
6786 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6787
6788         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6789         (write_pieced_value): Likewise.
6790
6791 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6792
6793         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6794         transfer the source value's least significant bits, instead of its
6795         lowest-addressed ones.  Rename type_len to max_offset.
6796         (read_pieced_value): Mirror above changes to write_pieced_value as
6797         applicable.
6798
6799 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6800
6801         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6802         truncate full bytes from dest_offset_bits before using it as an
6803         offset into the buffer.
6804
6805 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6806
6807         * dwarf2loc.c (write_pieced_value): Include transfer size in
6808         byte-wise check.
6809
6810 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6811
6812         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6813         calculation of this_size.
6814
6815 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6816
6817         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6818         when targeting a bit-field.
6819         (write_pieced_value): Likewise.
6820
6821 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6822
6823         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6824         (allocate_piece_closure): Drop addr_size parameter.
6825         (dwarf2_evaluate_loc_desc_full): Adjust call to
6826         allocate_piece_closure.
6827
6828 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6829
6830         PR gdb/21226
6831         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6832         the LSB end, independent of endianness.
6833
6834 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6835
6836         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6837         size capping.
6838
6839 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6840
6841         * mips-linux-nat.c: Move include features/mips*-linux.c to
6842         mips-linux-tdep.c.
6843         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6844         to mips-linux-tdep.c.
6845         * mips-linux-tdep.c: Include features/mips*-linux.c
6846         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6847         functions.
6848         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6849         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6850         (tdesc_mips64_dsp_linux): Declare.
6851
6852 2017-06-12  Tom Tromey  <tom@tromey.com>
6853
6854         * valprint.h (val_print_type_code_int): Remove.
6855         * valprint.c (generic_val_print_int): Always call
6856         val_print_scalar_formatted.
6857         (val_print_type_code_int): Remove.
6858         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6859         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6860         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6861         * ada-valprint.c (ada_val_print_num): Use
6862         val_print_scalar_formatted.
6863
6864 2017-06-12  Tom Tromey  <tom@tromey.com>
6865
6866         * printcmd.c (print_scalar_formatted): Unify the two switches.
6867         Don't convert scalars to LONGEST.
6868
6869 2017-06-12  Tom Tromey  <tom@tromey.com>
6870
6871         PR exp/16225:
6872         * valprint.h (print_decimal_chars): Update.
6873         * valprint.c (maybe_negate_by_bytes): New function.
6874         (print_decimal_chars): Add "is_signed" argument.
6875         * printcmd.c (print_scalar_formatted): Update.
6876
6877 2017-06-12  Tom Tromey  <tom@tromey.com>
6878
6879         PR exp/16225:
6880         * valprint.h (print_binary_chars, print_hex_chars): Update.
6881         * valprint.c (val_print_type_code_int): Update.
6882         (print_binary_chars): Add "zero_pad" argument.
6883         (emit_octal_digit): New function.
6884         (print_octal_chars): Don't zero-pad.
6885         (print_decimal_chars): Likewise.
6886         (print_hex_chars): Add "zero_pad" argument.
6887         * sh64-tdep.c (sh64_do_fp_register): Update.
6888         * regcache.c (regcache::dump): Update.
6889         * printcmd.c (print_scalar_formatted): Update.
6890         * infcmd.c (default_print_one_register_info): Update.
6891
6892 2017-06-12  Pedro Alves  <palves@redhat.com>
6893             Alan Hayward  <alan.hayward@arm.com>
6894
6895         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6896         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6897         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6898         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6899         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6900
6901 2017-06-12  Pedro Alves  <palves@redhat.com>
6902
6903         * dwarf2read.c (mapped_symtab::data): Now a vector of
6904         symtab_index_entry instead of vector of
6905         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6906         whether an element's name is NULL instead of checking whether the
6907         element itself is NULL.
6908         (find_slot): Change return type.  Adjust.
6909         (hash_expand, , add_index_entry, uniquify_cu_indices)
6910         (write_hash_table): Adjust.
6911
6912 2017-06-12  Pedro Alves  <palves@redhat.com>
6913
6914         * dwarf2read.c (recursively_count_psymbols): New function.
6915         (write_psymtabs_to_index): Call it to compute number of psyms and
6916         pass estimate size of psyms_seen to unordered_set's ctor.
6917
6918 2017-06-12  Pedro Alves  <palves@redhat.com>
6919
6920         * dwarf2read.c (write_hash_table): Check if key already exists
6921         before emplacing.
6922
6923 2017-06-12  Pedro Alves  <palves@redhat.com>
6924
6925         * dwarf2read.c (data_buf::append_space): Rename to...
6926         (data_buf::grow): ... this, and make private.  Adjust all callers.
6927         (data_buf::append_uint): New method.
6928         (add_address_entry, write_one_signatured_type)
6929         (write_psymtabs_to_index): Use it.
6930
6931 2017-06-12  Pedro Alves  <palves@redhat.com>
6932
6933         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6934         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6935         (data_buf::file_write): Call ::fwrite directly.
6936
6937 2017-06-12  Pedro Alves  <palves@redhat.com>
6938
6939         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6940         std::vector::erase.
6941
6942 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6943
6944         Code cleanup: C++ify .gdb_index producer.
6945         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6946         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6947         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6948         (create_strtab, add_string): Remove.
6949         (file_write, data_buf): New.
6950         (struct symtab_index_entry): Use std::vector for cu_indices.
6951         (struct mapped_symtab): Use std::vector for data.
6952         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6953         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6954         Remove.
6955         (find_slot): Change return type.  Update it to the new data structures.
6956         (hash_expand, add_index_entry): Update it to the new data structures.
6957         (offset_type_compare): Remove.
6958         (uniquify_cu_indices): Update it to the new data structures.
6959         (c_str_view, c_str_view_hasher, vector_hasher): New.
6960         (add_indices_to_cpool): Remove.
6961         (write_hash_table): Update it to the new data structures.
6962         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6963         (eq_psymtab_cu_index): Remove.
6964         (psym_index_map): New typedef.
6965         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6966         reference and std::unordered_map for cu_index_htab.
6967         (add_address_entry, add_address_entry_worker, write_address_map)
6968         (write_psymbols): Update it to the new data structures.
6969         (write_obstack): Remove.
6970         (struct signatured_type_index_data): Change types_list to a data_buf
6971         reference and psyms_seen to a std::unordered_set reference.
6972         (write_one_signatured_type, recursively_write_psymbols)
6973         (write_psymtabs_to_index): Update it to the new data structures.
6974
6975 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6976
6977         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6978         separate-debug-file commands.
6979         * symfile.h (separate_debug_file_debug): New global.
6980         * symfile.c (separate_debug_file_debug): New global.
6981         (separate_debug_file_exists, find_separate_debug_file): Add
6982         debug output.
6983         (_initialize_symfile): Add "set debug separate-debug-file"
6984         command.
6985         * build-id.c (build_id_to_debug_bfd,
6986         find_separate_debug_file_by_buildid): Add debug output.
6987
6988 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6989
6990         * gdbarch.sh (displaced_step_free_closure): Remove.
6991         * gdbarch.h, gdbarch.c: Re-generate.
6992         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6993         displaced_step_free_closure.
6994         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6995         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6996         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6997         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6998         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6999         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7000         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7001         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7002         * infrun.c (displaced_step_clear): Call xfree instead of
7003         gdbarch_displaced_step_free_closure.
7004
7005 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7006
7007         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7008         NULL".
7009
7010 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7011
7012         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7013         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7014         (mn10300_push_dummy_call): Likewise.
7015
7016 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7017
7018         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7019
7020 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7021
7022         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7023
7024 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7025
7026         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7027         able to start inferiors using a shell.
7028         (New remote packets): Announce new packet "QStartupWithShell".
7029         * remote.c: Add PACKET_QStartupWithShell.
7030         (extended_remote_create_inferior): Handle new
7031         PACKET_QStartupWithShell.
7032         (remote_protocol_features) <QStartupWithShell>: New entry for
7033         PACKET_QStartupWithShell.
7034         (_initialize_remote): Call "add_packet_config_cmd" for
7035         QStartupShell.
7036
7037 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7038             Pedro Alves  <palves@redhat.com>
7039
7040         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7041         and "nat/fork-inferior.h".
7042         * common/common-inferior.h: New file, with contents from
7043         "gdb/inferior.h".
7044         * commom/common-utils.c: Include "common-utils.h".
7045         (stringify_argv): New function.
7046         * common/common-utils.h (stringify_argv): New prototype.
7047         * configure.nat: Add "fork-inferior.o" as a dependency for
7048         "*linux*", "fbsd*" and "nbsd*" hosts.
7049         * corefile.c (get_exec_file): Update comment.
7050         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7051         instead of "startup_inferior".
7052         (darwin_create_inferior): Call "add_thread_silent" after
7053         "fork_inferior".
7054         * fork-child.c: Cleanup unnecessary includes.
7055         (SHELL_FILE): Move to "common/common-fork-child.c".
7056         (environ): Likewise.
7057         (exec_wrapper): Initialize.
7058         (get_exec_wrapper): New function.
7059         (breakup_args): Move to "common/common-fork-child.c"; rename to
7060         "breakup_args_for_exec".
7061         (escape_bang_in_quoted_argument): Move to
7062         "common/common-fork-child.c".
7063         (saved_ui): New variable.
7064         (prefork_hook): New function.
7065         (postfork_hook): Likewise.
7066         (postfork_child_hook): Likewise.
7067         (gdb_startup_inferior): Likewise.
7068         (fork_inferior): Move to "common/common-fork-child.c".  Update
7069         function to support gdbserver.
7070         (startup_inferior): Likewise.
7071         * gdbcore.h (get_exec_file): Remove declaration.
7072         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7073         instead of "startup_inferior".  Call "add_thread_silent" after
7074         "fork_inferior".
7075         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7076         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7077         instead of "startup_inferior".  Call "add_thread_silent" after
7078         "fork_inferior".
7079         * inferior.h: Include "common-inferior.h".
7080         (trace_start_error): Move to "common/common-utils.h".
7081         (trace_start_error_with_name): Likewise.
7082         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7083         (startup_inferior): Likewise.
7084         (gdb_startup_inferior): New prototype.
7085         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7086         * nat/fork-inferior.h: New file.
7087         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7088         instead of "startup_inferior".  Call "add_thread_silent" after
7089         "fork_inferior".
7090         * target.h (target_terminal_init): Move prototype to
7091         "target/target.h".
7092         (target_terminal_inferior): Likewise.
7093         (target_terminal_ours): Likewise.
7094         * target/target.h (target_terminal_init): New prototype, moved
7095         from "target.h".
7096         (target_terminal_inferior): Likewise.
7097         (target_terminal_ours): Likewise.
7098         * utils.c (gdb_flush_out_err): New function.
7099
7100 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7101
7102         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7103         * common/common-gdbthread.h: New file, with parts from
7104         "gdb/gdbthread.h".
7105         * gdbthread.h: Include "common-gdbthread.h".
7106         (switch_to_thread): Moved to "common/common-gdbthread.h".
7107
7108 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7109
7110         * Makefile.in (SFILES): Add "common/job-control.c".
7111         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7112         (COMMON_OBS): Add "job-control.o".
7113         * common/job-control.c: New file, with contents from
7114         "gdb/inflow.c".
7115         * common/job-control.h: New file, with contents from "terminal.h".
7116         * fork-child.c: Include "job-control.h".
7117         * inflow.c: Include "job-control.h".
7118         (gdb_setpgid): Move to "common/common-inflow.c".
7119         (_initialize_inflow): Move setting of "job_control" to
7120         "handle_job_control".
7121         * terminal.h (job_control): Moved to "common/common-terminal.h".
7122         (gdb_setpgid): Likewise.
7123         * top.c: Include "job_control.h".
7124         * utils.c: Likewise.
7125         (job_control): Moved to "job-control.c".
7126
7127 2017-06-07  Pedro Alves  <palves@redhat.com>
7128
7129         * Makefile.in (SFILES): Add gdb_regex.c.
7130         (COMMON_OBS): Add gdb_regex.o.
7131         * ada-lang.c (ada_add_standard_exceptions)
7132         (ada_add_exceptions_from_frame, name_matches_regex)
7133         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7134         parameter type to compiled_regex.  Adjust.
7135         (ada_exceptions_list): Use compiled_regex.
7136         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7137         std::unique_ptr<compiled_regex>.
7138         (exception_catchpoint::~exception_catchpoint): Remove regfree
7139         call.
7140         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7141         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7142         * breakpoint.c (solib_catchpoint::compiled): Now a
7143         std::unique_ptr<compiled_regex>.
7144         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7145         (check_status_catch_solib): Adjust to use compiled_regex.
7146         (add_solib_catchpoint): Adjust to use compiled_regex.
7147         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7148         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7149         compiled_regex reference.  Adjust to use it.
7150         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7151         declaration.  Include "gdb_regex.h".
7152         (apropos_cmd): Change regex parameter to compiled_regex reference.
7153         * gdb_regex.c: New file.
7154         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7155         declarations.
7156         (class compiled_regex): New.
7157         * linux-tdep.c: Include "common/gdb_optional.h".
7158         (struct mapping_regexes): New, factored out from
7159         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7160         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7161         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7162         * probe.c: Include "common/gdb_optional.h".
7163         (collect_probes): Use compiled_regex and gdb::optional and remove
7164         cleanups.
7165         * skip.c: Include "common/gdb_optional.h".
7166         (skiplist_entry::compiled_function_regexp): Now a
7167         gdb::optional<compiled_regex>.
7168         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7169         (free_skiplist_entry): Remove regfree call.
7170         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7171         compiled_regex and gdb::optional.
7172         * symtab.c: Include "common/gdb_optional.h".
7173         (search_symbols): Use compiled_regex and gdb::optional.
7174         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7175         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7176         to gdb_regex.c.
7177
7178 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7179
7180         * regcache.c (regcache::save): Avoid buffer use.
7181         (regcache::dump): Likewise.
7182
7183 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7184
7185         * sh-tdep.c (sh_pseudo_register_read): Remove
7186         MAX_REGISTER_SIZE.
7187         (sh_pseudo_register_write): Likewise.
7188         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7189         (sh64_pseudo_register_write): Likewise
7190
7191 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7192
7193         * aarch64-tdep.c (aarch64_store_return_value): Use
7194         V_REGISTER_SIZE.
7195         (aarch64_pseudo_read_value): Likewise.
7196         (aarch64_pseudo_write): Likewise.
7197
7198 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7199
7200         * regformats/regdef.h (set_register_cache): Remove the
7201         declaration.
7202
7203 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7204
7205         * frame.c (frame_unwind_register_signed): Use
7206         frame_unwind_register_value.
7207
7208 2017-06-06  Pedro Alves  <palves@redhat.com>
7209
7210         PR breakpoints/21553
7211         * breakpoint.c (create_breakpoints_sal_default)
7212         (init_breakpoint_sal, create_breakpoint_sal): Use
7213         gdb::unique_xmalloc_ptr for string parameters.
7214         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7215         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7216         (base_breakpoint_create_breakpoints_sal)
7217         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7218         (strace_marker_create_breakpoints_sal)
7219         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7220         string parameters.
7221         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7222         gdb::unique_xmalloc_ptr for string parameters.
7223         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7224         parameters.
7225
7226 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7227
7228         * alpha-tdep.c (alpha_register_to_value): Use
7229         get_frame_register_value.
7230         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7231
7232 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7233
7234         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7235         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7236         (ia64_value_to_register): Likewise.
7237         (ia64_extract_return_value): Likewise.
7238         (ia64_store_return_value): Likewise.
7239         (ia64_push_dummy_call): Likewise.
7240
7241 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7242
7243         GDB 8.0 released.
7244
7245 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7246
7247         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7248
7249 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7250
7251         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7252         parameter.
7253         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7254
7255 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7256
7257         * event-loop.c (poll_timers): Unallocate timer using delete
7258         instead of xfree.
7259
7260 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7261
7262         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7263         (struct breakpoint) <~breakpoint>: New.
7264         (struct watchpoint): Inherit from breakpoint.
7265         <~watchpoint>: New.
7266         <base>: Remove.
7267         (struct tracepoint): Inherit from breakpoint.
7268         <base>: Remove.
7269         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7270         (struct longjmp_breakpoint): Inherit from breakpoint.
7271         <~longjmp_breakpoint>: New.
7272         <base>: Remove.
7273         (new_breakpoint_from_type): Remove casts.
7274         (watchpoint_in_thread_scope): Remove reference to base field.
7275         (watchpoint_del_at_next_stop): Likewise.
7276         (update_watchpoint): Likewise.
7277         (watchpoint_check): Likewise.
7278         (bpstat_check_watchpoint): Likewise.
7279         (set_longjmp_breakpoint): Likewise.
7280         (struct fork_catchpoint): Inherit from breakpoint.
7281         <base>: Remove.
7282         (struct solib_catchpoint): Inherit from breakpoint.
7283         <~solib_catchpoint>: New.
7284         <base>: Remove.
7285         (dtor_catch_solib): Change to ...
7286         (solib_catchpoint::~solib_catchpoint): ... this.
7287         (breakpoint_hit_catch_solib): Remove reference to base field.
7288         (add_solib_catchpoint): Likewise.
7289         (create_fork_vfork_event_catchpoint): Likewise.
7290         (struct exec_catchpoint): Inherit from breakpoint.
7291         <~exec_catchpoint>: New.
7292         <base>: Remove.
7293         (dtor_catch_exec): Change to ...
7294         (exec_catchpoint::~exec_catchpoint): ... this.
7295         (dtor_watchpoint): Change to ...
7296         (watchpoint::~watchpoint): ... this.
7297         (watch_command_1): Remove reference to base field.
7298         (catch_exec_command_1): Likewise.
7299         (base_breakpoint_dtor): Change to ...
7300         (breakpoint::~breakpoint): ... this.
7301         (base_breakpoint_ops): Remove dtor field value.
7302         (longjmp_bkpt_dtor): Change to ...
7303         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7304         (strace_marker_create_breakpoints_sal): Remove reference to base
7305         field.
7306         (delete_breakpoint): Don't manually call breakpoint destructor.
7307         (create_tracepoint_from_upload): Remove reference to base field.
7308         (trace_pass_set_count): Likewise.
7309         (initialize_breakpoint_ops): Don't initialize
7310         momentary_breakpoint_ops, don't set dtors.
7311         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7312         <~ada_catchpoint>: New.
7313         <base>: Remove.
7314         (create_excep_cond_exprs): Remove reference to base field.
7315         (dtor_exception): Change to ...
7316         (ada_catchpoint::~ada_catchpoint): ... this.
7317         (dtor_catch_exception): Remove.
7318         (dtor_catch_exception_unhandled): Remove.
7319         (dtor_catch_assert): Remove.
7320         (create_ada_exception_catchpoint): Remove reference to base
7321         field.
7322         (initialize_ada_catchpoint_ops): Don't set dtors.
7323         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7324         breakpoint.
7325         <~signal_catchpoint>: New.
7326         <base>: Remove.
7327         (signal_catchpoint_dtor): Change to ...
7328         (signal_catchpoint::~signal_catchpoint): ... this.
7329         (create_signal_catchpoint): Remove reference to base field.
7330         (initialize_signal_catchpoint_ops): Don't set dtor.
7331         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7332         from breakpoint.
7333         <~syscall_catchpoint>: New.
7334         <base>: Remove.
7335         (dtor_catch_syscall): Change to ...
7336         (syscall_catchpoint::~syscall_catchpoint): ... this.
7337         (create_syscall_event_catchpoint): Remove reference to base
7338         field.
7339         (initialize_syscall_catchpoint_ops): Don't set dtor.
7340         * break-catch-throw.c (struct exception_catchpoint): Inherit
7341         from breakpoint.
7342         <~exception_catchpoint>: New.
7343         <base>: Remove.
7344         (dtor_exception_catchpoint): Change to ...
7345         (exception_catchpoint::~exception_catchpoint): ... this.
7346         (handle_gnu_v3_exceptions): Remove reference to base field.
7347         (initialize_throw_catchpoint_ops): Don't set dtor.
7348         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7349         field.
7350         * remote.c (remote_get_tracepoint_status): Likewise.
7351         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7352         * tracefile.c (tracefile_fetch_registers): Likewise.
7353         * tracepoint.c (actions_command): Likewise.
7354         (validate_actionline): Likewise.
7355         (tfind_1): Likewise.
7356         (get_traceframe_location): Likewise.
7357         (find_matching_tracepoint_location): Likewise.
7358         (parse_tracepoint_status): Likewise.
7359         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7360
7361 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7362
7363         * breakpoint.c (struct longjmp_breakpoint): New struct.
7364         (is_tracepoint_type): Change return type to bool.
7365         (is_longjmp_type): New function.
7366         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7367         (set_raw_breakpoint_without_location): Use
7368         new_breakpoint_from_type.
7369         (set_raw_breakpoint): Likewise.
7370
7371 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7372
7373         * breakpoint.c (new_breakpoint_from_type): New function.
7374         (create_breakpoint_sal): Use new_breakpoint_from_type and
7375         unique_ptr.
7376         (create_breakpoint): Likewise.
7377
7378 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7379
7380         * memattr.c (mem_info_command): Rename to ...
7381         (info_mem_command): ... this.
7382         (mem_enable_command): Rename to ...
7383         (enable_mem_command): ... this.
7384         (mem_disable_command): Rename to ...
7385         (disable_mem_command): ... this.
7386         (mem_delete_command): Rename to ...
7387         (delete_mem_command): ... this.
7388         (_initialize_mem): Adjust function names.
7389
7390 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7391
7392         * btrace.c (handle_pt_insn_events): New.
7393         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7394         STATUS.  Split into this and ...
7395         (handle_pt_insn_event_flags): ... this.
7396
7397 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7398
7399         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7400         and struct pt_insn.resynced.
7401         * configure: Regenerated.
7402         * config.in: Regenerated.
7403
7404 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7405
7406         * btrace.c (ftrace_find_call_by_number): New function.
7407         (ftrace_new_function): Store objects, not pointers.
7408         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7409         ftrace_new_gap, ftrace_update_function,
7410         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7411         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7412         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7413         btrace_ends_with_single_insn, btrace_call_get): Account for
7414         btrace_thread_info::functions now storing objects.
7415         * btrace.h (struct btrace_thread_info): Add constructor.
7416         (struct btrace_thread_info) <functions>: Make std::vector.
7417         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7418         Initialize with default values.
7419         * record-btrace.c (record_btrace_frame_sniffer): Account for
7420         btrace_thread_info::functions now storing objects.
7421
7422 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7423
7424         * btrace.c: Remove typedef bfun_s.
7425         (ftrace_new_gap): Directly add gaps to the list of gaps.
7426         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7427         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7428         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7429         instead of gdb VEC.
7430
7431 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7432
7433         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7434         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7435         with btrace_thread_info::next_segment and
7436         btrace_thread_info::prev_segment.
7437         * btrace.h: Remove struct btrace_func_link.
7438         (struct btrace_function): Replace pair of function segment pointers
7439         with pair of indices.
7440         * python/py-record-btrace.c (btpy_call_prev_sibling,
7441         btpy_call_next_sibling): Replace references to
7442         btrace_thread_info::segment with btrace_thread_info::next_segment and
7443         btrace_thread_info::prev_segment.
7444         * record-btrace.c (record_btrace_frame_this_id): Use
7445         btrace_find_call_by_number.
7446
7447 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7448
7449         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7450         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7451         btrace_insn_next, btrace_insn_prev): Remove references to
7452         btrace_thread_info::flow.
7453         * btrace.h (struct btrace_function): Remove FLOW.
7454
7455 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7456
7457         * btrace.c (ftrace_find_call_by_number): New function.
7458         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7459         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7460         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7461         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7462         index.
7463         * btrace.h (struct btrace_function): Turn UP into an index.
7464         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7465         as an index.
7466         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7467         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7468         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7469
7470 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7471
7472         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7473         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7474         ftrace_update_function, ftrace_compute_global_level_offset,
7475         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7476         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7477         btrace_insn_end, btrace_is_empty): Remove references to
7478         btrace_thread_info::begin and btrace_thread_info::end.
7479         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7480         (struct btrace_thread_info) <functions>: Adjust comment.
7481         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7482         btrace_thread_info::begin.
7483
7484 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7485
7486         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7487         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7488         ftrace_update_function): Remove arguments that implicitly were always
7489         BTINFO->END.
7490         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7491         Don't pass BTINFO->END.
7492
7493 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7494
7495         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7496         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7497         btrace_find_insn_by_number): Replace function segment pointer with
7498         index.
7499         (btrace_insn_cmp): Simplify.
7500         * btrace.h: (struct btrace_insn_iterator) Rename index to
7501         insn_index.  Replace function segment pointer with index into function
7502         segment vector.
7503         * record-btrace.c (record_btrace_call_history): Replace function
7504         segment pointer use with index.
7505         (record_btrace_frame_sniffer): Retrieve function call segment through
7506         vector.
7507         (record_btrace_set_replay): Remove defunc't safety check.
7508
7509 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7510
7511         * btrace.c (btrace_ends_with_single_insn): New function.
7512         (btrace_call_get, btrace_call_number, btrace_call_begin,
7513         btrace_call_end, btrace_call_next, btrace_call_prev,
7514         btrace_find_call_by_number): Use index into call segment vector
7515         instead of pointer.
7516         (btrace_call_cmp): Simplify.
7517         * btrace.h (struct btrace_call_iterator): Replace function call segment
7518         pointer with index into vector.
7519         * record-btrace.c (record_btrace_call_history): Use index instead of
7520         pointer.
7521
7522 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7523
7524         * btrace.c (btrace_insn_begin, btrace_insn_end,
7525         btrace_find_insn_by_number): Add btinfo to iterator.
7526         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7527
7528 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7529
7530         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7531         and save pointers directly.
7532         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7533         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7534         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7535         changed signature of functions.
7536         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7537         (btrace_fetch): Remove code that adds btrace_function pointers to
7538         vector of btrace_functions.
7539         (btrace_clear): Simplify freeing vector of btrace_functions.
7540
7541 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7542
7543         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7544         Replace VEC_* with std::vector functions.
7545         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7546         (struct btrace_thread_info)<functions>: Change type to std::vector.
7547
7548 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7549
7550         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7551         "Removed targets and native configurations" up.  Merge duplicate
7552         "New commands" sub-sections.  Add "New options" sub-sections.
7553
7554 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7555
7556         * defs.h (copy_integer_to_size): New declaration.
7557         * findvar.c (copy_integer_to_size): New function.
7558         (do_cint_test): New selftest function.
7559         (copy_integer_to_size_test): Likewise.
7560         (_initialize_findvar): Likewise.
7561         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7562         (mips_fbsd_collect_reg): Use raw_collect_integer.
7563         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7564         (mips64_fill_gregset): Use raw_collect_integer
7565         (mips64_fill_fpregset): Use raw_supply_integer.
7566         * regcache.c (regcache::raw_supply_integer): New function.
7567         (regcache::raw_collect_integer): Likewise.
7568         * regcache.h: (regcache::raw_supply_integer): New declaration.
7569         (regcache::raw_collect_integer): Likewise.
7570
7571 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7572
7573         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7574         (COMMON_OBS): Add gdbarch-selftests.o.
7575         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7576         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7577         * gdbarch-selftests.c: New file.
7578         * regcache.h (regcache) <~regcache>: Mark it virtual if
7579         GDB_SELF_TEST.
7580         <raw_write>: Likewise.
7581
7582 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7583
7584         * regcache.c (current_regcache): Change it to
7585         regcache::current_regcache.
7586         (regcache_observer_target_changed): Update.
7587         (regcache_thread_ptid_changed): Make it a regcache static
7588         method.
7589         (regcache_thread_ptid_changed): Update.
7590         (class regcache_access): New.
7591         (current_regcache_test): Update.
7592         (_initialize_regcache): Update.
7593         * regcache.h: Include forward_list.
7594         (regcache): Declare regcache_thread_ptid_changed and declare
7595         registers_changed_ptid as friend.
7596
7597 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7598
7599         * i387-tdep.c (i387_register_to_value): Use register_size
7600         instead of TYPE_LENGTH.
7601         * m68k-tdep.c (m68k_register_to_value): Likewise.
7602
7603 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7604
7605         * i387-tdep.c (i387_convert_register_p): Return false if type
7606         code isn't TYPE_CODE_FLT.
7607
7608 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7609
7610         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7611         length is 4.
7612         (alpha_register_to_value): Remove type length check.
7613         (alpha_value_to_register): Likewise.
7614
7615 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7616
7617         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7618         TYPE_CODE_FLT.
7619
7620 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7621
7622         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7623         TYPE_CODE_FLT or not.
7624
7625 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7626
7627         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7628         * avr-tdep.c (avr_gdbarch_init): Likewise.
7629         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7630         * cris-tdep.c (cris_gdbarch_init): Likewise.
7631         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7632         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7633         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7634         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7635         * mep-tdep.c (mep_gdbarch_init): Likewise.
7636         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7637         * mips-tdep.c (mips_gdbarch_init): Likewise.
7638         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7639         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7640         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7641         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7642         * v850-tdep.c (v850_gdbarch_init): Likewise.
7643
7644 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7645
7646         * selftest-arch.c (tests_with_arch): Call registers_changed
7647         and reinit_frame_cache.
7648         * selftest.c (run_self_tests): Likewise.
7649
7650 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7651
7652         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7653         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7654
7655 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7656
7657         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7658         set_gdbarch_print_insn.
7659
7660 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7661
7662         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7663         set_gdbarch_print_insn.
7664
7665 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7666
7667         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7668         set_gdbarch_print_insn.
7669         * arc-tdep.c (arc_gdbarch_init): Likewise.
7670         * arch-utils.c: include dis-asm.h.
7671         (default_print_insn): New function.
7672         * arch-utils.h (default_print_insn): Declare.
7673         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7674         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7675         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7676         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7677         * frv-tdep.c (frv_gdbarch_init): Likewise.
7678         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7679         * gdbarch.sh (print_insn): Use default_print_insn.
7680         * gdbarch.c: Regenerated.
7681         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7682         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7683         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7684         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7685         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7686         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7687         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7688         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7689         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7690         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7691         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7692         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7693         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7694         * mt-tdep.c (mt_gdbarch_init): Likewise.
7695         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7696         * nios2-tdep.c (nios2_print_insn): Remove.
7697         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7698         * rx-tdep.c (rx_gdbarch_init): Likewise.
7699         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7700         * score-tdep.c (score_print_insn): Remove.
7701         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7702         * sh-tdep.c (sh_gdbarch_init): Likewise.
7703         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7704         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7705         * tic6x-tdep.c (tic6x_print_insn): Remove.
7706         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7707         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7708         * v850-tdep.c (v850_gdbarch_init): Likewise.
7709         * vax-tdep.c (vax_gdbarch_init): Likewise.
7710         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7711         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7712
7713 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7714
7715         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7716         (MIPS_FP0_REGNUM): Remove.
7717         (MIPS_FSR_REGNUM): Remove.
7718         (mips_fbsd_supply_fpregs): Use mips_regnum.
7719         (mips_fbsd_supply_gregs): Likewise.
7720         (mips_fbsd_collect_fpregs): Likewise.
7721         (mips_fbsd_collect_gregs): Likewise.
7722
7723 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7724
7725         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7726         (getpfpregs_supplies): New function.
7727         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7728         getfpregs_supplies.
7729         (mips_fbsd_store_inferior_registers): Likewise.
7730
7731 2017-05-22  Pedro Alves <palves@redhat.com>
7732
7733         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7734         maintainer.
7735
7736 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7737
7738         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7739         (store_register): Likewise.
7740         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7741         (get_decimal_float_return_value): Likewise.
7742         (do_ppc_sysv_return_value): Likewise.
7743         (ppc64_sysv_abi_push_integer): Likewise.
7744         (ppc64_sysv_abi_push_freg): Likewise.
7745         (ppc64_sysv_abi_return_value_base): Likewise.
7746         (ppc64_sysv_abi_return_value): Likewise.
7747         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7748         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7749         * rs6000-nat.c: Likewise.
7750         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7751         (rs6000_value_to_register): Likewise.
7752         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7753
7754 2017-05-21  Tom Tromey  <tom@tromey.com>
7755
7756         PR rust/21466:
7757         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7758         arrays as "[T]", not "[T; ]".
7759
7760 2017-05-19  Tom Tromey  <tom@tromey.com>
7761
7762         PR rust/21484:
7763         * rust-lang.c (exp_descriptor_rust): New function.
7764         (rust_language_defn): Use it.
7765         * p-lang.c (pascal_language_defn): Update.
7766         * opencl-lang.c (opencl_language_defn): Update.
7767         * objc-lang.c (objc_language_defn): Update.
7768         * m2-lang.c (m2_language_defn): Update.
7769         * language.h (struct language_defn)
7770         <la_watch_location_expression>: New member.
7771         * language.c (unknown_language_defn, auto_language_defn)
7772         (local_language_defn): Update.
7773         * go-lang.c (go_language_defn): Update.
7774         * f-lang.c (f_language_defn): Update.
7775         * d-lang.c (d_language_defn): Update.
7776         * c-lang.h (c_watch_location_expression): Declare.
7777         * c-lang.c (c_watch_location_expression): New function.
7778         (c_language_defn, cplus_language_defn, asm_language_defn)
7779         (minimal_language_defn): Use it.
7780         * breakpoint.c (watch_command_1): Call
7781         la_watch_location_expression.
7782         * ada-lang.c (ada_language_defn): Update.
7783
7784 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7785
7786         PR tui/21482
7787         * gdb_curses.h (NOMACROS): Define.
7788         (NCURSES_NOMACROS): Define.
7789
7790 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7791
7792         PR tui/21482
7793         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7794         arg to char *.
7795         * tui/tui-wingeneral.c (box_win): Likewise.
7796         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7797         (tui_show_source_line): Likewise.
7798         (tui_show_exec_info_content): Likewise.
7799
7800 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7801
7802         * sparc-tdep.c (sparc_structure_return_p)
7803         (sparc_arg_on_registers_p): New functions.
7804         (sparc32_store_arguments): Use them.
7805         * sparc64-tdep.c (sparc64_16_byte_align_p)
7806         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7807         Handle TYPE_CODE_ARRAY.
7808
7809 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7810
7811         * cli/cli-decode.c (add_alias_cmd): New function.
7812         * command.h (add_alias_cmd): Declare.
7813         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7814         instead call add_alias_cmd.
7815
7816 2017-05-17  Pedro Alves  <palves@redhat.com>
7817
7818         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7819         (nat_makefile_frag): ... this.  All references updated.
7820         * configure.ac: Likewise.
7821         * configure.nat: Likewise.  Enhance comments.
7822         * configure: Regenerate.
7823
7824 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7825
7826         * procfs.c (procfs_create_inferior): Change prototype to match
7827         definition.
7828
7829 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7830
7831         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7832         C++ compiler warning.
7833
7834 2017-05-12  Tom Tromey  <tom@tromey.com>
7835
7836         PR rust/21483:
7837         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7838         recurse, just call value_struct_elt directly.
7839
7840 2017-05-12  Tom Tromey  <tom@tromey.com>
7841
7842         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7843         OP_RUST_ARRAY>: Fix.
7844
7845 2017-05-12  Tom Tromey  <tom@tromey.com>
7846
7847         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7848
7849 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7850
7851         * regcache.c: Include <forward_list>.
7852         (struct regcache_list): Remove.
7853         (current_regcache): Update.
7854         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7855         (regcache_thread_ptid_changed): Likewise.
7856         (registers_changed_ptid): Likewise.
7857         (current_regcache_size): Likewise.
7858
7859 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7860
7861         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7862         (current_regcache_size): New function.
7863         (current_regcache_test): New function.
7864         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7865
7866 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7867
7868         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7869         (print_gp_register_row): Use get_frame_register_value.
7870
7871 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7872
7873         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7874         (mips_supply_fpregset): Likewise.
7875         (mips64_supply_gregset): Likewise.
7876
7877 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7878
7879         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7880         regcache->raw_supply_zeroed.
7881
7882 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7883
7884         * configure.nat: Rearrange 'case' statements to match
7885         host before cpu.
7886
7887 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7888
7889         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7890         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7891         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7892         "@nat_extra_makefile_frag@".
7893         (Makefile): Remove dependency on "@frags@".
7894         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7895         (data-directory/Makefile): Likewise.
7896         * config/aarch64/linux.mh: Deleted; moved contents to
7897         "gdb/configure.nat".
7898         * config/alpha/alpha-linux.mh: Likewise.
7899         * config/alpha/nbsd.mh: Likewise.
7900         * config/arm/linux.mh: Likewise.
7901         * config/arm/nbsdelf.mh: Likewise.
7902         * config/i386/cygwin.mh: Likewise.
7903         * config/i386/cygwin64.mh: Likewise.
7904         * config/i386/darwin.mh: Likewise.
7905         * config/i386/fbsd.mh: Likewise.
7906         * config/i386/fbsd64.mh: Likewise.
7907         * config/i386/go32.mh: Likewise.
7908         * config/i386/i386gnu.mh: Likewise.
7909         * config/i386/i386sol2.mh: Likewise.
7910         * config/i386/linux.mh: Likewise.
7911         * config/i386/linux64.mh: Likewise.
7912         * config/i386/mingw.mh: Likewise.
7913         * config/i386/mingw64.mh: Likewise.
7914         * config/i386/nbsd64.mh: Likewise.
7915         * config/i386/nbsdelf.mh: Likewise.
7916         * config/i386/nto.mh: Likewise.
7917         * config/i386/obsd.mh: Likewise.
7918         * config/i386/obsd64.mh: Likewise.
7919         * config/i386/sol2-64.mh: Likewise.
7920         * config/ia64/linux.mh: Likewise.
7921         * config/m32r/linux.mh: Likewise.
7922         * config/m68k/linux.mh: Likewise.
7923         * config/m68k/nbsdelf.mh: Likewise.
7924         * config/m68k/obsd.mh: Likewise.
7925         * config/m88k/obsd.mh: Likewise.
7926         * config/mips/fbsd.mh: Likewise.
7927         * config/mips/linux.mh: Likewise.
7928         * config/mips/nbsd.mh: Likewise.
7929         * config/mips/obsd64.mh: Likewise.
7930         * config/pa/linux.mh: Likewise.
7931         * config/pa/nbsd.mh: Likewise.
7932         * config/pa/obsd.mh: Likewise.
7933         * config/powerpc/aix.mh: Likewise.
7934         * config/powerpc/fbsd.mh: Likewise.
7935         * config/powerpc/linux.mh: Likewise.
7936         * config/powerpc/nbsd.mh: Likewise.
7937         * config/powerpc/obsd.mh: Likewise.
7938         * config/powerpc/ppc64-linux.mh: Likewise.
7939         * config/powerpc/spu-linux.mh: Likewise.
7940         * config/s390/linux.mh: Likewise.
7941         * config/sh/nbsd.mh: Likewise.
7942         * config/sparc/fbsd.mh: Likewise.
7943         * config/sparc/linux.mh: Likewise.
7944         * config/sparc/linux64.mh: Likewise.
7945         * config/sparc/nbsd64.mh: Likewise.
7946         * config/sparc/nbsdelf.mh: Likewise.
7947         * config/sparc/obsd64.mh: Likewise.
7948         * config/sparc/sol2.mh: Likewise.
7949         * config/tilegx/linux.mh: Likewise.
7950         * config/vax/nbsdelf.mh: Likewise.
7951         * config/vax/obsd.mh: Likewise.
7952         * config/xtensa/linux.mh: Likewise.
7953         * config/i386/i386gnu.mn: New file, with excerpts from
7954         "config/i386/i386gnu.mh".
7955         * configure: Regenerate.
7956         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7957         *.mh files under "gdb/config".
7958         * configure.nat: New file, with contents from the
7959         "gdb/config/*/*.mh" files.
7960
7961 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7962
7963         * btrace.c (btrace_clear): Free insn vector.
7964
7965 2017-05-05  Pedro Alves  <palves@redhat.com>
7966
7967         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7968         * configure: Regenerate.
7969
7970 2017-05-04  Pedro Alves  <palves@redhat.com>
7971
7972         * Makefile.in (SFILES): Add progspace-and-thread.c.
7973         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7974         (COMMON_OBS): Add progspace-and-thread.o.
7975         * breakpoint.c: Include "progspace-and-thread.h".
7976         (update_inserted_breakpoint_locations)
7977         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7978         Use scoped_restore_current_pspace_and_thread.
7979         (create_std_terminate_master_breakpoint): Use
7980         scoped_restore_current_program_space.
7981         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7982         (print_breakpoint_location): Use
7983         scoped_restore_current_program_space.
7984         (bp_loc_is_permanent): Use
7985         scoped_restore_current_pspace_and_thread.
7986         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7987         (download_tracepoint_locations): Use
7988         scoped_restore_current_pspace_and_thread.
7989         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7990         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7991         (enum step_over_calls_kind): Moved from inferior.h.
7992         (class scoped_restore_current_thread): New class.
7993         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7994         declaration.
7995         (scoped_restore_current_thread): New class.
7996         * infcmd.c: Include "common/gdb_optional.h".
7997         (continue_1, proceed_after_attach): Use
7998         scoped_restore_current_thread.
7999         (notice_new_inferior): Use scoped_restore_current_thread.
8000         * inferior.c: Include "progspace-and-thread.h".
8001         (restore_inferior, save_current_inferior): Delete.
8002         (add_inferior_command, clone_inferior_command): Use
8003         scoped_restore_current_pspace_and_thread.
8004         * inferior.h (scoped_restore_current_inferior): New class.
8005         * infrun.c: Include "progspace-and-thread.h" and
8006         "common/gdb_optional.h".
8007         (follow_fork_inferior): Use
8008         scoped_restore_current_pspace_and_thread.
8009         (scoped_restore_exited_inferior): New class.
8010         (handle_vfork_child_exec_or_exit): Use
8011         scoped_restore_exited_inferior,
8012         scoped_restore_current_pspace_and_thread,
8013         scoped_restore_current_thread and scoped_restore.
8014         (fetch_inferior_event): Use scoped_restore_current_thread.
8015         * linespec.c (decode_line_full, decode_line_1): Use
8016         scoped_restore_current_program_space.
8017         * mi/mi-main.c: Include "progspace-and-thread.h".
8018         (exec_continue): Use scoped_restore_current_thread.
8019         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8020         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8021         * proc-service.c (ps_pglobal_lookup): Use
8022         scoped_restore_current_program_space.
8023         * progspace-and-thread.c: New file.
8024         * progspace-and-thread.h: New file.
8025         * progspace.c (release_program_space, clone_program_space): Use
8026         scoped_restore_current_program_space.
8027         (restore_program_space, save_current_program_space)
8028         (save_current_space_and_thread): Delete.
8029         (switch_to_program_space_and_thread): Moved to
8030         progspace-and-thread.c.
8031         * progspace.h (save_current_program_space)
8032         (save_current_space_and_thread): Delete declarations.
8033         (scoped_restore_current_program_space): New class.
8034         * remote.c (remote_btrace_maybe_reopen): Use
8035         scoped_restore_current_thread.
8036         * symtab.c: Include "progspace-and-thread.h".
8037         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8038         * thread.c (print_thread_info_1): Use
8039         scoped_restore_current_thread.
8040         (struct current_thread_cleanup): Delete.
8041         (do_restore_current_thread_cleanup)
8042         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8043         (scoped_restore_current_thread::~scoped_restore_current_thread):
8044         ... this new dtor.
8045         (make_cleanup_restore_current_thread): Rename/convert to ...
8046         (scoped_restore_current_thread::scoped_restore_current_thread):
8047         ... this new ctor.
8048         (thread_apply_all_command): Use scoped_restore_current_thread.
8049         (thread_apply_command): Use scoped_restore_current_thread.
8050         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8051         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8052
8053 2017-05-04  Pedro Alves  <palves@redhat.com>
8054
8055         * thread.c (make_cleanup_restore_current_thread): Move
8056         find_thread_ptid call before the is_stopped call.  Assert that the
8057         thread is found.  Replace is_stopped call by checking the thread's
8058         state directly.  Remove unnecessary NULL-thread check.
8059
8060 2017-05-04  Pedro Alves  <palves@redhat.com>
8061
8062         * corelow.c (thread_section_name): New class.
8063         (get_core_register_section, get_core_siginfo): Use it.
8064
8065 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8066
8067         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8068         (get_core_register_section): Remove xfree of NULL pointer.
8069
8070 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8071
8072         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8073         * regcache.c (regcache::raw_supply_zeroed): New function.
8074         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8075
8076 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8077
8078         * gdbarch.sh: Remove commented out definition of
8079         TARGET_CHAR_BIT.
8080         * gdbarch.h: Re-generate.
8081
8082 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8083
8084         * configure: Regenerate.
8085
8086 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8087
8088         * solib-target.c (solib_target_relocate_section_addresses):
8089         Remove num_section_bases, num_bases, segment_bases variables.
8090
8091 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8092
8093         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8094
8095 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8096
8097         * solib-target.c: Include <vector>
8098         (struct lm_info_target) <~lm_info_target>: Remove.
8099         <segment_bases, section_bases>: Change type to
8100         std::vector<CORE_ADDR>.
8101         (library_list_start_segment, library_list_start_section,
8102         library_list_end_library,
8103         solib_target_relocate_section_addresses): Adjust.
8104
8105 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8106
8107         * gdbarch.sh (software_single_step): Change return type to
8108         std::vector<CORE_ADDR>.
8109         * gdbarch.c, gdbarch.h: Re-generate.
8110         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8111         Adjust.
8112         (arm_deal_with_atomic_sequence_raw): Adjust.
8113         (thumb_get_next_pcs_raw): Adjust.
8114         (arm_get_next_pcs_raw): Adjust.
8115         (arm_get_next_pcs): Adjust.
8116         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8117         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8118         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8119         (alpha_software_single_step): Adjust.
8120         * alpha-tdep.h (alpha_software_single_step): Adjust.
8121         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8122         * arm-tdep.c (arm_software_single_step): Adjust.
8123         (arm_breakpoint_kind_from_current_state): Adjust.
8124         * arm-tdep.h (arm_software_single_step): Adjust.
8125         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8126         * cris-tdep.c (cris_software_single_step): Adjust.
8127         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8128         (micromips_deal_with_atomic_sequence): Adjust.
8129         (deal_with_atomic_sequence): Adjust.
8130         (mips_software_single_step): Adjust.
8131         * mips-tdep.h (mips_software_single_step): Adjust.
8132         * moxie-tdep.c (moxie_software_single_step): Adjust.
8133         * nios2-tdep.c (nios2_software_single_step): Adjust.
8134         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8135         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8136         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8137         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8138         * sparc-tdep.c (sparc_software_single_step): Adjust.
8139         * spu-tdep.c (spu_software_single_step): Adjust.
8140         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8141
8142 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8143
8144         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8145         * gdbarch.h: Re-generate.
8146
8147 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8148
8149         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8150         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8151         * python/py-instruction.c, python/py-instruction.h: New file.
8152         * python/py-record.c: Add py-instruction.h include.
8153         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8154         gdb.RecordInstruction.
8155         * python/python-internal.h: Add gdbpy_initialize_instruction
8156         declaration.
8157         * python/python.c (do_start_initialization): Add
8158         gdbpy_initialize_instruction.
8159
8160 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8161
8162         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8163         Remove.
8164         (btrace_func_from_recpy_func): New function.
8165         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8166         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8167         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8168         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8169         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8170         Also, use new helper functions.
8171         (btpy_list_item): Use new helper functions.
8172         (recpy_bt_function_call_history): Use new type name.
8173         (btpy_call_getset): Remove.
8174         (gdbpy_initialize_btrace): Remove code to initialize
8175         gdb.BtraceFunctionCall.
8176         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8177         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8178         recpy_bt_func_prev, recpy_bt_func_next): New export.
8179         * python/py-record.c (recpy_func_type): New static object.
8180         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8181         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8182         recpy_func_next): New function.
8183         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8184         (recpy_func_getset): New static object.
8185         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8186         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8187
8188 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8189
8190         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8191         (btpy_object, btpy_insn_type, btpy_new): Remove.
8192         (btpy_list_object): Use gdb.RecordInstruction type instead of
8193         gdb.BtraceInstruction type.
8194         (btrace_insn_from_recpy_insn): New function.
8195         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8196         btpy_new.
8197         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8198         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8199         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8200         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8201         instead of btpy_object.
8202         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8203         btpy_insn_data, btpy_insn_decode): Rename to ...
8204         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8205         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8206         recpy_bt_insn_decode): This.  Also, use new helper functions.
8207         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8208         recpy_insn_type.
8209         (btpy_insn_getset): Remove.
8210         (gdbpy_initialize_btrace): Remove code to initialize
8211         gdb.BtraceInstruction.  Use recpy_element_object.
8212         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8213         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8214         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8215         * python/py-record.c (recpy_insn_type): New static object.
8216         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8217         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8218         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8219         New function.
8220         (recpy_insn_getset): New static object.
8221         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8222         * python/py-record.h (recpy_element_object): New typedef.
8223         (recpy_insn_type, recpy_insn_new): New export.
8224
8225 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8226
8227         * py-record-btrace.c (btpy_insn_new): Removed.
8228         (btpy_insn_or_gap_new): New function.
8229         (btpy_insn_error): Removed.
8230         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8231         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8232         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8233         btpy_insn_or_gap_new instead of btpy_insn_new.
8234         (btpy_insn_getset): Remove btpy_insn_error.
8235         * py-record.c (recpy_gap_type): New static object.
8236         (recpy_gap_object): New typedef.
8237         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8238         recpy_gap_reason_string): New function.
8239         (recpy_gap_getset): New static object.
8240         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8241         * py-record.h (recpy_gap_new): New export.
8242
8243 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8244
8245         * python/py-record.c (recpy_ptid): Remove.
8246         (recpy_record_getset): Remove recpy_ptid.
8247
8248 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8249
8250         * btrace.c (btrace_fetch): Set inferior_ptid.
8251         * python/py-record-btrace.c: Add "py-record.h" include.
8252         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8253         recpy_bt_end, recpy_bt_instruction_history,
8254         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8255         in gdb.Record object instead of current ptid.
8256         * python/py-record.c: Include new "py-record.h" file.
8257         (recpy_record_object): Moved to py-record.h.
8258         * python/py-record.h: New file.
8259
8260 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8261
8262         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8263         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8264         indentation.
8265
8266 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8267
8268         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8269         the past maintainers section.
8270
8271 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8272
8273         * infcmd.c (get_return_value): Use regcache ctor, and remove
8274         cleanup.
8275
8276 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8277             Pedro Alves  <palves@redhat.com>
8278
8279         * regcache.c (regcache::regcache): New tag dispatch ctor.
8280         (do_cooked_read): Moved above.
8281         (regcache_dup): Use the tag dispatch ctor..
8282         * regcache.h (regcache): Declare ctor, delete copy ctor and
8283         assignment operator, remove friend regcache_dup.
8284
8285 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8286
8287         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8288         call method save instead of regcache_cpy.
8289         * regcache.h (struct regcache): Make regcache_dup a friend.
8290
8291 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8292
8293         * regcache.c (struct regcache): Move to regcache.h
8294         (regcache::arch): New method.
8295         (regcache_get_ptid): Update.
8296         (get_regcache_arch): Call arch method.
8297         (get_regcache_aspace): Call method aspace.
8298         (register_buffer): Change it to method.
8299         (regcache_save): Change it to regcache::save.
8300         (regcache_restore): Likewise.
8301         (regcache_cpy_no_passthrough): Remove the declaration.
8302         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8303         (regcache_cpy_no_passthrough): Change it to method
8304         cpy_no_passthrough.
8305         (regcache_register_status): Change it to method
8306         get_register_status.
8307         (regcache_invalidate): Change it to method invalidate.
8308         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8309         (regcache_raw_update): Change it to method raw_update.
8310         (regcache_raw_read): Likewise.
8311         (regcache_raw_read_signed): Likewise.
8312         (regcache_raw_read_unsigned): Likewise.
8313         (regcache_raw_write_signed): Likewise.
8314         (regcache_raw_write_unsigned): Likewise.
8315         (regcache_cooked_read): Likewise.
8316         (regcache_cooked_read_value): Likewise.
8317         (regcache_cooked_read_signed): Likewise.
8318         (regcache_cooked_read_unsigned): Likewise.
8319         (regcache_cooked_write_signed): Likewise.
8320         (regcache_cooked_write_unsigned): Likewise.
8321         (regcache_raw_set_cached_value): Likewise.
8322         (regcache_raw_write): Likewise.
8323         (regcache_cooked_write): Likewise.
8324         (regcache_xfer_part): Likewise.
8325         (regcache_raw_read_part): Likewise.
8326         (regcache_raw_write_part): Likewise.
8327         (regcache_cooked_read_part): Likewise.
8328         (regcache_cooked_write_part): Likewise.
8329         (regcache_raw_supply): Likewise.
8330         (regcache_raw_collect): Likewise.
8331         (regcache_transfer_regset): Likewise.
8332         (regcache_supply_regset): Likewise.
8333         (regcache_collect_regset): Likewise.
8334         (regcache_debug_print_register): Likewise.
8335         (enum regcache_dump_what): Move it to regcache.h.
8336         (regcache_dump): Change it to method dump.
8337         * regcache.h (enum regcache_dump_what): New.
8338         (class regcache): New.
8339         * target.c (target_fetch_registers): Call method
8340         debug_print_register.
8341         (target_store_registers): Likewise.
8342
8343 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8344
8345         * windows-nat.c (struct lm_info_windows): Initialize field.
8346         (windows_make_so): Allocate lm_info_windows with new.
8347         (windows_free_so): Free lm_info_windows with delete.
8348
8349 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8350
8351         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8352         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8353         cleanup.
8354         (darwin_free_so): Free lm_info_darwin with delete.
8355
8356 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8357
8358         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8359         <l_addr_p>: Change type to bool.
8360         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8361         (svr4_free_so): Free lm_info_svr4 with delete.
8362         (svr4_copy_library_list): Replace memcpy with call to copy
8363         constructor.
8364         (library_list_start_library, svr4_default_sos): Allocate
8365         lm_info_svr4 with new.
8366
8367 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8368
8369         * solib-target.c (struct lm_info_target): Add destructor,
8370         initialize fields.
8371         <name>: Change type to std::string.
8372         (library_list_start_library): Allocate lm_info_target with new.
8373         (solib_target_free_library_list): Free lm_info_target with
8374         delete.
8375         (solib_target_current_sos): Adapt to std::string.
8376         (solib_target_free_so): Free lm_info_target with delete.
8377
8378 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8379
8380         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8381         fields.
8382         (frv_current_sos): Allocate lm_info_frv with new.
8383         (frv_relocate_main_executable): Free lm_info_frv with delete,
8384         allocate with new.
8385         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8386
8387 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8388
8389         * solib-frv.c (struct lm_info_frv): Fix indentation.
8390
8391 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8392
8393         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8394         map field.
8395         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8396         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8397         and allocate with new.
8398         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8399
8400 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8401
8402         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8403         <filename, member_name>: Change type to std::string.
8404         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8405         (library_list_start_library): Allocate lm_info_aix with new.
8406         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8407         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8408         with copy constructor.
8409
8410 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8411
8412         * solist.h (struct lm_info): Remove.
8413         (struct lm_info_base): New class.
8414         (struct so_list) <lm_info>: Change type to lm_info_base *.
8415         * nto-tdep.c (struct lm_info): Remove.
8416         (lm_addr): Adjust.
8417         * solib-aix.c (struct lm_info): Rename to ...
8418         (struct lm_info_aix): ... this.  Extend lm_info_base.
8419         (lm_info_p): Rename to ...
8420         (lm_info_aix_p): ... this, and adjust.
8421         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8422         solib_aix_parse_libraries, library_list_start_library,
8423         solib_aix_free_library_list, solib_aix_parse_libraries,
8424         solib_aix_get_library_list,
8425         solib_aix_relocate_section_addresses, solib_aix_free_so,
8426         solib_aix_get_section_offsets,
8427         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8428         Adjust.
8429         (struct solib_aix_inferior_data) <library_list>: Adjust.
8430         * solib-darwin.c (struct lm_info): Rename to ...
8431         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8432         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8433         * solib-dsbt.c (struct lm_info): Rename to ...
8434         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8435         (struct dsbt_info) <main_executable_lm_info): Adjust.
8436         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8437         dsbt_relocate_section_addresses): Adjust.
8438         * solib-frv.c (struct lm_info): Rename to ...
8439         (struct lm_info_frv): ... this.  Extend lm_info_base.
8440         (main_executable_lm_info): Adjust.
8441         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8442         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8443         find_canonical_descriptor_in_load_object,
8444         frv_fdpic_find_canonical_descriptor): Adjust.
8445         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8446         to lm_info_svr4.
8447         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8448         svr4_clear_so, svr4_copy_library_list,
8449         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8450         svr4_current_sos, svr4_fetch_objfile_link_map,
8451         solist_update_incremental): Adjust.
8452         * solib-svr4.h (struct lm_info_svr4): Move here from
8453         solib-svr4.c.
8454         * solib-target.c (struct lm_info): Rename to ...
8455         (struct lm_info_target): ... this.  Extend lm_info_base.
8456         (lm_info_p): Rename to ...
8457         (lm_info_target_p): ... this.
8458         (solib_target_parse_libraries, library_list_start_segment,
8459         library_list_start_section, library_list_start_library,
8460         library_list_end_library, solib_target_free_library_list,
8461         solib_target_current_sos, solib_target_free_so,
8462         solib_target_relocate_section_addresses): Adjust.
8463         * windows-nat.c (struct lm_info): Rename to ...
8464         (struct lm_info_windows): ... this.  Extend lm_info_base.
8465         (windows_make_so, handle_load_dll, handle_unload_dll,
8466         windows_xfer_shared_libraries): Adjust.
8467
8468 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8469
8470         * solib-darwin.c (struct darwin_so_list): Remove.
8471         (darwin_current_sos): Allocate an so_list object instead of a
8472         darwin_so_list, separately allocate an lm_info object.
8473         (darwin_free_so): Free lm_info.
8474
8475 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8476
8477         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8478         with fprintf_filtered.
8479
8480 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8481
8482         * regcache.c (regcache::regcache): New function.
8483         (regcache::~regcache): New function.
8484         (regcache_xmalloc_1): Remove.
8485         (regcache_xmalloc): Call new regcache.
8486         (regcache_xfree): Call delete regcache.
8487         (get_thread_arch_aspace_regcache): Call new regcache.
8488
8489 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8490
8491         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8492         lwp instead of ptid_get_lwp.
8493
8494 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8495
8496         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8497         lwp_info instead of getting from inferior_ptid.
8498
8499 2017-04-27  Keith Seitz  <keiths@redhat.com>
8500
8501         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8502         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8503         (CV_CONVERSION_BADNESS): Define.
8504         (rank_one_type): Remove overly restrictive rvalue reference
8505         rank checks.
8506         Add cv-qualifier checks and subranks for type equality.
8507         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8508         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8509         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8510
8511 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8512
8513         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8514         count when creating the object.
8515
8516 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8517             Ulrich Weigand  <uweigand@de.ibm.com>
8518
8519         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8520         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8521         is used in AIX.
8522         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8523         (process_xcoff_symbol): Likewise.
8524         (scan_xcoff_symtab): Likewise.
8525
8526 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8527
8528         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8529         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8530         (ia64_access_reg): Use get_frame_register_unsigned.
8531         (ia64_access_rse_reg): Likewise.
8532         (ia64_libunwind_frame_prev_register): Likewise.
8533
8534 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8535
8536         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8537         * gdbarch.c: Regenerated.
8538         * gdbarch.h: Regenerated.
8539         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8540         visibility external.
8541         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8542         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8543         (enum cfa_how_kind): Move to ...
8544         (struct dwarf2_frame_state_reg_info): Likewise.
8545         (struct dwarf2_frame_state): Likewise.
8546         * dwarf2-frame.h: ... here.
8547         (dwarf2_frame_state_alloc_regs): New declaration.
8548         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8549         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8550
8551 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8552
8553         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8554         regcache_raw_read_unsigned.
8555         (xtensa_pseudo_register_write): Likewise.
8556
8557 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8558
8559         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8560         (nds32_pseudo_register_write): Likewise.
8561
8562 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8563
8564         * regcache.c (struct regcache) <readonly_p>: Change its type
8565         to bool.
8566         (regcache_xmalloc_1): Update parameter type and callers update.
8567
8568 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8569
8570         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8571         set_gdbarch_wchar_bit.
8572         * arm-tdep.c (arm_gdbarch_init): Likewise.
8573
8574 2017-04-25  Pedro Alves  <palves@redhat.com>
8575
8576         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8577         (BothAreRelocatable, memcopy, memmove): Don't define.
8578         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8579         macros.
8580
8581 2017-04-25  Pedro Alves  <palves@redhat.com>
8582
8583         * common/common-defs.h: Include "common/poison.h".
8584         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8585         and adjust.
8586         * common/poison.h: New file.
8587         * common/traits.h: Include <type_traits>.
8588         (Not, Or, Requires): New, moved from common/function-view.h.
8589
8590 2017-04-25  Pedro Alves  <palves@redhat.com>
8591
8592         * breakpoint.h (struct breakpoint): In-class initialize all
8593         fields.  Make boolean fields "bool".
8594         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8595         memset call and initializations no longer necessary.
8596
8597 2017-04-25  Pedro Alves  <palves@redhat.com>
8598
8599         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8600         reference.
8601         (pt_btrace_insn): New function.
8602         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8603
8604 2017-04-25  Pedro Alves  <palves@redhat.com>
8605
8606         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8607         "base" field and inherit from "bp_location" instead.  Add
8608         non-default ctor.
8609         (allocate_location_exception): Use new non-default ctor.
8610         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8611         (init_bp_location): Convert to ...
8612         (bp_location::bp_location): ... this new ctor, and remove memset
8613         call.
8614         (base_breakpoint_allocate_location): Use the new non-default ctor.
8615         * breakpoint.h (bp_location): Now a class.  Declare default and
8616         non-default ctors.  In-class initialize all members.
8617         (init_bp_location): Remove declaration.
8618
8619 2017-04-25  Pedro Alves  <palves@redhat.com>
8620
8621         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8622         assignment operator.
8623
8624 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8625
8626         * doublest.c (convert_doublest_to_floatformat): Call
8627         floatformat_totalsize_bytes.
8628
8629 2017-04-22  Tom Tromey  <tom@tromey.com>
8630
8631         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8632         ui_out_emit_list.
8633         * stack.c (print_frame): Use ui_out_emit_list.
8634         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8635         ui_out_emit_list.
8636         * mi/mi-main.c (print_one_inferior)
8637         (mi_cmd_data_list_register_names)
8638         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8639         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8640         ui_out_emit_list.
8641         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8642         (mi_output_solib_attribs): Use ui_out_emit_list,
8643         ui_out_emit_tuple.
8644         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8645         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8646         (mi_cmd_stack_list_args, list_args_or_locals): Use
8647         ui_out_emit_list.
8648         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8649         * breakpoint.c (print_solib_event, output_thread_groups): Use
8650         ui_out_emit_list.
8651
8652 2017-04-22  Tom Tromey  <tom@tromey.com>
8653
8654         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8655         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8656         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8657
8658 2017-04-22  Tom Tromey  <tom@tromey.com>
8659
8660         * tracepoint.c (tvariables_info_1)
8661         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8662
8663 2017-04-22  Tom Tromey  <tom@tromey.com>
8664
8665         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8666         annotate_arg_emitter.
8667         * breakpoint.c (print_mention_watchpoint)
8668         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8669         * annotate.h (struct annotate_arg_emitter): New.
8670
8671 2017-04-22  Tom Tromey  <tom@tromey.com>
8672
8673         * record-btrace.c (record_btrace_insn_history)
8674         (record_btrace_insn_history_range, record_btrace_call_history)
8675         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8676         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8677         ui_out_emit_tuple.
8678         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8679         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8680         * skip.c (skip_info): Use ui_out_emit_tuple.
8681         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8682         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8683         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8684         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8685         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8686         ui_out_emit_tuple.
8687         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8688         (output_register, mi_cmd_data_read_memory)
8689         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8690         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8691         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8692         Use ui_out_emit_tuple.
8693         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8694         ui_out_emit_tuple.
8695         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8696         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8697         * linux-thread-db.c (info_auto_load_libthread_db): Use
8698         ui_out_emit_tuple.
8699         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8700         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8701         * disasm.c (do_mixed_source_and_assembly_deprecated)
8702         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8703         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8704         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8705         * breakpoint.c (print_one_breakpoint_location)
8706         (print_one_breakpoint): Use ui_out_emit_tuple.
8707         * auto-load.c (print_script, info_auto_load_cmd): Use
8708         ui_out_emit_tuple.
8709         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8710
8711 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8712
8713         * thread.c (print_thread_info_1): Remove dead code.
8714
8715 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8716
8717         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8718         GDB_SELF_TEST.
8719         * arm-tdep.c (selftests::arm_record_test): Likewise.
8720
8721 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8722
8723         * regcache.c (regcache_restore): Remove argument 2.  Replace
8724         argument 3 with regcache.  Get register status from
8725         src->register_status and get register contents from
8726         register_buffer (src, regnum).
8727         (regcache_cpy): Update.
8728
8729 2017-04-19  Pedro Alves  <palves@redhat.com>
8730
8731         * gdbthread.h (thread): Add missing closing parenthesis in
8732         comment.
8733
8734 2017-04-19  Pedro Alves  <palves@redhat.com>
8735
8736         * common/refcounted-object.h: New file.
8737         * gdbthread.h: Include "common/refcounted-object.h".
8738         (thread_info): Inherit from refcounted_object and add comments.
8739         (thread_info::incref, thread_info::decref)
8740         (thread_info::m_refcount): Delete.
8741         (thread_info::deletable): Use the refcounted_object::refcount()
8742         method.
8743         * inferior.c (current_inferior_): Add comment.
8744         (set_current_inferior): Increment/decrement refcounts.
8745         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8746         not-deletable instead of comparing with the current inferior.
8747         (initialize_inferiors): Increment the initial inferior's refcount.
8748         * inferior.h (struct inferior): Forward declare.
8749         Include "common/refcounted-object.h".
8750         (current_inferior, set_current_inferior): Move declaration to
8751         before struct inferior's definition, and fix comment.
8752         (inferior): Inherit from refcounted_object.  Add comments.
8753         * thread.c (switch_to_thread_no_regs): Reference the thread's
8754         inferior pointer directly instead of doing a ptid lookup.
8755         (switch_to_no_thread): New function.
8756         (switch_to_thread(thread_info *)): New function, factored out
8757         from ...
8758         (switch_to_thread(ptid_t)): ... this.
8759         (restore_current_thread): Delete.
8760         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8761         fields, and add 'inf' field.
8762         (do_restore_current_thread_cleanup): Check whether old->inf is
8763         alive instead of looking up an inferior by ptid.  Use
8764         switch_to_thread and switch_to_no_thread.
8765         (restore_current_thread_cleanup_dtor): Use old->inf directly
8766         instead of lookup up an inferior by id.  Decref the inferior.
8767         Don't restore 'removable'.
8768         (make_cleanup_restore_current_thread): Same the inferior pointer
8769         in old, instead of the inferior number.  Incref the inferior.
8770         Don't save/clear 'removable'.
8771
8772 2017-04-19  Pedro Alves  <palves@redhat.com>
8773
8774         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8775         unittests/scoped_restore-selftests.c.
8776         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8777         * common/scoped_restore.h (scoped_restore_base): Make "class".
8778         (scoped_restore_base::release): New public method.
8779         (scoped_restore_base::scoped_restore_base): New protected ctor.
8780         (scoped_restore_base::m_saved_var): New protected field.
8781         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8782         scoped_restore_base base class instead of m_saved_var directly.
8783         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8784         (scoped_restore_tmpl::scoped_restore_tmpl(const
8785         scoped_restore_tmpl<T>&)): Likewise.
8786         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8787         method.
8788         (scoped_restore_tmpl::saved_var): New method.
8789         (scoped_restore_tmpl::m_saved_var): Delete.
8790         * inferior.h (inferior::detaching): Now a bool.
8791         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8792         cleanup.
8793         * unittests/scoped_restore-selftests.c: New file.
8794
8795 2017-04-19  Pedro Alves  <palves@redhat.com>
8796
8797         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8798         Re-sort in alphabetic order.
8799
8800 2017-04-18  Pedro Alves  <palves@redhat.com>
8801
8802         * xml-support.c (obstack_xml_printf): Delete.
8803         * xml-support.h (obstack_xml_printf): Delete.
8804
8805 2017-04-18  Pedro Alves  <palves@redhat.com>
8806
8807         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8808         vdebug, verror, body_text, start_element, end_element, name,
8809         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8810         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8811         is_xinclude>: Make private and add m_ prefix.
8812         (gdb_xml_parser::body_text): New method, based on ...
8813         (gdb_xml_body_text): ... this.  Adjust.
8814         (gdb_xml_parser::vdebug): New method, based on ...
8815         (gdb_xml_debug): ... this.  Adjust.
8816         (gdb_xml_parser::verror): New method, based on ...
8817         (gdb_xml_error): ... this.  Adjust.
8818         (gdb_xml_parser::start_element): New method, based on ...
8819         (gdb_xml_start_element): ... this.  Adjust.
8820         (gdb_xml_start_element_wrapper): Defer to
8821         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8822         (gdb_xml_parser::end_element): New method, based on ...
8823         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8824         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8825         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8826         (gdb_xml_parser::use_dtd): New method, based on ...
8827         (gdb_xml_use_dtd): ... this.  Adjust.
8828         (gdb_xml_parser::parse): New method, based on ...
8829         (gdb_xml_parse): ... this.  Adjust.
8830         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8831         (xinclude_start_include): Adjust to call the parser's name method.
8832         (xml_xinclude_default, xml_xinclude_start_doctype)
8833         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8834         method.
8835         (xml_process_xincludes): Adjust to call parser methods.
8836         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8837         declarations.
8838
8839 2017-04-18  Pedro Alves  <palves@redhat.com>
8840
8841         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8842         gdb::optional<std::string>.
8843         * xml-support.c: Include <string>.
8844         (scope_level::scope_level(scope_level &&))
8845         (scope_level::~scope_level): Delete.
8846         (scope_level::body): Now a std::string.
8847         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8848         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8849         parameter.
8850         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8851         (xinclude_parsing_data::output): Now a std::string reference.
8852         (xinclude_start_include): Adjust.
8853         (xml_xinclude_default): Adjust.
8854         (xml_process_xincludes): Add 'output' parameter, and return bool.
8855         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8856         and return bool.
8857         * xml-tdesc.c: Include <unordered_map> and <string>.
8858         (tdesc_xml_cache): Delete.
8859         (tdesc_xml_cache_s): Delete.
8860         (xml_cache): Now an std::unordered_map.
8861         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8862         (target_fetch_description_xml): Change return type to
8863         gdb::optional<std::string>, and adjust.
8864         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8865         (target_fetch_description_xml): Change return type to
8866         gdb::optional<std::string>.
8867
8868 2017-04-18  Pedro Alves  <palves@redhat.com>
8869
8870         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8871         unittests/optional-selftests.c.
8872         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8873         * unittests/optional-selftests.c: New file.
8874         * unittests/optional/assignment/1.cc: New file.
8875         * unittests/optional/assignment/2.cc: New file.
8876         * unittests/optional/assignment/3.cc: New file.
8877         * unittests/optional/assignment/4.cc: New file.
8878         * unittests/optional/assignment/5.cc: New file.
8879         * unittests/optional/assignment/6.cc: New file.
8880         * unittests/optional/assignment/7.cc: New file.
8881         * unittests/optional/cons/copy.cc: New file.
8882         * unittests/optional/cons/default.cc: New file.
8883         * unittests/optional/cons/move.cc: New file.
8884         * unittests/optional/cons/value.cc: New file.
8885         * unittests/optional/in_place.cc: New file.
8886         * unittests/optional/observers/1.cc: New file.
8887         * unittests/optional/observers/2.cc: New file.
8888
8889 2017-04-18  Pedro Alves  <palves@redhat.com>
8890
8891         * common/gdb_optional.h: Include common/traits.h.
8892         (in_place_t): New type.
8893         (in_place): New constexpr variable.
8894         (optional::optional): Remove member initialization of
8895         m_instantiated.
8896         (optional::optional(in_place_t...)): New constructor.
8897         (optional::~optional): Use reset.
8898         (optional::optional(const optional&)): New.
8899         (optional::optional(const optional&&)): New.
8900         (optional::optional(T &)): New.
8901         (optional::optional(T &&)): New.
8902         (operator::operator=(const optional &)): New.
8903         (operator::operator=(optional &&)): New.
8904         (operator::operator= (const T &))
8905         (operator::operator= (T &&))
8906         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8907         (operator::reset): New.
8908         (operator::m_instantiated):: Add in-class initializer.
8909         * common/traits.h: Include <type_traits>.
8910         (struct And): New types.
8911
8912 2017-04-18  Pedro Alves  <palves@redhat.com>
8913
8914         * xml-support.c: Include <vector>.
8915         (scope_level::scope_level(const gdb_xml_element *))
8916         (scope_level::scope_level(scope_level&&)): New.
8917         (scope_level::~scope_level): New.
8918         (scope_level_s): Delete.
8919         (gdb_xml_parser::scopes): Now a std::vector.
8920         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8921         Use std::vector.
8922         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8923         scope cleanup code.
8924         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8925         of the scopes member.  Use std::vector::emplace_back.
8926
8927 2017-04-18  Pedro Alves  <palves@redhat.com>
8928
8929         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8930         a bool.
8931         (gdb_xml_end_element): Change type of first parameter.
8932         (gdb_xml_cleanup): Rename to ...
8933         (gdb_xml_parser::~gdb_xml_parser): ... this.
8934         (gdb_xml_create_parser_and_cleanup): Delete with ...
8935         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8936         to this new ctor.
8937         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8938         using gdb_xml_create_parser_and_cleanup.
8939         (xinclude_parsing_data): Add ctor/dtor.
8940         (xml_xinclude_cleanup): Delete.
8941         (xml_process_xincludes): Create a local xinclude_parsing_data
8942         instead of heap-allocating one.  Create a local gdb_xml_parser
8943         instead of heap-allocating one with
8944         gdb_xml_create_parser_and_cleanup.
8945
8946 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8947
8948         PR threads/20743
8949         * fbsd-nat.c (resume_one_thread_cb): Remove.
8950         (resume_all_threads_cb): Remove.
8951         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8952         iterate_over_threads.
8953
8954 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8955
8956         * NEWS: Create a new section for the next release branch.
8957         Rename the section of the current branch, now that it has
8958         been cut.
8959
8960 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8961
8962         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8963         * version.in: Bump version to 8.0.50.DATE-git.
8964
8965 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8966
8967         PR gdb/21385
8968         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8969         independently of the host, and fix build breakage on Cygwin.
8970
8971 2017-04-13  Pedro Alves  <palves@redhat.com>
8972
8973         * inferior.c (free_inferior): Convert to ...
8974         (inferior::~inferior): ... this dtor.
8975         (inferior::inferior): New ctor, factored out from ...
8976         (add_inferior_silent): ... here.  Allocate the inferior with a new
8977         expression.
8978         (delete_inferior): Call delete instead of free_inferior.
8979         * inferior.h (gdb_environ, continuation): Forward declare.
8980         (inferior): Now a class.  Add in-class initialization to all
8981         members.  Make boolean fields bool, except 'detaching'.
8982         (inferior::inferior): New explicit ctor.
8983         (inferior::~inferior): New.
8984
8985 2017-04-13  Pedro Alves  <palves@redhat.com>
8986
8987         * inferior.c (init_inferior_list): Delete.
8988         * inferior.h (init_inferior_list): Delete.
8989
8990 2017-04-13  Pedro Alves  <palves@redhat.com>
8991
8992         PR threads/13217
8993         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8994         (top level): Call it twice, with different thread sets.
8995
8996 2017-04-13  Pedro Alves  <palves@redhat.com>
8997
8998         * thread.c: Include <algorithm>.
8999         (thread_array_cleanup): Delete.
9000         (scoped_inc_dec_ref): New class.
9001         (live_threads_count): New function.
9002         (set_thread_refcount): Delete.
9003         (tp_array_compar_ascending): Now a bool.
9004         (tp_array_compar): Convert to a std::sort comparison function.
9005         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9006         and live_threads_count.
9007
9008 2017-04-13  Pedro Alves  <palves@redhat.com>
9009
9010         * infrun.c (follow_fork_inferior): Also switch the current
9011         inferior.
9012
9013 2017-04-13  Pedro Alves  <palves@redhat.com>
9014
9015         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9016         before calling create_internal_breakpoint.
9017
9018 2017-04-13  Pedro Alves  <palves@redhat.com>
9019
9020         * fork-child.c (execv_argv): New class.
9021         (breakup_args): Refactored as ...
9022         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9023         Copy arguments to storage and replace separators with NULL
9024         terminators in place.
9025         (escape_bang_in_quoted_argument): Adjust to return bool.
9026         (execv_argv::execv_argv): New ctor.
9027         (execv_argv::init_for_shell): New method, factored out from
9028         fork_inferior.  Don't strdup strings into the vector.
9029         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9030         Remove free_vector_argv call.
9031
9032 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9033
9034         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9035         tdep->rx_psw_type.
9036
9037 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9038
9039         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9040         * rx-tdep.c (rx_gdbarch_init): Likewise.
9041
9042 2017-04-13  Pedro Alves  <palves@redhat.com>
9043
9044         * breakpoint.h (struct breakpoint): Reindent.
9045
9046 2017-04-13  Pedro Alves  <palves@redhat.com>
9047
9048         * breakpoint.c (bp_location): Rename to ...
9049         (bp_locations): ... this.  All references updated.
9050         (bp_location_count): Rename to ...
9051         (bp_locations_count): ... this.  All references updated.
9052         (bp_location_placed_address_before_address_max): Rename to ...
9053         (bp_locations_placed_address_before_address_max): ... this.  All
9054         references updated.
9055         (bp_location_shadow_len_after_address_max): Rename to ...
9056         (bp_locations_shadow_len_after_address_max): ... this.  All
9057         references updated.
9058         (bp_location_compare_addrs): Rename to ...
9059         (bp_locations_compare_addrs): ... this.  All references updated.
9060         (bp_location_compare):Rename to ...
9061         (bp_locations_compare): ... this.  All references updated.
9062         (bp_location_target_extensions_update): Rename to ...
9063         (bp_locations_target_extensions_update): ... this.  All references
9064         updated.
9065
9066 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9067
9068         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9069         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9070         'sgtty.h'.
9071         * common/gdb_termios.h: New file, with parts of "terminal.h".
9072         * inflow.c: Include "gdb_termios.h".
9073         * ser-unix.c: Include "gdb_termios.h".
9074         * terminal.h: Move terminal-related defines to
9075         "common/gdb_termios.h".
9076
9077 2017-04-12  Tom Tromey  <tom@tromey.com>
9078
9079         * probe.c (parse_probes): Update.
9080         * location.h (delete_event_location): Don't declare.
9081         (event_location_deleter::operator()): Update.
9082         * location.c (event_location_deleter::operator()): Rename from
9083         delete_event_location.
9084         * linespec.h (linespec_result) <location>: Change type to
9085         event_location_up.
9086         * linespec.c (canonicalize_linespec, event_location_to_sals)
9087         (decode_objc): Update.
9088         (linespec_result): Don't call delete_event_location.
9089         * breakpoint.c (create_breakpoints_sal)
9090         (bkpt_probe_create_sals_from_location)
9091         (strace_marker_create_sals_from_location): Update.
9092
9093 2017-04-12  Tom Tromey  <tom@tromey.com>
9094
9095         * linespec.h (struct linespec_result): Add constructor and
9096         destructor.
9097         (init_linespec_result, destroy_linespec_result)
9098         (make_cleanup_destroy_linespec_result): Don't declare.
9099         * linespec.c (init_linespec_result): Remove.
9100         (linespec_result::~linespec_result): Rename from
9101         destroy_linespec_result.  Update.
9102         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9103         Remove.
9104         * breakpoint.c (create_breakpoint, break_range_command)
9105         (decode_location_default): Update.
9106         * ax-gdb.c (agent_command_1): Update.
9107
9108 2017-04-12  Tom Tromey  <tom@tromey.com>
9109
9110         * remote.c (remote_download_tracepoint): Update.
9111         * python/py-breakpoint.c (bppy_get_location): Update.
9112         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9113         (gdbscm_breakpoint_location): Update.
9114         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9115         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9116         Change type to event_location_up.
9117         * breakpoint.c (create_overlay_event_breakpoint)
9118         (create_longjmp_master_breakpoint)
9119         (create_std_terminate_master_breakpoint)
9120         (create_exception_master_breakpoint)
9121         (breakpoint_event_location_empty_p, print_breakpoint_location)
9122         (print_one_breakpoint_location, create_thread_event_breakpoint)
9123         (init_breakpoint_sal, create_breakpoint)
9124         (print_recreate_ranged_breakpoint, break_range_command)
9125         (init_ada_exception_breakpoint, say_where): Update.
9126         (base_breakpoint_dtor): Don't call delete_event_location.
9127         (bkpt_print_recreate, tracepoint_print_recreate)
9128         (dprintf_print_recreate, update_static_tracepoint)
9129         (breakpoint_re_set_default): Update.
9130
9131 2017-04-12  Tom Tromey  <tom@tromey.com>
9132
9133         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9134         type of "to_do".  Update.
9135         (compute_stack_depth): Use std::vector.
9136
9137 2017-04-12  Tom Tromey  <tom@tromey.com>
9138
9139         * printcmd.c (find_instruction_backward): Use std::vector.
9140
9141 2017-04-12  Tom Tromey  <tom@tromey.com>
9142
9143         * symfile.c (objfilep): Remove typedef.
9144         (reread_symbols): Use a std::vector.
9145
9146 2017-04-12  Tom Tromey  <tom@tromey.com>
9147
9148         * mi/mi-main.c (exec_direction_forward): Remove.
9149         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9150         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9151         scoped_restore.
9152         * guile/guile.c (guile_repl_command, guile_command)
9153         (gdbscm_execute_gdb_command): Use scoped_restore.
9154         * go-exp.y (go_parse): Use scoped_restore.
9155         * d-exp.y (d_parse): Use scoped_restore.
9156         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9157         * c-exp.y (c_parse): Use scoped_restore.
9158
9159 2017-04-12  Tom Tromey  <tom@tromey.com>
9160
9161         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9162         (mi_parse): Update return type.
9163         (mi_parse_free): Remove.
9164         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9165         (mi_parse::~mi_parse): Rename from mi_parse_free.
9166         (mi_parse_cleanup): Remove.
9167         (mi_parse): Return a unique_ptr.  Use new.
9168         * mi/mi-main.c (mi_execute_command): Update.
9169
9170 2017-04-12  Tom Tromey  <tom@tromey.com>
9171
9172         * location.c (explicit_location_lex_one): Return a
9173         unique_xmalloc_ptr.
9174         (string_to_explicit_location): Update.  Remove cleanups.
9175
9176 2017-04-12  Tom Tromey  <tom@tromey.com>
9177
9178         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9179         (compare_value_and_voffset): Change type.  Update.
9180         (compute_vtable_size): Change type of "offset_vec".
9181         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9182         (gnuv3_get_typeid): Remove extraneous declaration.
9183
9184 2017-04-12  Tom Tromey  <tom@tromey.com>
9185
9186         * charset.h (wchar_iterator): Fix comment.
9187
9188 2017-04-12  Tom Tromey  <tom@tromey.com>
9189
9190         * charset.c (iconv_wrapper): New class.
9191         (cleanup_iconv): Remove.
9192         (convert_between_encodings): Use it.
9193
9194 2017-04-12  Tom Tromey  <tom@tromey.com>
9195
9196         * symfile.h (increment_reading_symtab): Update type.
9197         * symfile.c (decrement_reading_symtab): Remove.
9198         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9199         * psymtab.c (psymtab_to_symtab): Update.
9200         * dwarf2read.c (dw2_instantiate_symtab): Update.
9201
9202 2017-04-12  Tom Tromey  <tom@tromey.com>
9203
9204         * jit.c (struct jit_reader): Declare separately.  Add constructor
9205         and destructor.  Change type of "handle".
9206         (loaded_jit_reader): Define separately.
9207         (jit_reader_load): Update.  New "new".
9208         (jit_reader_unload_command): Use "delete".
9209         * gdb-dlfcn.h (struct dlclose_deleter): New.
9210         (gdb_dlhandle_up): New typedef.
9211         (gdb_dlopen, gdb_dlsym): Update types.
9212         (gdb_dlclose): Remove.
9213         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9214         (gdb_dlsym): Change type of "handle".
9215         (make_cleanup_dlclose): Remove.
9216         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9217         * compile/compile-c-support.c (load_libcc): Update.
9218
9219 2017-04-12  Tom Tromey  <tom@tromey.com>
9220
9221         * symtab.h (find_pcs_for_symtab_line): Change return type.
9222         * symtab.c (find_pcs_for_symtab_line): Change return type.
9223         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9224         type of "vec".  Update.
9225         (ltpy_get_pcs_for_line): Update.
9226         * linespec.c (decode_digits_ordinary): Update.
9227
9228 2017-04-12  Tom Tromey  <tom@tromey.com>
9229
9230         * tracepoint.c (actions_command): Update.
9231         * python/python.c (python_command, python_interactive_command):
9232         Update.
9233         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9234         * guile/guile.c (guile_command): Update.
9235         * defs.h (read_command_lines, read_command_lines_1): Return
9236         command_line_up.
9237         (command_lines_deleter): New struct.
9238         (command_line_up): New typedef.
9239         * compile/compile.c (compile_code_command)
9240         (compile_print_command): Update.
9241         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9242         command_line_up.
9243         (make_cleanup_free_command_lines): Remove.
9244         * cli/cli-script.c (get_command_line, read_command_lines_1)
9245         (copy_command_lines): Return command_line_up.
9246         (while_command, if_command, read_command_lines, define_command)
9247         (document_command): Update.
9248         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9249         Remove.
9250         * breakpoint.h (breakpoint_set_commands): Change type of
9251         "commands".
9252         * breakpoint.c (breakpoint_set_commands): Change type of
9253         "commands".  Update.
9254         (do_map_commands_command, update_dprintf_command_list)
9255         (create_tracepoint_from_upload): Update.
9256
9257 2017-04-12  Tom Tromey  <tom@tromey.com>
9258
9259         * tracepoint.c (scope_info): Update.
9260         * spu-tdep.c (spu_catch_start): Update.
9261         * python/python.c (gdbpy_decode_line): Update.
9262         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9263         * python/py-breakpoint.c (bppy_init): Update.
9264         * probe.c (parse_probes): Update.
9265         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9266         * location.h (event_location_deleter): New struct.
9267         (event_location_up): New typedef.
9268         (new_linespec_location, new_address_location, new_probe_location)
9269         (new_explicit_location, copy_event_location)
9270         (string_to_event_location, string_to_event_location_basic)
9271         (string_to_explicit_location): Update return type.
9272         (make_cleanup_delete_event_location): Remove.
9273         * location.c (new_linespec_location, new_address_location)
9274         (new_probe_location, new_explicit_location, copy_event_location):
9275         Return event_location_up.
9276         (delete_event_location_cleanup)
9277         (make_cleanup_delete_event_location): Remove.
9278         (string_to_explicit_location, string_to_event_location_basic)
9279         (string_to_event_location): Return event_location_up.
9280         * linespec.c (canonicalize_linespec, event_location_to_sals)
9281         (decode_line_with_current_source)
9282         (decode_line_with_last_displayed, decode_objc): Update.
9283         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9284         * completer.c (location_completer): Update.
9285         * cli/cli-cmds.c (edit_command, list_command): Update.
9286         * breakpoint.c (create_overlay_event_breakpoint)
9287         (create_longjmp_master_breakpoint)
9288         (create_std_terminate_master_breakpoint)
9289         (create_exception_master_breakpoint)
9290         (create_thread_event_breakpoint): Update.
9291         (init_breakpoint_sal): Update.  Remove some dead code.
9292         (create_breakpoint_sal): Change type of "location".  Update.
9293         (create_breakpoints_sal, create_breakpoint, break_command_1)
9294         (dprintf_command, break_range_command, until_break_command)
9295         (init_ada_exception_breakpoint)
9296         (strace_marker_create_sals_from_location)
9297         (update_static_tracepoint, trace_command, ftrace_command)
9298         (strace_command, create_tracepoint_from_upload): Update.
9299         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9300         * ax-gdb.c (agent_command_1): Update.
9301
9302 2017-04-12  Pedro Alves  <palves@redhat.com>
9303
9304         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9305         * configure.tgt: Handle i[34567]86-*-go32* and
9306         i[34567]86-*-msdosdjgpp*.
9307         * i386-tdep.c (i386_svr4_reg_to_regnum):
9308         Make extern.
9309         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9310         i386-go32-tdep.c.
9311         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9312         * i386-go32-tdep.c: New file.
9313         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9314         declarations.
9315
9316 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9317
9318         * aix-thread.c (pd_status2str): Change return type to const char *.
9319
9320 2017-04-12  Pedro Alves  <palves@redhat.com>
9321
9322         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9323         calls to set_gdbarch_gnu_triplet_regexp.
9324
9325 2017-04-12  Pedro Alves  <palves@redhat.com>
9326
9327         PR gdb/21323
9328         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9329         New enum value.
9330         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9331         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9332         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9333         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9334         * gdbarch.h, gdbarch.c: Regenerate.
9335         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9336         gdbarch_wchar_bit and gdbarch_wchar_signed.
9337         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9338         * arm-tdep.c (arm_gdbarch_init): Likewise.
9339         * avr-tdep.c (avr_gdbarch_init): Likewise.
9340         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9341         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9342         * i386-tdep.c (i386_go32_init_abi): Likewise.
9343         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9344         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9345         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9346         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9347         * sh-tdep.c (sh_gdbarch_init): Likewise.
9348         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9349         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9350         * windows-tdep.c (windows_init_abi): Likewise.
9351         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9352
9353 2017-04-12  Pedro Alves  <palves@redhat.com>
9354
9355         PR c++/21323
9356         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9357         cplus_primitive_type_char32_t>: New enum values.
9358         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9359         and cplus_primitive_type_char32_t.
9360         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9361         32, use the archtecture's built-in type for char16_t and char32_t,
9362         respectively.  Otherwise, fallback to init_integer_type as before,
9363         but make the type unsigned, and issue a complaint.
9364         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9365
9366 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9367
9368         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9369         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9370
9371 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9372
9373         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9374         'const char *'.
9375
9376 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9377
9378         * common/common-utils.c (free_vector_argv): New function.
9379         * common/common-utils.h: Include <vector>.
9380         (free_vector_argv): New prototype.
9381         * darwin-nat.c (darwin_create_inferior): Rewrite function
9382         prototype in order to constify "exec_file" and accept a
9383         "std::string" for "allargs".
9384         * fork-child.c: Include <vector>.
9385         (breakup_args): Rewrite function, using C++.
9386         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9387         and accept "std::string" for "allargs".  Update the code to
9388         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9389         and "execvp".
9390         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9391         order to constify "exec_file" and accept a "std::string" for
9392         "allargs".
9393         * go32-nat.c (go32_create_inferior): Likewise.
9394         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9395         * infcmd.c (run_command_1): Constify "exec_file".  Use
9396         "std::string" for inferior arguments.
9397         * inferior.h (fork_inferior): Update prototype.
9398         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9399         prototype in order to constify "exec_file" and accept a
9400         "std::string" for "allargs".
9401         * nto-procfs.c (procfs_create_inferior): Likewise.
9402         * procfs.c (procfs_create_inferior): Likewise.
9403         * remote-sim.c (gdbsim_create_inferior): Likewise.
9404         * remote.c (extended_remote_run): Update code to accept
9405         "std::string" as argument.
9406         (extended_remote_create_inferior): Rewrite function prototype in
9407         order to constify "exec_file" and accept a "std::string" for
9408         "allargs".
9409         * rs6000-nat.c (super_create_inferior): Likewise.
9410         (rs6000_create_inferior): Likewise.
9411         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9412         * windows-nat.c (windows_create_inferior): Likewise.
9413
9414 2017-04-11  Pedro Alves  <palves@redhat.com>
9415
9416         * thread.c: Fix whitespace throughout.
9417
9418 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9419
9420         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9421
9422 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9423
9424         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9425
9426 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9427
9428         PR gdb/21364
9429         * osdata.c (info_osdata): Check if 'type' is an empty string
9430         instead of NULL.
9431
9432 2017-04-10  Pedro Alves  <palves@redhat.com>
9433
9434         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9435         (ptid_to_global_thread_id, in_thread_list)
9436         (do_captured_list_thread_ids, set_resumed, set_running)
9437         (set_executing, set_stop_requested, finish_thread_state)
9438         (validate_registers_access, can_access_registers_ptid)
9439         (print_thread_info_1, switch_to_thread)
9440         (do_restore_current_thread_cleanup)
9441         (make_cleanup_restore_current_thread, thread_command)
9442         (thread_name_command): Use operator== instead of ptid_equal.
9443
9444 2017-04-10  Pedro Alves  <palves@redhat.com>
9445
9446         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9447         (current_thread_cleanup_chain): Delete.
9448         (restore_current_thread_cleanup_dtor)
9449         (make_cleanup_restore_current_thread): Remove references to
9450         current_thread_cleanup_chain.
9451
9452 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9453
9454         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9455         REG_UNKNOWN.
9456
9457 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9458
9459         PR gdb/19942
9460         * gdbthread.h (thread_info::deletable): New method.
9461         (thread_info::incref): New method.
9462         (thread_info::decref): New method.
9463         (thread_info::refcount): Move it to private.
9464         * infrun.c (save_stop_context): Call inc_refcount.
9465         (release_stop_context_cleanup): Likewise.
9466         * thread.c (set_thread_exited): New function.
9467         (init_thread_list): Delete "tp" only it is deletable, otherwise
9468         call set_thread_exited.
9469         (delete_thread_1): Call set_thread_exited.
9470         (current_thread_cleanup) <inferior_pid>: Remove.
9471         <thread>: New field.
9472         (restore_current_thread_ptid_changed): Removed.
9473         (do_restore_current_thread_cleanup): Adjust.
9474         (restore_current_thread_cleanup_dtor): Don't call
9475         find_thread_ptid.
9476         (set_thread_refcount): Use dec_refcount.
9477         (make_cleanup_restore_current_thread): Adjust.
9478         (thread_apply_all_command): Call inc_refcount.
9479         (_initialize_thread): Don't call
9480         observer_attach_thread_ptid_changed.
9481
9482 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9483
9484         * thread.c (delete_thread_1): Hoist code on marking thread as
9485         exited.
9486
9487 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9488
9489         * windows-nat.c (windows_detach): Initialize ptid with
9490         minus_one_ptid.
9491
9492 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9493
9494         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9495
9496 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9497
9498         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9499         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9500         (bfin_pseudo_register_write): Likewise
9501
9502 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9503
9504         * common/ptid.h (struct ptid): Change to...
9505         (class ptid_t): ... this.
9506         <ptid_t>: New constructors.
9507         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9508         matches>: New methods.
9509         <make_null, make_minus_one>: New static methods.
9510         <pid>: Rename to...
9511         <m_pid>: ...this.
9512         <lwp>: Rename to...
9513         <m_lwp>: ...this.
9514         <tid>: Rename to...
9515         <m_tid>: ...this.
9516         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9517         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9518         as references, move comment to class ptid_t.
9519         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9520         ptid_t static methods.
9521         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9522         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9523         Take ptid arguments as references, implement using ptid_t methods.
9524         * unittests/ptid-selftests.c: New file.
9525         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9526         unittests/ptid-selftests.c.
9527         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9528
9529 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9530
9531         * python/python.c (python_run_simple_file): Cast mode literal to
9532         non-const char pointer as expected by PyFile_FromString.
9533
9534 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9535
9536         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9537         minus_one_ptid and null_ptid.
9538
9539 2017-04-05  Pedro Alves  <palves@redhat.com>
9540
9541         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9542         * configure: Regenerate.
9543
9544 2017-04-05  Pedro Alves  <palves@redhat.com>
9545
9546         * ada-exp.y (yyerror): Constify.
9547         * ada-lang.c (bound_name, get_selections)
9548         (ada_variant_discrim_type)
9549         (ada_variant_discrim_name, ada_value_struct_elt)
9550         (ada_lookup_struct_elt_type, is_unchecked_variant)
9551         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9552         (catch_ada_exception_command_split)
9553         (catch_ada_assert_command_split, catch_assert_command)
9554         (ada_op_name): Constify.
9555         * ada-lang.h (ada_yyerror, get_selections)
9556         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9557         * arc-tdep.c (arc_print_frame_cache): Constify.
9558         * arm-tdep.c (arm_skip_stub): Constify.
9559         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9560         (gen_aggregate_elt_ref): Constify.
9561         * bcache.c (print_bcache_statistics): Constify.
9562         * bcache.h (print_bcache_statistics): Constify.
9563         * break-catch-throw.c (catch_exception_command_1):
9564         * breakpoint.c (struct ep_type_description::description):
9565         Constify.
9566         (add_solib_catchpoint): Constify.
9567         (catch_fork_command_1): Add cast.
9568         (add_catch_command): Constify.
9569         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9570         Constify.
9571         * bsd-uthread.c (bsd_uthread_state): Constify.
9572         * buildsym.c (patch_subfile_names): Constify.
9573         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9574         Constify.
9575         * c-exp.y (yyerror): Constify.
9576         (token::oper): Constify.
9577         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9578         * c-varobj.c (cplus_describe_child): Constify.
9579         * charset.c (find_charset_names): Add cast.
9580         (find_charset_names): Constify array and add const_cast.
9581         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9582         (edit_command): Constify.
9583         * cli/cli-decode.c (lookup_cmd): Constify.
9584         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9585         Constify.
9586         (struct dump_context): Constify.
9587         (add_dump_command, restore_command): Constify.
9588         * cli/cli-script.c (get_command_line): Constify.
9589         * cli/cli-script.h (get_command_line): Constify.
9590         * cli/cli-utils.c (check_for_argument): Constify.
9591         * cli/cli-utils.h (check_for_argument): Constify.
9592         * coff-pe-read.c (struct read_pe_section_data): Constify.
9593         * command.h (lookup_cmd): Constify.
9594         * common/print-utils.c (decimal2str): Constify.
9595         * completer.c (gdb_print_filename): Constify.
9596         * corefile.c (set_gnutarget): Constify.
9597         * cp-name-parser.y (yyerror): Constify.
9598         * cp-valprint.c (cp_print_class_member): Constify.
9599         * cris-tdep.c (cris_register_name, crisv32_register_name):
9600         Constify.
9601         * d-exp.y (yyerror): Constify.
9602         (struct token::oper): Constify.
9603         * d-lang.h (d_yyerror): Constify.
9604         * dbxread.c (struct header_file_location::name): Constify.
9605         (add_old_header_file, add_new_header_file, last_function_name)
9606         (dbx_next_symbol_text, add_bincl_to_list)
9607         (find_corresponding_bincl_psymtab, set_namestring)
9608         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9609         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9610         * defs.h (command_line_input, print_address_symbolic)
9611         (deprecated_readline_begin_hook): Constify.
9612         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9613         Constify.
9614         * event-top.c (handle_line_of_input): Constify and add cast.
9615         * exceptions.c (catch_errors): Constify.
9616         * exceptions.h (catch_errors): Constify.
9617         * expprint.c (print_subexp_standard, op_string, op_name)
9618         (op_name_standard, dump_raw_expression, dump_raw_expression):
9619         * expression.h (op_name, op_string, dump_raw_expression):
9620         Constify.
9621         * f-exp.y (yyerror): Constify.
9622         (struct token::oper): Constify.
9623         (struct f77_boolean_val::name): Constify.
9624         * f-lang.c (f_word_break_characters): Constify.
9625         * f-lang.h (f_yyerror): Constify.
9626         * fork-child.c (fork_inferior): Add cast.
9627         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9628         (new_variant): Constify.
9629         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9630         * gdbarch.c: Regenerate.
9631         * gdbcore.h (set_gnutarget): Constify.
9632         * go-exp.y (yyerror): Constify.
9633         (token::oper): Constify.
9634         * go-lang.h (go_yyerror): Constify.
9635         * go32-nat.c (go32_sysinfo): Constify.
9636         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9637         * guile/scm-cmd.c (cmdscm_function): Constify.
9638         * guile/scm-param.c (pascm_param_value): Constify.
9639         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9640         (h8300sx_register_name): Constify.
9641         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9642         Constify.
9643         * ia64-tdep.c (ia64_register_names): Constify.
9644         * infcmd.c (construct_inferior_arguments): Constify.
9645         (path_command, attach_post_wait): Constify.
9646         * language.c (show_range_command, show_case_command)
9647         (unk_lang_error): Constify.
9648         * language.h (language_defn::la_error)
9649         (language_defn::la_name_of_this): Constify.
9650         * linespec.c (decode_line_2): Constify.
9651         * linux-thread-db.c (thread_db_err_str): Constify.
9652         * lm32-tdep.c (lm32_register_name): Constify.
9653         * m2-exp.y (yyerror): Constify.
9654         * m2-lang.h (m2_yyerror): Constify.
9655         * m32r-tdep.c (m32r_register_names): Constify and make static.
9656         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9657         * m88k-tdep.c (m88k_register_name): Constify.
9658         * macroexp.c (appendmem): Constify.
9659         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9660         (upgrade_type, parse_external, parse_partial_symbols)
9661         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9662         (new_symbol): Constify.
9663         * memattr.c (mem_info_command): Constify.
9664         * mep-tdep.c (register_name_from_keyword): Constify.
9665         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9666         Constify.
9667         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9668         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9669         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9670         cast.
9671         (mi_execute_async_cli_command): Constify.
9672         * mips-tdep.c (mips_register_name): Constify.
9673         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9674         (am33_register_name, am33_2_register_name)
9675         * moxie-tdep.c (moxie_register_names): Constify.
9676         * nat/linux-osdata.c (osdata_type): Constify fields.
9677         * nto-tdep.c (nto_parse_redirection): Constify.
9678         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9679         (lookup_child_selector): Constify.
9680         (objc_methcall::name): Constify.
9681         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9682         (lookup_struct_typedef): Constify.
9683         * objfiles.c (pc_in_section): Constify.
9684         * objfiles.h (pc_in_section): Constify.
9685         * p-exp.y (struct token::oper): Constify.
9686         (yyerror): Constify.
9687         * p-lang.h (pascal_yyerror): Constify.
9688         * parser-defs.h (op_name_standard): Constify.
9689         (op_print::string): Constify.
9690         (exp_descriptor::op_name): Constify.
9691         * printcmd.c (print_address_symbolic): Constify.
9692         * psymtab.c (print_partial_symbols): Constify.
9693         * python/py-breakpoint.c (stop_func): Constify.
9694         (bppy_get_expression): Constify.
9695         * python/py-cmd.c (cmdpy_completer::name): Constify.
9696         (cmdpy_function): Constify.
9697         * python/py-event.c (evpy_add_attribute)
9698         (gdbpy_initialize_event_generic): Constify.
9699         * python/py-event.h (evpy_add_attribute)
9700         (gdbpy_initialize_event_generic): Constify.
9701         * python/py-evts.c (add_new_registry): Constify.
9702         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9703         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9704         * python/py-inferior.c (get_buffer): Add cast.
9705         * python/py-param.c (parm_constant::name): Constify.
9706         * python/py-unwind.c (fprint_frame_id): Constify.
9707         * python/python.c (gdbpy_parameter_value): Constify.
9708         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9709         * remote.c (memory_packet_config::name): Constify.
9710         (show_packet_config_cmd, remote_write_bytes)
9711         (remote_buffer_add_string):
9712         * reverse.c (exec_reverse_once): Constify.
9713         * rs6000-tdep.c (variant::name, variant::description): Constify.
9714         * rust-exp.y (rustyyerror): Constify.
9715         * rust-lang.c (rust_op_name): Constify.
9716         * rust-lang.h (rustyyerror): Constify.
9717         * serial.h (serial_ops::name): Constify.
9718         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9719         (sh_sh3e_register_name, sh_sh2e_register_name)
9720         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9721         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9722         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9723         (sh_sh4al_dsp_register_name): Constify.
9724         * sh64-tdep.c (sh64_register_name): Constify.
9725         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9726         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9727         * stabsread.c (patch_block_stabs, read_type_number)
9728         (ref_map::stabs, ref_add, process_reference)
9729         (symbol_reference_defined, define_symbol, define_symbol)
9730         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9731         (read_one_struct_field, read_struct_fields, read_baseclasses)
9732         (read_tilde_fields, read_struct_type, read_array_type)
9733         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9734         (read_huge_number, read_range_type, read_args, common_block_start)
9735         (find_name_end): Constify.
9736         * stabsread.h (common_block_start, define_symbol)
9737         (process_one_symbol, symbol_reference_defined, ref_add):
9738         * symfile.c (get_section_index, add_symbol_file_command):
9739         * symfile.h (get_section_index): Constify.
9740         * target-descriptions.c (tdesc_type::name): Constify.
9741         (tdesc_free_type): Add cast.
9742         * target.c (find_default_run_target):
9743         (add_deprecated_target_alias, find_default_run_target)
9744         (target_announce_detach): Constify.
9745         (do_option): Constify.
9746         * target.h (add_deprecated_target_alias): Constify.
9747         * thread.c (print_thread_info_1): Constify.
9748         * top.c (deprecated_readline_begin_hook, command_line_input):
9749         Constify.
9750         (init_main): Add casts.
9751         * top.h (handle_line_of_input): Constify.
9752         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9753         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9754         (tfind_command): Rename to ...
9755         (tfind_command_1): ... this and constify.
9756         (tfind_command): New function.
9757         (tfind_end_command, tfind_start_command): Adjust.
9758         (encode_source_string): Constify.
9759         * tracepoint.h (encode_source_string): Constify.
9760         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9761         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9762         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9763         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9764         * tui/tui-win.c (parse_scrolling_args): Constify.
9765         * tui/tui-windata.c (tui_erase_data_content): Constify.
9766         * tui/tui-windata.h (tui_erase_data_content): Constify.
9767         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9768         * tui/tui.c (tui_enable): Add cast.
9769         * utils.c (defaulted_query): Constify.
9770         (init_page_info): Add cast.
9771         (puts_debug, subset_compare): Constify.
9772         * utils.h (subset_compare): Constify.
9773         * varobj.c (varobj_format_string): Constify.
9774         * varobj.h (varobj_format_string): Constify.
9775         * vax-tdep.c (vax_register_name): Constify.
9776         * windows-nat.c (windows_detach): Constify.
9777         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9778         * xml-support.c (gdb_xml_end_element): Constify.
9779         * xml-tdesc.c (tdesc_start_reg): Constify.
9780         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9781         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9782         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9783
9784 2017-04-05  Pedro Alves  <palves@redhat.com>
9785
9786         * proc-api.c (struct trans): Constify.
9787         (procfs_note): Constify.
9788         * proc-events.c (struct trans, syscall_table):
9789         * proc-flags.c (struct trans): Constify.
9790         * proc-utils.h (procfs_note): Constify.
9791         * proc-why.c (struct trans): Constify.
9792         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9793         (procfs_detach): Constify.
9794         * sol-thread.c (struct string_map): Constify.
9795         (td_err_string, td_state_string): Constify.
9796
9797 2017-04-05  Pedro Alves  <palves@redhat.com>
9798
9799         * proc-api.c (procfs_filename): Don't initialize
9800         procfs_filename.
9801         (prepare_to_trace): Assume procfs_filename is non-NULL.
9802         (_initialize_proc_api): Give procfs_filename a default value here.
9803
9804 2017-04-05  Pedro Alves  <palves@redhat.com>
9805
9806         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9807         'cond_string' parameter.
9808         (extract_exception_regexp): Constify 'string' parameter.
9809         (catch_exception_command_1): Constify.
9810         * breakpoint.c (init_catchpoint)
9811         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9812         parameter.
9813         (ep_parse_optional_if_clause, catch_fork_command_1)
9814         (catch_exec_command_1): Constify.
9815         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9816         parameter.
9817         (ep_parse_optional_if_clause): Constify.
9818         * cli/cli-utils.c (remove_trailing_whitespace)
9819         (check_for_argument): Constify.
9820         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9821         non-const overload.
9822         (check_for_argument): Likewise.
9823
9824 2017-04-05  Pedro Alves  <palves@redhat.com>
9825
9826         * event-top.c (command_line_handler): Add cast to execute_command
9827         call.
9828         * record-btrace.c (cmd_record_btrace_bts_start)
9829         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9830         (cmd_record_btrace_start): Add cast to execute_command call.
9831         * record-full.c (record_full_goto_insn):
9832         * record.c (record_start, record_stop): Add cast to
9833         execute_command_to_string calls.
9834         (cmd_record_start): Add cast to execute_command calls.
9835
9836 2017-04-05  Pedro Alves  <palves@redhat.com>
9837
9838         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9839         static inline function.
9840         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9841         array and use gdb_PyArg_ParseTupleAndKeywords.
9842         * python/py-cmd.c (cmdpy_init): Likewise.
9843         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9844         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9845         (infpy_search_memory): Likewise.
9846         * python/py-objfile.c (objfpy_add_separate_debug_file)
9847         (gdbpy_lookup_objfile): Likewise.
9848         * python/py-symbol.c (gdbpy_lookup_symbol)
9849         (gdbpy_lookup_global_symbol): Likewise.
9850         * python/py-type.c (gdbpy_lookup_type): Likewise.
9851         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9852         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9853         Likewise.
9854
9855 2017-04-05  Pedro Alves  <palves@redhat.com>
9856
9857         * python/python-internal.h (gdb_PyGetSetDef): New type.
9858         * python/py-block.c (block_object_getset)
9859         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9860         * python/py-event.c (event_object_getset)
9861         (finish_breakpoint_object_getset): Likewise.
9862         * python/py-inferior.c (inferior_object_getset): Likewise.
9863         * python/py-infthread.c (thread_object_getset): Likewise.
9864         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9865         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9866         * python/py-objfile.c (objfile_getset): Likewise.
9867         * python/py-progspace.c (pspace_getset): Likewise.
9868         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9869         Likewise.
9870         * python/py-record.c (recpy_record_getset): Likewise.
9871         * python/py-symbol.c (symbol_object_getset): Likewise.
9872         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9873         Likewise.
9874         * python/py-type.c (type_object_getset, field_object_getset):
9875         Likewise.
9876         * python/py-value.c (value_object_getset): Likewise.
9877
9878 2017-04-05  Pedro Alves  <palves@redhat.com>
9879
9880         * python/python-internal.h (gdb_PyObject_CallMethod)
9881         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9882         New functions.
9883         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9884         (PySys_GetObject, PySys_SetPath): New macros.
9885
9886 2017-04-05  Pedro Alves  <palves@redhat.com>
9887
9888         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9889         info_osdata_command.
9890         * osdata.c (info_osdata_command): Rename to ...
9891         (info_osdata): ... this.  Constify 'type' parameter, and remove
9892         the 'from_tty' parameter.  Accept NULL TYPE.
9893         (info_osdata_command): New function.
9894         * osdata.h (info_osdata_command): Remove declaration.
9895         (info_osdata): New declaration.
9896
9897 2017-04-05  Pedro Alves  <palves@redhat.com>
9898
9899         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9900         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9901         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9902         parameter.
9903         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9904         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9905         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9906         parameter.
9907         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9908         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9909         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9910         (mi_cmd_file_list_exec_source_files)
9911         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9912         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9913         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9914         parameter.
9915         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9916         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9917         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9918         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9919         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9920         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9921         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9922         'command' parameter.
9923         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9924         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9925         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9926         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9927         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9928         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9929         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9930         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9931         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9932         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9933         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9934         parameter.
9935         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9936         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9937         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9938         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9939         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9940         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9941         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9942         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9943         (mi_cmd_data_list_changed_registers)
9944         (mi_cmd_data_write_register_values)
9945         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9946         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9947         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9948         (mi_cmd_list_features, mi_cmd_list_target_features)
9949         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9950         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9951         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9952         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9953         (mi_cmd_trace_frame_collected): Constify 'command'
9954         parameter.
9955         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9956         'command' parameter.
9957
9958 2017-04-05  Pedro Alves  <palves@redhat.com>
9959
9960         * ada-lang.c (ada_completer_word_break_characters): Now a const
9961         array.
9962         (ada_get_gdb_completer_word_break_characters): Constify.
9963         * completer.c (gdb_completer_command_word_break_characters)
9964         (gdb_completer_file_name_break_characters)
9965         (gdb_completer_quote_characters): Now const arrays.
9966         (get_gdb_completer_quote_characters): Constify.
9967         (set_rl_completer_word_break_characters): New function.
9968         (set_gdb_completion_word_break_characters)
9969         (complete_line_internal): Use it.
9970         * completer.h (get_gdb_completer_quote_characters): Constify.
9971         (set_rl_completer_word_break_characters): Declare.
9972         * f-lang.c (f_word_break_characters): Constify.
9973         * language.c (default_word_break_characters): Constify.
9974         * language.h (language_defn::la_word_break_characters): Constify.
9975         (default_word_break_characters): Constify.
9976         * top.c (init_main): Use set_rl_completer_word_break_characters.
9977
9978 2017-04-05  Pedro Alves  <palves@redhat.com>
9979
9980         * aix-thread.c (aix_thread_pid_to_str)
9981         (aix_thread_extra_thread_info): Constify.
9982         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9983         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9984         (bsd_uthread_pid_to_str): Constify.
9985         * corelow.c (core_pid_to_str): Constify.
9986         * darwin-nat.c (darwin_pid_to_str): Constify.
9987         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9988         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9989         Constify.
9990         * gnu-nat.c (gnu_pid_to_str): Constify.
9991         * go32-nat.c (go32_pid_to_str): Constify.
9992         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9993         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9994         * inferior.c (inferior_pid_to_str): Constify.
9995         * linux-nat.c (linux_nat_pid_to_str): Constify.
9996         * linux-tdep.c (linux_core_pid_to_str): Constify.
9997         * linux-thread-db.c (thread_db_pid_to_str)
9998         (thread_db_extra_thread_info): Constify.
9999         * nto-tdep.c (nto_extra_thread_info): Constify.
10000         * nto-tdep.h (nto_extra_thread_info): Constify.
10001         * obsd-nat.c (obsd_pid_to_str): Constify.
10002         * procfs.c (procfs_pid_to_str): Constify.
10003         * ravenscar-thread.c (ravenscar_extra_thread_info)
10004         (ravenscar_pid_to_str): Constify.
10005         * remote-sim.c (gdbsim_pid_to_str): Constify.
10006         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10007         Constify.
10008         * sol-thread.c (solaris_pid_to_str): Constify.
10009         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10010         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10011         * target.c (default_pid_to_str, target_pid_to_str)
10012         (normal_pid_to_str, default_pid_to_str): Constify.
10013         * target.h (target_ops::to_pid_to_str)
10014         (target_ops::to_extra_thread_info): Constify.
10015         (target_pid_to_str, normal_pid_to_str): Constify.
10016         * windows-nat.c (windows_pid_to_str): Constify.
10017         * gdbarch.sh (core_pid_to_str): Constify.
10018         * target-delegates.c: Regenerate.
10019         * gdbarch.h, gdbarch.c: Regenerate.
10020
10021 2017-04-05  Pedro Alves  <palves@redhat.com>
10022
10023         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10024         the memory of the temporary warning_pre_print override.
10025         * utils.c (warning_pre_print): Constify.
10026         * utils.h (warning_pre_print): Constify.
10027
10028 2017-04-05  Pedro Alves  <palves@redhat.com>
10029
10030         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10031         (shell_command): New function.
10032         (make_command): Use std::string.
10033         (init_cli_cmds): Register shell_command instead of shell_escape.
10034
10035 2017-04-05  Pedro Alves  <palves@redhat.com>
10036
10037         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10038         * tracepoint.c (default_collect): Don't initialize.
10039
10040 2017-04-05  Pedro Alves  <palves@redhat.com>
10041
10042         * macroexp.c (macro_buffer::shared): Now a bool.
10043         (init_buffer): Update.
10044         (init_shared_buffer): Constify 'addr' parameter.
10045         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10046         casts.
10047
10048 2017-04-05  Pedro Alves  <palves@redhat.com>
10049
10050         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10051         * disasm.c (set_disassembler_options): Constify local.
10052         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10053
10054 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10055
10056         PR gdb/21352
10057         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10058         option.
10059
10060 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10061
10062         * frame.c (frame_unwind_register_unsigned): Call
10063         frame_unwind_register_value.
10064
10065 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10066
10067         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10068         Use gdb_test_multiple, and don't match anchor.
10069
10070 2017-04-05  Pedro Alves  <palves@redhat.com>
10071
10072         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10073         (Write After Approval): Remove Simon Marchi.
10074
10075 2017-04-05  Pedro Alves  <palves@redhat.com>
10076
10077         * common/gdb_optional.h (optional::optional): Make constexpr and
10078         initialize m_dummy.
10079
10080 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10081
10082         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10083         (amd64fbsd_jmp_buf_reg_offset): Remove.
10084         (amd64fbsd_supply_uthread): Remove function.
10085         (amd64fbsd_collect_uthread): Remove function.
10086         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10087         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10088         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10089         (fbsd-nat.c): Update comment.
10090         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10091         (i386fbsd_jmp_buf_reg_offset): Remove.
10092         (i386fbsd_supply_uthread): Remove function.
10093         (i386fbsd_collect_uthread): Remove function.
10094         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10095
10096 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10097
10098         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10099         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10100         * NEWS: Mention that support for FreeBSD/alpha was removed.
10101         * alpha-fbsd-tdep.c: Delete file.
10102         * config/alpha/fbsd.mh: Delete file.
10103         * configure.host: Delete alpha*-*-freebsd* and
10104         alpha*-*-kfreebsd*-gnu.
10105         * configure.tgt: Delete alpha*-*-freebsd* and
10106         alpha*-*-kfreebsd*-gnu.
10107
10108 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10109
10110         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10111         amd64bsd_store_inferior_registers): Use ptid from regcache.
10112
10113 2017-04-04  Pedro Alves  <palves@redhat.com>
10114
10115         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10116         data fields, make them private and add "m_" prefixes.
10117         (lnp_state_machine::lnp_state_machine): New ctor.
10118         (record_line, check_line_address, handle_set_discriminator)
10119         (handle_set_address, handle_advance_pc, handle_special_opcode)
10120         (handle_advance_line, handle_set_file, handle_negate_stmt)
10121         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10122         (end_sequence, advance_line): New methods.
10123         (m_gdbarch, m_record_lines_p): New fields.
10124         (lnp_reader_state): Delete.
10125         (dwarf_record_line): Rename to ...
10126         (lnp_state_machine::record_line): ... adjust.
10127         (init_lnp_state_machine): Delete.
10128         (lnp_state_machine::lnp_state_machine): New.
10129         (check_line_address): Rename to ...
10130         (lnp_state_machine::check_line_address): This.
10131         (dwarf_decode_lines_1): Remove reference to "reader_state".
10132         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10133         State machine internal state manipulation moved to
10134         lnp_state_machine methods.
10135
10136 2017-04-04  Pedro Alves  <palves@redhat.com>
10137
10138         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10139         unittests/offset-type-selftests.c.
10140         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10141         * common/offset-type.h: New file.
10142         * common/preprocessor.h: New file.
10143         * common/traits.h: New file.
10144         * common/valid-expr.h: New file.
10145         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10146         sect_offset and cu_offset strong typedefs throughout.
10147         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10148         typedefs throughout.
10149         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10150         sect_offset and cu_offset strong typedefs throughout.
10151         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10152         typedefs throughout.
10153         * gdbtypes.h: Include "common/offset-type.h".
10154         (cu_offset): Now an offset type (strong typedef) instead of a
10155         struct.
10156         (sect_offset): Likewise.
10157         (union call_site_parameter_u): Rename "param_offset" field to
10158         "param_cu_off".
10159         * unittests/offset-type-selftests.c: New file.
10160
10161 2017-04-04  Pedro Alves  <palves@redhat.com>
10162
10163         * common/underlying.h: New file.
10164         * dwarf2read.c: Include "common/gdb_optional.h" and
10165         "common/underlying.h".
10166         (dir_index, file_name_index): New types.
10167         (file_entry): Use them.
10168         (file_entry::include): Use to_underlying.
10169         (line_header::add_file_name): Use dir_index.
10170         (read_formatted_entries): Use gdb::optional.  Read form before
10171         writting to file_entry.
10172         (dwarf_decode_line_header): Use dir_index.
10173         (lnp_state_machine::current_file): Use to_underlying.
10174         (lnp_state_machine::file): Change type to file_name_index.
10175         (dwarf_record_line): Use to_underlying.
10176         (init_lnp_state_machine): Use file_name_index.
10177         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10178
10179 2017-04-04  Pedro Alves  <palves@redhat.com>
10180
10181         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10182         operator bool, has_value and get methods.
10183
10184 2017-04-04  Pedro Alves  <palves@redhat.com>
10185
10186         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10187         fields.
10188         (line_header): Initialize all data fields.  Change type of
10189         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10190         Change type of include_dirs to std::vector<const char *>.  Remove
10191         num_include_dirs, include_dirs_size.  Change type of file_names to
10192         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10193         (line_header::line_header): New.
10194         (line_header::add_include_dir, line_header::add_file_name): New
10195         methods.
10196         (line_header::include_dir_at): Remove NULL check.
10197         (line_header::file_name_at): Add const overload.
10198         (line_header_up): New unique_ptr typedef.
10199         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10200         std::vector.  Remove free_line_header call.
10201         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10202         free_line_header call.
10203         (free_cu_line_header): Delete.
10204         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10205         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10206         Adjust to use std::vector.
10207         (free_line_header): Delete.
10208         (free_line_header_voidp): Use delete.
10209         (add_include_dir): Replace with ...
10210         (line_header::add_include_dir): ... this method.  Use std::vector.
10211         (add_file_name): Replace with ...
10212         (line_header::add_file_name): ... this method.  Use std::vector.
10213         (add_include_dir_stub): Delete.
10214         (read_formatted_entries): Remove memset.
10215         (dwarf_decode_line_header): Return a line_header_up instead of a
10216         raw pointer.  Remove cleanup handling.  Pass lambdas to
10217         read_formatted_entries.  Adjust to use line_header methods.
10218         (dwarf_decode_lines_1): Adjust to use line_header methods.
10219         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10220         use std::vector.
10221
10222 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10223
10224         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10225         instead of struct ptid.
10226
10227 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10228
10229         * frame.c (get_frame_register_bytes): Unwind using value.
10230         (put_frame_register_bytes): Likewise.
10231
10232 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10233
10234         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10235         aggregate-like.
10236
10237 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10238
10239         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10240
10241 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10242
10243         * gdbthread.h (struct thread_info): Declare constructor and
10244         destructor.  Add some in-class member initializers.
10245         * thread.c (free_thread): Remove.
10246         (init_thread_list): Call delete instead of free_thread.
10247         (new_thread): Call thread_info constructor.
10248         (thread_info::thread_info): New function.
10249         (thread_info::~thread_info): New function.
10250         (delete_thread_1): Call delete instead of free_thread.
10251         (make_cleanup_restore_current_thread): Move tp and frame to
10252         inner block.
10253
10254 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10255
10256         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10257         (arc_skip_prologue): Likewise.
10258         (arc_make_frame_cache): Likewise.
10259         (arc_pv_get_operand): New function.
10260         (arc_is_in_prologue): Likewise.
10261         (arc_analyze_prologue): Likewise.
10262         (arc_print_frame_cache): Likewise.
10263         (MAX_PROLOGUE_LENGTH): New constant.
10264
10265 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10266
10267         * configure.tgt: Add arc-insn.o.
10268         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10269         (dump_arc_instruction_command): New function.
10270         (arc_fprintf_disasm): Likewise.
10271         (arc_disassemble_info): Likewise.
10272         (arc_insn_get_operand_value): Likewise.
10273         (arc_insn_get_operand_value_signed): Likewise.
10274         (arc_insn_get_memory_base_reg): Likewise.
10275         (arc_insn_get_memory_offset): Likewise.
10276         (arc_insn_get_branch_target): Likewise.
10277         (arc_insn_dump): Likewise.
10278         (arc_insn_get_linear_next_pc): Likewise.
10279         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10280         (arc_disassemble_info): Likewise.
10281         (arc_insn_get_branch_target): Likewise.
10282         (arc_insn_get_linear_next_pc): Likewise.
10283         * NEWS: Mention new "maint print arc arc-instruction".
10284
10285 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10286
10287         * arc-tdep (maintenance_print_arc_list): New variable.
10288         (maintenance_print_arc_command): New function.
10289
10290 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10291
10292         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10293         Add "limm" and "reserved".
10294         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10295         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10296         * arc-tdep.h (arc_regnum): Likewise.
10297
10298 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10299
10300         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10301         for THREADPTR register.
10302         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10303         register.
10304         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10305         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10306         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10307
10308 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10309
10310         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10311         registers above gdbarch_num_regs (gdbarch) as privileged in
10312         call0 ABI.
10313
10314 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10315
10316         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10317         for a single specified register or for all registers in
10318         a0_base..a0_base + C0_NREGS range.
10319         (supply_gregset_reg): Call regcache_raw_supply for a single
10320         specified register or for all registers in a0_base..a0_base +
10321         C0_NREGS range.
10322
10323 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10324
10325         * arch/xtensa.h (C0_NREGS): Add definition.
10326         * xtensa-tdep.c (C0_NREGS): Remove definition.
10327
10328 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10329
10330         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10331         Drop xtensa_default_isa initialization.
10332         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10333
10334 2017-03-27  Pedro Alves  <palves@redhat.com>
10335
10336         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10337         (file_entry::include_dir): New method.
10338         (line_header::include_dir_at, line_header::file_name_at): New
10339         methods.
10340         (setup_type_unit_groups, setup_type_unit_groups)
10341         (psymtab_include_file_name): Simplify using the new methods.
10342         (lnp_state_machine) <the_line_header>: New field.
10343         <file>: Add comment.
10344         (lnp_state_machine::current_file): New method.
10345         (dwarf_record_line): Simplify using the new methods.
10346         (init_lnp_state_machine): Initialize the "the_line_header" field.
10347         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10348         Simplify using the new methods.
10349
10350 2017-03-27  Pedro Alves  <palves@redhat.com>
10351
10352         * cp-name-parser.y (make_empty): Delete.
10353         (demangler_special, nested_name, ptr_operator, array_indicator)
10354         (direct_declarator, declarator_1): Use fill_comp instead of
10355         make_empty.
10356
10357 2017-03-27  Pedro Alves  <palves@redhat.com>
10358
10359         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10360         to ATTRIBUTE_PRINTF.
10361         * solib-target.c (library_list_start_list): Print "string" not
10362         "version".
10363         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10364         gdb_xml_error call.
10365
10366 2017-03-27  Pedro Alves  <palves@redhat.com>
10367
10368         * dwarf2read.c (struct file_and_directory): New.
10369         (dwarf2_get_dwz_file): Adjust to use std::string.
10370         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10371         (find_file_and_directory): Adjust to return a file_and_directory
10372         object.
10373         (read_file_scope): Adjust to use file_and_directory.  Remove
10374         make_cleanup/do_cleanups calls.
10375         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10376         make_cleanup/do_cleanups calls.
10377         * python/python.c (do_start_initialization): Adjust to ldirname
10378         returning a std::string.
10379         * utils.c (ldirname): Now returns a std::string.
10380         * utils.h (ldirname): Change return type to std::string.
10381         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10382         returning a std::string.
10383         * xml-tdesc.c (file_read_description_xml): Likewise.
10384
10385 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10386
10387         * regcache.c (regcache_debug_print_register): New function.
10388         * regcache.h (regcache_debug_print_register): New declaration.
10389         * target.c (debug_print_register): Remove.
10390         (target_fetch_registers): Call regcache_debug_print_register.
10391         (target_store_registers): Likewise.
10392
10393 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10394
10395         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10396         reference beyond the 'lh->include_dirs' array before accessing to
10397         it.
10398         (psymtab_include_file_name): Likewise.
10399         (dwarf_decode_lines_1): Likewise.
10400         (dwarf_decode_lines): Likewise.
10401         (file_file_name): Likewise.
10402
10403 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10404
10405         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10406         inferior_ptid.
10407         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10408         ps_lsetfpregs): Likewise.
10409         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10410         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10411         ps_lsetfpregs): Likewise.
10412         * target.c (target_fetch_registers, target_store_registers):
10413         Remove asserts.
10414
10415 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10416
10417         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10418
10419 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10420
10421         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10422         (_initialize_aarch64_tdep): Register it.
10423         (aarch64_record_load_store): Handle PRFM instruction.
10424         (aarch64_process_record_test): New function.
10425
10426 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10427
10428         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10429         indentation.
10430
10431 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10432
10433         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10434
10435 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10436
10437         python/python.c (do_start_initialization): Fix memory leak.
10438
10439 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10440
10441         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10442         using get_ptrace_pid.
10443         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10444         inferior_ptid.
10445         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10446         inferior_ptid instead of pid.
10447
10448 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10449
10450         * aarch64-tdep.c: Wrap locally used classes in anonymous
10451         namespace.
10452         * arm-tdep.c: Likewise.
10453         * linespec.c: Likewise.
10454         * ui-out.c: Likewise.
10455
10456 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10457
10458         PR gdb/19637
10459         * python/lib/gdb/printer/bound_registers.py: Import sys.
10460
10461 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10462
10463         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10464         windows_thread_info parameter and use it instead of
10465         current_thread.
10466         (windows_fetch_inferior_registers): Don't set current_thread,
10467         pass the thread to do_windows_fetch_inferior_registers.  Use
10468         ptid from regcache instead of inferior_ptid.
10469         (do_windows_store_inferior_registers): Add windows_thread_info
10470         parameter and use it instead of current_thread.
10471         (windows_store_inferior_registers): Don't set current_thread,
10472         pass the thread to do_windows_store_inferior_registers.  Use
10473         ptid from regcache instead of inferior_ptid.
10474
10475 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10476
10477         * ser-mingw.c (ser_windows_raw): Remove reference to
10478         struct serial::current_timeout.
10479
10480 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10481
10482         PR tdep/20928
10483         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10484         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10485         (sparc64_fsr_type): Fix %fsr decoding.
10486
10487 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10488
10489         * python/py-record-btrace.c (btpy_insn_data): Change return type
10490         for Python 2.
10491
10492 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10493
10494         * spu-linux-nat.c (spu_fetch_inferior_registers,
10495         spu_store_inferior_registers): Use ptid from regcache, set and
10496         restore inferior_ptid.
10497         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10498         Likewise.
10499
10500 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10501
10502         * i386-linux-nat.c (fetch_register, store_register,
10503         i386_linux_fetch_inferior_registers,
10504         i386_linux_store_inferior_registers): Use ptid from regcache.
10505         * ia64-linux-nat.c (ia64_linux_fetch_register,
10506         ia64_linux_store_register): Likewise.
10507         * inf-ptrace.c (inf_ptrace_fetch_register,
10508         inf_ptrace_store_register): Likewise.
10509         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10510         m32r_linux_store_inferior_registers): Likewise.
10511         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10512         m68kbsd_store_inferior_registers): Likewise.
10513         * m68k-linux-nat.c (fetch_register, store_register,
10514         m68k_linux_fetch_inferior_registers,
10515         m68k_linux_store_inferior_registers): Likewise.
10516         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10517         m88kbsd_store_inferior_registers): Likewise.
10518         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10519         mips_fbsd_store_inferior_registers): Likewise.
10520         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10521         mips64_linux_regsets_store_registers): Likewise.
10522         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10523         mipsnbsd_store_inferior_registers): Likewise.
10524         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10525         mips64obsd_store_inferior_registers): Likewise.
10526         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10527         Likewise.
10528         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10529         ppcfbsd_store_inferior_registers): Likewise.
10530         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10531         ppc_linux_store_inferior_registers): Likewise.
10532         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10533         ppcnbsd_store_inferior_registers): Likewise.
10534         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10535         ppcobsd_store_registers): Likewise.
10536         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10537         Likewise.
10538         * ravenscar-thread.c (ravenscar_fetch_registers,
10539         ravenscar_store_registers, ravenscar_prepare_to_store):
10540         Likewise.
10541         * record-btrace.c (record_btrace_fetch_registers,
10542         record_btrace_store_registers, record_btrace_prepare_to_store):
10543         Likewise.
10544         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10545         Lookup inferior using ptid from regcache, instead of
10546         current_inferior.
10547         * remote.c (remote_fetch_registers, remote_store_registers): Use
10548         ptid from regcache.
10549         * rs6000-nat.c (fetch_register, store_register): Likewise.
10550         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10551         s390_linux_store_inferior_registers): Likewise.
10552         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10553         shnbsd_store_inferior_registers): Likewise.
10554         * sol-thread.c (sol_thread_fetch_registers,
10555         sol_thread_store_registers): Likewise.
10556         * sparc-nat.c (sparc_fetch_inferior_registers,
10557         sparc_store_inferior_registers): Likewise.
10558         * tilegx-linux-nat.c (fetch_inferior_registers,
10559         store_inferior_registers): Likewise.
10560         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10561         vaxbsd_store_inferior_registers): Likewise.
10562         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10563         store_xtregs): Likewise.
10564
10565 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10566
10567         PR gdb/14441
10568         * NEWS: Mention support for rvalue references in GDB and python.
10569         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10570         supports both lvalue and rvalue references.
10571
10572 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10573
10574         PR gdb/14441
10575         * gdbtypes.c (rank_one_type): Implement overloading
10576         resolution rules regarding rvalue references.
10577
10578 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10579
10580         PR gdb/14441
10581         * aarch64-tdep.c (aarch64_type_align)
10582         (aarch64_extract_return_value, aarch64_store_return_value): Change
10583         lvalue reference type checks to general reference type checks.
10584         * amd64-tdep.c (amd64_classify): Likewise.
10585         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10586         Likewise.
10587         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10588         (arm_store_return_value): Likewise.
10589         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10590         * c-typeprint.c (c_print_type): Likewise.
10591         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10592         (cplus_number_of_children, cplus_describe_child): Likewise.
10593         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10594         * completer.c (expression_completer): Likewise.
10595         * cp-support.c (make_symbol_overload_list_adl_namespace):
10596         Likewise.
10597         * darwin-nat-info.c (info_mach_region_command): Likewise.
10598         * dwarf2loc.c (entry_data_value_coerce_ref)
10599         (value_of_dwarf_reg_entry): Likewise.
10600         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10601         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10602         Likewise.
10603         * findvar.c (extract_typed_address, store_typed_address):
10604         Likewise.
10605         * gdbtypes.c (rank_one_type): Likewise.
10606         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10607         * infcall.c (value_arg_coerce): Likewise.
10608         * language.c (pointer_type): Likewise.
10609         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10610         Likewise.
10611         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10612         * mn10300-tdep.c (mn10300_type_align): Likewise.
10613         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10614         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10615         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10616         Likewise.
10617         * printcmd.c (print_formatted, x_command): Likewise.
10618         * python/py-type.c (typy_get_composite, typy_template_argument):
10619         Likewise.
10620         * python/py-value.c (valpy_referenced_value)
10621         (valpy_get_dynamic_type, value_has_field): Likewise.
10622         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10623         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10624         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10625         * spu-tdep.c (spu_scalar_value_p): Likewise.
10626         * symtab.c (lookup_symbol_aux): Likewise.
10627         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10628         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10629         Likewise.
10630         * valops.c (value_cast_pointers, value_cast)
10631         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10632         (value_struct_elt, value_struct_elt_bitpos)
10633         (value_find_oload_method_list, find_overload_match)
10634         (value_rtti_indirect_type): Likewise.
10635         * valprint.c (val_print_scalar_type_p, generic_val_print):
10636         Likewise.
10637         * value.c (value_actual_type, value_as_address, unpack_long)
10638         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10639         (coerce_ref): Likewise.
10640         * varobj.c (varobj_get_value_type): Likewise.
10641
10642 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10643
10644         PR gdb/14441
10645         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10646         table of constants.
10647         * python/lib/gdb/command/explore.py: Support exploring values
10648         of rvalue reference types.
10649         * python/lib/gdb/types.py: Implement get_basic_type() for
10650         rvalue reference types.
10651         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10652         constant.
10653         * python/py-value.c (valpy_getitem): Add an rvalue reference
10654         check.
10655         (valpy_reference_value): Add new parameter "refcode".
10656         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10657         New wrappers for valpy_reference_value().
10658         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10659         (gdbpy_invoke_xmethod): Likewise.
10660
10661 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10662
10663         PR gdb/14441
10664         * dwarf2read.c (process_die, read_type_die_1): Handle the
10665         DW_TAG_rvalue_reference_type DIE.
10666         (read_tag_reference_type): Add new parameter "refcode".
10667
10668 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10669
10670         PR gdb/14441
10671         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10672         (c_type_print_modifier, c_type_print_varspec_suffix)
10673         (c_type_print_base): Support printing rvalue reference types.
10674         * c-valprint.c (c_val_print, c_value_print): Support printing
10675         rvalue reference values.
10676
10677 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10678
10679         PR gdb/14441
10680         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10681         typename.
10682         * cp-support.c (replace_typedefs): Handle
10683         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10684         * python/py-type.c (typy_lookup_type): Likewise.
10685
10686 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10687
10688         PR gdb/14441
10689         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10690         * parse.c (insert_type): Change assert statement.
10691         (follow_types): Handle rvalue reference types.
10692         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10693         constant.
10694
10695 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10696
10697         PR gdb/14441
10698         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10699         value_ref() interface.
10700         * c-valprint.c (c_value_print): Likewise.
10701         * infcall.c (value_arg_coerce): Likewise.
10702         * python/py-value.c (valpy_reference_value): Likewise.
10703         * valops.c (value_cast, value_reinterpret_cast)
10704         (value_dynamic_cast, typecmp): Likewise.
10705         (value_ref): Parameterize by kind of return value reference type.
10706         * value.h (value_ref): Add new parameter "refcode".
10707
10708 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10709
10710         PR gdb/14441
10711         * dwarf2read.c (read_tag_reference_type): Use
10712         lookup_lvalue_reference_type() instead of lookup_reference_type().
10713         * eval.c (evaluate_subexp_standard): Likewise.
10714         * f-exp.y: Likewise.
10715         * gdbtypes.c (make_reference_type, lookup_reference_type):
10716         Generalize with rvalue reference types.
10717         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10718         convenience wrappers for lookup_reference_type().
10719         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10720         reference kind parameter.
10721         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10722         wrappers for lookup_reference_type().
10723         * guile/scm-type.c (gdbscm_type_reference): Use
10724         lookup_lvalue_reference_type() instead of lookup_reference_type().
10725         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10726         * parse.c (follow_types): Likewise.
10727         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10728         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10729         Likewise.
10730         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10731         (gdbpy_invoke_xmethod): Likewise.
10732         * stabsread.c: Provide extra argument to make_reference_type()
10733         call.
10734         * valops.c (value_ref, value_rtti_indirect_type): Use
10735         lookup_lvalue_reference_type() instead of lookup_reference_type().
10736
10737 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10738
10739         PR gdb/14441
10740         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10741         (TYPE_IS_REFERENCE): New macro.
10742         (struct type): Add rvalue_reference_type field.
10743         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10744
10745 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10746
10747         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10748         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10749         New function definition.
10750         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10751         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10752         New function declaration.
10753         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10754         * mi/mi-interp.h: New file.
10755         * solib.c (info_sharedlibrary_command): Replace for loop with
10756         ALL_SO_LIBS macro
10757         * solib.h (update_solib_list): New function declaration.
10758         (so_list_head): Move macro.
10759         * solist.h (ALL_SO_LIBS): New macro.
10760
10761 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10762
10763         * infcmd.c (post_create_inferior): Remove unused argument in
10764         call to solib_add.
10765         * remote.c (remote_start_remote): Likewise.
10766         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10767         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10768         (enable_break): Likewise.
10769         * solib.c (update_solib_list): Remove unused target argument
10770         and its documentation.
10771         (solib_add): Remove unused target argument.  Remove unused
10772         argument in call to update_solib_list.
10773         (info_sharedlibrary_command): Remove unused argument in call
10774         to update_solib_list.
10775         (sharedlibrary_command): Remove unused argument in call to
10776         solib_add.
10777         (handle_solib_event): Likewise.
10778         (reload_shared_libraries): Likewise.
10779         * solib.h (solib_add): Remove unused target argument.
10780
10781 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10782
10783         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10784         (s390_displaced_step_fixup): Cover relative branches with the
10785         default fixup handling.  This fixes lack of support for some
10786         relative branch instructions.
10787
10788 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10789
10790         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10791         ptid from regcache.
10792
10793 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10794
10795         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10796         i386_darwin_store_inferior_registers): Use ptid from regcache.
10797
10798 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10799
10800         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10801         i386bsd_store_inferior_registers): Use ptid from regcache.
10802
10803 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10804
10805         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10806         hppaobsd_store_registers): Use ptid from regcache.
10807
10808 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10809
10810         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10811         hppanbsd_store_registers): Use ptid from regcache.
10812
10813 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10814
10815         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10816         from regcache.  Use get_ptrace_pid.
10817
10818 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10819
10820         * corelow.c (get_core_register_section): Use ptid from regcache,
10821         update doc.
10822
10823 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10824
10825         * bsd-uthread.c (bsd_uthread_fetch_registers,
10826         bsd_uthread_store_registers): Use ptid from regcache, set and
10827         restore inferior_ptid.
10828
10829 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10830
10831         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10832         fetch_fp_regs, store_register, store_regs, store_fp_register,
10833         store_fp_regs): Use ptid from regcache.
10834
10835 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10836
10837         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10838         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10839         store_vfp_regs): Use ptid from regcache.
10840
10841 2017-03-17  Pedro Alves  <palves@redhat.com>
10842
10843         PR remote/21188
10844         * ser-base.c (ser_base_wait_for): Add comment.
10845         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10846         version.
10847         * ser-unix.c (hardwire_raw): Remove reference to
10848         scb->current_timeout.
10849         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10850         (hardwire_ops): Install ser_base_readchar instead of
10851         hardwire_readchar.
10852         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10853         Remove fields.
10854
10855 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10856
10857         PR gdb/19637
10858         * python/lib/gdb/printer/bound_registers.py: Add support for
10859         Python 3.
10860
10861 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10862
10863         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10864         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10865         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10866         byte_offset to subobj_byte_offset.  Fix the handling of
10867         DWARF_VALUE_STACK on big-endian targets when coming via an
10868         implicit pointer.
10869         (dwarf2_evaluate_loc_desc): Adjust call to
10870         dwarf2_evaluate_loc_desc_full.
10871         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10872         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10873
10874 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10875
10876         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10877         and REVSH instructions.
10878
10879 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10880
10881         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10882         (arm_record_test): Declare.
10883         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10884         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10885         align with the manual.
10886         (thumb_record_misc): Adjust the code order to align with the
10887         manual.
10888         (thumb2_record_decode_insn_handler): Fix instruction matching.
10889         (instruction_reader_thumb): New class.
10890         (arm_record_test): New function.
10891
10892 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10893
10894         * arm-tdep.c (abstract_memory_reader): New class.
10895         (instruction_reader): New class.
10896         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10897         (decode_insn): Likewise.
10898
10899 2017-03-16  Doug Evans  <dje@google.com>
10900
10901         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10902         member.  Change type of TYPE member to SCM.  All uses updated.
10903         (lsscm_make_lazy_string_smob): Add assert.
10904         (lsscm_make_lazy_string): Flag bad length values.
10905         (lsscm_elt_type): New function.
10906         (gdbscm_lazy_string_to_value): Rewrite to use
10907         lsscm_safe_lazy_string_to_value.
10908         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10909         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10910         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10911         in incoming type.
10912         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10913         * guile/scm-type.c (tyscm_scm_to_type): New function.
10914
10915 2017-03-15  Doug Evans  <dje@google.com>
10916
10917         PR python/17728, python/18439, python/18779
10918         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10919         member.  Change type of TYPE member to PyObject *.  All uses updated.
10920         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10921         (gdbpy_create_lazy_string_object): Flag bad length values.
10922         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10923         Handle typedefs in incoming type.
10924         (stpy_lazy_string_elt_type): New function.
10925         (gdbpy_extract_lazy_string): Call it.
10926         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10927         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10928         typedefs in incoming type.
10929
10930 2017-03-16  Doug Evans  <dje@google.com>
10931
10932         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10933         * guile/scm-type.c (tyscm_scm_to_type): New function.
10934
10935 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10936
10937         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10938         "ULONGEST" for "skip".
10939
10940 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10941
10942         PR gdb/21220
10943         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10944         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10945         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10946         over ptrace peek/poke until end of buffer or error.
10947
10948 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10949
10950         * parse.c (length_of_subexp): Make static.
10951         * parser-defs.h (length_of_subexp): Remove.
10952
10953 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10954
10955         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10956         as well.
10957
10958 2017-03-14  Pedro Alves  <palves@redhat.com>
10959
10960         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10961         (main): Use std::unique_ptr.  Remove calls to
10962         cp_demangled_name_parse_free.
10963
10964 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10965
10966         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10967         alphabsd_store_inferior_registers): Use regcache->ptid instead
10968         of inferior_ptid.
10969
10970 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10971
10972         * aix-thread.c (aix_thread_fetch_registers,
10973         aix_thread_store_registers): Use regcache->ptid instead of
10974         inferior_ptid.
10975
10976 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10979         store_gregs_to_thread, fetch_fpregs_from_thread,
10980         store_fpregs_to_thread): Use regcache->ptid instead of
10981         inferior_ptid.
10982
10983 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10984
10985         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10986         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10987         instead of inferior_ptid.
10988
10989 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10990
10991         * target.c (target_fetch_registers, target_store_registers): Add
10992         assert.
10993
10994 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10995
10996         * regcache.h (regcache_get_ptid): New function.
10997         * regcache.c (regcache_get_ptid): New function.
10998
10999 2017-03-13  Mark Wielaard  <mark@klomp.org>
11000
11001         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11002
11003 2017-03-10  Keith Seitz  <keiths@redhat.com>
11004
11005         PR c++/8218
11006         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11007
11008 2017-03-08  Pedro Alves  <palves@redhat.com>
11009
11010         PR gdb/18360
11011         * infrun.c (start_step_over, do_target_resume, resume)
11012         (restart_threads): Assert we're not resuming a thread that is
11013         meant to be stopped.
11014         (infrun_thread_stop_requested_callback): Delete.
11015         (infrun_thread_stop_requested): If the thread is internally
11016         stopped, queue a pending stop event and clear the thread's
11017         inline-frame state.
11018         (handle_stop_requested): New function.
11019         (handle_syscall_event, handle_inferior_event_1): Use
11020         handle_stop_requested.
11021         (handle_stop_requested): New function.
11022         (handle_signal_stop): Set the thread's stop_signal here instead of
11023         at caller.
11024         (finish_step_over): Clear step over info unconditionally.
11025         (handle_signal_stop): If the user had interrupted the event
11026         thread, consider the stop a random signal.
11027         (handle_signal_stop) <signal arrived while stepping over
11028         breakpoint>: Don't restart threads here.
11029         (stop_waiting): Don't clear step-over info here.
11030
11031 2017-03-08  Pedro Alves  <palves@redhat.com>
11032
11033         PR 21206
11034         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11035         goes to argument 2, not 1.
11036
11037 2017-03-08  Pedro Alves  <palves@redhat.com>
11038
11039         PR cli/21218
11040         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11041         display_gdb_prompt.
11042         (command_line_input): Add comment.
11043
11044 2017-03-08  Pedro Alves  <palves@redhat.com>
11045
11046         PR tui/21216
11047         * tui/tui-file.c (tui_file::write): New.
11048         * tui/tui-file.h (tui_file): Override "write".
11049         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11050         factored out from ...
11051         (tui_puts): ... here.
11052         (tui_putc): Use them.
11053         (tui_write): New function.
11054         * tui/tui-io.h (tui_write): Declare.
11055
11056 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11057
11058         * Makefile.in (SFILES): Replace "environ.c" with
11059         "common/environ.c".
11060         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11061         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11062         to...
11063         * common/environ.c: ... here.
11064         * environ.h: Moved to...
11065         * common/environ.h: ... here.
11066
11067 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11068
11069         * gdbarch.sh (pstring_ptr): New static function.
11070         (gdbarch_disassembler_options): Use it.
11071         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11072         not valid_disassembler_option->name.
11073         * gdbarch.c: Regenerate.
11074
11075 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11076
11077         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11078
11079 2017-03-07  Pedro Alves  <palves@redhat.com>
11080
11081         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11082
11083 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11084
11085         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11086         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11087         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11088         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11089
11090 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11091
11092         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11093
11094 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11095
11096         * remote.c (remote_add_target_side_commands): Use range-based
11097         for loop.
11098
11099 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11100
11101         PR gdb/21165
11102         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11103         value is lazy.
11104         * valprint.c (common_val_print): Likewise.
11105
11106 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11107
11108         * NEWS: Mention new set/show disassembler-options commands.
11109         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11110         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11111         (prospective_options): New static variable.
11112         (gdb_disassembler::gdb_disassembler): Initialize
11113         m_di.disassembler_options.
11114         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11115         (get_disassembler_options): New function.
11116         (set_disassembler_options): Likewise.
11117         (set_disassembler_options_sfunc): Likewise.
11118         (show_disassembler_options_sfunc): Likewise.
11119         (disassembler_options_completer): Likewise.
11120         (_initialize_disasm): Likewise.
11121         * disasm.h (get_disassembler_options): New prototype.
11122         (set_disassembler_options): Likewise.
11123         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11124         (gdbarch_verify_disassembler_options): Likewise.
11125         * gdbarch.c: Regenerate.
11126         * gdbarch.h: Likewise.
11127         * arm-tdep.c (num_disassembly_options): Delete.
11128         (set_disassembly_style): Likewise.
11129         (arm_disassembler_options): New static variable.
11130         (set_disassembly_style_sfunc): Convert short style name into long
11131         option name.  Call set_disassembler_options.
11132         (show_disassembly_style_sfunc): New function.
11133         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11134         set_gdbarch_verify_disassembler_options.
11135         (_initialize_arm_tdep): Delete regnames variable and update callers.
11136         (arm_disassembler_options): Initialize.
11137         (disasm_options): New variable.
11138         (num_disassembly_options): Rename from this...
11139         (num_disassembly_styles): ...to this.  Compute by scanning through
11140         disasm_options.
11141         (valid_disassembly_styles): Initialize using disasm_options.
11142         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11143         set_arm_regname_option.
11144         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11145         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11146         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11147         set_gdbarch_verify_disassembler_options.
11148         * s390-tdep.c (s390_disassembler_options): New static variable.
11149         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11150         set_gdbarch_verify_disassembler_options.
11151
11152 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11153
11154         * remote.c (remote_add_target_side_condition): Remove "struct"
11155         keyword from range-based for loop.
11156
11157 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11158
11159         * remote.c (remote_add_target_side_condition): Use range-based
11160         for loop.  Update comment.
11161
11162 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11163
11164         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11165
11166 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11167
11168         * regcache.c (regcache_raw_update): New function.
11169         (regcache_raw_read): Move code to regcache_raw_update.
11170         * regcache.h (regcache_raw_update): New declaration.
11171         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11172
11173 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11174
11175         * dwarf2read.c (create_debug_type_hash_table): Initialize
11176         header.signature and header.type_offset_in_tu.
11177
11178 2017-02-24  Pedro Alves  <palves@redhat.com>
11179
11180         * symtab.c (make_file_symbol_completion_list_1): Use
11181         add_symtab_completions.
11182
11183 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11184
11185         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11186
11187 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11188
11189         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11190         I386_MAX_REGISTER_SIZE.
11191         (i386_pseudo_register_write): Likewise.
11192         (i386_process_record): Likewise.
11193         * i387-tdep.c (i387_supply_xsave): Likewise.
11194         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11195         (store_register): Likewise.
11196
11197 2017-02-23  Pedro Alves  <palves@redhat.com>
11198
11199         * ada-lang.c: Include "common/function-view.h".
11200         (ada_iterate_over_symbols): Adjust to use function_view as
11201         callback type.
11202         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11203         (ada_make_symbol_completion_list): Use a lambda.
11204         (ada_exc_search_name_matches): Delete.
11205         (name_matches_regex): New.
11206         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11207         * compile/compile-c-support.c: Include "common/function-view.h".
11208         (print_one_macro): Change prototype to accept a ui_file pointer.
11209         (write_macro_definitions): Use a lambda.
11210         * dwarf2read.c: Include "common/function-view.h".
11211         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11212         (dw2_expand_symtabs_matching): Adjust to use function_view as
11213         callback type.
11214         * language.h: Include "common/function-view.h".
11215         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11216         function_view as callback type.
11217         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11218         * linespec.c: Include "common/function-view.h".
11219         (collect_info::add_symbol): New method.
11220         (struct symbol_and_data_callback, iterate_inline_only, struct
11221         symbol_matcher_data, iterate_name_matcher): Delete.
11222         (iterate_over_all_matching_symtabs): Adjust to use function_view
11223         as callback type and lambdas.
11224         (iterate_over_file_blocks): Adjust to use function_view as
11225         callback type.
11226         (decode_compound_collector): Now a class with private fields.
11227         (decode_compound_collector::release_symbols): New method.
11228         (collect_one_symbol): Rename to...
11229         (decode_compound_collector::operator()): ... this and adjust.
11230         (lookup_prefix_sym): decode_compound_collector construction bits
11231         move to decode_compound_collector ctor.  Pass the
11232         decode_compound_collector object directly as callback.  Remove
11233         cleanups and use decode_compound_collector::release_symbols
11234         instead.
11235         (symtab_collector): Now a class with private fields.
11236         (symtab_collector::release_symtabs): New method.
11237         (add_symtabs_to_list): Rename to...
11238         (symtab_collector::operator()): ... this and adjust.
11239         (collect_symtabs_from_filename): symtab_collector construction
11240         bits move to symtab_collector ctor.  Pass the symtab_collector
11241         object directly as callback.  Remove cleanups and use
11242         symtab_collector::release_symtabs instead.
11243         (collect_symbols): Delete.
11244         (add_matching_symbols_to_info): Use lambdas.
11245         * macrocmd.c (print_macro_callback): Delete.
11246         (info_macro_command): Use a lambda.
11247         (info_macros_command): Pass print_macro_definition as callable
11248         directly.
11249         (print_one_macro): Remove 'ignore' parameter.
11250         (macro_list_command): Adjust.
11251         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11252         (macro_for_each_data::user_data): Delete field.
11253         (foreach_macro): Adjust to call the function_view.
11254         (macro_for_each): Adjust to use function_view as callback type.
11255         (foreach_macro_in_scope): Adjust to call the function_view.
11256         (macro_for_each_in_scope): Adjust to use function_view as callback
11257         type.
11258         * macrotab.h: Include "common/function-view.h".
11259         (macro_callback_fn): Declare a prototype instead of a pointer.
11260         Remove "user_data" parameter.
11261         (macro_for_each, macro_for_each_in_scope): Adjust to use
11262         function_view as callback type.
11263         * psymtab.c (partial_map_expand_apply)
11264         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11265         Adjust to use function_view as callback type and to return bool.
11266         (psym_expand_symtabs_matching): Adjust to use function_view as
11267         callback types.
11268         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11269         to use function_view as callback type and to return bool.
11270         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11271         callback types.
11272         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11273         as callback types.
11274         * symfile.h: Include "common/function-view.h".
11275         (expand_symtabs_file_matcher_ftype)
11276         (expand_symtabs_symbol_matcher_ftype)
11277         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11278         return bool.
11279         (quick_symbol_functions::map_symtabs_matching_filename)
11280         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11281         function_view as callback type and return bool.
11282         (expand_symtabs_matching): Adjust to use function_view as callback
11283         type.
11284         (maintenance_expand_name_matcher)
11285         (maintenance_expand_file_matcher): Delete.
11286         (maintenance_expand_symtabs): Use lambdas.
11287         * symtab.c (iterate_over_some_symtabs): Adjust to use
11288         function_view as callback types and return bool.
11289         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11290         of a cleanup.
11291         (lookup_symtab_callback): Delete.
11292         (lookup_symtab): Use a lambda.
11293         (iterate_over_symbols): Adjust to use function_view as callback
11294         type.
11295         (struct search_symbols_data, search_symbols_file_matches)
11296         (search_symbols_name_matches): Delete.
11297         (search_symbols): Use a pair of lambdas.
11298         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11299         (symtab_expansion_callback): Delete.
11300         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11301         * symtab.h: Include "common/function-view.h".
11302         (iterate_over_some_symtabs): Adjust to use function_view as
11303         callback type and return bool.
11304         (iterate_over_symtabs): Adjust to use function_view as callback
11305         type.
11306         (symbol_found_callback_ftype): Remove 'data' parameter and return
11307         bool.
11308         (iterate_over_symbols): Adjust to use function_view as callback
11309         type.
11310
11311 2017-02-23  Pedro Alves  <palves@redhat.com>
11312
11313         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11314         (%.o) <unittests/%.c>: New pattern.
11315         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11316         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11317         * common/function-view.h: New file.
11318         * unittests/function-view-selftests.c: New file.
11319         * configure: Regenerate.
11320
11321 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11322
11323         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11324         inferior_ptid.
11325         * go32-nat.c (go32_thread_alive): Likewise.
11326
11327 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11328
11329         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11330         delete.
11331
11332 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11333
11334         * varobj.c (varobj_clear_saved_item): Use delete instead of
11335         xfree.
11336         (update_dynamic_varobj_children): Likewise.
11337
11338 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11339
11340         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11341
11342 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11343
11344         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11345         m_enum_value to 0 in default constructor.
11346
11347 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11348
11349         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11350         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11351         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11352         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11353         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11354         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11355         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11356         IS_STORE_CONDITIONAL_INSN.
11357
11358 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11359
11360         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11361
11362 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11363
11364         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11365
11366 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11367
11368         * dwarf2read.c (skip_one_die, read_attribute_value)
11369         (dwarf2_const_value_attr, dump_die_shallow)
11370         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11371         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11372
11373 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11374
11375         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11376         (dwarf_parse_macro_header): Accept DWARF version 5.
11377         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11378
11379 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11380
11381         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11382         DW_AT_GNU_*.
11383         * common/common-exceptions.h (enum errors): Likewise.
11384         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11385         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11386         (dwarf_expr_context::execute_stack_op): Likewise.
11387         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11388         Likewise.
11389         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11390         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11391         (show_entry_values_debug, call_site_to_target_addr)
11392         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11393         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11394         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11395         (value_of_dwarf_block_entry, indirect_pieced_value)
11396         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11397         (disassemble_dwarf_expression): Likewise.
11398         * dwarf2read.c (process_die, inherit_abstract_dies)
11399         (read_call_site_scope): Likewise.
11400         * gdbtypes.h (struct func_type, struct call_site_parameter)
11401         (struct call_site): Likewise.
11402         * stack.c (read_frame_arg): Likewise.
11403         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11404
11405 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11406
11407         * defs.h (read_unsigned_leb128): New declaration.
11408         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11409         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11410         (dwarf2_find_location_expression): Call also
11411         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11412         * dwarf2loc.h (dwarf2_version): New declaration.
11413         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11414         rnglists.
11415         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11416         .debug_rnglists.
11417         (struct dwop_section_names): Add loclists_dwo.
11418         (dwop_section_names): Add .debug_loclists.dwo.
11419         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11420         (struct dwarf2_per_cu_data): Add dwarf_version.
11421         (struct dwo_sections): Add loclists.
11422         (struct attr_abbrev): Add implicit_const.
11423         (read_indirect_line_string): New declaration.
11424         (read_unsigned_leb128): Delete declaration.
11425         (rcuh_kind): New definition.
11426         (read_and_check_comp_unit_head): Change parameter
11427         is_debug_types_section to section_kind.
11428         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11429         (read_comp_unit_head): Change parameter abfd to section, add parameter
11430         section_kind.  Handle DWARF-5.
11431         (error_check_comp_unit_head): Accept also DWARF version 5.
11432         (read_and_check_comp_unit_head): Change parameter
11433         is_debug_types_section to section_kind.
11434         (read_and_check_type_unit_head): Delete function.
11435         (read_abbrev_offset): Handle DWARF-5.
11436         (create_debug_type_hash_table): Add parameter section_kind.  Process
11437         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11438         comp_unit_head.
11439         (create_debug_types_hash_table): Update create_debug_type_hash_table
11440         caller.
11441         (create_all_type_units): Call create_debug_type_hash_table.
11442         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11443         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11444         caller.
11445         (skip_one_die): Handle DW_FORM_implicit_const.
11446         (dwarf2_rnglists_process): New function.
11447         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11448         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11449         (read_attribute_value): Handle DW_FORM_implicit_const,
11450         DW_FORM_line_strp.
11451         (read_attribute): Handle DW_FORM_implicit_const.
11452         (read_indirect_string_at_offset_from): New function from
11453         read_indirect_string_at_offset.
11454         (read_indirect_string_at_offset): Call
11455         read_indirect_string_at_offset_from.
11456         (read_indirect_line_string_at_offset): New function.
11457         (read_indirect_string): New function comment.
11458         (read_indirect_line_string): New function.
11459         (read_unsigned_leb128): Make it global.
11460         (dwarf2_string_attr): Handle DWARF-5.
11461         (add_include_dir_stub, read_formatted_entries): New functions.
11462         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11463         Handle DWARF-5.
11464         (per_cu_header_read_in): Update read_comp_unit_head caller.
11465         (dwarf2_version): New function.
11466         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11467         rnglists.
11468         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11469         fields.
11470
11471 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11472
11473         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11474
11475 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11476
11477         * dwarf2read.c (dwarf2_ranges_process): New function from
11478         dwarf2_ranges_read.
11479         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11480         dwarf2_ranges_process.
11481
11482 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11483
11484         * dwarf2read.c (create_debug_type_hash_table): New function from
11485         create_debug_types_hash_table.
11486         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11487         (create_all_type_units, open_and_init_dwo_file): Update
11488         create_debug_types_hash_table callers.
11489
11490 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11491
11492         PR gdb/16188
11493         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11494         refer to 'ap', not 'args'.
11495
11496 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11497             Pedro Alves  <palves@redhat.com>
11498
11499         PR gdb/16188
11500         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11501         calls succeeded.
11502         * fork-child.c (trace_start_error): New function.
11503         (trace_start_error_with_name): Likewise.
11504         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11505         * inf-ptrace.c (inf_ptrace_me): Likewise.
11506         * inferior.h (trace_start_error): New prototype.
11507         (trace_start_error_with_name): Likewise.
11508
11509 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11510
11511         PR gdb/21164
11512         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11513         NULL before using it.
11514         * symmisc.c (maintenance_print_symbols): Likewise.
11515         (maintenance_print_msymbols): Likewise.
11516
11517 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11518
11519         * NEWS: Add record Python bindings entry.
11520
11521 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11522
11523         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11524         py-record-full.o.
11525         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11526         * python/py-record-btrace.c, python/py-record-btrace.h,
11527         python/py-record-full.c, python/py-record-full.h: New file.
11528         * python/py-record.c: Add include for py-record-btrace.h and
11529         py-record-full.h.
11530         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11531         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11532         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11533         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11534         New definition.
11535         (gdbpy_initialize_btrace): New export.
11536         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11537
11538 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11539
11540         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11541         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11542         * python/py-record.c: New file.
11543         * python/python-internal.h (gdbpy_start_recording,
11544         gdbpy_current_recording, gdpy_stop_recording,
11545         gdbpy_initialize_record): New export.
11546         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11547         (python_GdbMethods): Add gdbpy_start_recording,
11548         gdbpy_current_recording and gdbpy_stop_recording.
11549
11550 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11551
11552         * record-btrace.c (record_btrace_record_method): New function.
11553         (init_record_btrace_ops): Initialize to_record_method.
11554         * record-full.c (record_full_record_method): New function.
11555         (init_record_full_ops, init_record_full_core_ops): Add
11556         record_full_record_method.
11557         * record.h (enum record_method): New enum.
11558         * target-debug.h (target_debug_print_enum_record_method: New define.
11559         * target-delegates.c: Regenerate.
11560         * target.c (target_record_method): New function.
11561         * target.h: Include record.h.
11562         (struct target_ops) <to_record_method>: New field.
11563         (target_record_method): New export.
11564
11565 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11566
11567         * record.h (record_start, record_stop): New export.
11568         * record.c (record_start, record_stop): New function.
11569
11570 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11571
11572         * btrace.c (btrace_fetch): Copy function call segments pointer
11573         into a vector.
11574         (btrace_clear): Clear the vector.
11575         (btrace_find_insn_by_number): Use binary search to find the correct
11576         function call segment.
11577         * btrace.h (brace_fun_p): New typedef.
11578         (struct btrace_thread_info) <functions>: New field.
11579
11580 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11581
11582         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11583         * btrace.c (btrace_decode_error): ... here.  New function.
11584         * btrace.h (btrace_decode_error): New export.
11585
11586 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11587
11588         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11589         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11590         btrace_find_insn_by_number): Remove special case for gaps.
11591         * btrace.h (btrace_insn_get_error): New export.
11592         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11593         * record-btrace.c (btrace_insn_history): Print number for gaps.
11594         (record_btrace_info, record_btrace_goto): Handle gaps.
11595
11596 2017-02-14  Tom Tromey  <tom@tromey.com>
11597
11598         PR python/13598:
11599         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11600         event.
11601         * python/py-evts.c (gdbpy_initialize_py_events): Add
11602         before_prompt registry.
11603         * python/py-events.h (events_object) <before_prompt>: New field.
11604
11605 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11606
11607         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11608
11609 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11610
11611         * symfile (_initialize_symfile): Add usage text to the load command's
11612         help text.
11613
11614 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11615
11616         * utils.c (defaulted_query): Don't query on secondary UIs.
11617
11618 2017-02-10  Tom Tromey  <tom@tromey.com>
11619
11620         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11621
11622 2017-02-10  Tom Tromey  <tom@tromey.com>
11623
11624         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11625         "cleanup" local.
11626         * python/py-type.c (typy_legacy_template_argument): Remove
11627         unnecessary "cleanup" local.
11628
11629 2017-02-10  Tom Tromey  <tom@tromey.com>
11630
11631         * python/python.c (do_start_initialization): New function, from
11632         _initialize_python.
11633         (_initialize_python): Call do_start_initialization.
11634         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11635         goto.
11636
11637 2017-02-10  Tom Tromey  <tom@tromey.com>
11638
11639         * python/py-prettyprint.c (pretty_print_one_value): Use
11640         gdbpy_ref.
11641
11642 2017-02-10  Tom Tromey  <tom@tromey.com>
11643
11644         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11645         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11646         gdbpy_ref.
11647         * python/py-type.c (field_new): Use gdbpy_ref.
11648         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11649         gdbpy_ref.
11650         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11651         (py_free_pspace): Likewise.
11652         (pspace_to_pspace_object): Likewise.
11653         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11654         (py_free_objfile): Likewise.
11655         (objfile_to_objfile_object): Likewise.
11656         * python/py-inferior.c (delete_thread_object): Use
11657         gdbpy_ref.
11658         (infpy_read_memory): Likewise.
11659         (py_free_inferior): Likewise.
11660         * python/py-evtregistry.c (create_eventregistry_object): Use
11661         gdbpy_ref.
11662         * python/py-event.c (create_event_object): Use gdbpy_ref.
11663
11664 2017-02-10  Tom Tromey  <tom@tromey.com>
11665
11666         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11667         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11668         used.
11669         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11670         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11671         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11672         python/py-framefilter.c, python/py-function.c,
11673         python/py-inferior.c, python/py-infevents.c,
11674         python/py-linetable.c, python/py-newobjfileevent.c,
11675         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11676         python/py-signalevent.c, python/py-stopevent.c,
11677         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11678         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11679         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11680         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11681
11682 2017-02-10  Tom Tromey  <tom@tromey.com>
11683
11684         * ui-out.h (ui_out_emit_type): New class.
11685         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11686         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11687         and ui_out_emit_tuple.
11688         (enumerate_locals): Likewise.
11689         (py_mi_print_variables, py_print_locals, py_print_args): Use
11690         ui_out_emit_list.
11691         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11692         ui_out_emit_list.
11693         * common/gdb_optional.h: New file.
11694
11695 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11696
11697         * MAINTAINERS (Write After Approval): Update my e-mail address.
11698
11699 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11700
11701         PR gdb/21122
11702         * breakpoint.c (_initialize_breakpoint): Update the help description
11703         of the 'commands' command to indicate that it takes a list argument.
11704
11705 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11706
11707         * interps.c (current_interp_set_logging): Remove "return".
11708
11709 2017-02-09  Gary Benson  <gbenson@redhat.com>
11710
11711         * symtab.c (add_symtab_completions): Prevent NULL pointer
11712         dereference.
11713
11714 2017-02-08  Pedro Alves  <palves@redhat.com>
11715
11716         * interps.c (interp::interp): Remove reference to quiet_p.
11717         (interp_set): Make static.  Remove dead "Switching to" output
11718         code.
11719         (interp_quiet_p, interp_set_quiet): Delete.
11720         (interpreter_exec_cmd): Don't set the interpreter quiet.
11721         * interps.h (interp_quiet_p): Make static.
11722         (class interp) <quiet_p>: Remove field
11723
11724 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11725
11726         * cli/cli-decode.c (find_command_name_length): Make it extern.
11727         * cli/cli-decode.h (find_command_name_length): Declare.
11728         * cli/cli-script.c (command_name_equals, line_first_arg):
11729         New functions.
11730         (process_next_line): Use cli-decode to parse command names.
11731         (build_command_line): Make args a constant pointer.
11732
11733 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11734
11735         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11736         Remove case-insensitive search.
11737
11738 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11739
11740         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11741         at the end of the line.  Avoids an ARI warning.
11742
11743 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11744
11745         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11746         rdseed instructions.
11747         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11748
11749 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11750
11751         PR tdep/20936
11752         Provide and use sparc32 and sparc64 target description XML files.
11753         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11754         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11755         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11756         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11757         * features/sparc/sparc32-solaris.xml: New file.
11758         * features/sparc/sparc64-solaris.xml: New file.
11759         * features/sparc/sparc32-solaris.c: Generated.
11760         * features/sparc/sparc64-solaris.c: Generated.
11761         * sparc-tdep.h: Account for differences in target descriptions.
11762         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11763         (sparc32_register_type): Use target provided registers.
11764         (validate_tdesc_registers): New function.
11765         (sparc32_gdbarch_init): Use tdesc_has_registers.
11766         Set pseudoregister functions.
11767         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11768         (sparc64_register_type): Use target provided registers.
11769         (sparc64_init_abi): Set pseudoregister functions.
11770
11771 2017-02-03  Tom Tromey  <tom@tromey.com>
11772
11773         PR rust/21097:
11774         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11775         with a single member.
11776
11777 2017-02-03  Pedro Alves  <palves@redhat.com>
11778
11779         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11780         (cli_interp_base::~cli_interp_base): New.
11781         (cli_interp): New struct.
11782         (as_cli_interp): Cast the interp itself to cli_interp.
11783         (cli_interpreter_pre_command_loop): Rename to ...
11784         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11785         parameter.
11786         (cli_interpreter_init): Rename to ...
11787         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11788         boolean.  Make extern.
11789         (cli_interpreter_resume): Rename to ...
11790         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11791         extern.
11792         (cli_interpreter_suspend): Rename to ...
11793         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11794         extern.
11795         (cli_interpreter_exec): Rename to ...
11796         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11797         extern.
11798         (cli_interpreter_supports_command_editing): Rename to ...
11799         (cli_interp_base::supports_command_editing): ... this.  Remove
11800         'interp' parameter.  Make extern.
11801         (cli_ui_out): Rename to ...
11802         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11803         Make extern.
11804         (cli_set_logging): Rename to ...
11805         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11806         parameter.  Make extern.
11807         (cli_interp_procs): Delete.
11808         (cli_interp_factory): Adjust to use "new".
11809         * cli/cli-interp.h: Include "interps.h".
11810         (struct cli_interp_base): New struct.
11811         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11812         (interp_new): Delete.
11813         (interp::interp, interp::~interp): New.
11814         (interp_set): Use bool, and return void.  Assume the interpreter
11815         has suspend, init and resume methods, and that the all return
11816         void.
11817         (set_top_level_interpreter): interp_set returns void.
11818         (interp_ui_out): Adapt.
11819         (current_interp_set_logging): Adapt.
11820         (interp_data): Delete.
11821         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11822         (interp_exec): Adapt.
11823         (top_level_interpreter_data): Delete.
11824         * interps.h (interp_init_ftype, interp_resume_ftype)
11825         (interp_suspend_ftype, interp_exec_ftype)
11826         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11827         (class interp): New.
11828         (interp_new): Delete.
11829         (interp_set): Now returns void.  Use bool.
11830         (interp_data, top_level_interpreter_data): Delete.
11831         * mi/mi-common.h: Include interps.h.
11832         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11833         init, resume, suspect, exec, interp_ui_out, set_logging and
11834         pre_command_loop methods.
11835         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11836         (mi_interpreter_init): Rename to ...
11837         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11838         bool, return void and make extern.  Adjust.
11839         (mi_interpreter_resume): ... Rename to ...
11840         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11841         return void and make extern.  Adjust.
11842         (mi_interpreter_suspend): ... Rename to ...
11843         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11844         return void and make extern.  Adjust.
11845         (mi_interpreter_exec): ... Rename to ...
11846         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11847         extern.  Adjust.
11848         (mi_interpreter_pre_command_loop): ... Rename to ...
11849         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11850         parameter and make extern.
11851         (mi_on_normal_stop_1): Adjust.
11852         (mi_ui_out): Rename to ...
11853         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11854         parameter and make extern.  Adjust.
11855         (mi_set_logging): Rename to ...
11856         (mi_interp::set_logging): ... this.  Remove the 'interp'
11857         parameter and make extern.  Adjust.
11858         (mi_interp_procs): Delete.
11859         (mi_interp_factory): Adjust to use 'new'.
11860         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11861         (mi_print_exception, mi_execute_command, mi_load_progress):
11862         Adjust.
11863         * tui/tui-interp.c (tui_interp): New class.
11864         (as_tui_interp): Return a tui_interp pointer.
11865         (tui_on_normal_stop, tui_on_signal_received)
11866         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11867         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11868         to use interp::interp_ui_out.
11869         (tui_init): Rename to ...
11870         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11871         bool, return void and make extern.  Adjust.
11872         (tui_resume): Rename to ...
11873         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11874         return void and make extern.  Adjust.
11875         (tui_suspend): Rename to ...
11876         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11877         return void and make extern.  Adjust.
11878         (tui_ui_out): Rename to ...
11879         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11880         parameter, and make extern.  Adjust.
11881         (tui_exec): Rename to ...
11882         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11883         make extern.
11884         (tui_interp_procs): Delete.
11885         (tui_interp_factory): Use "new".
11886
11887 2017-02-02  Tom Tromey  <tom@tromey.com>
11888
11889         * rust-exp.y (ends_raw_string, space_then_number)
11890         (rust_identifier_start_p): Return bool.
11891         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11892         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11893         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11894         (rust_chartype_p): Return bool.
11895         (val_print_struct, rust_print_struct_def, rust_print_type):
11896         Update.
11897         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11898         Return bool.
11899
11900 2017-02-02  Tom Tromey  <tom@tromey.com>
11901
11902         * rust-lang.c: Reindent.
11903
11904 2017-02-02  Tom Tromey  <tom@tromey.com>
11905
11906         * rust-lang.h (rust_crate_for_block): Update.
11907         * rust-lang.c (rust_crate_for_block): Return std::string.
11908         (rust_get_disr_info): Use std:;string, not
11909         gdb::unique_xmalloc_ptr.
11910         * rust-exp.y (crate_name): Update.
11911
11912 2017-02-02  Pedro Alves  <palves@redhat.com>
11913
11914         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11915         field out of gdb_disassembler_test and make it static.
11916
11917 2017-02-02  Pedro Alves  <palves@redhat.com>
11918
11919         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11920         mi1_interp and mi_interp fields.
11921
11922 2017-02-02  Pedro Alves  <palves@redhat.com>
11923
11924         * cli/cli-interp.c (struct saved_output_files, saved_output):
11925         Moved from cli/cli-logging.c.
11926         (cli_set_logging): New function.
11927         (cli_interp_procs): Install cli_set_logging.
11928         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11929         Declare.
11930         * cli/cli-logging.c (struct saved_output_files, saved_output):
11931         Moved to cli/cli-interp.c.
11932         (pop_output_files): Don't save outputs here.
11933         (make_logging_output): New function.
11934         (handle_redirections): Don't build tee nor save previous outputs
11935         here.
11936         * interps.c (current_interp_set_logging): Change prototype.
11937         Assume there's always a set_logging_proc method installed.
11938         * interps.h (interp_set_logging_ftype): Change prototype.
11939         (current_interp_set_logging): Change prototype and adjust comment.
11940         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11941         use make_logging_output.
11942         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11943 2017-02-02  Pedro Alves  <palves@redhat.com>
11944
11945         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11946         from ...
11947         (set_logging_overwrite): ... here.
11948         (logging_no_redirect_file): Delete.
11949         (set_logging_redirect): Don't handle redirection on the fly.
11950         Instead warn that "logging off" / "logging on" is necessary.
11951         (pop_output_files): Delete references to logging_no_redirect_file.
11952         (show_logging_command): Always speak in terms of what will happen
11953         once logging is reenabled.
11954
11955 2017-02-02  Pedro Alves  <palves@redhat.com>
11956
11957         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11958
11959 2017-02-02  Pedro Alves  <palves@redhat.com>
11960
11961         * disasm.c (gdb_pretty_print_insn): Rename to ...
11962         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11963         Remove gdbarch parameter.  Adapt to clear the object's buffers
11964         instead of allocating new buffers, and to print using the object's
11965         gdb_disassembler instead of calling gdb_print_insn.
11966         (dump_insns): Use gdb_pretty_print_disassembler.
11967         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11968         (gdb_pretty_print_disassembler): New class.
11969         * record-btrace.c (btrace_insn_history): Use
11970         gdb_pretty_print_disassembler.
11971
11972 2017-02-02  Pedro Alves  <palves@redhat.com>
11973
11974         * ada-lang.c (type_as_string): Use string_file.
11975         * ada-valprint.c (ada_print_floating): Use string_file.
11976         * ada-varobj.c (ada_varobj_scalar_image)
11977         (ada_varobj_get_value_image): Use string_file.
11978         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11979         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11980         * breakpoint.c (update_inserted_breakpoint_locations)
11981         (insert_breakpoint_locations, reattach_breakpoints)
11982         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11983         (print_it_watchpoint): Use string_file.
11984         (save_breakpoints): Use stdio_file.
11985         * c-exp.y (oper): Use string_file.
11986         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11987         tee_file.
11988         (pop_output_files): Use delete.
11989         (handle_redirections): Use stdio_file and tee_file.
11990         * cli/cli-setshow.c (do_show_command): Use string_file.
11991         * compile/compile-c-support.c (c_compute_program): Use
11992         string_file.
11993         * compile/compile-c-symbols.c (generate_vla_size): Take a
11994         'string_file &' instead of a 'ui_file *'.
11995         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11996         of a 'ui_file *'.  Use string_file.
11997         (generate_c_for_variable_locations): Take a 'string_file &'
11998         instead of a 'ui_file *'.
11999         * compile/compile-internal.h (generate_c_for_for_one_variable):
12000         Take a 'string_file &' instead of a 'ui_file *'.
12001         * compile/compile-loc2c.c (push, pushf, unary, binary)
12002         (print_label, pushf_register_address, pushf_register)
12003         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12004         'ui_file *'.  Adjust.
12005         * compile/compile.c (compile_to_object): Use string_file.
12006         * compile/compile.h (compile_dwarf_expr_to_c)
12007         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12008         'ui_file *'.
12009         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12010         (replace_typedefs_qualified_name): Use string_file and
12011         obstack_copy0.
12012         * disasm.c (gdb_pretty_print_insn): Use string_file.
12013         (gdb_disassembly): Adjust reference the null_stream global.
12014         (do_ui_file_delete): Delete.
12015         (gdb_insn_length): Use null_stream.
12016         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12017         * dwarf2loc.c (dwarf2_compile_property_to_c)
12018         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12019         'string_file &' instead of a 'ui_file *'.
12020         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12021         * dwarf2read.c (do_ui_file_peek_last): Delete.
12022         (dwarf2_compute_name): Use string_file.
12023         * event-top.c (gdb_setup_readline): Use stdio_file.
12024         * gdbarch.sh (verify_gdbarch): Use string_file.
12025         * gdbtypes.c (safe_parse_type): Use null_stream.
12026         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12027         string_file.
12028         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12029         'string_file *' instead of a 'ui_file *'.
12030         (gdbscm_arch_disassemble): Use string_file.
12031         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12032         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12033         inherits from ui_file.
12034         (ioscm_file_port_delete, ioscm_file_port_rewind)
12035         (ioscm_file_port_put): Delete.
12036         (ioscm_file_port_write): Rename to ...
12037         (ioscm_file_port::write): ... this.  Remove file_port_magic
12038         checks.
12039         (ioscm_file_port_new): Delete.
12040         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12041         ui_file_up.
12042         * guile/scm-type.c (tyscm_type_name): Use string_file.
12043         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12044         Use string_file.
12045         * infcmd.c (print_return_value_1): Use string_file.
12046         * infrun.c (print_target_wait_results): Use string_file.
12047         * language.c (add_language): Use string_file.
12048         * location.c (explicit_to_string_internal): Use string_file.
12049         * main.c (captured_main_1): Use null_file.
12050         * maint.c (maintenance_print_architecture): Use stdio_file.
12051         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12052         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12053         event_channel>: Change type to mi_console_file pointer.
12054         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12055         (mi_console_file_delete): Delete.
12056         (struct mi_console_file): Delete.
12057         (mi_console_file_magic): Delete.
12058         (mi_console_file_new): Delete.
12059         (mi_console_file::mi_console_file): New.
12060         (mi_console_file_delete): Delete.
12061         (mi_console_file_fputs): Delete.
12062         (mi_console_file::write): New.
12063         (mi_console_raw_packet): Delete.
12064         (mi_console_file::flush): New.
12065         (mi_console_file_flush): Delete.
12066         (mi_console_set_raw): Rename to ...
12067         (mi_console_file::set_raw): ... this.
12068         * mi/mi-console.h (class mi_console_file): New class.
12069         (mi_console_file_new, mi_console_set_raw): Delete.
12070         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12071         (mi_set_logging): Use delete and tee_file.  Adjust.
12072         * mi/mi-main.c (output_register): Use string_file.
12073         (mi_cmd_data_evaluate_expression): Use string_file.
12074         (mi_cmd_data_read_memory): Use string_file.
12075         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12076         * mi/mi-out.c (mi_ui_out::main_stream): New.
12077         (mi_ui_out::rewind): Use main_stream and
12078         string_file.
12079         (mi_ui_out::put): Use main_stream and string_file.
12080         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12081         Allocate a 'string_file' instead.
12082         (mi_out_new): Don't allocate a mem_fileopen stream here.
12083         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12084         (mi_ui_out::main_stream): Declare method.
12085         * printcmd.c (eval_command): Use string_file.
12086         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12087         * python/py-arch.c (archpy_disassemble): Use string_file.
12088         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12089         * python/py-frame.c (frapy_str): Use string_file.
12090         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12091         Use string_file.
12092         * python/py-type.c (typy_str): Use string_file.
12093         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12094         * python/py-value.c (valpy_str): Use string_file.
12095         * record-btrace.c (btrace_insn_history): Use string_file.
12096         * regcache.c (regcache_print): Use stdio_file.
12097         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12098         * remote.c (escape_buffer): Use string_file.
12099         * rust-lang.c (rust_get_disr_info): Use string_file.
12100         * serial.c (serial_open_ops_1): Use stdio_file.
12101         (do_serial_close): Use delete.
12102         * stack.c (print_frame_arg): Use string_file.
12103         (print_frame_args): Remove local mem_fileopen stream, not used.
12104         (print_frame): Use string_file.
12105         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12106         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12107         Take a 'string_file *' instead of a 'ui_file *'.
12108         * top.c (new_ui): Use stdio_file and stderr_file.
12109         (free_ui): Use delete.
12110         (execute_command_to_string): Use string_file.
12111         (quit_confirm): Use string_file.
12112         * tracepoint.c (collection_list::append_exp): Use string_file.
12113         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12114         * tui/tui-file.c: Don't include "ui-file.h".
12115         (enum streamtype, struct tui_stream): Delete.
12116         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12117         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12118         (tui_file::tui_file): New method.
12119         (tui_file_fputs): Delete.
12120         (tui_file_get_strbuf): Delete.
12121         (tui_file::puts): New method.
12122         (tui_file_adjust_strbuf): Delete.
12123         (tui_file_flush): Delete.
12124         (tui_file::flush): New method.
12125         * tui/tui-file.h: Tweak intro comment.
12126         Include ui-file.h.
12127         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12128         (tui_file_adjust_strbuf): Delete declarations.
12129         (class tui_file): New class.
12130         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12131         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12132         (tui_register_format): Use string_stream.
12133         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12134         (tui_get_function_from_frame): Use string_file.
12135         * typeprint.c (type_to_string): Use string_file.
12136         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12137         (null_stream): New global.
12138         (ui_file_delete): Delete.
12139         (ui_file::ui_file): New.
12140         (null_file_isatty): Delete.
12141         (ui_file::~ui_file): New.
12142         (null_file_rewind): Delete.
12143         (ui_file::printf): New.
12144         (null_file_put): Delete.
12145         (null_file_flush): Delete.
12146         (ui_file::putstr): New.
12147         (null_file_write): Delete.
12148         (ui_file::putstrn): New.
12149         (null_file_read): Delete.
12150         (ui_file::putc): New.
12151         (null_file_fputs): Delete.
12152         (null_file_write_async_safe): Delete.
12153         (ui_file::vprintf): New.
12154         (null_file_delete): Delete.
12155         (null_file::write): New.
12156         (null_file_fseek): Delete.
12157         (null_file::puts): New.
12158         (ui_file_data): Delete.
12159         (null_file::write_async_safe): New.
12160         (gdb_flush, ui_file_isatty): Adjust.
12161         (ui_file_put, ui_file_rewind): Delete.
12162         (ui_file_write): Adjust.
12163         (ui_file_write_for_put): Delete.
12164         (ui_file_write_async_safe, ui_file_read): Adjust.
12165         (ui_file_fseek): Delete.
12166         (fputs_unfiltered): Adjust.
12167         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12168         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12169         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12170         (set_ui_file_data): Delete.
12171         (string_file::~string_file, string_file::write)
12172         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12173         (do_ui_file_as_string, ui_file_as_string): Delete.
12174         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12175         (struct mem_file): Delete.
12176         (mem_file_new): Delete.
12177         (stdio_file::stdio_file): New.
12178         (mem_file_delete): Delete.
12179         (stdio_file::stdio_file): New.
12180         (mem_fileopen): Delete.
12181         (stdio_file::~stdio_file): New.
12182         (mem_file_rewind): Delete.
12183         (stdio_file::set_stream): New.
12184         (mem_file_put): Delete.
12185         (stdio_file::open): New.
12186         (mem_file_write): Delete.
12187         (stdio_file_magic, struct stdio_file): Delete.
12188         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12189         (stdio_file::flush): New.
12190         (stdio_file_read): Rename to ...
12191         (stdio_file::read): ... this.  Adjust.
12192         (stdio_file_write): Rename to ...
12193         (stdio_file::write): ... this.  Adjust.
12194         (stdio_file_write_async_safe): Rename to ...
12195         (stdio_file::write_async_safe) ... this.  Adjust.
12196         (stdio_file_fputs): Rename to ...
12197         (stdio_file::puts) ... this.  Adjust.
12198         (stdio_file_isatty): Delete.
12199         (stdio_file_fseek): Delete.
12200         (stdio_file::isatty): New.
12201         (stderr_file_write): Rename to ...
12202         (stderr_file::write) ... this.  Adjust.
12203         (stderr_file_fputs): Rename to ...
12204         (stderr_file::puts) ... this.  Adjust.
12205         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12206         (stderr_file::stderr_file): New.
12207         (tee_file_magic): Delete.
12208         (struct tee_file): Delete.
12209         (tee_file::tee_file): New.
12210         (tee_file_new): Delete.
12211         (tee_file::~tee_file): New.
12212         (tee_file_delete): Delete.
12213         (tee_file_flush): Rename to ...
12214         (tee_file::flush): ... this.  Adjust.
12215         (tee_file_write): Rename to ...
12216         (tee_file::write): ... this.  Adjust.
12217         (tee_file::write_async_safe): New.
12218         (tee_file_fputs): Rename to ...
12219         (tee_file::puts): ... this.  Adjust.
12220         (tee_file_isatty): Rename to ...
12221         (tee_file::isatty): ... this.  Adjust.
12222         * ui-file.h (struct obstack, struct ui_file): Don't
12223         forward-declare.
12224         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12225         (ui_file_write_ftype)
12226         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12227         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12228         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12229         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12230         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12231         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12232         (set_ui_file_fseek): Delete.
12233         (ui_file_data, ui_file_delete, ui_file_rewind)
12234         (struct ui_file): New.
12235         (ui_file_up): New.
12236         (class null_file): New.
12237         (null_stream): Declare.
12238         (ui_file_write_for_put, ui_file_put): Delete.
12239         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12240         Delete.
12241         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12242         (gdb_fopen, tee_file_new): Delete.
12243         (struct string_file): New.
12244         (struct stdio_file): New.
12245         (stdio_file_up): New.
12246         (struct stderr_file): New.
12247         (class tee_file): New.
12248         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12249         of a 'ui_file *'.  Adjust.
12250         * ui-out.h (class ui_out) <field_stream>: Likewise.
12251         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12252         (null_stream): Delete.
12253         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12254         Adjust.
12255         * utils.h (struct ui_file): Delete forward declaration..
12256         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12257         (error_stream): Take a 'string_file &' instead of a
12258         'ui_file *'.
12259         * varobj.c (varobj_value_get_print_value): Use string_file.
12260         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12261         * gdbarch.c: Regenerate.
12262
12263 2017-02-02  Pedro Alves  <palves@redhat.com>
12264
12265         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12266         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12267         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12268         Adjust to call gdb_print_insn instead of
12269         gdb_disassembler::print_insn.
12270         (dump_insns, do_mixed_source_and_assembly_deprecated)
12271         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12272         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12273         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12274         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12275         declaration.
12276         (gdb_pretty_print_insn): Re-add declaration.
12277         * record-btrace.c (btrace_insn_history): Don't allocate a
12278         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12279
12280 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12281
12282         * disasm.h (gdb_disassembly): Remove file_string parameter.
12283         * disasm.c (gdb_disassembly): Likewise.
12284         * cli/cli-cmds.c (print_disassembly): Adapt.
12285         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12286         * stack.c (do_gdb_disassembly): Likewise.
12287
12288 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12289
12290         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12291         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12292         targets.  And if the implicit value is longer than needed, extract
12293         the first bytes instead of the "least significant" ones.
12294
12295 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12296
12297         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12298         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12299         (btrace_fetch): Assert can_access_registers_ptid.
12300         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12301         validate_registers_access.
12302
12303 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12304
12305         * gdbthread.h (can_access_registers_ptid): New.
12306         * thread.c (can_access_registers_ptid): New.
12307
12308 2017-02-01  Pedro Alves  <palves@redhat.com>
12309
12310         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12311
12312 2017-01-31  Pedro Alves  <palves@redhat.com>
12313
12314         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12315         Fix typos.
12316
12317 2017-01-31  Pedro Alves  <palves@redhat.com>
12318
12319         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12320         not used.
12321
12322 2017-01-31  Pedro Alves  <palves@redhat.com>
12323
12324         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12325
12326 2017-01-31  Pedro Alves  <palves@redhat.com>
12327
12328         * common/scoped_restore.h
12329         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12330         change the value's parameter type to T2.
12331         (make_scoped_restore): Likewise.
12332
12333 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12334             Richard Henderson  <rth@redhat.com>
12335
12336         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12337         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12338         GS_BASE for older kernels.
12339         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12340         GS_BASE for older kernels.
12341         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12342         and GS_BASE to the offset table.
12343         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12344         system register group.
12345         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12346         for older kernels.
12347         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12348         amd64 ABI.
12349         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12350         AMD64_GSBASE_REGNUM.
12351         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12352         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12353         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12354         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12355         i386/64bit-segments.xml in those rules.
12356         * features/i386/64bit-segments.xml: New file.
12357         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12358         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12359         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12360         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12361         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12362         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12363         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12364         * features/i386/amd64-avx-linux.c: Regenerated.
12365         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12366         * features/i386/amd64-avx-mpx.c: Regenerated.
12367         * features/i386/amd64-avx512-linux.c: Regenerated.
12368         * features/i386/amd64-linux.c: Regenerated.
12369         * features/i386/amd64-mpx-linux.c: Regenerated.
12370         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12371         * features/i386/i386-avx-mpx.c: Regenerated.
12372         * features/i386/x32-avx-linux.c: Regenerated.
12373         * features/i386/x32-avx512-linux.c: Regenerated.
12374         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12375         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12376         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12377         * regformats/i386/amd64-linux.dat: Regenerated.
12378         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12379         * regformats/i386/x32-avx-linux.dat: Regenerated.
12380         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12381         * regformats/i386/x32-linux.dat: Regenerated.
12382
12383 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12384
12385         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12386         Set to AMD64_NUM_REGS.
12387
12388 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12389
12390         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12391         that checks validity of a register number.
12392
12393 2017-01-27  Kees Cook  <keescook@google.com>
12394
12395         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12396         fetch_fpregs if target has fpa registers.
12397         (arm_linux_store_inferior_registers): Call store_fpregs if target
12398         has fpa registers.
12399
12400 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12401
12402         * cris-tdep.c (cris_gdbarch_init): Remove check for
12403         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12404
12405 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12406
12407         * corelow.c (get_core_register_section): Check for regset
12408         existence before checking for REGSET_VARIABLE_SIZE.
12409
12410 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12411             Pedro Alves  <palves@redhat.com>
12412
12413         PR gdb/20939
12414         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12415         call memory_error, save memaddr instead.
12416         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12417         negative, cal memory_error.
12418         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12419
12420 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12421
12422         * disasm-selftests.c (memory_error_test): New function.
12423         (_initialize_disasm_selftests): Register memory_error_test.
12424
12425 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12426
12427         * Makefile.in (SFILES): Add disasm-selftests.c and
12428         selftest-arch.c.
12429         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12430         * disasm-selftests.c: New file.
12431         * selftest-arch.c: New file.
12432         * selftest-arch.h: New file.
12433
12434 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12435
12436         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12437         to bfd_arch_mep.  Don't return 0 if section is not
12438         found.  Call print_insn_mep.
12439
12440 2017-01-26  Pedro Alves  <palves@redhat.com>
12441             Yao Qi  <yao.qi@linaro.org>
12442
12443         * arm-tdep.c: Include "disasm.h".
12444         (gdb_print_insn_arm): Update code to get gdbarch.
12445         * disasm.c (dis_asm_read_memory): Change it to
12446         gdb_disassembler::dis_asm_read_memory.
12447         (dis_asm_memory_error): Likewise.
12448         (dis_asm_print_address): Likewise.
12449         (gdb_pretty_print_insn): Change it to
12450         gdb_disassembler::pretty_print_insn.
12451         (dump_insns): Add one argument gdb_disassemlber.  All
12452         callers updated.
12453         (do_mixed_source_and_assembly_deprecated): Likewise.
12454         (do_mixed_source_and_assembly): Likewise.
12455         (do_assembly_only): Likewise.
12456         (gdb_disassembler::gdb_disassembler): New.
12457         (gdb_disassembler::print_insn): New.
12458         * disasm.h (class gdb_disassembler): New.
12459         (gdb_pretty_print_insn): Remove declaration.
12460         (gdb_disassemble_info): Likewise.
12461         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12462         (gdbscm_disasm_read_memory_worker): Update.
12463         (gdbscm_disasm_read_memory): Update.
12464         (gdbscm_disasm_memory_error): Remove.
12465         (gdbscm_disasm_print_address): Remove.
12466         (gdbscm_disassembler::gdbscm_disassembler): New.
12467         (gdbscm_print_insn_from_port): Update.
12468         * mips-tdep.c: Include disasm.h.
12469         (gdb_print_insn_mips): Update code to get gdbarch.
12470         * record-btrace.c (btrace_insn_history): Update.
12471         * spu-tdep.c: Include disasm.h.
12472         (struct spu_dis_asm_data): Remove.
12473         (struct spu_dis_asm_info): New.
12474         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12475         SPU id.
12476         (gdb_print_insn_spu): Cast disassemble_info to
12477         spu_dis_asm_info.
12478
12479 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12480
12481         * disasm.c (do_ui_file_delete): Delete.
12482         (gdb_insn_length): Move code creating stream to ...
12483         * utils.c (null_stream): ... here.  New function.
12484         * utils.h (null_stream): Declare.
12485
12486 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12487
12488         * python/py-inferior.c (find_thread_object): Return directly
12489         from the loop.  Remove "found" variable.
12490
12491 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12492
12493         GDB 7.12.1 released.
12494
12495 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12496
12497         * python/py-function.c (fnpy_call): Reorder declarations to have
12498         the gdbpy_enter object declared first.
12499         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12500
12501 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12502
12503         PR python/21068
12504         * python/python-internal.h (PyMem_RawMalloc): Define for
12505         Python < 3.4.
12506         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12507         PyMem_RawMalloc instead of PyMem_Malloc.
12508
12509 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12510             Luis Machado  <lgustavo@codesourcery.com>
12511
12512         * NEWS (New commands): Mention flash-erase.
12513         (New MI commands): Mention target-flash-erase.
12514         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12515         command.
12516         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12517         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12518         * target.c (flash_erase_command): New function.
12519         (initialize_targets): Add new flash-erase command.
12520         * target.h (flash_erase_command): New declaration.
12521
12522 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12523
12524         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12525         HAVE_SYS_PROCFS_H is defined.
12526
12527 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12528
12529         * remote.c (struct cached_reg): Change data into a pointer.
12530         * (stop_reply_dtr): Free data pointers before deleting vector.
12531         (process_stop_reply): Likewise.
12532         (remote_parse_stop_reply): Allocate space for data
12533
12534 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12535
12536         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12537         MAX_REGISTER_SIZE.
12538         (amd64_pseudo_register_read_value): Likewise.
12539         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12540         (store_register_using_P): Likewise.
12541         * regcache.c (regcache_xfer_part): Likewise.
12542
12543 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12544
12545         Split real and pseudo registers.
12546         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12547         (sparc32_pseudo_regnum): New enum.
12548         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12549         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12550         (SPARC32_CP0_REGISTERS): New macro.
12551         (sparc32_pseudo_register_name): New function.
12552         (sparc32_register_name): Use sparc32_pseudo_register_name.
12553         (sparc32_pseudo_register_type): New function.
12554         (sparc32_register_type): Use sparc32_pseudo_register_type.
12555         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12556         pseudo register numbers.
12557         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12558         (SPARC64_CP0_REGISTERS): New macro.
12559         (sparc64_pseudo_register_name): New function.
12560         (sparc64_register_name): Use sparc64_pseudo_register_name.
12561         (sparc64_pseudo_register_type): New function.
12562         (sparc64_register_type): Use sparc64_pseudo_register_type.
12563         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12564         pseudo register numbers.
12565         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12566         sparc64_store_arguments): Handle pseudo register numbers.
12567
12568 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12569
12570         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12571         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12572         output.
12573         (getpkt_or_notif_sane_1): Likewise.
12574
12575 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12576
12577         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12578         of CC.  Pass "-x c++-header" instead of "-x c".
12579
12580 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12581
12582         * remote.c (remote_can_async_p): Update comment.
12583
12584 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12585
12586         * linux-nat.c (linux_nat_can_async_p): Update comment.
12587
12588 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12589
12590         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12591
12592 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12593
12594         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12595
12596 2017-01-10  Tom Tromey  <tom@tromey.com>
12597
12598         * python/py-type.c (typy_legacy_template_argument): Update.
12599         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12600         ~demangle_parse_info): Declare new members.
12601         (cp_demangled_name_to_comp): Return unique_ptr.
12602         (cp_demangled_name_parse_free)
12603         (make_cleanup_cp_demangled_name_parse_free)
12604         (cp_new_demangle_parse_info): Remove.
12605         * cp-support.c (do_demangled_name_parse_free_cleanup)
12606         (make_cleanup_cp_demangled_name_parse_free): Remove.
12607         (inspect_type, cp_canonicalize_string_full)
12608         (cp_canonicalize_string): Update.
12609         (mangled_name_to_comp): Change return type.
12610         (cp_class_name_from_physname, method_name_from_physname)
12611         (cp_func_name, cp_remove_params): Update.
12612         * cp-name-parser.y (demangle_parse_info): New constructor, from
12613         cp_new_demangle_parse_info.
12614         (~demangle_parse_info): New destructor, from
12615         cp_demangled_name_parse_free.
12616         (cp_merge_demangle_parse_infos): Update.
12617         (cp_demangled_name_to_comp): Change return type.
12618
12619 2017-01-10  Tom Tromey  <tom@tromey.com>
12620
12621         * top.c (prevent_dont_repeat): Change return type.
12622         * python/python.c (execute_gdb_command): Use std::string.
12623         Update.
12624         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12625         * command.h (prevent_dont_repeat): Change return type.
12626         * breakpoint.c (bpstat_do_actions_1): Update.
12627
12628 2017-01-10  Tom Tromey  <tom@tromey.com>
12629
12630         * value.h (scoped_value_mark::~scoped_value_mark): Call
12631         free_to_mark.
12632         (scoped_value_mark::free_to_mark): New method.
12633         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12634         scoped_value_mark.
12635
12636 2017-01-10  Tom Tromey  <tom@tromey.com>
12637
12638         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12639         (valpy_reference_value, valpy_const_value, valpy_get_address)
12640         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12641         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12642         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12643         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12644         scoped_value_mark.
12645         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12646         * value.h (scoped_value_mark): New class.
12647
12648 2017-01-10  Tom Tromey  <tom@tromey.com>
12649
12650         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12651         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12652         * psymtab.c (discard_psymtabs_upto): Remove.
12653         (make_cleanup_discard_psymtabs): Remove.
12654         (struct psymtab_state): Remove.
12655
12656 2017-01-10  Tom Tromey  <tom@tromey.com>
12657
12658         * record-full.c (record_full_save_cleanups): Remove.
12659         (record_full_save): Use gdb::unlinker.
12660         * gcore.c (do_bfd_delete_cleanup): Remove.
12661         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12662         cleanups.
12663         * dwarf2read.c (unlink_if_set): Remove.
12664         (write_psymtabs_to_index): Use gdb::unlinker.
12665         * common/gdb_unlinker.h: New file.
12666
12667 2017-01-10  Tom Tromey  <tom@tromey.com>
12668
12669         * windows-tdep.c (windows_xfer_shared_library): Update.
12670         * windows-nat.c (windows_make_so): Update.
12671         * utils.h (make_cleanup_bfd_unref): Remove.
12672         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12673         * symfile.h (symfile_bfd_open)
12674         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12675         * symfile.c (read_symbols, symbol_file_add)
12676         (separate_debug_file_exists): Update.
12677         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12678         (generic_load, reread_symbols): Update.
12679         * symfile-mem.c (symbol_file_add_from_memory): Update.
12680         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12681         (spu_symbol_file_add_from_memory): Update.
12682         * solist.h (struct target_so_ops) <bfd_open>: Return
12683         gdb_bfd_ref_ptr.
12684         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12685         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12686         gdb_bfd_ref_ptr.
12687         (solib_map_sections, reload_shared_libraries_1): Update.
12688         * solib-svr4.c (enable_break): Update.
12689         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12690         * solib-frv.c (enable_break2): Update.
12691         * solib-dsbt.c (enable_break): Update.
12692         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12693         gdb_bfd_ref_ptr.
12694         (darwin_solib_get_all_image_info_addr_at_init): Update.
12695         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12696         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12697         * record-full.c (record_full_save): Update.
12698         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12699         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12700         * minidebug.c (find_separate_debug_file_in_section): Return
12701         gdb_bfd_ref_ptr.
12702         * machoread.c (macho_add_oso_symfile): Change abfd to
12703         gdb_bfd_ref_ptr.
12704         (macho_symfile_read_all_oso): Update.
12705         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12706         (macho_symfile_read): Update.
12707         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12708         (jit_bfd_try_read_symtab): Update.
12709         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12710         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12711         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12712         gdb_bfd_ref_ptr.
12713         (gdb_bfd_ref_policy): New struct.
12714         (gdb_bfd_ref_ptr): New typedef.
12715         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12716         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12717         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12718         gdb_bfd_ref_ptr.
12719         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12720         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12721         (gcore_command): Update.
12722         * exec.c (exec_file_attach): Update.
12723         * elfread.c (elf_symfile_read): Update.
12724         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12725         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12726         (open_and_init_dwo_file): Update.
12727         (open_dwp_file): Return gdb_bfd_ref_ptr.
12728         (open_and_init_dwp_file): Update.
12729         * corelow.c (core_open): Update.
12730         * compile/compile-object-load.c (compile_object_load): Update.
12731         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12732         * coffread.c (coff_symfile_read): Update.
12733         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12734         gdb_bfd_ref_ptr.  Rename.
12735         (dump_bfd_file, restore_command): Update.
12736         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12737         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12738         (find_separate_debug_file_by_buildid): Update.
12739
12740 2017-01-10  Tom Tromey  <tom@tromey.com>
12741
12742         * common/gdb_ref_ptr.h: New file.
12743         * python/py-ref.h (struct gdbpy_ref_policy): New.
12744         (gdbpy_ref): Now a typedef.
12745
12746 2017-01-10  Tom Tromey  <tom@tromey.com>
12747
12748         * utils.h (make_cleanup_htab_delete): Don't declare.
12749         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12750         Remove.
12751         * linespec.c (decode_compound_collector): Add constructor,
12752         destructor.
12753         (lookup_prefix_sym): Remove cleanup.
12754         (symtab_collector): Add constructor, destructor.
12755         (collect_symtabs_from_filename): Remove cleanup.
12756         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12757         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12758         Use htab_up.
12759         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12760         * dwarf2read.c (dw2_expand_symtabs_matching)
12761         (dw2_map_symbol_filenames, dwarf_decode_macros)
12762         (write_psymtabs_to_index): Use htab_up.
12763         * dwarf2loc.c (func_verify_no_selftailcall)
12764         (call_site_find_chain_1, func_verify_no_selftailcall)
12765         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12766         std::vector, gdb::unique_xmalloc_ptr.
12767         (call_sitep): Remove typedef.
12768         (dwarf2_locexpr_baton_eval): Remove unused variable.
12769
12770 2017-01-10  Tom Tromey  <tom@tromey.com>
12771
12772         * python/python-internal.h (make_cleanup_py_decref)
12773         (make_cleanup_py_xdecref): Don't declare.
12774         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12775         (py_xdecref, make_cleanup_py_xdecref): Remove.
12776
12777 2017-01-10  Tom Tromey  <tom@tromey.com>
12778
12779         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12780         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12781
12782 2017-01-10  Tom Tromey  <tom@tromey.com>
12783
12784         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12785
12786 2017-01-10  Tom Tromey  <tom@tromey.com>
12787
12788         * python/py-utils.c (unicode_to_encoded_string)
12789         (python_string_to_target_string)
12790         (python_string_to_target_python_string)
12791         (python_string_to_host_string, gdbpy_obj_to_string)
12792         (get_addr_from_python): Use gdbpy_ref.
12793
12794 2017-01-10  Tom Tromey  <tom@tromey.com>
12795
12796         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12797         gdbpy_ref.
12798
12799 2017-01-10  Tom Tromey  <tom@tromey.com>
12800
12801         * python/python.c (eval_python_command, gdbpy_decode_line)
12802         (gdbpy_run_events, gdbpy_start_type_printers)
12803         (gdbpy_apply_type_printers): Use gdbpy_ref.
12804
12805 2017-01-10  Tom Tromey  <tom@tromey.com>
12806
12807         * python/py-param.c (get_doc_string, compute_enum_values): Use
12808         gdbpy_ref.
12809
12810 2017-01-10  Tom Tromey  <tom@tromey.com>
12811
12812         * python/py-inferior.c (find_thread_object, build_inferior_list):
12813         Use gdbpy_ref.
12814
12815 2017-01-10  Tom Tromey  <tom@tromey.com>
12816
12817         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12818
12819 2017-01-10  Tom Tromey  <tom@tromey.com>
12820
12821         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12822         gdbpy_ref.
12823
12824 2017-01-10  Tom Tromey  <tom@tromey.com>
12825
12826         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12827         extra incref.
12828         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12829         Use gdbpy_ref.
12830
12831 2017-01-10  Tom Tromey  <tom@tromey.com>
12832
12833         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12834         gdbpy_ref.
12835
12836 2017-01-10  Tom Tromey  <tom@tromey.com>
12837
12838         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12839         decref results of PyArg_ParseTupleAndKeywords.
12840
12841 2017-01-10  Tom Tromey  <tom@tromey.com>
12842
12843         * python/python.c (python_run_simple_file): Use
12844         unique_xmalloc_ptr, gdbpy_ref.
12845
12846 2017-01-10  Tom Tromey  <tom@tromey.com>
12847
12848         * python/py-prettyprint.c (print_stack_unless_memory_error)
12849         (print_string_repr, print_children): Use gdbpy_ref.
12850         (dummy_python_frame): New class.
12851         (dummy_python_frame::dummy_python_frame): Rename from
12852         push_dummy_python_frame.
12853         (py_restore_tstate): Remove.
12854
12855 2017-01-10  Tom Tromey  <tom@tromey.com>
12856
12857         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12858
12859 2017-01-10  Tom Tromey  <tom@tromey.com>
12860
12861         * python/python.c (ensure_python_env, restore_python_env):
12862         Remove.
12863         * python/python-internal.h (ensure_python_env): Don't declare.
12864         * varobj.h (varobj_ensure_python_env): Don't declare.
12865         * varobj.c (varobj_ensure_python_env): Remove.
12866
12867 2017-01-10  Tom Tromey  <tom@tromey.com>
12868
12869         * varobj.c (varobj_value_get_print_value): Use
12870         gdbpy_enter_varobj.
12871
12872 2017-01-10  Tom Tromey  <tom@tromey.com>
12873
12874         * python/py-prettyprint.c (print_string_repr, print_children):
12875         Update.
12876         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12877         of "encoding".
12878         * varobj.c (varobj_value_get_print_value): Update.
12879         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12880
12881 2017-01-10  Tom Tromey  <tom@tromey.com>
12882
12883         * varobj.c (varobj_get_display_hint)
12884         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12885         (varobj_set_visualizer, free_variable): Use
12886         gdbpy_enter_varobj.
12887
12888 2017-01-10  Tom Tromey  <tom@tromey.com>
12889
12890         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12891         (do_finish_initialization): New function.  Use gdbpy_ref.
12892         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12893         do_finish_initialization.
12894
12895 2017-01-10  Tom Tromey  <tom@tromey.com>
12896
12897         * python/py-param.c (get_set_value, get_show_value): Use
12898         gdbpy_enter, gdbpy_ref.
12899
12900 2017-01-10  Tom Tromey  <tom@tromey.com>
12901
12902         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12903
12904 2017-01-10  Tom Tromey  <tom@tromey.com>
12905
12906         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12907
12908 2017-01-10  Tom Tromey  <tom@tromey.com>
12909
12910         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12911         Use gdbpy_enter_varobj.
12912
12913 2017-01-10  Tom Tromey  <tom@tromey.com>
12914
12915         * varobj.c (gdbpy_enter_varobj): New constructor.
12916         * python/python-internal.h (gdbpy_enter_varobj): New class.
12917         * python/py-varobj.c (py_varobj_get_iterator): Use
12918         gdbpy_enter_varobj.
12919
12920 2017-01-10  Tom Tromey  <tom@tromey.com>
12921
12922         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12923         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12924         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12925         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12926         unique_xmalloc_ptr.
12927         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12928
12929 2017-01-10  Tom Tromey  <tom@tromey.com>
12930
12931         * python/py-xmethods.c (invoke_match_method): Use
12932         gdbpy_ref.
12933
12934 2017-01-10  Tom Tromey  <tom@tromey.com>
12935
12936         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12937         gdbpy_enter, gdbpy_ref.
12938
12939 2017-01-10  Tom Tromey  <tom@tromey.com>
12940
12941         * python/python.c (python_interactive_command): Use gdbpy_enter.
12942
12943 2017-01-10  Tom Tromey  <tom@tromey.com>
12944
12945         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12946         gdbpy_ref.
12947
12948 2017-01-10  Tom Tromey  <tom@tromey.com>
12949
12950         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12951         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12952
12953 2017-01-10  Tom Tromey  <tom@tromey.com>
12954
12955         * utils.h (htab_deleter): New struct.
12956         (htab_up): New typedef.
12957         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12958         gdbpy_enter, gdbpy_ref, htab_up.
12959
12960 2017-01-10  Tom Tromey  <tom@tromey.com>
12961
12962         * python/py-unwind.c (pending_frame_invalidate): Remove.
12963         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12964
12965 2017-01-10  Tom Tromey  <tom@tromey.com>
12966
12967         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12968         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12969
12970 2017-01-10  Tom Tromey  <tom@tromey.com>
12971
12972         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12973
12974 2017-01-10  Tom Tromey  <tom@tromey.com>
12975
12976         * python/python.c (gdbpy_eval_from_control_command)
12977         (gdbpy_source_script, gdbpy_run_events)
12978         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12979         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12980         gdbpy_enter.
12981
12982 2017-01-10  Tom Tromey  <tom@tromey.com>
12983
12984         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12985
12986 2017-01-10  Tom Tromey  <tom@tromey.com>
12987
12988         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12989
12990 2017-01-10  Tom Tromey  <tom@tromey.com>
12991
12992         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12993         (python_on_inferior_call_pre, python_on_inferior_call_post)
12994         (python_on_memory_change, python_on_register_change)
12995         (python_inferior_exit, python_new_objfile, add_thread_object)
12996         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12997
12998 2017-01-10  Tom Tromey  <tom@tromey.com>
12999
13000         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13001         (bpfinishpy_handle_exit): Use gdbpy_enter.
13002
13003 2017-01-10  Tom Tromey  <tom@tromey.com>
13004
13005         * python/py-cmd.c (cmdpy_destroyer)
13006         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13007         gdbpy_enter.
13008
13009 2017-01-10  Tom Tromey  <tom@tromey.com>
13010
13011         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13012         gdbpy_enter.
13013         (gdbpy_breakpoint_has_cond): Likewise.
13014
13015 2017-01-10  Tom Tromey  <tom@tromey.com>
13016
13017         * python/python.c (gdbpy_enter): New constructor.
13018         (~gdbpy_enter): New destructor.
13019         (restore_python_env, ensure_python_env): Rewrite.
13020         * python/python-internal.h (gdbpy_enter): New class.
13021
13022 2017-01-10  Tom Tromey  <tom@tromey.com>
13023
13024         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13025
13026 2017-01-10  Tom Tromey  <tom@tromey.com>
13027
13028         * python/py-value.c (value_has_field, get_field_flag)
13029         (get_field_type, valpy_getitem, convert_value_from_python): Use
13030         gdbpy_ref.
13031
13032 2017-01-10  Tom Tromey  <tom@tromey.com>
13033
13034         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13035         gdbpy_ref.
13036
13037 2017-01-10  Tom Tromey  <tom@tromey.com>
13038
13039         * python/py-prettyprint.c (search_pp_list)
13040         (find_pretty_printer_from_objfiles)
13041         (find_pretty_printer_from_progspace)
13042         (find_pretty_printer_from_gdb, find_pretty_printer)
13043         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13044         gdbpy_ref.
13045
13046 2017-01-10  Tom Tromey  <tom@tromey.com>
13047
13048         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13049
13050 2017-01-10  Tom Tromey  <tom@tromey.com>
13051
13052         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13053         (ltpy_get_all_source_lines): Use gdbpy_ref.
13054
13055 2017-01-10  Tom Tromey  <tom@tromey.com>
13056
13057         * python/py-framefilter.c (extract_sym, extract_value)
13058         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13059         gdbpy_ref.
13060
13061 2017-01-10  Tom Tromey  <tom@tromey.com>
13062
13063         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13064
13065 2017-01-10  Tom Tromey  <tom@tromey.com>
13066
13067         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13068
13069 2017-01-10  Tom Tromey  <tom@tromey.com>
13070
13071         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13072         gdbpy_ref.
13073
13074 2017-01-10  Tom Tromey  <tom@tromey.com>
13075
13076         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13077
13078 2017-01-10  Tom Tromey  <tom@tromey.com>
13079
13080         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13081         (typy_range): Use gdbpy_ref.
13082
13083 2017-01-10  Tom Tromey  <tom@tromey.com>
13084
13085         * python/py-threadevent.c (create_thread_event_object): Use
13086         gdbpy_ref.
13087         * python/py-stopevent.c (create_stop_event_object): Simplify.
13088         (emit_stop_event): Use gdbpy_ref.
13089         * python/py-signalevent.c (create_signal_event_object): Use
13090         gdbpy_ref.
13091         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13092         (emit_new_objfile_event, create_clear_objfiles_event_object)
13093         (emit_clear_objfiles_event): Use gdbpy_ref.
13094         * python/py-infevents.c (create_inferior_call_event_object)
13095         (create_register_changed_event_object)
13096         (create_memory_changed_event_object, emit_inferior_call_event)
13097         (emit_memory_changed_event, emit_register_changed_event): Use
13098         gdbpy_ref.
13099         * python/py-exitedevent.c (create_exited_event_object)
13100         (emit_exited_event): Use gdbpy_ref.
13101         * python/py-event.h (evpy_emit_event): Remove
13102         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13103         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13104         * python/py-continueevent.c (emit_continue_event): Use
13105         gdbpy_ref.
13106         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13107         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13108         gdbpy_ref.
13109         * python/py-bpevent.c (create_breakpoint_event_object): Use
13110         gdbpy_ref.
13111
13112 2017-01-10  Tom Tromey  <tom@tromey.com>
13113
13114         * python/py-ref.h: New file.
13115
13116 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13117
13118         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13119         void.
13120         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13121         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13122         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13123         * ui-out.c (ui_out::redirect): Likewise.
13124         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13125         * cli/cli-logging.c (set_logging_redirect): Update call site of
13126         ui_out::redirect.
13127         (handle_redirections): Likewise.
13128         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13129         * top.c (execute_command_to_string): Likewise.
13130         * utils.c (do_ui_out_redirect_pop): Likewise.
13131
13132 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13133
13134         * stack.c (_initialize_stack): Update "frame" command help message.
13135
13136 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13137
13138         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13139
13140 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13141
13142         * x86-linux-nat.h: Include gdb_proc_service.h.
13143
13144 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13145
13146         * ser-base.h: Include serial.h.
13147
13148 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13149
13150         * ppc-linux-tdep.h: Include ppc-tdep.h.
13151
13152 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13153
13154         * nat/amd64-linux-siginfo.h: Include signal.h.
13155
13156 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13157
13158         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13159
13160 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13161
13162         * mi/mi-parse.h: Include mi-cmds.h.
13163
13164 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13165
13166         * inf-loop.c: Don't include "target.h".
13167         * inf-loop.h: Include it here.
13168
13169 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13170
13171         * dfp.h: Include "dboulest.h" and "expression.h".
13172
13173 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13174
13175         * ax-gdb.h: Include "ax.h".
13176
13177 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13178
13179         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13180         with nat/gdb_ptrace.h.
13181
13182 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13183
13184         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13185         new line.
13186         (mips64_fbsd_sigframe_init): Likewise.
13187
13188 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13189
13190         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13191         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13192
13193 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13194
13195         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13196         * NEWS: Mention new FreeBSD/mips native configuration.
13197         * config/mips/fbsd.mh: New file.
13198         * configure.host: Add mips*-*-freebsd*.
13199         * mips-fbsd-nat.c: New file.
13200
13201 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13202
13203         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13204         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13205         * NEWS: Mention new FreeBSD/mips target.
13206         * configure.tgt: Add mips*-*-freebsd*.
13207         * mips-fbsd-tdep.c: New file.
13208         * mips-fbsd-tdep.h: New file.
13209
13210 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13211
13212         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13213         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13214
13215 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13216
13217         Update copyright year range in all GDB files.
13218
13219 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13220
13221         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13222
13223 For older changes see ChangeLog-2016.
13224 \f
13225 Local Variables:
13226 mode: change-log
13227 left-margin: 8
13228 fill-column: 74
13229 version-control: never
13230 coding: utf-8
13231 End: