Remove cleanups from disasm.c
[external/binutils.git] / gdb / ChangeLog
1 2017-10-17  Tom Tromey  <tom@tromey.com>
2
3         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5         (do_mixed_source_and_assembly): Likewise.
6
7 2017-10-17  Tom Tromey  <tom@tromey.com>
8
9         * regcache.c (regcache::xfer_part): Remove assertion.
10
11 2017-10-17  Pedro Alves  <palves@redhat.com>
12
13         * xml-support.c (xml_fetch_content_from_file): Call
14         unique_ptr::release() instead unique_ptr::get() when passing
15         through xrealloc.
16
17 2017-10-17  Yao Qi  <yao.qi@linaro.org>
18
19         * regcache.c (regcache::xfer_part): Remove parameters read and
20         write, add parameter is_raw.  All callers are updated.
21
22 2017-10-16  Keith Seitz  <keiths@redhat.com>
23
24         * c-typeprint.c (enum access_specifier): Moved here from
25         c_type_print_base.
26         (output_access_specifier): New function.
27         (c_type_print_base): Consider typedefs when assessing
28         whether access labels are needed.
29         Use output_access_specifier as needed.
30         Output access specifier for typedefs, if needed.
31         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
32         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
33         fields.
34         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
35         accessor macros.
36
37 2017-10-16  Tom Tromey  <tom@tromey.com>
38
39         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
40         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
41         * target.c (target_fileio_read_stralloc): Update.
42         * sparc64-tdep.c (adi_is_addr_mapped): Update.
43         * target.h (target_fileio_read_stralloc): Return
44         unique_xmalloc_ptr.
45
46 2017-10-16  Tom Tromey  <tom@tromey.com>
47
48         * xml-syscall.c (xml_init_syscalls_info): Update.
49         * xml-support.c (xinclude_start_include): Update.
50         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
51         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
52         (xml_fetch_content_from_file): Likewise.
53         * osdata.c (get_osdata): Update.
54         * target.h (target_read_stralloc, target_get_osdata): Return
55         unique_xmalloc_ptr.
56         * solib-aix.c (solib_aix_get_library_list): Update.
57         * solib-target.c (solib_target_current_sos): Update.
58         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
59         * xml-tdesc.c (fetch_available_features_from_target): Update.
60         (target_fetch_description_xml): Update.
61         (file_read_description_xml): Update.
62         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
63         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
64         (remote_pid_to_exec_file): Update.
65         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
66         (target_get_osdata): Likewise.
67
68 2017-10-16  Tom Tromey  <tom@tromey.com>
69
70         * remote.c (remote_register_number_and_offset): Use std::vector.
71         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
72         (putpkt_binary): Use gdb::def_vector.
73         (compare_sections_command): Use gdb::byte_vector.
74
75 2017-10-16  Tom Tromey  <tom@tromey.com>
76
77         * ppc-linux-nat.c (hwdebug_insert_point): Use
78         gdb::unique_xmalloc_ptr, XDUP.
79
80 2017-10-16  Tom Tromey  <tom@tromey.com>
81
82         * probe.c (parse_probes): Use std::string.
83         (info_probes_for_ops, enable_probes_command)
84         (disable_probes_command): Remove cleanups.
85
86 2017-10-16  Tom Tromey  <tom@tromey.com>
87
88         * buildsym.c (block_compar): Remove.
89         (end_symtab_get_static_block): Use std::vector.
90
91 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
92
93         * memrange.h (struct mem_range): Define operator< and operator==.
94         (mem_range_s): Remove.
95         (DEF_VEC_O (mem_range_s)): Remove.
96         (normalize_mem_ranges): Change parameter type to std::vector.
97         * memrange.c (compare_mem_ranges): Remove.
98         (normalize_mem_ranges): Change parameter type to std::vector,
99         adjust to vector change.
100         * exec.c (section_table_available_memory): Return vector, remove
101         parameter.
102         (section_table_read_available_memory): Adjust to std::vector
103         change.
104         * remote.c (remote_read_bytes): Adjust to std::vector
105         change.
106         * tracepoint.h (traceframe_available_memory): Change parameter
107         type to std::vector.
108         * tracepoint.c (traceframe_available_memory): Change parameter
109         type to std::vector, adjust.
110         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
111         std::vector change.
112         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
113         unittests/memrange-selftests.c.
114         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
115         * gdb/unittests/memrange-selftests.c: New file.
116
117 2017-10-16  Pedro Alves  <palves@redhat.com>
118
119         * elfread.c (probe_key_free): Rename range-for variable.
120         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
121         (find_probe_by_pc, collect_probes): Rename range-for variable.
122
123 2017-10-16  Yao Qi  <yao.qi@linaro.org>
124
125         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
126         * features/tic6x-c62x.c: Remove.
127         * features/tic6x-c64x-linux.c: Remove.
128         * features/tic6x-c64x.c: Remove.
129         * features/tic6x-c64xp-linux.c: Remove.
130         * features/tic6x-c64xp.c: Remove.
131         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
132         initialize_tdesc_tic6x_*_linux functions.
133         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
134         initialize_tdesc_tic6x_* functions.
135
136 2017-10-16  Yao Qi  <yao.qi@linaro.org>
137
138         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
139         tic6x-c62x.
140         * regformats/tic6x-c62x.dat: Remove.
141         * regformats/tic6x-c64x.dat: Remove.
142         * regformats/tic6x-c64xp.dat: Remove.
143
144 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
145
146         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
147         (the !HAVE_LIBEXPAT version).
148
149 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
150
151         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
152         const.
153
154 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
155
156         * target.h: Include tracepoint.h.
157         (enum trace_find_type): Move to tracepoint.h.
158         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
159         * tracepoint.h: Don't include target.h
160         (enum trace_find_type): Move from target.h.
161         (parse_traceframe_info): Return a unique ptr.
162         * tracepoint.c (current_traceframe_info): Change type to unique
163         ptr.
164         (free_traceframe_info): Remove.
165         (clear_traceframe_info): Don't manually free
166         current_traceframe_info.
167         (free_result): Remove.
168         (parse_traceframe_info): Return a unique ptr.
169         (get_traceframe_info): Adjust to unique ptr.
170         * ctf.c (ctf_traceframe_info): Return a unique ptr.
171         * remote.c (remote_traceframe_info): Return a unique ptr.
172         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
173         ptr.
174         * target-debug.h (target_debug_print_traceframe_info_up): New
175         macro.
176         * target-delegates.c: Regenerate.
177
178 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
179
180         * memrange.h (struct mem_range): Add constructors.
181         * tracepoint.h (struct traceframe_info) <memory>: Change type to
182         std::vector<mem_range>.
183         * tracepoint.c (free_traceframe_info): Don't manually free
184         vector.
185         (traceframe_info_start_memory): Adjust to vector change.
186         (traceframe_available_memory): Likewise.
187         * tracefile-tfile.c (build_traceframe_info): Likewise.
188         * ctf.c (ctf_traceframe_info): Likewise.
189
190 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
191
192         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
193         std::vector<int>.
194         * tracepoint.c (free_traceframe_info): Deallocate with delete.
195         (traceframe_info_start_tvar): Adjust to vector change.
196         (parse_traceframe_info): Allocate with new.
197         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
198         vector change.
199         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
200         change.
201         tfile_traceframe_info): Allocate with new.
202         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
203         change.
204
205 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
206
207         * tracepoint.c (traceframe_info): Rename to...
208         (current_traceframe_info): ...this.
209         (clear_traceframe_info): Adjust.
210         (get_traceframe_info): Adjust.
211
212 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
213
214         * nat/linux-osdata.c: Include algorithm.
215         (compare_processes): Remove.
216         (struct pid_pgid_entry): New struct.
217         (linux_xfer_osdata_processgroups): Use std::vector instead of
218         XNEWVEC.
219
220 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
221
222         * objfiles.h: Don't include symfile.h.
223         (struct partial_symbol): Remove forward-declaration.
224         (struct objfile) <global_psymbols, static_psymbols>: Change type
225         to std::vector<partial_symbol *>.
226         * objfiles.c (objfile::objfile): Don't memset those fields.
227         (objfile::~objfile): Don't free those fields.
228         * psympriv.h (struct psymbol_allocation_list): Remove
229         forward-declaration.
230         (add_psymbol_to_list): Change psymbol_allocation_list parameter
231         to std::vector.
232         (start_psymtab_common): Change parameters to std::vector.
233         * psymtab.c: Include algorithm.
234         (require_partial_symbols): Call shrink_to_fit.
235         (find_pc_sect_psymbol): Adjust to vector change.
236         (match_partial_symbol): Likewise.
237         (lookup_partial_symbol): Likewise.
238         (psym_relocate): Likewise.
239         (dump_psymtab): Likewise.
240         (recursively_search_psymtabs): Likewise.
241         (compare_psymbols): Remove.
242         (sort_pst_symbols): Adjust to vector change.
243         (start_psymtab_common): Likewise.
244         (end_psymtab_common): Likewise.
245         (psymbol_bcache_full): De-constify return value.
246         (add_psymbol_to_bcache): Likewise.
247         (extend_psymbol_list): Remove.
248         (append_psymbol_to_list): Adjust to vector change.
249         (add_psymbol_to_list): Likewise.
250         (init_psymbol_list): Likewise.
251         (maintenance_info_psymtabs): Likewise.
252         (maintenance_check_psymtabs): Likewise.
253         * symfile.h (struct psymbol_allocation_list): Remove.
254         * symfile.c (reread_symbols): Adjust to vector change.
255         * dbxread.c (start_psymtab): Change type of parameters.
256         (dbx_symfile_read): Adjust to vector change.
257         (read_dbx_symtab): Likewise.
258         (start_psymtab): Change type of parameters.
259         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
260         (create_partial_symtab): Likewise.
261         (add_partial_symbol): Likewise.
262         (write_one_signatured_type): Likewise.
263         (recursively_write_psymbols): Likewise.
264         * mdebugread.c (parse_partial_symbols): Likewise.
265         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
266         (scan_xcoff_symtab): Adjust to vector change.
267         (xcoff_initial_scan): Likewise.
268
269 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
270
271         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
272
273 2017-10-13  Yao Qi  <yao.qi@linaro.org>
274
275         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
276         Remove s390x-*-expedite, add s390x-expedite.
277
278 2017-10-13  Yao Qi  <yao.qi@linaro.org>
279
280         * features/s390-gs-linux64.c: Regenerated.
281         * features/s390x-gs-linux64.c: Regenerated.
282
283 2017-10-13  Tom Tromey  <tom@tromey.com>
284
285         * compile/compile-object-run.c (do_module_cleanup): Use delete.
286         * solib.c (update_solib_list, reload_shared_libraries_1): Use
287         delete.
288         * symfile.c (symbol_file_add_with_addrs): Use new.
289         (symbol_file_add_separate): Update comment.
290         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
291         * jit.c (jit_object_close_impl): Use new.
292         (jit_unregister_code): Use delete.
293         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
294         (~objfile): Rename from free_objfile.
295         (free_objfile_separate_debug, do_free_objfile_cleanup)
296         (free_all_objfiles, objfile_purge_solibs): Use delete.
297         * objfiles.h (struct objfile): Add constructor and destructor.
298         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
299         (allocate_objfile, free_objfile): Don't declare.
300         (struct objstats): Add initializers.
301
302 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
303
304         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
305         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
306         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
307         * gdbarch.h: Regenerate.
308         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
309         Adjust comment.
310         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
311         (i386_displaced_step_fixup): Adjust comment.
312         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
313
314 2017-10-12  Tom Tromey  <tom@tromey.com>
315
316         * prologue-value.h (pv_area::store_would_trash): Return bool.
317         (pv_area::find_reg): Likewise.
318         * prologue-value.c (pv_area::store_would_trash): Return bool.
319         (pv_area::find_reg): Likewise.
320
321 2017-10-12  Tom Tromey  <tom@tromey.com>
322
323         * s390-linux-tdep.c (s390_store, s390_load)
324         (s390_check_for_saved, s390_analyze_prologue): Update.
325         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
326         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
327         * prologue-value.h (class pv_area): Move from prologue-value.c.
328         Change names of members.  Add constructor, destructor, member
329         functions.
330         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
331         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
332         (pv_area_fetch, pv_area_scan): Don't declare.
333         * prologue-value.c (struct pv_area::area_entry): Now member of
334         pv_area.
335         (struct pv_area): Move to prologue-value.h.
336         (pv_area::pv_area): Rename from make_pv_area.
337         (pv_area::~pv_area): Rename from free_pv_area.
338         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
339         (clear_entries, find_entry, overlaps, store_would_trash, store)
340         (fetch, find_reg, scan): Now member of pv_area.
341         Remove "area" argument.  Update.
342         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
343         Update.
344         * mn10300-tdep.c (push_reg, check_for_saved)
345         (mn10300_analyze_prologue): Update.
346         * mep-tdep.c (is_arg_spill, check_for_saved)
347         (mep_analyze_prologue): Update.
348         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
349         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
350         (m32c_is_struct_return, m32c_analyze_prologue): Update.
351         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
352         Update.
353         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
354         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
355
356 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
357
358         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
359         * linux-nat.c (linux_nat_delete_thread): New variable.
360         (lwp_free): Invoke linux_nat_delete_thread if set.
361         (linux_nat_set_delete_thread): New function.
362         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
363         thread delete callback.
364         * arm-linux-nat.c (arm_linux_delete_thread): New function.
365         (_initialize_arm_linux_nat): Assign thread delete callback.
366         * s390-linux-nat.c (s390_delete_thread): New function.
367         (_initialize_s390_nat): Assign thread delete callback.
368         * x86-linux-nat.c (x86_linux_add_target): Likewise.
369         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
370         function.
371         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
372         declaration.
373         * nat/x86-linux.c (x86_linux_delete_thread): New function.
374         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
375
376 2017-10-09  Tom Tromey  <tom@tromey.com>
377
378         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
379         std::string.
380         * tui/tui-layout.c (enum tui_status): Use std::string.
381
382 2017-10-11  Tom Tromey  <tom@tromey.com>
383
384         * gdbthread.h (thread_command): Constify.
385         * inferior.h (detach_command): Constify.
386         * top.h (set_history, show_history): Constify.
387         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
388         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
389         * bsd-kvm.c (bsd_kvm_cmd): Constify.
390         * printcmd.c (set_command): Constify.
391         (non_const_set_command): New function.
392         * dcache.c (set_dcache_command, show_dcache_command): Constify.
393         * breakpoint.c (enable_command, disable_command, delete_command)
394         (catch_command, tcatch_command, set_breakpoint_cmd)
395         (show_breakpoint_cmd): Constify.
396         * macrocmd.c (macro_command): Constify.
397         * infcmd.c (unset_command, kill_command, detach_command)
398         (info_proc_cmd): Constify.
399         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
400         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
401         (info_auto_load_cmd): Constify.
402         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
403         (unset_tdesc_cmd): Constify.
404         * ada-lang.c (set_ada_command, show_ada_command)
405         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
406         * guile/guile.c (set_guile_command, show_guile_command)
407         (info_guile_command): Constify.
408         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
409         Constify.
410         * skip.c (skip_command): Constify.
411         * compile/compile.c (_initialize_compile): Constify.
412         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
413         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
414         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
415         (maint_btrace_pt_show_cmd): Constify.
416         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
417         Constify.
418         * python/python.c (user_show_python, user_set_python): Constify.
419         * mips-tdep.c (set_mips_command, show_mips_command)
420         (set_mipsfpu_command): Constify.
421         * record-btrace.c (cmd_record_btrace_start)
422         (cmd_set_record_btrace, cmd_show_record_btrace)
423         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
424         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
425         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
426         Constify.
427         * symfile.c (overlay_command): Constify.
428         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
429         * cli/cli-logging.c (set_logging_command, show_logging_command):
430         Constify.
431         * cli/cli-dump.c (dump_command, append_command)
432         (srec_dump_command, ihex_dump_command, verilog_dump_command)
433         (tekhex_dump_command, binary_dump_command)
434         (binary_append_command): Constify.
435         * cli/cli-decode.c (struct cmd_list_element): Change type of
436         "fun".
437         * cli/cli-cmds.c (info_command, show_command, set_debug)
438         (show_debug): Constify.
439         (show_command): Add non-const overload.
440         * top.c (set_history, show_history): Constify.
441         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
442         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
443         * target.c (target_command): Constify.
444         * sparc64-tdep.c (info_adi_command): Constify.
445         * record-full.c (cmd_record_full_start): Constify.
446         (set_record_full_command): Constify.  Fix typo.
447         (show_record_full_command): Constify.
448         * thread.c (thread_command, thread_apply_command): Constify.
449         * memattr.c (dummy_cmd): Constify.
450         * value.c (function_command): Constify.
451         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
452         * probe.c (info_probes_command): Constify.
453         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
454         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
455         (show_thread_cmd, set_thread_default_cmd)
456         (show_thread_default_cmd): Constify.
457         (check_empty): Constify.
458         * tracepoint.c (tfind_command): Constify.
459         * cp-support.c (maint_cplus_command): Constify.
460         * windows-tdep.c (info_w32_command): Constify.
461         * record.c (cmd_record_start, set_record_command)
462         (show_record_command, info_record_command, cmd_record_goto):
463         Constify.
464         * ravenscar-thread.c (set_ravenscar_command)
465         (show_ravenscar_command): Constify.
466         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
467         Constify.
468         (add_internal_problem_command): Remove casts.
469         * arc-tdep.c (maintenance_print_arc_command): Constify.
470         * valprint.c (set_print, show_print, set_print_raw)
471         (show_print_raw): Constify.
472         * maint.c (maintenance_command, maintenance_info_command)
473         (maintenance_print_command, maintenance_set_cmd)
474         (maintenance_show_cmd, set_per_command_cmd)
475         (show_per_command_cmd, maintenance_check_command): Constify.
476         * language.c (set_check, show_check): Constify.
477         * typeprint.c (show_print_type, set_print_type): Constify.
478         * go32-nat.c (go32_info_dos_command): Constify.
479
480 2017-10-11  Tom Tromey  <tom@tromey.com>
481
482         * breakpoint.c (prepare_re_set_context): Remove.
483         (breakpoint_re_set_one): Update.  Don't use cleanups.
484         (breakpoint_re_set): Use scoped_restore, std::string, and
485         scoped_restore_current_language.
486
487 2017-10-11  Tom Tromey  <tom@tromey.com>
488
489         * breakpoint.c (commands_command_1): Use std::string.
490         (cleanup_executing_breakpoints): Remove.
491         (bpstat_do_actions_1): Use scoped_restore.
492         (bpstat_check_watchpoint): Use std::string.
493         (decode_static_tracepoint_spec): Likewise.
494         (break_range_command): Likewise.
495         (watch_command_1): Likewise.
496         (compare_breakpoints): Change argument types.
497         (clear_command): Use std::vector.
498         (cleanup_executing_breakpoints): Remove.
499         (update_global_location_list): Use unique_xmalloc_ptr.
500         (strace_command): Remove unused declaration.
501
502 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
503
504         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
505         * NEWS: Mention new FreeBSD/arm native configuration.
506         * configure.host: Add arm*-*-freebsd*.
507         * configure.nat: Likewise.
508         * arm-fbsd-nat.c: New file.
509
510 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
511
512         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
513         (ALLDEPFILES): Add arm-fbsd-tdep.c.
514         * NEWS: Mention new FreeBSD/arm target.
515         * configure.tgt: Add arm*-*-freebsd*.
516         * arm-fbsd-tdep.c: New file.
517         * arm-fbsd-tdep.h: New file.
518
519 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
520
521         * linux-tdep.c (linux_make_corefile_notes): Remove call to
522         `gdbarch_elfcore_write_linux_prpsinfo'.
523         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
524         method.
525         (elf_internal_linux_prpsinfo): Remove declaration.
526         * gdbarch.h: Regenerate.
527         * gdbarch.c: Regenerate.
528
529 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
530
531         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
532         `set_gdbarch_elfcore_write_linux_prpsinfo'.
533
534 2017-10-11  Pedro Alves  <palves@redhat.com>
535
536         * breakpoint.c (reattach_breakpoints): Delete.
537         * breakpoint.h (reattach_breakpoints): Delete.
538
539 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
540
541         * symfile.c (registered_sym_fns): Make struct, not typedef.
542         (DEF_VEC_O (registered_sym_fns)): Remove.
543         (symtab_fns): Change type to std::vector.
544         (add_symtab_fns): Adjust.
545         (find_sym_fns): Adjust.
546
547 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
548
549         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
550         * arc-tdep.h (arc_arch_is_em): New function.
551         (arc_arch_is_hs): Likewise.
552
553 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
554
555         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
556         parentheses in the declaration.
557         (macro_lookup_inclusion): Likewise.
558         (macro_lookup_definition): Likewise.
559         * p-lang.h (pascal_builtin_types): Likewise.
560         * tui/tui-data.c (tui_win_list): Likewise.
561         * tui/tui-data.h (tui_win_list): Likewise.
562         * utils.h (make_cleanup_free_section_addr_info): Likewise.
563
564 2017-10-11  Mark Rages  <markrages@gmail.com>
565
566         * target-memory.c (block_boundaries): Fix for block address not
567         aligned on block size.
568
569 2017-10-10  Pedro Alves <palves@redhat.com>
570             Tom Tromey  <tom@tromey.com>
571
572         * breakpoint.c (struct captured_breakpoint_query_args)
573         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
574         (print_breakpoint): New.
575         * breakpoint.h (print_breakpoint): Declare.
576         * common/common-exceptions.h (enum return_reason): Remove
577         references to catch_exceptions.
578         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
579         Delete.
580         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
581         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
582         * gdb.h: Delete.
583         * gdbthread.h (thread_select): Declare.
584         * mi/mi-cmd-break.c: Don't include gdb.h.
585         (breakpoint_notify): Use print_breakpoint.
586         * mi/mi-cmd-catch.c: Don't include gdb.h.
587         * mi/mi-interp.c: Don't include gdb.h.
588         (mi_print_breakpoint_for_event): New.
589         (mi_breakpoint_created, mi_breakpoint_modified): Use
590         mi_print_breakpoint_for_event.
591         * mi/mi-main.c: Don't include gdb.h.
592         (mi_cmd_thread_select): Parse the global thread ID here.  Use
593         thread_select instead of gdb_thread_select.
594         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
595         of using gdb_list_thread_ids.
596         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
597         FILEIO_ENOSYS here.
598         (remote_fileio_request): Use TRY/CATCH instead of
599         catch_exceptions.
600         * symfile-mem.c (struct symbol_file_add_from_memory_args)
601         (symbol_file_add_from_memory_wrapper): Delete.
602         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
603         * thread.c: Don't include gdb.h.
604         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
605         (thread_alive): Use thread_select.
606         (do_captured_thread_select): Delete, parts salvaged as ...
607         (thread_select): ... this new function.
608         (gdb_thread_select): Delete.
609
610 2017-10-10  Pedro Alves  <palves@redhat.com>
611             Tom Tromey  <tom@tromey.com>
612
613         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
614         and reverse logic.
615         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
616         No longer macros.  Instead ...
617         (enum wp_check_result): They're now values of this new
618         enumeration.
619         (watchpoint_check): Change return type to wp_check_result and
620         parameter type to bpstat.
621         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
622         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
623         catch_errors.  Reverse logic of watchpoint_check call.
624         (breakpoint_re_set_one): Now returns void and takes a breakpoint
625         pointer as parameter.
626         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
627         * common/common-exceptions.c (throw_exception_sjlj): Update
628         comments to avoid mentioning catch_errors.
629         * exceptions.c (catch_errors): Delete.
630         * exceptions.h: Update comments to avoid mentioning catch_errors.
631         (catch_errors_ftype, catch_errors): Delete.
632         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
633         (hook_stop_stub): Delete.
634         (restore_selected_frame): Change return type to void, and
635         parameter type to const frame_id &.
636         (restore_infcall_control_state): Use TRY/CATCH instead of
637         catch_errors.
638         * main.c (captured_command_loop): Return void and remove
639         parameter.  Remove references to catch_errors.
640         (captured_main): Use TRY/CATCH instead of catch_errors.
641         * objc-lang.c (objc_submethod_helper_data)
642         (find_objc_msgcall_submethod_helper): Delete.
643         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
644         catch_errors.
645         * record-full.c (record_full_message): Return void.
646         (record_full_message_args, record_full_message_wrapper): Delete.
647         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
648         instead of catch_errors.
649         * solib-aix.c (solib_aix_open_symbol_file_object): Change
650         parameter type to int.
651         * solib-darwin.c (open_symbol_file_object): Ditto.
652         * solib-dsbt.c (open_symbol_file_object): Ditto.
653         * solib-frv.c (open_symbol_file_object): Ditto.
654         * solib-svr4.c (open_symbol_file_object): Ditto.
655         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
656         * solib.c (update_solib_list): Use TRY/CATCH instead of
657         catch_errors.
658         * solist.h (struct target_so_ops) <open_symbol_file_object>:
659         Change type.
660         * symmisc.c (struct print_symbol_args): Remove.
661         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
662         (print_symbol): Change type.
663         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
664         and remove parameters.
665         (catch_errors): New.
666         (get_windows_debug_event): Adjust.
667
668 2017-10-09  Tom Tromey  <tom@tromey.com>
669
670         * mi/mi-main.c (free_splay_tree): Remove.
671         (list_available_thread_groups): Use splay_tree_up.
672         * common/gdb_splay_tree.h: New file.
673
674 2017-10-09  Tom Tromey  <tom@tromey.com>
675
676         * mi/mi-main.c (do_nothing): Remove.
677         (list_available_thread_groups): Update.
678
679 2017-10-09  Pedro Alves  <palves@redhat.com>
680
681         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
682         reading registers when switching context.
683
684 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
685
686         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
687         (fbsd_convert_siginfo): Likewise.
688         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
689
690 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
691
692         * configure.ac (try_guile_versions): Remove guile-2.2.
693         * configure: Regenerate.
694
695 2017-10-09  Tom Tromey  <tom@tromey.com>
696
697         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
698         (COMPILE.pre): Use $(CXX).
699
700 2017-10-09  Pedro Alves  <palves@redhat.com>
701
702         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
703         Use bool.
704         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
705         * cp-support.h (cp_remove_params): Now returns a
706         gdb::unique_xmalloc_ptr.
707         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
708         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
709         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
710         returning a gdb::unique_xmalloc_ptr.
711         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
712         * stack.c (find_frame_funname): Adjust to cp_remove_params
713         returning a gdb::unique_xmalloc_ptr.
714
715 2017-10-08  Tom Tromey  <tom@tromey.com>
716
717         * dwarf2read.c (dwarf2_get_dwz_file): Use
718         gdb::unique_xmalloc_ptr.
719         (find_slot_in_mapped_hash): Likewise.
720         (dwarf2_physname): Likewise.
721         (create_dwo_unit_in_dwp_v1): Use std::string.
722         (create_dwo_unit_in_dwp_v2): Likewise.
723         (lookup_dwo_cutu): Likewise.
724         (inherit_abstract_dies): Use std::vector.
725         (read_array_type): Likewise.
726         (dwarf_decode_macros): Remove unused declaration.
727         (unsigned_int_compar): Remove.
728         (dwarf2_build_psymtabs_hard): Use scoped_restore.
729         (psymtabs_addrmap_cleanup): Remove.
730
731 2017-10-08  Tom Tromey  <tom@tromey.com>
732
733         * frame-unwind.c (frame_unwind_try_unwinder): Update.
734         * frame.h (frame_cleanup_after_sniffer): Declare.
735         (frame_prepare_for_sniffer): Return void.
736         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
737         type of argument.
738         (frame_prepare_for_sniffer): Return void.
739
740 2017-10-08  Tom Tromey  <tom@tromey.com>
741
742         * utils.h (make_cleanup_value_free): Remove.
743         * utils.c (do_value_free, struct cleanup): Remove.
744         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
745         Use gdb_value_up.
746         * value.h (struct value_deleter): New.
747         (gdb_value_up): New typedef.
748
749 2017-10-08  Tom Tromey  <tom@tromey.com>
750
751         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
752         (make_cleanup_free_search_symbols): Remove.
753         (search_symbols): Return std::vector.
754         (symbol_search::compare_search_syms): Now member of
755         symbol_search.  Change arguments.
756         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
757         (symtab_symbol_info, rbreak_command): Update.
758         * symtab.h (struct symbol_search) <next>: Remove.
759         Add constructors.
760         (symbol_search::operator<): New function.
761         (symbol_search::operator==): New function.
762         (search_symbols): Remove std::vector.
763         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
764         (symbol_search::compare_search_syms): Declare.
765
766 2017-10-06  Yao Qi  <yao.qi@linaro.org>
767
768         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
769         arch/aarch64-insn.o.
770         Remove one rule.
771         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
772
773 2017-10-06  Yao Qi  <yao.qi@linaro.org>
774
775         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
776         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
777         arch/arm-linux.o respectively.
778         * configure.tgt: Likewise.
779
780 2017-10-06  Yao Qi  <yao.qi@linaro.org>
781
782         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
783         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
784
785 2017-10-06  Pedro Alves  <palves@redhat.com>
786
787         * windows-nat.c: Include <algorithm>.
788
789 2017-10-06  Yao Qi  <yao.qi@linaro.org>
790
791         * configure.tgt (i386_tobjs): New variable.
792         (amd64_tobjs): New variable.
793         Set $cpu_obs and $os_obs.
794
795 2017-10-06  Yao Qi  <yao.qi@linaro.org>
796
797         * Makefile.in (CONFIG_SRC_SUBDIR): New.
798         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
799         (clean): Remove object files and dependency files.
800         (distclean): Remove the directory.
801         * configure.ac: Invoke AC_CONFIG_COMMANDS.
802         * configure: Re-generated.
803         * configure.tgt: Replace amd64.o with arch/amd64.o.
804
805 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
806
807         PR build/22188
808         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
809         and SETEND.
810
811 2017-10-05  Pedro Alves  <palves@redhat.com>
812
813         * linux-nat.c (linux_child_follow_fork): When following the parent
814         and detaching the child, consult the parent thread's architecture
815         instead of the child's.
816
817 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
818
819         * ax.h: Do not include "doublest.h".
820         (union agent_val): Remove.
821
822 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
823
824         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
825         (decimal_to_string): Return std::string object.
826         (decimal_from_string): Accept std::string object.  Return bool.
827         (decimal_from_integral, decimal_from_doublest): Remove.
828         (decimal_from_longest): Add prototype.
829         (decimal_from_ulongest): Likewise.
830         (decimal_to_longest): Likewise.
831         (decimal_from_doublest): Likewise.
832         * dfp.c: Do not include "gdbtypes.h" or "value.h".
833         (MAX_DECIMAL_STRING): Move here.
834         (decimal_to_string): Return std::string object.
835         (decimal_from_string): Accept std::string object.  Return bool.
836         (decimal_from_integral): Remove, replace by ...
837         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
838         (decimal_to_longest): New function.
839         (decimal_from_floating): Remove, replace by ...
840         (decimal_from_doublest): ... this new function.
841         (decimal_to_doublest): Update to new decimal_to_string interface.
842
843         * value.c (unpack_long): Use decimal_to_longest.
844         * valops.c (value_cast): Use decimal_from_doublest instead of
845         decimal_from_floating.  Use decimal_from_[u]longest isntead of
846         decimal_from_integral.
847         * valarith.c (value_args_as_decimal): Likewise.
848         * valprint.c (print_decimal_floating): Update to new
849         decimal_to_string interface.
850         * printcmd.c (printf_decfloat): Likewise.
851         * c-exp.y (parse_number): Update to new decimal_from_string interface.
852
853 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
854
855         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
856         * gdbtypes.c: Include "floatformat.h".
857         * value.c: Likewise.
858         * m68k-tdep.c: Likewise.
859
860         * findvar.c: Do not include "floatformat.h".
861         * amd64-darwin-tdep.c: Likewise.
862         * arm-linux-tdep.c: Likewise.
863         * i386-darwin-tdep.c: Likewise.
864         * i387-tdep.c: Likewise.
865         * m68k-linux-tdep.c: Likewise.
866         * mep-tdep.c: Likewise.
867         * mips-tdep.c: Likewise.
868         * nios2-tdep.c: Likewise.
869         * s390-linux-tdep.c: Likewise.
870         * sparc-obsd-tdep.c: Likewise.
871         * sparc-tdep.c: Likewise.
872         * sparc64-tdep.c: Likewise.
873         * spu-tdep.c: Likewise.
874         * tic6x-tdep.c: Likewise.
875         * tilegx-tdep.c: Likewise.
876         * vax-tdep.c: Likewise.
877         * xstormy16-tdep.c: Likewise.
878         * xtensa-tdep.c: Likewise.
879
880         * top.c: Do not include "doublest.h".
881         * aarch64-tdep.c: Likewise.
882         * alpha-tdep.c: Likewise.
883         * arm-linux-tdep.c: Likewise.
884         * m68k-linux-tdep.c: Likewise.
885         * tilegx-tdep.c: Likewise.
886         * xstormy16-tdep.c: Likewise.
887
888 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
889
890         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
891         (mipsn32_fbsd_sigframe): Define.
892         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
893         for FreeBSD/mipsn32.
894
895 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
896
897         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
898         AT_HWCAP.
899
900 2017-10-05  Tristan Gingold  <tgingold@free.fr>
901
902         * MAINTAINERS (Misc): Update my email address.
903
904 2017-10-04  Pedro Alves  <palves@redhat.com>
905
906         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
907         it instead of target_gdbarch.
908         (get_remote_state, get_remote_packet_size): Adjust
909         get_remote_arch_state calls, passing down target_gdbarch
910         explicitly.
911         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
912         'gdbarch' and use it instead of target_gdbarch.
913         (get_memory_packet_size): Adjust get_remote_arch_state calls,
914         passing down target_gdbarch explicitly.
915         (struct stop_reply) <arch>: New field.
916         (remote_parse_stop_reply): Use the stopped thread's architecture,
917         not the current inferior's.  Save the architecture in the
918         stop_reply.
919         (process_stop_reply): Use the stop reply's architecture.
920         (process_g_packet, remote_fetch_registers)
921         (remote_prepare_to_store, store_registers_using_G)
922         (remote_store_registers): Adjust get_remote_arch_state calls,
923         using the regcache's architecture.
924         (remote_get_trace_status): Adjust get_remote_arch_state calls,
925         passing down target_gdbarch explicitly.
926         * spu-multiarch.c (spu_thread_architecture): Defer to the target
927         beneath instead of calling target_gdbarch.
928         * target.c (default_thread_architecture): Use the specified
929         inferior's architecture, instead of the current inferior's
930         architecture (via target_gdbarch).
931
932 2017-10-04  Pedro Alves  <palves@redhat.com>
933
934         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
935         case.
936         (regcache_print): Handle !target_has_registers here instead.
937
938 2017-10-04  Pedro Alves  <palves@redhat.com>
939
940         * frame.c (create_test_frame): Delete.
941         * frame.h (create_test_frame): Delete.
942         * gdbarch-selftests.c: Include gdbthread.h and target.h.
943         (class regcache_test): Delete.
944         (test_target_has_registers, test_target_has_stack)
945         (test_target_has_memory, test_target_prepare_to_store)
946         (test_target_store_registers): New functions.
947         (test_target_ops): New class.
948         (register_to_value_test): Error out if there's already a
949         process_stratum (or higher) target pushed.  Create a fuller mock
950         environment, with mock target_ops, inferior, address space, thread
951         and inferior_ptid.
952         * progspace.c (struct address_space): Move to ...
953         * progspace.h (struct address_space): ... here.
954         * regcache.h (regcache::~regcache, regcache::raw_write)
955         [GDB_SELF_TEST]: No longer virtual.
956
957 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
958
959         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
960
961 2017-10-04  Pedro Alves  <palves@redhat.com>
962
963         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
964         out of 'between TRY and CATCH'.
965
966 2017-10-04  Pedro Alves  <palves@redhat.com>
967
968         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
969         * common/common-exceptions.h (TRY): Open an outermost scope.
970         Expand intro comment.
971         (CATCH): Reindent.
972         (END_CATCH): Close the outermost scope.
973         * completer.c (complete_line_internal): Add missing END_CATCH.
974
975 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
976
977         * NEWS (Changes since GDB 8.0): Add entry about new
978         'set-cwd-on-gdbserver' feature.
979         (New remote packets): Add entry for QSetWorkingDir.
980         * common/common-inferior.h (set_inferior_cwd): New prototype.
981         * infcmd.c (set_inferior_cwd): Remove "static".
982         (show_cwd_command): Expand text to include remote debugging.
983         * remote.c: Add PACKET_QSetWorkingDir.
984         (remote_protocol_features) <QSetWorkingDir>: New entry for
985         PACKET_QSetWorkingDir.
986         (extended_remote_set_inferior_cwd): New function.
987         (extended_remote_create_inferior): Call
988         "extended_remote_set_inferior_cwd".
989         (_initialize_remote): Call "add_packet_config_cmd" for
990         QSetWorkingDir.
991
992 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
993
994         * NEWS (New commands): Mention "set/show cwd".
995         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
996         "cd" command's help text.
997         * common/common-inferior.h (get_inferior_cwd): New prototype.
998         * infcmd.c (inferior_cwd_scratch): New global variable.
999         (set_inferior_cwd): New function.
1000         (get_inferior_cwd): Likewise.
1001         (set_cwd_command): Likewise.
1002         (show_cwd_command): Likewise.
1003         (_initialize_infcmd): Add "set/show cwd" commands.
1004         * inferior.h (class inferior) <cwd>: New field.
1005         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1006         (fork_inferior): Change inferior's cwd before its execution.
1007         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1008         to CreateProcess.
1009
1010 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1011
1012         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1013         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1014         (COMMON_OBS): Add gdb_tilde_expand.o.
1015         * common/gdb_tilde_expand.c: New file.
1016         * common/gdb_tilde_expand.h: Likewise.
1017
1018 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1019
1020         * gdbarch.sh (objfile): Remove duplicate declaration.
1021         * gdbarch.h: Regenerate.
1022
1023 2017-10-03  Tom Tromey  <tom@tromey.com>
1024
1025         * utils.c (internal_vproblem): Use string_vprintf.
1026
1027 2017-10-03  Tom Tromey  <tom@tromey.com>
1028
1029         * printcmd.c (info_symbol_command): Use std::string.
1030
1031 2017-10-03  Tom Tromey  <tom@tromey.com>
1032
1033         * top.c (gdb_safe_append_history): Use std::string.
1034
1035 2017-10-03  Tom Tromey  <tom@tromey.com>
1036
1037         * event-top.c (stdin_event_handler): Update.
1038         * main.c (captured_main_1): Update.
1039         * top.h (make_delete_ui_cleanup): Remove.
1040         (struct ui): Add constructor and destructor.
1041         (new_ui, delete_ui): Remove.
1042         * top.c (make_delete_ui_cleanup): Remove.
1043         (new_ui_command): Use std::unique_ptr.
1044         (delete_ui_cleanup): Remove.
1045         (ui::ui): Rename from new_ui.  Update.
1046         (free_ui): Remove.
1047         (ui::~ui): Rename from delete_ui.  Update.
1048
1049 2017-10-03  Tom Tromey  <tom@tromey.com>
1050
1051         * symfile.c (load_progress): Use gdb::byte_vector.
1052
1053 2017-10-03  Tom Tromey  <tom@tromey.com>
1054
1055         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1056         declaration.
1057         * printcmd.c (x_command): Remove unused declaration.
1058         * symfile.c (symbol_file_command): Remove unused declaration.
1059
1060 2017-10-03  Tom Tromey  <tom@tromey.com>
1061
1062         * utils.c (internal_vproblem): Use std::string.
1063         (defaulted_query): Likewise.
1064
1065 2017-10-03  Tom Tromey  <tom@tromey.com>
1066
1067         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1068         * top.c (execute_command_to_string): Update.
1069         * utils.c (make_cleanup_restore_page_info): Remove.
1070         (do_restore_page_info_cleanup): Remove.
1071         (set_batch_flag_and_restore_page_info):
1072         New.
1073         (make_cleanup_restore_page_info): Remove.
1074         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1075         (~set_batch_flag_and_restore_page_info): New
1076         (make_cleanup_restore_uinteger): Remove.
1077         (make_cleanup_restore_integer): Remove.
1078         (struct restore_integer_closure): Remove.
1079         (restore_integer): Remove.
1080         * utils.h (struct set_batch_flag_and_restore_page_info): New
1081         class.
1082         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1083         (make_cleanup_restore_page_info): Remove.
1084         (make_cleanup_restore_uinteger) Remove.
1085         (make_cleanup_restore_integer) Remove.
1086
1087 2017-10-03  Tom Tromey  <tom@tromey.com>
1088
1089         * record-full.h (record_full_gdb_operation_disable_set): Return
1090         scoped_restore_tmpl<int>.
1091         * infrun.c (adjust_pc_after_break): Update.
1092         (handle_signal_stop): Update.
1093         * record-full.c (record_full_gdb_operation_disable_set): Return
1094         scoped_restore_tmpl<int>.
1095         (record_full_wait_1, record_full_insert_breakpoint)
1096         (record_full_remove_breakpoint, record_full_save)
1097         (record_full_goto_insn): Update.
1098
1099 2017-10-02  Tom Tromey  <tom@tromey.com>
1100
1101         PR rust/22236:
1102         * rust-lang.c (rust_val_print_str): New function.
1103         (val_print_struct): Call it.
1104         (rust_subscript): Preserve name of slice type.
1105
1106 2017-10-02  Tom Tromey  <tom@tromey.com>
1107
1108         * rust-lang.c (rust_subscript): Handle slices in
1109         EVAL_AVOID_SIDE_EFFECTS case.
1110
1111 2017-10-02  Tom Tromey  <tom@tromey.com>
1112
1113         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1114
1115 2017-10-02  Tom Tromey  <tom@tromey.com>
1116
1117         * rust-lang.h (rust_slice_type): Add "extern".
1118
1119 2017-10-02  Tom Tromey  <tom@tromey.com>
1120             Pedro Alves  <palves@redhat.com>
1121
1122         * ada-lang.h (ada_exc_info::operator<): Make const.
1123         (ada_exc_info::operator==): Make const.
1124         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1125         Make const.
1126
1127 2017-09-29  Tom Tromey  <tom@tromey.com>
1128
1129         * target.c (read_whatever_is_readable): Change type of "result".
1130         Update.
1131         (free_memory_read_result_vector): Remove.
1132         (read_memory_robust): Change return type.  Update.
1133         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1134         bin2hex, std::string.
1135         * target.h (memory_read_result_s): Remove typedef.
1136         (free_memory_read_result_vector): Remove.
1137         (read_memory_robust): Return std::vector.
1138
1139 2017-09-29  Tom Tromey  <tom@tromey.com>
1140
1141         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1142
1143 2017-09-29  Tom Tromey  <tom@tromey.com>
1144
1145         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1146         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1147         operator< and operator==.
1148         (ada_exceptions_list): Return a std::vector.
1149         * ada-lang.c (ada_exc_info::operator<): Rename from
1150         compare_ada_exception_info.
1151         (ada_exc_info::operator==): New.
1152         (sort_remove_dups_ada_exceptions_list): Change type of
1153         "exceptions".
1154         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1155         (ada_add_global_exceptions): Likewise.
1156         (ada_exceptions_list_1): Return a std::vector.
1157         (ada_exceptions_list): Likewise.
1158
1159 2017-09-29  Tom Tromey  <tom@tromey.com>
1160
1161         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1162         'std::set *'.
1163         (print_one_inferior): Update.
1164         (free_vector_of_ints): Remove.
1165         (list_available_thread_groups): Change "ids" to std::set.
1166         (mi_cmd_list_thread_groups): Update.
1167         (struct collect_cores_data) <core>: Now a std::set.
1168         (collect_cores): Update.
1169         (unique): Remove.
1170         (print_one_inferior): Update.
1171
1172 2017-09-29  Tom Tromey  <tom@tromey.com>
1173
1174         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1175         (mi_execute_async_cli_command): Likewise.
1176         (mi_cmd_trace_frame_collected): Use field_fmt.
1177
1178 2017-09-29  Tom Tromey  <tom@tromey.com>
1179
1180         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1181         gdb::byte_vector.
1182
1183 2017-09-29  Tom Tromey  <tom@tromey.com>
1184
1185         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1186
1187 2017-09-29  Tom Tromey  <tom@tromey.com>
1188
1189         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1190
1191 2017-09-29  Tom Tromey  <tom@tromey.com>
1192
1193         * varobj.h (varobj_gen_name): Return std::string.
1194         * varobj.c (varobj_gen_name): Return std::string.
1195         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1196         (mi_cmd_var_delete): Don't copy "name".
1197
1198 2017-09-29  Tom Tromey  <tom@tromey.com>
1199
1200         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1201         (mi_cmd_break_insert_1): Update.
1202
1203 2017-09-29  Tom Tromey  <tom@tromey.com>
1204
1205         * target.h (make_scoped_defer_target_commit_resume): Update.
1206         * target.c (make_scoped_defer_target_commit_resume): Rename from
1207         make_cleanup_defer_target_commit_resume.  Return a
1208         scoped_restore.
1209         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1210
1211 2017-09-29  Tom Tromey  <tom@tromey.com>
1212
1213         * main.c (captured_main_1): Remove unused declaration.
1214         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1215
1216 2017-09-29  Tom Tromey  <tom@tromey.com>
1217
1218         * symtab.c (search_symbols): Remove unused outer cleanup.
1219         (make_source_files_completion_list): Remove unused declaration.
1220
1221 2017-09-29  Tom Tromey  <tom@tromey.com>
1222
1223         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1224
1225 2017-09-29  Tom Tromey  <tom@tromey.com>
1226
1227         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1228         gdb::byte_vector.
1229
1230 2017-09-29  Tom Tromey  <tom@tromey.com>
1231
1232         * complaints.c (vcomplaint): Use std::string.
1233
1234 2017-09-29  Tom Tromey  <tom@tromey.com>
1235
1236         * tracepoint.c (trace_variable_command): Use std::string.
1237         (encode_actions_1): Remove unused declarations.
1238         (create_tsv_from_upload): Use std::string.
1239
1240 2017-09-29  Tom Tromey  <tom@tromey.com>
1241
1242         * cp-support.c (gdb_demangle): Use std::string.
1243
1244 2017-09-29  Tom Tromey  <tom@tromey.com>
1245
1246         * stack.c (parse_frame_specification): Use std::string
1247         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1248
1249 2017-09-29  Tom Tromey  <tom@tromey.com>
1250
1251         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1252
1253 2017-09-29  Tom Tromey  <tom@tromey.com>
1254
1255         * utils.c (vfprintf_maybe_filtered): Use std::string.
1256         (vfprintf_unfiltered): Likewise.
1257
1258 2017-09-29  Tom Tromey  <tom@tromey.com>
1259
1260         * event-top.c (top_level_prompt): Return std::string.
1261         (display_gdb_prompt): Update.
1262
1263 2017-09-29  Tom Tromey  <tom@tromey.com>
1264
1265         * unittests/common-utils-selftests.c (format): New function.
1266         (string_vprintf_tests): New function.
1267         (_initialize_common_utils_selftests): Register new tests.
1268         * common/common-utils.c (string_vprintf): New function.
1269         * common/common-utils.h (string_vprintf): Declare.
1270
1271 2017-09-29  Pedro Alves  <palves@redhat.com>
1272
1273         * common/rsp-low.c (unpack_varlen_hex): Constify.
1274         * common/rsp-low.h (unpack_varlen_hex): Constify.
1275         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1276         Constify.
1277         * remote.c (remote_set_permissions, read_ptid)
1278         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1279         (remote_static_tracepoint_marker_at)
1280         (remote_static_tracepoint_markers_by_strid)
1281         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1282         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1283         (parse_tracepoint_definition, parse_tsv_definition)
1284         (parse_static_tracepoint_marker_definition): Constify.
1285         * tracepoint.h (parse_static_tracepoint_marker_definition)
1286         (parse_trace_status, parse_tracepoint_status)
1287         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1288
1289 2017-09-29  Pedro Alves  <palves@redhat.com>
1290
1291         * remote.c (target_buf, target_buf_size): Delete.
1292         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1293         Use the connection's packet buffer instead.
1294         All callers adjusted.
1295         (_initialize_remote): Remove references to target_buf and
1296         target_buf_size.
1297
1298 2017-09-28  Pedro Alves  <palves@redhat.com>
1299
1300         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1301         unittests/common-utils-selftests.c.
1302         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1303         (COMMON_OBS): Remove utils-selftests.o.
1304         * utils-selftests.c: Move to ...
1305         * unittests/common-utils-selftests.c: ... here and rename self
1306         test to "string_printf".
1307
1308 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1309
1310         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1311         having NULL cus or tus.
1312
1313 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1314
1315         * arm-tdep.c: (convert_from_extended): Remove.
1316         (convert_to_extended): Likewise.
1317         (arm_extract_return_value): Use convert_typed_floating.
1318         (arm_store_return_value): Likewise.
1319
1320         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1321         * sh-tdep.c: Do not include "floatformat.h".
1322         (sh_littlebyte_bigword_type): New function.
1323         (sh_register_convert_to_virtual): Use convert_typed_floating.
1324         (sh_register_convert_to_raw): Likewise.
1325         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1326         (sh64_littlebyte_bigword_type): New function.
1327         (sh64_extract_return_value): Use convert_typed_floating.
1328         (sh64_register_convert_to_virtual): Likewise.
1329         (sh64_register_convert_to_raw): Likewise.
1330
1331 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1332
1333         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1334         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1335
1336         * gdbtypes.h (union type_specific): Make field floatformat hold
1337         just a single struct floatformat, not an array.
1338         (floatformat_from_type): Move here.
1339         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1340         changed TYPE_FLOATFORMAT definition.
1341         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1342         (recursive_dump_type): Likewise.
1343         (init_float_type): Install correct floatformat for byte order.
1344         (arch_float_type): Likewise.
1345
1346 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1347
1348         * gdbtypes.c (init_type): Change incoming argument from
1349         length-in-bytes to length-in-bits.  Assert length is a
1350         multiple of TARGET_CHAR_BITS.
1351         (arch_type, arch_flags_type): Likewise.
1352         (init_integer_type): Update call to init_type.
1353         (init_character_type): Likewise.
1354         (init_boolean_type): Likewise.
1355         (init_float_type): Likewise.
1356         (init_decfloat_type): Likewise.
1357         (init_complex_type): Likewise.
1358         (init_pointer_type): Likewise.
1359         (objfile_type): Likewise.
1360         (arch_integer_type): Update call to arch_type.
1361         (arch_character_type): Likewise.
1362         (arch_boolean_type): Likewise.
1363         (arch_float_type): Likewise.
1364         (arch_decfloat_type): Likewise.
1365         (arch_complex_type): Likewise.
1366         (arch_pointer_type): Likewise.
1367         (gdbtypes_post_init): Likewise.
1368
1369         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1370         (read_base_type): Likewise.
1371         * mdebugread.c (basic_type): Likewise.
1372         * stabsread.c (dbx_init_float_type): Likewise.
1373         (rs6000_builtin_type): Likewise.
1374         (read_range_type): Likewise.  Also, fix call to init_integer_type
1375         with erroneous length argument.
1376
1377         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1378         * d-lang.c (build_d_types): Likewise.
1379         * f-lang.c (build_fortran_types): Likewise.
1380         * go-lang.c (build_go_types): Likewise.
1381         * opencl-lang.c (build_opencl_types): Likewise.
1382         * jit.c (finalize_symtab): Likewise.
1383         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1384         (build_std_type_info_type): Likewise.
1385         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1386         update call to arch_flags_type.
1387
1388         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1389         arch_type.
1390         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1391         * windows-tdep.c (windows_get_tlb_type): Likewise.
1392
1393         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1394         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1395         * m32c-tdep.c (make_types): Likewise.
1396         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1397         (rl78_psw_type): Update call to arch_flags_type.
1398         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1399         * rx-tdep.c (rx_psw_type): Likewise.
1400         (rx_fpsw_type): Likewise.
1401         * sparc-tdep.c (sparc_psr_type): Likewise.
1402         (sparc_fsr_type): Likewise.
1403         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1404         (sparc64_ccr_type): Likewise.
1405         (sparc64_fsr_type): Likewise.
1406         (sparc64_fprs_type): Likewise.
1407
1408 2017-09-27  Tom Tromey  <tom@tromey.com>
1409
1410         * findcmd.c (find_command): Constify.
1411
1412 2017-09-27  Tom Tromey  <tom@tromey.com>
1413
1414         * ada-tasks.c (task_command_1, task_command): Constify.
1415
1416 2017-09-27  Tom Tromey  <tom@tromey.com>
1417
1418         * symtab.c (maintenance_print_symbol_cache)
1419         (maintenance_flush_symbol_cache)
1420         (maintenance_print_symbol_cache_statistics): Constify.
1421
1422 2017-09-27  Tom Tromey  <tom@tromey.com>
1423
1424         * inferior.c (detach_inferior_command, kill_inferior_command)
1425         (inferior_command): Constify.
1426
1427 2017-09-27  Tom Tromey  <tom@tromey.com>
1428
1429         * regcache.c (regcache_print, maintenance_print_registers)
1430         (maintenance_print_raw_registers)
1431         (maintenance_print_cooked_registers)
1432         (maintenance_print_register_groups)
1433         (maintenance_print_remote_registers): Constify.
1434
1435 2017-09-27  Tom Tromey  <tom@tromey.com>
1436
1437         * printcmd.c (map_display_numbers, undisplay_command)
1438         (enable_disable_display_command, enable_display_command)
1439         (disable_display_command): Constify.
1440
1441 2017-09-27  Tom Tromey  <tom@tromey.com>
1442
1443         * breakpoint.h (delete_command): Don't declare.
1444         * breakpoint.c (delete_command, enable_once_command)
1445         (enable_count_command, enable_delete_command, breakpoint_1)
1446         (maintenance_info_breakpoints, stopin_command, stopat_command)
1447         (delete_command, delete_trace_command, save_breakpoints)
1448         (save_breakpoints_command, save_tracepoints_command): Constify.
1449
1450 2017-09-27  Tom Tromey  <tom@tromey.com>
1451
1452         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1453         (skip_ws, extract_identifier, macro_define_command)
1454         (macro_undef_command, macro_list_command): Constify.
1455
1456 2017-09-27  Tom Tromey  <tom@tromey.com>
1457
1458         * infcmd.c (environment_info, set_environment_command)
1459         (unset_environment_command, path_info, info_proc_cmd_1)
1460         (info_proc_cmd_mappings, info_proc_cmd_stat)
1461         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1462         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1463
1464 2017-09-27  Tom Tromey  <tom@tromey.com>
1465
1466         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1467         Constify.
1468
1469 2017-09-27  Tom Tromey  <tom@tromey.com>
1470
1471         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1472
1473 2017-09-27  Tom Tromey  <tom@tromey.com>
1474
1475         * demangle.c (demangle_command): Constify.
1476
1477 2017-09-27  Tom Tromey  <tom@tromey.com>
1478
1479         * progspace.c (maintenance_info_program_spaces_command):
1480         Constify.
1481
1482 2017-09-27  Tom Tromey  <tom@tromey.com>
1483
1484         * compile/compile.c (check_raw_argument, compile_file_command)
1485         (compile_code_command, compile_print_command): Constify.
1486
1487 2017-09-27  Tom Tromey  <tom@tromey.com>
1488
1489         * reggroups.c (maintenance_print_reggroups): Constify.
1490
1491 2017-09-27  Tom Tromey  <tom@tromey.com>
1492
1493         * dwarf2read.c (save_gdb_index_command): Constify.
1494
1495 2017-09-27  Tom Tromey  <tom@tromey.com>
1496
1497         * stap-probe.c (info_probes_stap_command): Constify.
1498
1499 2017-09-27  Tom Tromey  <tom@tromey.com>
1500
1501         * fork-child.c (unset_exec_wrapper_command): Constify.
1502
1503 2017-09-27  Tom Tromey  <tom@tromey.com>
1504
1505         * btrace.c (get_uint, get_context_size, no_chunk)
1506         (maint_btrace_packet_history_cmd)
1507         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1508         (maint_info_btrace_cmd): Constify.
1509
1510 2017-09-27  Tom Tromey  <tom@tromey.com>
1511
1512         * reverse.c (delete_bookmark_command): Constify.
1513
1514 2017-09-27  Tom Tromey  <tom@tromey.com>
1515
1516         * remote.c (set_memory_packet_size)
1517         (set_memory_write_packet_size, show_memory_write_packet_size)
1518         (set_memory_read_packet_size, show_memory_read_packet_size)
1519         (compare_sections_command, packet_command, remote_put_command)
1520         (remote_get_command, remote_delete_command): Constify.
1521
1522 2017-09-27  Tom Tromey  <tom@tromey.com>
1523
1524         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1525         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1526         (set_mipsfpu_auto_command): Constify.
1527
1528 2017-09-27  Tom Tromey  <tom@tromey.com>
1529
1530         * cli/cli-cmds.h (cd_command): Constify.
1531         * cli/cli-cmds.c (cd_command): Constify.
1532
1533 2017-09-27  Tom Tromey  <tom@tromey.com>
1534
1535         * thread.c (thread_name_command, thread_find_command): Constify.
1536
1537 2017-09-27  Tom Tromey  <tom@tromey.com>
1538
1539         * probe.c (enable_probes_command, disable_probes_command):
1540         Constify.
1541
1542 2017-09-27  Tom Tromey  <tom@tromey.com>
1543
1544         * symfile.c (symbol_file_command): Constify.
1545         * gdbcore.h (deprecated_file_changed_hook): Constify.
1546         * exec.c (deprecated_file_changed_hook, exec_file_command)
1547         (file_command): Constify.
1548         * defs.h (symbol_file_command): Constify.
1549
1550 2017-09-27  Tom Tromey  <tom@tromey.com>
1551
1552         * remote-fileio.c (set_system_call_allowed)
1553         (show_system_call_allowed): Constify.
1554
1555 2017-09-27  Tom Tromey  <tom@tromey.com>
1556
1557         * tracepoint.c (delete_trace_variable_command)
1558         (tfind_end_command, tfind_start_command, tfind_pc_command)
1559         (tfind_tracepoint_command, tfind_line_command)
1560         (tfind_range_command, tfind_outside_command): Constify.
1561
1562 2017-09-27  Tom Tromey  <tom@tromey.com>
1563
1564         * ax-gdb.c (maint_agent_printf_command, agent_command)
1565         (agent_eval_command): Constify.
1566
1567 2017-09-27  Tom Tromey  <tom@tromey.com>
1568
1569         * tracepoint.c (info_scope_command): Constify.
1570         * python/python.c (gdbpy_decode_line): Constify.
1571         * python/py-breakpoint.c (bppy_init): Constify.
1572         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1573         * location.h: (new_linespec_location)
1574         (string_to_event_location_basic, string_to_event_location):
1575         Constify.
1576         * location.c (new_linespec_location)
1577         (string_to_event_location_basic, string_to_event_location):
1578         Constify.
1579         * linespec.h (decode_line_with_current_source)
1580         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1581         * linespec.c (linespec_lex_to_end)
1582         (decode_line_with_current_source)
1583         (decode_line_with_last_displayed): Constify.
1584         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1585         Constify.
1586         * cli/cli-cmds.c (edit_command, list_command): Constify.
1587         * breakpoint.h (until_break_command, watch_command_wrapper)
1588         (awatch_command_wrapper, rwatch_command_wrapper)
1589         (init_ada_exception_breakpoint): Constify.
1590         * breakpoint.c (break_command_1, dprintf_command)
1591         (break_range_command, watch_command_wrapper)
1592         (rwatch_command_wrapper, awatch_command_wrapper)
1593         (until_break_command, init_ada_exception_breakpoint)
1594         (strace_marker_create_sals_from_location, trace_command)
1595         (ftrace_command, strace_command, struct tracepoint): Constify.
1596         * ax-gdb.c (agent_command_1): Constify.
1597         * ada-lang.c (ada_exception_sal): Constify.
1598
1599 2017-09-27  Tom Tromey  <tom@tromey.com>
1600
1601         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1602         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1603         (get_context_size, no_chunk, get_insn_history_modifiers)
1604         (cmd_record_insn_history, get_call_history_modifiers)
1605         (cmd_record_call_history): Constify.
1606
1607 2017-09-27  Tom Tromey  <tom@tromey.com>
1608
1609         * source.c (show_substitute_path_command)
1610         (unset_substitute_path_command, set_substitute_path_command):
1611         Constify.
1612
1613 2017-09-27  Tom Tromey  <tom@tromey.com>
1614
1615         * typeprint.c (maintenance_print_type): Constify.
1616         * maint.c (maintenance_dump_me, maintenance_demangle)
1617         (maintenance_time_display, maintenance_info_sections)
1618         (maintenance_print_statistics, maintenance_deprecate)
1619         (maintenance_undeprecate): Constify.
1620         (maintenance_do_deprecate): Constify.  Use std::string.
1621         (maintenance_selftest): Constify.
1622         * gdbtypes.h (maintenance_print_type): Constify.
1623
1624 2017-09-27  Tom Tromey  <tom@tromey.com>
1625
1626         * hppa-tdep.c (unwind_command): Constify.
1627
1628 2017-09-27  Tom Tromey  <tom@tromey.com>
1629
1630         * target-descriptions.c (unset_tdesc_filename_cmd)
1631         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1632         Constify.
1633
1634 2017-09-27  Tom Tromey  <tom@tromey.com>
1635
1636         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1637
1638 2017-09-27  Tom Tromey  <tom@tromey.com>
1639
1640         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1641
1642 2017-09-27  Tom Tromey  <tom@tromey.com>
1643
1644         * tui/tui-regs.c (tui_reg_command): Constify.
1645
1646 2017-09-27  Tom Tromey  <tom@tromey.com>
1647
1648         * skip.c (skip_file_command, skip_function_command)
1649         (skip_enable_command, skip_disable_command, skip_delete_command):
1650         Constify.
1651
1652 2017-09-27  Tom Tromey  <tom@tromey.com>
1653
1654         * record-btrace.c (cmd_record_btrace_bts_start)
1655         (cmd_record_btrace_pt_start): Constify.
1656
1657 2017-09-27  Tom Tromey  <tom@tromey.com>
1658
1659         * symmisc.c (maintenance_print_symbols)
1660         (maintenance_print_msymbols, maintenance_print_objfiles)
1661         (maintenance_info_symtabs, maintenance_check_symtabs)
1662         (maintenance_expand_symtabs, maintenance_info_line_tables):
1663         Constify.
1664
1665 2017-09-27  Tom Tromey  <tom@tromey.com>
1666
1667         * top.c (new_ui_command): Constify.
1668
1669 2017-09-27  Tom Tromey  <tom@tromey.com>
1670
1671         * symfile.c (add_symbol_file_command)
1672         (remove_symbol_file_command, list_overlays_command)
1673         (map_overlay_command, unmap_overlay_command)
1674         (overlay_auto_command, overlay_manual_command)
1675         (overlay_off_command, overlay_load_command): Constify.
1676
1677 2017-09-27  Tom Tromey  <tom@tromey.com>
1678
1679         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1680         (info_spu_mailbox_command, info_spu_dma_command)
1681         (info_spu_proxydma_command): Constify.
1682
1683 2017-09-27  Tom Tromey  <tom@tromey.com>
1684
1685         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1686
1687 2017-09-27  Tom Tromey  <tom@tromey.com>
1688
1689         * cli/cli-script.c (user_defined_command): Constify.
1690
1691 2017-09-27  Tom Tromey  <tom@tromey.com>
1692
1693         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1694         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1695         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1696         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1697         (dump_binary_value, append_binary_memory, append_binary_value):
1698         Constify.
1699         (struct dump_context) <func>: Constify.
1700         (add_dump_command): Update.
1701
1702 2017-09-27  Tom Tromey  <tom@tromey.com>
1703
1704         * cli/cli-cmds.c (show_version, show_configuration)
1705         (source_command, show_user): Constify.
1706
1707 2017-09-27  Tom Tromey  <tom@tromey.com>
1708
1709         * target.c (maintenance_print_target_stack): Constify.
1710
1711 2017-09-27  Tom Tromey  <tom@tromey.com>
1712
1713         * interps.c (interpreter_exec_cmd): Constify.
1714
1715 2017-09-27  Tom Tromey  <tom@tromey.com>
1716
1717         * record-full.c (cmd_record_full_restore): Constify.
1718
1719 2017-09-27  Tom Tromey  <tom@tromey.com>
1720
1721         * memattr.c (enable_mem_command, disable_mem_command)
1722         (delete_mem_command): Constify.
1723
1724 2017-09-27  Tom Tromey  <tom@tromey.com>
1725
1726         * value.c (show_convenience): Constify.
1727
1728 2017-09-27  Tom Tromey  <tom@tromey.com>
1729
1730         * gdbcore.h (core_file_command): Update.
1731         * corefile.c (core_file_command): Constify.
1732
1733 2017-09-27  Tom Tromey  <tom@tromey.com>
1734
1735         * user-regs.c (maintenance_print_user_registers): Constify.
1736
1737 2017-09-27  Tom Tromey  <tom@tromey.com>
1738
1739         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1740
1741 2017-09-27  Tom Tromey  <tom@tromey.com>
1742
1743         * cp-support.c (first_component_command): Constify.
1744
1745 2017-09-27  Tom Tromey  <tom@tromey.com>
1746
1747         * psymtab.c (maintenance_print_psymbols)
1748         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1749         Constify.
1750
1751 2017-09-27  Tom Tromey  <tom@tromey.com>
1752
1753         * windows-tdep.c (display_tib): Constify.
1754
1755 2017-09-27  Tom Tromey  <tom@tromey.com>
1756
1757         * linux-fork.c (delete_checkpoint_command)
1758         (detach_checkpoint_command): Constify.
1759
1760 2017-09-27  Tom Tromey  <tom@tromey.com>
1761
1762         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1763
1764 2017-09-27  Tom Tromey  <tom@tromey.com>
1765
1766         * arc-tdep.c (dump_arc_instruction_command): Constify.
1767
1768 2017-09-27  Tom Tromey  <tom@tromey.com>
1769
1770         * valprint.c (set_radix, show_radix): Constify.
1771
1772 2017-09-27  Tom Tromey  <tom@tromey.com>
1773
1774         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1775
1776 2017-09-27  Tom Tromey  <tom@tromey.com>
1777
1778         * command.h (not_just_help_class_command): Update.
1779         * cli/cli-decode.h (not_just_help_class_command): Update.
1780         * cli/cli-decode.c (not_just_help_class_command): Constify.
1781
1782 2017-09-27  Tom Tromey  <tom@tromey.com>
1783
1784         * gdb_bfd.c (maintenance_info_bfds): Constify.
1785
1786 2017-09-27  Tom Tromey  <tom@tromey.com>
1787
1788         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1789         overloads.
1790         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1791         (do_const_cfunc): New function.
1792         (cmd_cfunc_eq): New overload.
1793         (cli_user_command_p): Check do_const_cfunc.
1794         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1795         const_cfunc.
1796         * command.h (add_cmd): Add const overload and no-function
1797         overload.
1798         (set_cmd_cfunc): Add const overload.
1799         (cmd_const_cfunc_ftype): Declare.
1800         (cmd_cfunc_eq): Add const overload.
1801         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1802         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1803         overload.
1804
1805 2017-09-27  Tom Tromey  <tom@tromey.com>
1806
1807         * macroexp.c (get_next_token_for_substitution): New function.
1808         (substitute_args): Call it.  Check for __VA_OPT__.
1809
1810 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1811             Pedro Alves <palves@redhat.com>
1812
1813         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1814         producer_is_icc_lt_14.
1815         (producer_is_icc_lt_14): New function.
1816         (check_producer): Add code for checking version of ICC.
1817         (producer_is_icc): Move to producer.c.
1818         (read_structure_type): Restrict ICC workaround to ICC<14.
1819         * producer.c: Include selftest.h.
1820         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1821         New functions.
1822         * producer.h (producer_is_icc): New declaration.
1823
1824 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1825
1826         * Makefile.in (SFILES): Add producer.c.
1827         (COMMON_OBS): Add producer.o
1828         * amd64-tdep.c (producer.h): Add new include.
1829         * dwarf2read.c (producer.h): Add new include.
1830         * producer.c: New file.
1831         * producer.h: New file.
1832         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1833         producer.c.
1834         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1835         producer.h.
1836
1837 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1838
1839         * configure.ac: Search ncursesw before ncurses.
1840         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1841         * gdb_curses.h: Include <ncursesw/ncurses.h>
1842         * config.in, configure: Regenerate.
1843
1844 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1845
1846         PR gdb/22185
1847         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1848         obsolete.
1849         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1850         Remove i386sol2 support.
1851         * configure.nat <i386sol2>: Remove.
1852         <sol2-64>: Fold into ...
1853         <sol2>: ... this.
1854         Move common settings to default section.
1855         Add sol-thread.o.
1856         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1857         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1858         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1859         <i[34567]86-*-solaris*>: Remove.
1860         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1861
1862         * configure.ac: Remove wctype in libw check.
1863         (_MSE_INT_H): Don't define on Solaris 7-9.
1864         <solaris*>: Remove libthread_db.so.1 check.
1865         * configure: Regenerate.
1866         * config.in: Regenerate.
1867
1868         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1869         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1870         (gdb_ps_size_t): Remove.
1871         Use base types in users.
1872         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1873
1874         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1875
1876 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1877
1878         PR build/22206
1879         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1880         (adi_is_addr_mapped): Likewise.
1881         (PSR_ICC): Don't redefine.
1882         (PSR_IMPL): Likewise.
1883
1884 2017-09-25  Tom Tromey  <tom@tromey.com>
1885
1886         * regcache.c (regcache::dump): Use string_printf.
1887
1888 2017-09-25  Tom Tromey  <tom@tromey.com>
1889
1890         * regcache.c (class regcache_invalidator): New.
1891         (struct register_to_invalidate): Remove.
1892         (make_cleanup_regcache_invalidate): Remove.
1893         (regcache::raw_write): Use regcache_invalidator.
1894
1895 2017-09-25  Tom Tromey  <tom@tromey.com>
1896
1897         * spu-tdep.c (spu2ppu_sniffer): Update.
1898         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1899         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1900         Remove.
1901         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1902         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1903         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1904         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1905         (frame_pop): Update.
1906
1907 2017-09-25  Tom Tromey  <tom@tromey.com>
1908
1909         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1910         * regcache.h (regcache_xfree): Don't declare.
1911         * regcache.c (regcache_xfree): Remove.
1912         (do_regcache_xfree): Use delete.
1913         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1914         * linux-fork.c (free_fork): Use delete.
1915         (fork_save_infrun_state): Likewise.
1916         * jit.c (jit_dealloc_cache): Use delete.
1917         * infrun.c (discard_infcall_suspend_state): Use delete.
1918
1919 2017-09-25  Tom Tromey  <tom@tromey.com>
1920
1921         * regcache.h (regcache_xmalloc): Don't declare.
1922         (regcache_raw_set_cached_value): Update comment.
1923         * regcache.c (regcache_xmalloc): Remove.
1924         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1925         * jit.c (jit_frame_sniffer): Use new.
1926         * frame.c (frame_save_as_regcache): Use new.
1927
1928 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1929
1930         * NEWS: Advertise support for guarded-storage registers on IBM z.
1931
1932 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1933
1934         * s390-linux-nat.c (have_regset_gs): New static variable.
1935         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1936         control block and guarded-storage broadcast control regsets.
1937         (s390_read_description): Detect whether the target has
1938         guarded-storage support, return appropriate tdesc.
1939         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1940         (features/s390x-gs-linux64.c): Likewise.
1941         (struct gdbarch_tdep) <have_gs>: New field.
1942         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1943         (s390_gsbc_regset): New variables.
1944         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1945         and s390_gsbc_regset, if applicable.
1946         (s390_core_read_description): Check whether core file was from a
1947         target with guarded-storage support; include appropriate regsets.
1948         (s390_gdbarch_init): Add registers for guarded-storage support.
1949         (_initialize_s390_tdep): Initialize new target descriptions that
1950         include registers for guarded-storage support.
1951         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1952         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1953         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1954         (S390_NUM_REGS): Adjust macro definition.
1955         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1956         (tdesc_s390x_gs_linux64): New declarations.
1957
1958 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1959
1960         * features/s390-gs-linux64.xml: New file.
1961         * features/s390-gs.xml: New file.
1962         * features/s390-gsbc.xml: New file.
1963         * features/s390x-gs-linux64.xml: New file.
1964         * features/Makefile (WHICH): Add s390-gs-linux64 and
1965         s390x-gs-linux64.
1966         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1967         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1968         * features/s390-gs-linux64.c: New generated file.
1969         * features/s390x-gs-linux64.c: New file.
1970         * regformats/s390-gs-linux64.dat: New file.
1971         * regformats/s390x-gs-linux64.dat: New file.
1972
1973 2017-09-23  Tom Tromey  <tom@tromey.com>
1974
1975         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1976
1977 2017-09-22  Tom Tromey  <tom@tromey.com>
1978
1979         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1980         type to scoped_restore_tmpl.
1981         <scoped_input_handler>: Initialize m_quit_handler directly.
1982
1983 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1984
1985         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1986         (cd_command): Likewise.  Free "current_directory" before
1987         assigning to it.
1988         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1989         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1990         * top.c (gdb_dirbuf): Remove global declaration.
1991         * top.h (gdb_dirbuf): Likewise.
1992
1993 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1994
1995         * gnulib/aclocal.m4: Regenerate.
1996         * gnulib/config.in: Regenerate.
1997         * gnulib/configure: Regenerate.
1998         * gnulib/import/Makefile.am: Regenerate.
1999         * gnulib/import/Makefile.in: Regenerate.
2000         * gnulib/import/assure.h: New file.
2001         * gnulib/import/at-func.c: Likewise
2002         * gnulib/import/chdir-long.c: New file.
2003         * gnulib/import/chdir-long.h: New file.
2004         * gnulib/import/cloexec.c: New file.
2005         * gnulib/import/cloexec.h: New file.
2006         * gnulib/import/close.c: New file.
2007         * gnulib/import/closedir.c: New file.
2008         * gnulib/import/dirent-private.h: New file.
2009         * gnulib/import/dup-safer.c: New file.
2010         * gnulib/import/dup.c: New file.
2011         * gnulib/import/dup2.c: New file.
2012         * gnulib/import/error.c: New file.
2013         * gnulib/import/error.h: New file.
2014         * gnulib/import/exitfail.c: New file.
2015         * gnulib/import/exitfail.h: New file.
2016         * gnulib/import/fchdir.c: New file.
2017         * gnulib/import/fcntl.c: New file.
2018         * gnulib/import/fcntl.in.h: New file.
2019         * gnulib/import/fd-hook.c: New file.
2020         * gnulib/import/fd-hook.h: New file.
2021         * gnulib/import/fd-safer.c: New file.
2022         * gnulib/import/fdopendir.c: New file.
2023         * gnulib/import/filename.h: New file.
2024         * gnulib/import/filenamecat-lgpl.c: New file.
2025         * gnulib/import/filenamecat.h: New file.
2026         * gnulib/import/fstat.c: New file.
2027         * gnulib/import/fstatat.c: New file.
2028         * gnulib/import/getcwd-lgpl.c: New file.
2029         * gnulib/import/getcwd.c: New file.
2030         * gnulib/import/getdtablesize.c: New file.
2031         * gnulib/import/getlogin_r.c: New file.
2032         * gnulib/import/getprogname.c: New file.
2033         * gnulib/import/getprogname.h: New file.
2034         * gnulib/import/gettext.h: New file.
2035         * gnulib/import/glob-libc.h: New file.
2036         * gnulib/import/glob.c: New file.
2037         * gnulib/import/glob.in.h: New file.
2038         * gnulib/import/intprops.h: New file.
2039         * gnulib/import/m4/chdir-long.m4: New file.
2040         * gnulib/import/m4/close.m4: New file.
2041         * gnulib/import/m4/closedir.m4: New file.
2042         * gnulib/import/m4/d-ino.m4: New file.
2043         * gnulib/import/m4/d-type.m4: New file.
2044         * gnulib/import/m4/dup.m4: New file.
2045         * gnulib/import/m4/dup2.m4: New file.
2046         * gnulib/import/m4/error.m4: New file.
2047         * gnulib/import/m4/fchdir.m4: New file.
2048         * gnulib/import/m4/fcntl.m4: New file.
2049         * gnulib/import/m4/fcntl_h.m4: New file.
2050         * gnulib/import/m4/fdopendir.m4: New file.
2051         * gnulib/import/m4/filenamecat.m4: New file.
2052         * gnulib/import/m4/fstat.m4: New file.
2053         * gnulib/import/m4/fstatat.m4: New file.
2054         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2055         * gnulib/import/m4/getcwd-path-max.m4: New file.
2056         * gnulib/import/m4/getcwd.m4: New file.
2057         * gnulib/import/m4/getdtablesize.m4: New file.
2058         * gnulib/import/m4/getlogin_r.m4: New file.
2059         * gnulib/import/m4/getprogname.m4: New file.
2060         * gnulib/import/m4/glob.m4: New file.
2061         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2062         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2063         * gnulib/import/m4/mempcpy.m4: New file.
2064         * gnulib/import/m4/memrchr.m4: New file.
2065         * gnulib/import/m4/mode_t.m4: New file.
2066         * gnulib/import/m4/msvc-inval.m4: New file.
2067         * gnulib/import/m4/msvc-nothrow.m4: New file.
2068         * gnulib/import/m4/open.m4: New file.
2069         * gnulib/import/m4/openat.m4: New file.
2070         * gnulib/import/m4/opendir.m4: New file.
2071         * gnulib/import/m4/readdir.m4: New file.
2072         * gnulib/import/m4/realloc.m4: New file.
2073         * gnulib/import/m4/rewinddir.m4: New file.
2074         * gnulib/import/m4/save-cwd.m4: New file.
2075         * gnulib/import/m4/strdup.m4: New file.
2076         * gnulib/import/m4/strerror.m4: New file.
2077         * gnulib/import/m4/unistd-safer.m4: New file.
2078         * gnulib/import/mempcpy.c: New file.
2079         * gnulib/import/memrchr.c: New file.
2080         * gnulib/import/msvc-inval.c: New file.
2081         * gnulib/import/msvc-inval.h: New file.
2082         * gnulib/import/msvc-nothrow.c: New file.
2083         * gnulib/import/msvc-nothrow.h: New file.
2084         * gnulib/import/open.c: New file.
2085         * gnulib/import/openat-die.c: New file.
2086         * gnulib/import/openat-priv.h: New file.
2087         * gnulib/import/openat-proc.c: New file.
2088         * gnulib/import/openat.c: New file.
2089         * gnulib/import/openat.h: New file.
2090         * gnulib/import/opendir.c: New file.
2091         * gnulib/import/pipe-safer.c: New file.
2092         * gnulib/import/readdir.c: New file.
2093         * gnulib/import/realloc.c: New file.
2094         * gnulib/import/rewinddir.c: New file.
2095         * gnulib/import/save-cwd.c: New file.
2096         * gnulib/import/save-cwd.h: New file.
2097         * gnulib/import/strdup.c: New file.
2098         * gnulib/import/strerror-override.c: New file.
2099         * gnulib/import/strerror-override.h: New file.
2100         * gnulib/import/strerror.c: New file.
2101         * gnulib/import/unistd--.h: New file.
2102         * gnulib/import/unistd-safer.h: New file.
2103         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2104         "getcwd" and "glob".
2105         * ser-tcp.c: Undefine "close" before redefining it.
2106
2107 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2108
2109         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2110         get rid of res_val.
2111
2112 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2113
2114         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2115         <sol2,sparc>: Likewise.
2116         <sol2-64,i386>: Likewise.
2117
2118         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2119         -Wdeprecated-declarations on *-*-solaris*.
2120         * configure: Regenerate.
2121
2122         * procfs.c: Include "nat/inferior.h".
2123         (procfs_info_proc): Fix typo.
2124
2125 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2126
2127         * remote.c (vector): Include.
2128         (struct private_thread_info): Add field, thread_handle.
2129         (free_private_thread_info): Deallocate storage associated with
2130         thread handle.
2131         (get_private_info_thread): Initialize `thread_handle' field.
2132         (struct thread_item): Add field, thread_handle.
2133         (clear_threads_listing_context): Deallocate storage associated
2134         with thread handle.
2135         (start_thread): Add support for "handle" attribute.
2136         (thread_attributes): Add "handle".
2137         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2138         field.
2139         (remote_update_thread_list): Update thread_handle.
2140         (remote_thread_handle_to_thread_info): New function.
2141         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2142
2143 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2144
2145         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2146         function.
2147         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2148         * python/python-internal.h (thread_object_type): Declare.
2149
2150 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2151
2152         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2153         (target_thread_handle_to_thread_info): Declare.
2154         * target.c (target_thread_handle_to_thread_info): New function.
2155         * target-delegates.c: Regenerate.
2156         * gdbthread.h (find_thread_by_handle): Declare.
2157         * thread.c (find_thread_by_handle): New function.
2158         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2159         function.
2160         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2161
2162 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2163
2164         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2165
2166 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2167
2168         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2169
2170 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2171
2172         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2173         to gdb_target_obs.
2174
2175 2017-09-20  Tom Tromey  <tom@tromey.com>
2176
2177         * breakpoint.c (struct counted_command_line): Remove.
2178         (breakpoint_commands): Update.
2179         (alloc_counted_command_line, incref_counted_command_line)
2180         (decref_counted_command_line, do_cleanup_counted_command_line)
2181         (make_cleanup_decref_counted_command_line): Remove.
2182         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2183         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2184         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2185         (save_breakpoints): Update.
2186         * breakpoint.h (counted_command_line): Now a typedef to
2187         shared_ptr.
2188         (struct breakpoint) <commands>: Now a counted_command_line.
2189         (struct bpstats) <command>: Likewise.
2190
2191 2017-09-20  Tom Tromey  <tom@tromey.com>
2192
2193         * breakpoint.c (struct commands_info, do_map_commands_command):
2194         Remove.
2195         (commands_command_1): Update.
2196         (iterate_over_related_breakpoints): Take a function_view.
2197         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2198         (delete_command): Update.
2199         (map_breakpoint_numbers): Take a function_view.
2200         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2201         (disable_command): Update.
2202         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2203         (enable_command): Update.
2204         (struct disp_data, do_enable_breakpoint_disp)
2205         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2206         (do_map_enable_delete_breakpoint): Remove.
2207         (enable_once_command, enable_count_command, enable_delete_command)
2208         (delete_trace_variable_command): Update.
2209
2210 2017-09-20  Tom Tromey  <tom@tromey.com>
2211
2212         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2213         (bpstat_clear): Use delete.
2214         (bpstats): New constructors.
2215         (bpstat_copy, bpstat_stop_status): Use new.
2216         (dprintf_after_condition_true): Update.
2217         * breakpoint.h (bpstats::bpstats): Add constructors.
2218         (bpstats::~bpstats): Add destructor.
2219
2220 2017-09-20  Pedro Alves  <palves@redhat.com>
2221
2222         * eval.c (make_params): Delete, refactored as ...
2223         (class fake_method): ... this new type's ctor.
2224         (fake_method::~fake_method): New.
2225         (evaluate_subexp_standard): Use 'fake_method'.
2226
2227 2017-09-20  Tom Tromey  <tom@tromey.com>
2228
2229         * windows-nat.c (get_windows_debug_event, windows_wait)
2230         (do_initial_windows_stuff, windows_attach): Update.
2231         * utils.c (vwarning, internal_vproblem): Update.
2232         (ui_unregister_input_event_handler_cleanup)
2233         (prepare_to_handle_input): Remove.
2234         (class scoped_input_handler): New.
2235         (defaulted_query, prompt_for_continue): Update.
2236         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2237         Update.
2238         * top.c (undo_terminal_modifications_before_exit): Update.
2239         * target/target.h (target_terminal_init, target_terminal_inferior)
2240         (target_terminal_ours): Don't declare.
2241         (class target_terminal): New.
2242         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2243         (target_terminal_ours_for_output)
2244         (make_cleanup_restore_target_terminal): Don't declare.
2245         (target_terminal_info): Remove.
2246         * target.c (enum terminal_state, terminal_state): Remove.
2247         (target_terminal::terminal_state): Define.
2248         (target_terminal::init): Rename from target_terminal_init.
2249         (target_terminal::inferior): Rename from
2250         target_terminal_inferior.
2251         (target_terminal::ours): Rename from target_terminal_ours.
2252         (target_terminal::ours_for_output): Rename from
2253         target_terminal_ours_for_output.
2254         (target_terminal::info): New method.
2255         (cleanup_restore_target_terminal)
2256         (make_cleanup_restore_target_terminal): Remove.
2257         * solib.c (handle_solib_event): Update.
2258         * remote.c (remote_serial_quit_handler): Update.
2259         (remote_terminal_inferior, remote_wait_as): Update.
2260         * record-full.c (record_full_wait_1): Update.
2261         * nto-procfs.c (procfs_create_inferior): Update.
2262         * nat/fork-inferior.c (startup_inferior): Update.
2263         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2264         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2265         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2266         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2267         (mi_breakpoint_created, mi_breakpoint_deleted)
2268         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2269         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2270         (mi_user_selected_context_changed, report_initial_inferior):
2271         Update.
2272         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2273         (linux_nat_terminal_inferior): Update.
2274         * infrun.c (follow_fork_inferior)
2275         (handle_vfork_child_exec_or_exit, do_target_resume)
2276         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2277         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2278         Update.
2279         * inflow.c (child_terminal_init, info_terminal_command): Update.
2280         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2281         (attach_command): Update.
2282         * infcall.c (call_thread_fsm_should_stop): Update.
2283         * gnu-nat.c (gnu_attach): Update.
2284         * extension.c (struct active_ext_lang_state)
2285         (restore_active_ext_lang): Update.
2286         * exceptions.c (print_flush): Update.
2287         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2288         (struct quit_handler_cleanup_data, restore_quit_handler)
2289         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2290         Remove.
2291         * cp-support.c (gdb_demangle): Update.
2292         * breakpoint.c (update_inserted_breakpoint_locations)
2293         (insert_breakpoint_locations, handle_jit_event)
2294         (disable_breakpoints_in_unloaded_shlib): Update.
2295         * annotate.c (annotate_breakpoints_invalid)
2296         (annotate_frames_invalid): Update.
2297
2298 2017-09-20  Tom Tromey  <tom@tromey.com>
2299
2300         * main.c (catch_command_errors): Rename from
2301         catch_command_errors_const.
2302         (captured_main_1): Update.
2303
2304 2017-09-20  Pedro Alves  <palves@redhat.com>
2305
2306         * cli/cli-cmds.c (list_command): Use print_sal_location.
2307         (print_sal_location): New function.
2308         (ambiguous_line_spec): Use print_sal_location.
2309         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2310         * symtab.c (find_function_start_sal): Likewise.
2311         * symtab.h (symtab_and_line::symbol): New field.
2312
2313 2017-09-20  Pedro Alves  <palves@redhat.com>
2314
2315         * linespec.c (minsym_found): Handle non-text minsyms.
2316         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2317
2318 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2319
2320         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2321         backslash.
2322
2323 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2324
2325         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2326         vmovups instead vmovaps.
2327         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2328
2329 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2330
2331         * NEWS (Changes since GDB 8.0): Add starti.
2332         * infcmd.c (enum run_break): New.
2333         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2334         case.
2335         (run_command): Use enum run_how.
2336         (start_command): Likewise.
2337         (starti_command): New function.
2338         (RUN_ARGS_HELP): New macro.
2339         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2340         commands.  Add starti command.
2341
2342 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2343
2344         * Makefile.in (monitor.o): Remove the rule.
2345
2346 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2347
2348         * annotate.h (struct annotate_arg_emitter): Use
2349         DISABLE_COPY_AND_ASSIGN.
2350         * common/refcounted-object.h (refcounted_object): Likewise.
2351         * completer.h (struct completion_result): Likewise.
2352         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2353         * filename-seen-cache.h (filename_seen_cache): Likewise.
2354         * gdbcore.h (thread_section_name): Likewise.
2355         * gdb_regex.h (compiled_regex): Likewise.
2356         * gdbthread.h (scoped_restore_current_thread): Likewise.
2357         * inferior.h (scoped_restore_current_inferior): Likewise.
2358         * jit.c (jit_reader): Likewise.
2359         * linespec.h (struct linespec_result): Likewise.
2360         * mi/mi-parse.h (struct mi_parse): Likewise.
2361         * nat/fork-inferior.c (execv_argv): Likewise.
2362         * progspace.h (scoped_restore_current_program_space): Likewise.
2363         * python/python-internal.h (class gdbpy_enter): Likewise.
2364         * regcache.h (regcache): Likewise.
2365         * target-descriptions.c (struct tdesc_reg): Likewise.
2366         (struct tdesc_type): Likewise.
2367         (struct tdesc_feature): Likewise.
2368         * ui-out.h (ui_out_emit_type): Likewise.
2369
2370 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2371
2372         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2373         label abort_expression.
2374
2375 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2376
2377         * common/buffer.c (buffer_xml_printf): Adjust.
2378         * common/xml-utils.c (xml_escape_text): Change return type to
2379         std::string, update code accordingly.
2380         * common/xml-utils.h (xml_escape_text): Change return type to
2381         std::string.
2382         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2383         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2384         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2385         Adjust.
2386
2387 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2388
2389         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2390         (SUBDIR_UNITTESTS_OBS): Add new object file.
2391         * unittests/xml-utils-selftests.c: New file.
2392
2393 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2394
2395         * common/selftest.h (selftest): New struct/interface.
2396         (register_test): Add name parameter, add new overload.
2397         (run_tests): Add filter parameter.
2398         (for_each_selftest_ftype): New typedef.
2399         (for_each_selftest): New declaration.
2400         * common/selftest.c (tests): Change type to
2401         map<string, unique_ptr<selftest>>.
2402         (simple_selftest): New struct.
2403         (register_test): New function.
2404         (register_test): Add name parameter and use it.
2405         (run_tests): Add filter parameter and use it.  Add prints.
2406         Adjust to vector -> map change.
2407         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2408         registering selftests.
2409         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2410         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2411         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2412         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2413         * findvar.c (_initialize_findvar): Likewise.
2414         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2415         * maint.c (maintenance_selftest): Update call to run_tests.
2416         (maintenance_info_selftests): New function.
2417         (_initialize_maint_cmds): Register "maintenance info selftests"
2418         command.  Update "maintenance selftest" doc.
2419         * regcache.c (_initialize_regcache): Add names when registering
2420         selftests.
2421         * rust-exp.y (_initialize_rust_exp): Likewise.
2422         * selftest-arch.c (gdbarch_selftest): New struct.
2423         (gdbarch_tests): Remove.
2424         (register_test_foreach_arch): Add name parameter.  Call
2425         register_test.
2426         (tests_with_arch): Remove, move most content to
2427         gdbarch_selftest::operator().
2428         (_initialize_selftests_foreach_arch): Remove.
2429         * selftest-arch.h (register_test_foreach_arch): Add name
2430         parameter.
2431         (run_tests_with_arch): New declaration.
2432         * utils-selftests.c (_initialize_utils_selftests): Add names
2433         when registering selftests.
2434         * utils.c (_initialize_utils): Likewise.
2435         * unittests/array-view-selftests.c
2436         (_initialize_array_view_selftests): Likewise.
2437         * unittests/environ-selftests.c (_initialize_environ_selftests):
2438         Likewise.
2439         * unittests/function-view-selftests.c
2440         (_initialize_function_view_selftests): Likewise.
2441         * unittests/offset-type-selftests.c
2442         (_initialize_offset_type_selftests): Likewise.
2443         * unittests/optional-selftests.c
2444         (_initialize_optional_selftests): Likewise.
2445         * unittests/scoped_restore-selftests.c
2446         (_initialize_scoped_restore_selftests): Likewise.
2447         * NEWS: Document "maintenance selftest" and "maint info
2448         selftests".
2449
2450 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2451
2452         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2453         scoped_restore.
2454
2455 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2456
2457         * mi/mi-main.c (mi_load_progress): Make uiout variable
2458         a unique_ptr.
2459
2460 2017-09-15  Pedro Alves  <palves@redhat.com>
2461
2462         * compile/compile-c-types.c (convert_enum, convert_int)
2463         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2464
2465 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2466
2467         * dwarf2read.c (copy_string): Remove.
2468         (parse_macro_definition): Replace copy_string with savestring.
2469
2470 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2471
2472         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2473         gdb_target_obs.
2474         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2475         Likewise.
2476         (i[34567]86-*-linux*): Likewise.
2477
2478 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2479
2480         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2481         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2482         <stack>: Change type to std::vector.
2483         <stack_len, stack_allocated>: Remove.
2484         <grow_stack>: Remove.
2485         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2486         (dwarf_expr_context::~dwarf_expr_context): Remove.
2487         (dwarf_expr_context::grow_stack): Remove.
2488         (dwarf_expr_context::push): Adjust.
2489         (dwarf_expr_context::pop): Adjust.
2490         (dwarf_expr_context::fetch): Adjust.
2491         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2492         (dwarf_expr_context::stack_empty_p): Adjust.
2493         (dwarf_expr_context::execute_stack_op): Adjust.
2494
2495 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2496
2497         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2498         return type to bool.
2499         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2500
2501 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2502
2503         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2504         Change type to bool.
2505         (dwarf_stack_value) <in_stack_memory>: Likewise.
2506         (dwarf_expr_context) <push_address>: Change parameter type to
2507         bool.
2508         <fetch_in_stack_memory>: Change return type to bool.
2509         <push>: Change parameter type to bool.
2510         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2511         to bool.
2512         (dwarf_expr_context::push_address): Likewise.
2513         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2514         to bool.
2515         (dwarf_expr_context::execute_stack_op): Adjust.
2516         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2517
2518 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2519
2520         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2521         (struct dwarf_expr_context) <n_pieces>: Remove.
2522         <pieces>: Change type to std::vector.
2523         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2524         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2525         pieces.
2526         (dwarf_expr_context::add_piece): Adjust.
2527         * dwarf2loc.c (struct piece_closure): Initialize fields.
2528         <n_pieces>: Remove.
2529         <pieces>: Change type to std::vector.
2530         (allocate_piece_closure): Adjust, change parameter to
2531         std::vector rvalue and std::move it to piece_closure.
2532         (rw_pieced_value): Adjust.
2533         (check_pieced_synthetic_pointer): Adjust.
2534         (indirect_synthetic_pointer): Adjust.
2535         (coerce_pieced_ref): Adjust.
2536         (free_pieced_value_closure):  Adjust.  Use delete to free
2537         piece_closure.
2538         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2539         to allocate_piece_closure.
2540         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2541
2542 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2543
2544         * probe.h (probe_ops_cp): Remove typedef.
2545         (DEF_VEC_P (probe_ops_cp)): Remove.
2546         (all_probe_ops): Change type to std::vector.
2547         * probe.c (info_probes_for_ops): Adjust to vector change.
2548         (probe_linespec_to_ops): Likewise.
2549         (all_probe_ops): Change type to std::vector.
2550         (_initialize_probe): Adjust to vector change.
2551         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2552         * elfread.c (elf_get_probes): Likewise.
2553         * stap-probe.c (_initialize_stap_probe): Likewise.
2554
2555 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2556
2557         * probe.h (struct bound_probe): Define constructors.
2558         * probe.c (bound_probe_s): Remove typedef.
2559         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2560         (collect_probes): Change return type to std::vector, remove
2561         cleanup.
2562         (compare_probes): Return bool, change parameter type.  Change
2563         semantic to "less than".
2564         (gen_ui_out_table_header_info): Change parameter to std::vector
2565         and update.
2566         (exists_probe_with_pops): Likewise.
2567         (info_probes_for_ops): Update to std::vector change.
2568         (enable_probes_command): Likewise.
2569         (disable_probes_command): Likewise.
2570
2571 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2572
2573         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2574         vec to std::vector.
2575         * probe.c (parse_probes_in_pspace): Update.
2576         (find_probes_in_objfile): Update.
2577         (find_probe_by_pc): Update.
2578         (collect_probes): Update.
2579         (probe_any_get_probes): Update.
2580         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2581         return type to reference to std::vector.
2582         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2583         std::vector and update.
2584         (dtrace_process_dof): Likewise.
2585         (dtrace_get_probes): Likewise.
2586         * elfread.c (elf_get_probes): Change return type to std::vector,
2587         store an std::vector in bfd_data.
2588         (probe_key_free): Update to std::vector.
2589         * stap-probe.c (handle_stap_probe): Change parameter to
2590         std::vector and update.
2591         (stap_get_probes): Likewise.
2592         * symfile-debug.c (debug_sym_get_probes): Change return type to
2593         std::vector and update.
2594
2595 2017-09-11  Tom Tromey  <tom@tromey.com>
2596
2597         * breakpoint.c (program_breakpoint_here_p): Update.
2598         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2599         from make_show_memory_breakpoints_cleanup.  Return a
2600         scoped_restore_tmpl<int>.
2601         (restore_show_memory_breakpoints): Remove.
2602         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2603         * mem-break.c (memory_validate_breakpoint): Update.
2604         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2605         (ia64_memory_remove_breakpoint): Update.
2606         (ia64_breakpoint_from_pc): Update.
2607         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2608         from make_show_memory_breakpoints_cleanup.
2609
2610 2017-09-11  Tom Tromey  <tom@tromey.com>
2611
2612         * d-namespace.c (d_lookup_symbol): Use std::string.
2613         (find_symbol_in_baseclass): Likewise.
2614
2615 2017-09-11  Tom Tromey  <tom@tromey.com>
2616
2617         * ctf.c (ctf_start): Use std::string.
2618
2619 2017-09-11  Tom Tromey  <tom@tromey.com>
2620
2621         * ada-lang.c (is_known_support_routine): Update.
2622         (ada_unhandled_exception_name_addr_from_raise): Update.
2623         * guile/scm-frame.c (gdbscm_frame_name): Update.
2624         * python/py-frame.c (frapy_name): Update.
2625         (frapy_function): Update.
2626         * stack.h (find_frame_funname): Update.
2627         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2628         (print_frame): Update.
2629
2630 2017-09-11  Tom Tromey  <tom@tromey.com>
2631
2632         * findcmd.c (put_bits): Take a gdb::byte_vector.
2633         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2634         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2635         cleanups.
2636         (find_command): Update.
2637
2638 2017-09-11  Tom Tromey  <tom@tromey.com>
2639
2640         * cli/cli-script.c (class scoped_restore_hook_in): New.
2641         (clear_hook_in_cleanup): Remove.
2642         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2643         scoped_restore_hook_in.
2644
2645 2017-09-11  Tom Tromey  <tom@tromey.com>
2646
2647         * cli/cli-script.c (restore_interp): Remove.
2648         (read_command_lines): Use scoped_restore_interp.
2649         * interps.c (scoped_restore_interp::set_temp): Rename from
2650         interp_set_temp.
2651         * interps.h (class scoped_restore_interp): New.
2652         (interp_set_temp): Remove.
2653
2654 2017-09-11  Tom Tromey  <tom@tromey.com>
2655
2656         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2657         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2658         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2659         scoped_restore.
2660         (mi_cmd_break_insert_1): Update.
2661         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2662         scoped_restore.
2663
2664 2017-09-11  Tom Tromey  <tom@tromey.com>
2665
2666         * demangle.c (demangle_command): Update.
2667         * breakpoint.c (disable_command): Update.
2668         (enable_command): Update.
2669         (find_location_by_number): Make "number" const.  Use
2670         get_number_trailer.
2671         * cli/cli-utils.c (extract_arg): Return std::string.
2672         * probe.c (parse_probe_linespec): Update.  Change types.
2673         (collect_probes): Take string arguments.
2674         (parse_probe_linespec): Likewise.
2675         (info_probes_for_ops): Update.
2676         (enable_probes_command): Update.
2677         (disable_probes_command): Update.
2678         * break-catch-sig.c (catch_signal_split_args): Update.
2679         * mi/mi-parse.c (mi_parse): Update.
2680
2681 2017-09-11  Tom Tromey  <tom@tromey.com>
2682
2683         * language.h (language_enum): Make argument const.
2684         * language.c (language_enum): Make argument const.
2685
2686 2017-09-11  Tom Tromey  <tom@tromey.com>
2687
2688         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2689         as function.
2690         (skip_to_space): Rename from skip_to_space_const.
2691         * common/common-utils.c (skip_to_space): New function.
2692         (skip_to_space): Rename from skip_to_space_const.
2693         * cli/cli-utils.h (get_number): Rename from get_number_const.
2694         (extract_arg): Rename from extract_arg_const.
2695         * cli/cli-utils.c (get_number): Rename from get_number_const.
2696         (extract_arg): Rename from extract_arg_const.
2697         (number_or_range_parser::get_number): Use ::get_number.
2698         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2699         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2700         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2701         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2702         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2703         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2704         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2705         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2706
2707 2017-09-11  Tom Tromey  <tom@tromey.com>
2708
2709         * python/python.c (do_start_initialization): Use
2710         py-event-types.def to initialize types.
2711         Define all object type structures.
2712         * python/python-internal.h: Don't declare event initialization
2713         functions.
2714         * python/py-threadevent.c (thread_event_object_type): Don't
2715         define.
2716         * python/py-stopevent.c (stop_event_object_type): Don't define.
2717         * python/py-signalevent.c (signal_event_object_type): Don't
2718         declare or define.
2719         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2720         (clear_objfiles_event_object_type): Don't declare or define.
2721         * python/py-infevents.c (inferior_call_pre_event_object_type)
2722         (inferior_call_post_event_object_type)
2723         (register_changed_event_object_type)
2724         (memory_changed_event_object_type): Don't declare or define.
2725         * python/py-inferior.c (new_thread_event_object_type)
2726         (new_inferior_event_object_type)
2727         (inferior_deleted_event_object_type): Don't declare or define.
2728         * python/py-exitedevent.c (exited_event_object_type): Don't
2729         declare or define.
2730         * python/py-evts.c (gdbpy_initialize_py_events): Use
2731         py-all-events.def.
2732         * python/py-events.h (thread_event_object_type): Don't declare.
2733         (events_object): Use py-all-events.def.
2734         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2735         py-event-types.def.
2736         * python/py-event-types.def: New file.
2737         * python/py-continueevent.c (create_continue_event_object): Don't
2738         declare or define.
2739         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2740         declare or define.
2741         * python/py-all-events.def: New file.
2742
2743 2017-09-11  Tom Tromey  <tom@tromey.com>
2744
2745         * python/py-threadevent.c (create_thread_event_object): Return
2746         gdbpy_ref.
2747         * python/py-stopevent.h (create_stop_event_object)
2748         (create_breakpoint_event_object, create_signal_event_object):
2749         Update.
2750         * python/py-stopevent.c (create_stop_event_object): Return
2751         gdbpy_ref.
2752         (emit_stop_event): Update.
2753         * python/py-signalevent.c (create_signal_event_object): Return
2754         gdbpy_ref.
2755         * python/py-infevents.c (create_inferior_call_event_object):
2756         Update.
2757         * python/py-event.h (create_event_object)
2758         (create_thread_event_object): Update.
2759         * python/py-event.c (create_event_object): Return gdbpy_ref.
2760         * python/py-continueevent.c: Return gdbpy_ref.
2761         * python/py-bpevent.c (create_breakpoint_event_object): Return
2762         gdbpy_ref.
2763
2764 2017-09-11  Tom Tromey  <tom@tromey.com>
2765
2766         PR python/15622:
2767         * NEWS: Add entry.
2768         * python/python.c (do_start_initialization): Initialize new event
2769         types.
2770         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2771         (gdbpy_initialize_inferior_deleted_event)
2772         (gdbpy_initialize_new_thread_event): Declare.
2773         * python/py-threadevent.c (create_thread_event_object): Add option
2774         "thread" parameter.
2775         * python/py-inferior.c (new_thread_event_object_type)
2776         (new_inferior_event_object_type)
2777         (inferior_deleted_event_object_type): Declare.
2778         (python_new_inferior, python_inferior_deleted): New functions.
2779         (add_thread_object): Emit new_thread event.
2780         (gdbpy_initialize_inferior): Attach new functions to corresponding
2781         observers.
2782         (new_thread, new_inferior, inferior_deleted): Define new event
2783         types.
2784         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2785         registries.
2786         * python/py-events.h (events_object) <new_inferior,
2787         inferior_deleted, new_thread>: New fields.
2788         * python/py-event.h (create_thread_event_breakpoint): Add optional
2789         "thread" parameter.
2790
2791 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2792
2793         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2794         check current_ui instead.
2795         (internal_vproblem): Likewise.
2796
2797 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2798
2799         * thread.c (print_thread_info_1): Remove unnecessary calls to
2800         uiout->is_mi_like_p.
2801
2802 2017-09-09  Tom Tromey  <tom@tromey.com>
2803
2804         * namespace.h (add_using_directive): Update.
2805         * namespace.c (add_using_directive): Change type of excludes to
2806         std::vector.
2807         * dwarf2read.c (read_import_statement): Use std::vector.
2808         (read_namespace): Update.
2809         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2810
2811 2017-09-09  Tom Tromey  <tom@tromey.com>
2812
2813         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2814
2815 2017-09-09  Tom Tromey  <tom@tromey.com>
2816
2817         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2818
2819 2017-09-09  Tom Tromey  <tom@tromey.com>
2820
2821         * stack.c (func_command): Use gdb::def_vector.
2822
2823 2017-09-09  Tom Tromey  <tom@tromey.com>
2824
2825         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2826         ui_out_emit_list, ui_out_emit_tuple.
2827         (mi_cmd_var_update): Likewise.
2828
2829 2017-09-09  Tom Tromey  <tom@tromey.com>
2830
2831         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2832         ui_out_redirect_pop.
2833         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2834         ui_out_redirect_pop.
2835         * utils.c (do_ui_out_redirect_pop)
2836         (make_cleanup_ui_out_redirect_pop): Remove.
2837         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2838         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2839         * ui-out.h (ui_out_redirect_pop): New class.
2840
2841 2017-09-09  Tom Tromey  <tom@tromey.com>
2842
2843         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2844         (list_available_thread_groups, mi_cmd_list_thread_groups)
2845         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2846         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2847         Likewise.
2848
2849 2017-09-09  Tom Tromey  <tom@tromey.com>
2850
2851         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2852         ui_out_emit_tuple.
2853
2854 2017-09-09  Tom Tromey  <tom@tromey.com>
2855
2856         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2857         * stack.c (print_frame): Use ui_out_emit_tuple.
2858         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2859         (info_spu_mailbox_command, info_spu_dma_command)
2860         (info_spu_proxydma_command): Likewise.
2861         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2862         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2863         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2864         ui_out_emit_tuple.
2865         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2866
2867 2017-09-09  Tom Tromey  <tom@tromey.com>
2868
2869         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2870         (class ui_out_emit_table): Update comment.
2871         * ui-out.c (do_cleanup_table_end)
2872         (make_cleanup_ui_out_table_begin_end): Remove.
2873         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2874         (info_spu_dma_cmdlist): Likewise.
2875         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2876         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2877         ui_out_emit_table.
2878
2879 2017-09-09  Tom Tromey  <tom@tromey.com>
2880
2881         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2882         ui_out_emit_list, gdb::optional.
2883
2884 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2885
2886         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2887         prototype.
2888         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2889         prototype.
2890         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2891         prototype.
2892         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2893         * ada-exp.y: Remove _initialize_ada_exp prototype.
2894         * ada-lang.c: Remove _initialize_ada_language prototype.
2895         * ada-tasks.c: Remove _initialize_tasks prototype.
2896         * addrmap.c: Remove _initialize_addrmap prototype.
2897         * agent.c: Remove _initialize_agent prototype.
2898         * aix-thread.c: Remove _initialize_aix_thread prototype.
2899         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2900         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2901         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2902         prototype.
2903         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2904         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2905         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2906         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2907         prototype.
2908         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2909         prototype.
2910         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2911         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2912         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2913         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2914         prototype.
2915         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2916         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2917         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2918         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2919         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2920         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2921         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2922         prototype.
2923         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2924         prototype.
2925         * annotate.c: Remove _initialize_annotate prototype.
2926         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2927         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2928         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2929         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2930         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2931         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2932         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2933         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2934         prototype.
2935         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2936         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2937         * auto-load.c: Remove _initialize_auto_load prototype.
2938         * auxv.c: Remove _initialize_auxv prototype.
2939         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2940         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2941         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2942         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2943         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2944         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2945         prototype.
2946         * break-catch-throw.c: Remove _initialize_break_catch_throw
2947         prototype.
2948         * breakpoint.c: Remove _initialize_breakpoint prototype.
2949         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2950         * btrace.c: Remove _initialize_btrace prototype.
2951         * charset.c: Remove _initialize_charset prototype.
2952         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2953         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2954         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2955         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2956         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2957         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2958         * coffread.c: Remove _initialize_coffread prototype.
2959         * compile/compile.c: Remove _initialize_compile prototype.
2960         * complaints.c: Remove _initialize_complaints prototype.
2961         * completer.c: Remove _initialize_completer prototype.
2962         * copying.awk: Remove _initialize_copying prototype.
2963         * copying.c: Regenerate.
2964         * core-regset.c: Remove _initialize_core_regset prototype.
2965         * corefile.c: Remove _initialize_core prototype.
2966         * corelow.c: Remove _initialize_corelow prototype.
2967         * cp-abi.c: Remove _initialize_cp_abi prototype.
2968         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2969         * cp-support.c: Remove _initialize_cp_support prototype.
2970         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2971         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2972         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2973         * ctf.c: Remove _initialize_ctf prototype.
2974         * d-lang.c: Remove _initialize_d_language prototype.
2975         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2976         prototype.
2977         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2978         * dbxread.c: Remove _initialize_dbxread prototype.
2979         * dcache.c: Remove _initialize_dcache prototype.
2980         * demangle.c: Remove _initialize_demangler prototype.
2981         * disasm-selftests.c: Remove _initialize_disasm_selftests
2982         prototype.
2983         * disasm.c: Remove _initialize_disasm prototype.
2984         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2985         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2986         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2987         prototype.
2988         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2989         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2990         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2991         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2992         * elfread.c: Remove _initialize_elfread prototype.
2993         * exec.c: Remove _initialize_exec prototype.
2994         * extension.c: Remove _initialize_extension prototype.
2995         * f-lang.c: Remove _initialize_f_language prototype.
2996         * f-valprint.c: Remove _initialize_f_valprint prototype.
2997         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2998         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2999         * filesystem.c: Remove _initialize_filesystem prototype.
3000         * findcmd.c: Remove _initialize_mem_search prototype.
3001         * fork-child.c: Remove _initialize_fork_child prototype.
3002         * frame-base.c: Remove _initialize_frame_base prototype.
3003         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3004         * frame.c: Remove _initialize_frame prototype.
3005         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3006         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3007         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3008         * gcore.c: Remove _initialize_gcore prototype.
3009         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3010         * gdbarch.c: Regenerate.
3011         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3012         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3013         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3014         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3015         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3016         * go-lang.c: Remove _initialize_go_language prototype.
3017         * go32-nat.c: Remove _initialize_go32_nat prototype.
3018         * guile/guile.c: Remove _initialize_guile prototype.
3019         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3020         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3021         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3022         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3023         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3024         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3025         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3026         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3027         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3028         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3029         prototype.
3030         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3031         prototype.
3032         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3033         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3034         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3035         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3036         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3037         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3038         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3039         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3040         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3041         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3042         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3043         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3044         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3045         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3046         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3047         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3048         prototype.
3049         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3050         prototype.
3051         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3052         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3053         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3054         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3055         * infcall.c: Remove _initialize_infcall prototype.
3056         * infcmd.c: Remove _initialize_infcmd prototype.
3057         * inferior.c: Remove _initialize_inferiors prototype.
3058         * inflow.c: Remove _initialize_inflow prototype.
3059         * infrun.c: Remove _initialize_infrun prototype.
3060         * interps.c: Remove _initialize_interpreter prototype.
3061         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3062         * jit.c: Remove _initialize_jit prototype.
3063         * language.c: Remove _initialize_language prototype.
3064         * linux-fork.c: Remove _initialize_linux_fork prototype.
3065         * linux-nat.c: Remove _initialize_linux_nat prototype.
3066         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3067         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3068         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3069         * m2-lang.c: Remove _initialize_m2_language prototype.
3070         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3071         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3072         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3073         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3074         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3075         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3076         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3077         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3078         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3079         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3080         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3081         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3082         * machoread.c: Remove _initialize_machoread prototype.
3083         * macrocmd.c: Remove _initialize_macrocmd prototype.
3084         * macroscope.c: Remove _initialize_macroscope prototype.
3085         * maint.c: Remove _initialize_maint_cmds prototype.
3086         * mdebugread.c: Remove _initialize_mdebugread prototype.
3087         * memattr.c: Remove _initialize_mem prototype.
3088         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3089         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3090         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3091         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3092         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3093         * microblaze-linux-tdep.c: Remove
3094         _initialize_microblaze_linux_tdep prototype.
3095         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3096         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3097         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3098         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3099         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3100         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3101         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3102         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3103         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3104         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3105         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3106         prototype.
3107         * mipsread.c: Remove _initialize_mipsread prototype.
3108         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3109         prototype.
3110         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3111         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3112         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3113         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3114         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3115         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3116         prototype.
3117         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3118         * nto-procfs.c: Remove _initialize_procfs prototype.
3119         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3120         * objc-lang.c: Remove _initialize_objc_language prototype.
3121         * objfiles.c: Remove _initialize_objfiles prototype.
3122         * observer.c: Remove observer_test_first_notification_function,
3123         observer_test_second_notification_function,
3124         observer_test_third_notification_function, and
3125         _initialize_observer prototypes.
3126         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3127         * osabi.c: Remove _initialize_gdb_osabi prototype.
3128         * osdata.c: Remove _initialize_osdata prototype.
3129         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3130         * parse.c: Remove _initialize_parse prototype.
3131         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3132         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3133         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3134         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3135         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3136         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3137         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3138         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3139         * printcmd.c: Remove _initialize_printcmd prototype.
3140         * probe.c: Remove _initialize_probe prototype.
3141         * proc-api.c: Remove _initialize_proc_api prototype.
3142         * proc-events.c: Remove _initialize_proc_events prototype.
3143         * proc-service.c: Remove _initialize_proc_service prototype.
3144         * procfs.c: Remove _initialize_procfs prototype.
3145         * psymtab.c: Remove _initialize_psymtab prototype.
3146         * python/python.c: Remove _initialize_python prototype.
3147         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3148         * record-btrace.c: Remove _initialize_record_btrace prototype.
3149         * record-full.c: Remove _initialize_record_full prototype.
3150         * record.c: Remove _initialize_record prototype.
3151         * regcache.c: Remove _initialize_regcache prototype.
3152         * reggroups.c: Remove _initialize_reggroup prototype.
3153         * remote-notif.c: Remove _initialize_notif prototype.
3154         * remote-sim.c: Remove _initialize_remote_sim prototype.
3155         * remote.c: Remove _initialize_remote prototype.
3156         * reverse.c: Remove _initialize_reverse prototype.
3157         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3158         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3159         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3160         prototype.
3161         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3162         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3163         * rust-exp.y: Remove _initialize_rust_exp prototype.
3164         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3165         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3166         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3167         * score-tdep.c: Remove _initialize_score_tdep prototype.
3168         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3169         prototype.
3170         * ser-go32.c: Remove _initialize_ser_dos prototype.
3171         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3172         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3173         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3174         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3175         * serial.c: Remove _initialize_serial prototype.
3176         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3177         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3178         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3179         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3180         * skip.c: Remove _initialize_step_skip prototype.
3181         * sol-thread.c: Remove _initialize_sol_thread prototype.
3182         * solib-aix.c: Remove _initialize_solib_aix prototype.
3183         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3184         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3185         * solib-frv.c: Remove _initialize_frv_solib prototype.
3186         * solib-spu.c: Remove _initialize_spu_solib prototype.
3187         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3188         * solib-target.c: Remove _initialize_solib_target prototype.
3189         * solib.c: Remove _initialize_solib prototype.
3190         * source.c: Remove _initialize_source prototype.
3191         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3192         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3193         prototype.
3194         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3195         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3196         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3197         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3198         prototype.
3199         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3200         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3201         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3202         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3203         prototype.
3204         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3205         prototype.
3206         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3207         prototype.
3208         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3209         prototype.
3210         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3211         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3212         prototype.
3213         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3214         prototype.
3215         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3216         prototype.
3217         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3218         prototype.
3219         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3220         prototype.
3221         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3222         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3223         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3224         * stabsread.c: Remove _initialize_stabsread prototype.
3225         * stack.c: Remove _initialize_stack prototype.
3226         * stap-probe.c: Remove _initialize_stap_probe prototype.
3227         * std-regs.c: Remove _initialize_frame_reg prototype.
3228         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3229         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3230         * symfile.c: Remove _initialize_symfile prototype.
3231         * symmisc.c: Remove _initialize_symmisc prototype.
3232         * symtab.c: Remove _initialize_symtab prototype.
3233         * target-dcache.c: Remove _initialize_target_dcache prototype.
3234         * target-descriptions.c: Remove _initialize_target_descriptions
3235         prototype.
3236         * thread.c: Remove _initialize_thread prototype.
3237         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3238         prototype.
3239         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3240         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3241         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3242         prototype.
3243         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3244         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3245         * tracefile.c: Remove _initialize_tracefile prototype.
3246         * tracepoint.c: Remove _initialize_tracepoint prototype.
3247         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3248         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3249         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3250         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3251         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3252         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3253         * tui/tui.c: Remove _initialize_tui prototype.
3254         * typeprint.c: Remove _initialize_typeprint prototype.
3255         * user-regs.c: Remove _initialize_user_regs prototype.
3256         * utils.c: Remove _initialize_utils prototype.
3257         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3258         * valarith.c: Remove _initialize_valarith prototype.
3259         * valops.c: Remove _initialize_valops prototype.
3260         * valprint.c: Remove _initialize_valprint prototype.
3261         * value.c: Remove _initialize_values prototype.
3262         * varobj.c: Remove _initialize_varobj prototype.
3263         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3264         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3265         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3266         * windows-nat.c: Remove _initialize_windows_nat,
3267         _initialize_check_for_gdb_ini, and _initialize_loadable
3268         prototypes.
3269         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3270         * xcoffread.c: Remove _initialize_xcoffread prototype.
3271         * xml-support.c: Remove _initialize_xml_support prototype.
3272         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3273         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3274         prototype.
3275         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3276         prototype.
3277         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3278
3279 2017-09-08  Keith Seitz  <keiths@redhat.com>
3280
3281         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3282         field.
3283
3284 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3285
3286         * f-valprint.c (f_val_print): Remove check for one byte
3287         sized integers. Remove printing of character type.
3288
3289 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3290             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3291             Bernhard Heckel  <bernhard.heckel@intel.com>
3292
3293         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3294         to maintain proper indentation when printing pointers/refs.
3295
3296 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3297
3298         GDB 8.0.1 released.
3299
3300 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3301
3302         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3303
3304 2017-09-05  Tom Tromey  <tom@tromey.com>
3305
3306         * parse.c (funcall_chain): Now a std::vector.
3307         (start_arglist, end_arglist): Simplify.
3308         (free_funcalls): Remove.
3309         (parse_exp_in_context_1): Remove cleanup.
3310
3311 2017-09-05  Tom Tromey  <tom@tromey.com>
3312
3313         * go-exp.y (go_parse): Don't create a cleanup.
3314
3315 2017-09-05  Tom Tromey  <tom@tromey.com>
3316
3317         * d-exp.y (PrimaryExpression): Use std::string.
3318         (d_parse): Don't create a cleanup.
3319
3320 2017-09-05  Tom Tromey  <tom@tromey.com>
3321
3322         * utils.c (do_clear_parser_state): Remove.
3323         (make_cleanup_clear_parser_state): Remove.
3324         * p-exp.y (pascal_parse): Use scoped_restore.
3325         * m2-exp.y (m2_parse): Use scoped_restore.
3326         * f-exp.y (f_parse): Use scoped_restore.
3327         * d-exp.y (d_parse): Use scoped_restore.
3328         * c-exp.y (c_parse): Use scoped_restore.
3329         * ada-exp.y (ada_parse): Use scoped_restore.
3330         * utils.h (make_cleanup_clear_parser_state): Remove.
3331
3332 2017-09-06  Keith Seitz  <keiths@redhat.com>
3333
3334         * dwarf2read.c (dw2_linkage_name_attr): New function.
3335         (dw2_linkage_name): New function.
3336         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3337         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3338         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3339
3340 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3341
3342         * config/djgpp/djconfig.sh: Correct shell portability issue.
3343
3344 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3345
3346         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3347
3348 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3349
3350         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3351         * NEWS: Mention new FreeBSD/mips native configuration.
3352         * configure.host: Add aarch64*-*-freebsd*.
3353         * configure.nat: Likewise.
3354         * aarch64-fbsd-nat.c: New file.
3355
3356 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3357
3358         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3359         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3360         * NEWS: Mention new FreeBSD/aarch64 target.
3361         * configure.tgt: Add aarch64*-*-freebsd*.
3362         * aarch64-fbsd-tdep.c: New file.
3363         * aarch64-fbsd-tdep.h: New file.
3364
3365 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3366
3367         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3368
3369 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3370
3371         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3372         of TLS symbols.
3373
3374 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3375
3376         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3377         call.
3378
3379 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3380
3381         * infrun.c (follow_exec): Call add_thread after
3382         target_find_description.
3383
3384 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3385
3386         * infrun.c (handle_inferior_event_1): When exec'ing, read
3387         stop_pc after follow_exec.
3388
3389 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         * remote.c (process_g_packet): Update error message.
3392
3393 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3394
3395         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3396         targets.
3397
3398 2017-09-05  Pedro Alves  <palves@redhat.com>
3399
3400         * eval.c (eval_call, evaluate_funcall): New functions, factored
3401         out from ...
3402         (evaluate_subexp_standard): ... this.
3403
3404 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3405
3406         * amd64-tdep.c (amd64_target_description): Create target
3407         descriptions.
3408         (_initialize_amd64_tdep): Don't call functions
3409         initialize_tdesc_amd64_*.  Add self tests.
3410         * arch/amd64.c (amd64_create_target_description): Add parameter
3411         is_linux.  Call set_tdesc_osabi if is_linux is true.
3412         * arch/amd64.h (amd64_create_target_description): Update the
3413         declaration.
3414         * arch/i386.c (i386_create_target_description): Add parameter
3415         is_linux.  Call set_tdesc_osabi if is_linux is true.
3416         * arch/i386.h (i386_create_target_description): Update
3417         declaration.
3418         * configure.tgt: Add i386.o to gdb_target_obs.
3419         * features/Makefile (XMLTOC): Remove i386/*.xml.
3420         * features/i386/amd64-avx-avx512.c: Remove.
3421         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3422         * features/i386/amd64-avx-mpx.c: Remove.
3423         * features/i386/amd64-avx.c: Remove.
3424         * features/i386/amd64-mpx.c: Remove.
3425         * features/i386/amd64.c: Remove.
3426         * features/i386/i386-avx-avx512.c: Remove.
3427         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3428         * features/i386/i386-avx-mpx.c: Remove.
3429         * features/i386/i386-avx.c: Remove.
3430         * features/i386/i386-mmx.c: Remove.
3431         * features/i386/i386-mpx.c: Remove.
3432         * features/i386/i386.c: Remove.
3433         * i386-tdep.c: Don't include features/i386/i386*.c., include
3434         target-descriptions.h and arch/i386.h.
3435         (i386_target_description): Create target descriptions.
3436         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3437         functions.  Do self tests.
3438
3439 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3440
3441         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3442         * features/i386/amd64-avx-avx512-linux.c: Removed.
3443         * features/i386/amd64-avx-linux.c: Removed.
3444         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3445         * features/i386/amd64-avx-mpx-linux.c: Removed.
3446         * features/i386/amd64-linux.c: Removed.
3447         * features/i386/amd64-mpx-linux.c: Removed.
3448         * features/i386/x32-avx-avx512-linux.c: Removed.
3449         * features/i386/x32-avx-linux.c: Removed.
3450         * features/i386/x32-linux.c: Removed.
3451
3452 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3453
3454         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3455         features/i386/*.c.
3456         (amd64_linux_read_description): Call
3457         amd64_create_target_description.
3458         * arch/amd64.c: New file.
3459         * arch/amd64.h: New file.
3460         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3461         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3462
3463 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3464
3465         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3466         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3467         (amd64_linux_read_description): Create target descriptions.
3468         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3469         functions.  Add unit tests.
3470         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3471         x32-core.xml.
3472         * features/i386/64bit-avx.c: Generated.
3473         * features/i386/64bit-avx512.c: Generated.
3474         * features/i386/64bit-core.c: Generated.
3475         * features/i386/64bit-linux.c: Generated.
3476         * features/i386/64bit-mpx.c: Generated.
3477         * features/i386/64bit-pkeys.c: Generated.
3478         * features/i386/64bit-segments.c: Generated.
3479         * features/i386/64bit-sse.c: Generated.
3480         * features/i386/x32-core.c: Generated.
3481         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3482         c files for amd64-linux and x32-linux.
3483
3484 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3485
3486         * amd64-linux-tdep.c (amd64_linux_read_description): New
3487         function.
3488         (amd64_linux_core_read_description): Call
3489         amd64_linux_read_description.
3490         (amd64_linux_init_abi): Likewise.
3491         (amd64_x32_linux_init_abi): Likewise.
3492         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3493         * x86-linux-nat.c (x86_linux_read_description): Call
3494         amd64_linux_read_description.
3495
3496 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3497
3498         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3499         comments.
3500
3501 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3502
3503         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3504         * features/i386/i386-avx-avx512-linux.c: Remove.
3505         * features/i386/i386-avx-linux.c: Remove.
3506         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3507         * features/i386/i386-avx-mpx-linux.c: Remove.
3508         * features/i386/i386-linux.c: Remove.
3509         * features/i386/i386-mmx-linux.c: Remove.
3510         * features/i386/i386-mpx-linux.c: Remove.
3511
3512 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3513
3514         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3515         (SFILES): Add arch/i386.c.
3516         (HFILES_NO_SRCDIR): Add arch/i386.h.
3517         * arch/i386.c: New file.
3518         * arch/i386.h: New file.
3519         * arch/tdesc.h (allocate_target_description): Declare.
3520         (set_tdesc_architecture): Declare.
3521         (set_tdesc_osabi): Declare.
3522         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3523         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3524         include arch/i386.h.
3525         (i386_linux_read_description): Remove code and call
3526         i386_create_target_description.
3527         (set_tdesc_architecture): New function.
3528         (set_tdesc_osabi): New function.
3529         * target-descriptions.h (allocate_target_description): Remove.
3530
3531 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3532
3533         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3534         * target-descriptions.c (tdesc_create_feature): Likewise, and
3535         adjust code.
3536         * features/i386/32bit-avx.c: Re-generated.
3537         * features/i386/32bit-avx512.c: Re-generated.
3538         * features/i386/32bit-core.c: Re-generated.
3539         * features/i386/32bit-linux.c: Re-generated.
3540         * features/i386/32bit-mpx.c: Re-generated.
3541         * features/i386/32bit-pkeys.c: Re-generated.
3542         * features/i386/32bit-sse.c: Re-generated.
3543
3544 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3545
3546         * regformats/regdef.h (struct reg): Override operator == and !=.
3547
3548 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3549
3550         * arch/tdesc.h: New file.
3551         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3552         * target-descriptions.c: Update comments.
3553         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3554         declarations.
3555         * features/i386/32bit-avx.c: Re-generated.
3556         * features/i386/32bit-avx512.c: Re-generated.
3557         * features/i386/32bit-core.c: Re-generated.
3558         * features/i386/32bit-linux.c: Re-generated.
3559         * features/i386/32bit-mpx.c: Re-generated.
3560         * features/i386/32bit-pkeys.c: Re-generated.
3561         * features/i386/32bit-sse.c: Re-generated.
3562
3563 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3564
3565         * regformats/regdat.sh: Update generated code.
3566
3567 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3568
3569         * regformats/regdat.sh: Adjust code order.
3570
3571 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3572
3573         * expprint.c (dump_subexp_body_standard): Use constant format
3574         string in fprintf_filtered call.
3575
3576 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3577
3578         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3579         NetBSD/i386.
3580         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3581
3582 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3583
3584         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3585
3586 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3587
3588         * bsd-kvm.o: Define _KMEMUSER.
3589         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3590         * configure: Regenerate.
3591
3592 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3593
3594         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3595         * i386-fbsd-nat.c: Likewise.
3596
3597 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3598
3599         * unittests/array-view-selftests.c: Add include of <array>.
3600
3601 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3602
3603         * spu-tdep.c (flush_ea_cache): Add missing argument to
3604         call_function_by_hand.
3605
3606 2017-09-04  Pedro Alves  <palves@redhat.com>
3607
3608         * NEWS (Safer support for debugging with no debug info): New.
3609
3610 2017-09-04  Pedro Alves  <palves@redhat.com>
3611
3612         * c-exp.y (function_method, function_method_void): Add current
3613         instance flags to TYPE_INSTANCE.
3614         * dwarf2read.c (check_modifier): New.
3615         (compute_delayed_physnames): Assert that only C++ adds delayed
3616         physnames.  Mark fn_fields as const/volatile depending on
3617         physname.
3618         * eval.c (make_params): New type_instance_flags parameter.  Use
3619         it as the new type's instance flags.
3620         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3621         flags element and pass it to make_params.
3622         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3623         instance flags element.
3624         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3625         * gdbtypes.h: Include "enum-flags.h".
3626         (type_instance_flags): New enum-flags type.
3627         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3628         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3629         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3630         (follow_type_instance_flags): New function.
3631         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3632         * parser-defs.h (follow_type_instance_flags): Declare.
3633         * valops.c (value_struct_elt_for_reference): const/volatile must
3634         match too.
3635
3636 2017-09-04  Pedro Alves  <palves@redhat.com>
3637
3638         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3639         function/method scopes; lookup the nested name as a function local
3640         static variable.
3641
3642 2017-09-04  Pedro Alves  <palves@redhat.com>
3643
3644         (%type <voidval>): Add function_method.
3645         * c-exp.y (exp): New production for calls with no arguments.
3646         (function_method, function_method_void_or_typelist): New
3647         productions.
3648         (exp): New production for "method()::static_var".
3649         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3650         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3651         Handle OP_FUNC_STATIC_VAR.
3652         * parse.c (operator_length_standard):
3653         Handle OP_FUNC_STATIC_VAR.
3654
3655 2017-09-04  Pedro Alves  <palves@redhat.com>
3656
3657         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3658         handling.
3659         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3660         Ditto.
3661         * parse.c (operator_length_standard, operator_check_standard):
3662         Ditto.
3663         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3664
3665 2017-09-04  Pedro Alves  <palves@redhat.com>
3666
3667         * ax-gdb.c: Include "typeprint.h".
3668         (gen_expr_for_cast): New function.
3669         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3670         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3671         type is unknown.
3672         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3673         nodebug_data_symbol.
3674         * eval.c: Include "typeprint.h".
3675         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3676         Error out if symbol has unknown type.
3677         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3678         evaluate_subexp_for_cast.
3679         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3680         OP_VAR_MSYM_VALUE.
3681         (evaluate_subexp_for_cast): New function.
3682         * gdbtypes.c (init_nodebug_var_type): New function.
3683         (objfile_type): Use it to initialize types of variables with no
3684         debug info.
3685         * typeprint.c (error_unknown_type): New.
3686         * typeprint.h (error_unknown_type): New declaration.
3687         * compile/compile-c-types.c (convert_type_basic): Handle
3688         TYPE_CODE_ERROR; warn and fallback to int for variables with
3689         unknown type.
3690
3691 2017-09-04  Pedro Alves  <palves@redhat.com>
3692
3693         * eval.c (evaluate_var_value): New function, factored out from ...
3694         (evaluate_subexp_standard): ... here.
3695
3696 2017-09-04  Pedro Alves  <palves@redhat.com>
3697
3698         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3699         Remove useless assignments to 'op'.
3700
3701 2017-09-04  Pedro Alves  <palves@redhat.com>
3702
3703         * eval.c (eval_skip_value): New function.
3704         (evaluate_subexp_standard): Use it.
3705
3706 2017-09-04  Pedro Alves  <palves@redhat.com>
3707
3708         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3709         function name from symbol/minsym and pass it to
3710         error_call_unknown_return_type.
3711
3712 2017-09-04  Pedro Alves  <palves@redhat.com>
3713
3714         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3715         * ax-gdb.c (gen_msym_var_ref): New function.
3716         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3717         * eval.c (evaluate_var_msym_value): New function.
3718         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3719         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3720         to call_function_by_hand.
3721         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3722         Handle OP_VAR_MSYM_VALUE.
3723         (union exp_element) <msymbol>: New field.
3724         * minsyms.h (struct type): Forward declare.
3725         (find_minsym_type_and_address): Declare.
3726         * parse.c (write_exp_elt_msym): New function.
3727         (write_exp_msymbol): Delete, refactored as ...
3728         (find_minsym_type_and_address): ... this new function.
3729         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3730         (operator_length_standard, operator_check_standard): Handle
3731         OP_VAR_MSYM_VALUE.
3732         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3733
3734 2017-09-04  Pedro Alves  <palves@redhat.com>
3735
3736         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3737         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3738         unknown.
3739         * ada-typeprint.c (print_func_type): Handle functions with unknown
3740         return type.
3741         * c-typeprint.c (c_type_print_base): Handle functions and methods
3742         with unknown return type.
3743         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3744         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3745         * compile/compile-c-types.c: Include "objfiles.h".
3746         (convert_func): For functions with unknown return type, warn and
3747         default to int.
3748         * compile/compile-object-run.c (compile_object_run): Adjust call
3749         to call_function_by_hand_dummy.
3750         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3751         call_function_by_hand.
3752         * eval.c (evaluate_subexp_standard): Adjust calls to
3753         call_function_by_hand.  Handle functions and methods with unknown
3754         return type.  Pass expect_type to call_function_by_hand.
3755         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3756         return type.
3757         * gcore.c (call_target_sbrk): Adjust call to
3758         call_function_by_hand.
3759         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3760         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3761         an integer address type instead of nodebug.
3762         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3763         call_function_by_hand.
3764         * infcall.c (error_call_unknown_return_type): New function.
3765         (call_function_by_hand): New "default_return_type" parameter.
3766         Pass it down.
3767         (call_function_by_hand_dummy): New "default_return_type"
3768         parameter.  Use it instead of defaulting to int.  If there's no
3769         default and the return type is unknown, throw an error.  If
3770         there's a default return type, and the called function has no
3771         debug info, then assume the function is prototyped.
3772         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3773         New "default_return_type" parameter.
3774         (error_call_unknown_return_type): New declaration.
3775         * linux-fork.c (call_lseek): Cast return type of lseek.
3776         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3777         call_function_by_hand.
3778         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3779         calls to call_function_by_hand.
3780         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3781         return type.
3782         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3783         (value_nsstring, print_object_command): Adjust calls to
3784         call_function_by_hand.
3785         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3786         functions with unknown return type.
3787         (pascal_type_print_func_varspec_suffix): New function.
3788         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3789         TYPE_CODE_METHOD>: Use it.
3790         * python/py-value.c (valpy_call): Adjust call to
3791         call_function_by_hand.
3792         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3793         call_function_by_hand.
3794         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3795         call_function_by_hand.
3796         * valops.c (value_allocate_space_in_inferior): Adjust call to
3797         call_function_by_hand.
3798         * typeprint.c (type_print_unknown_return_type): New function.
3799         * typeprint.h (type_print_unknown_return_type): New declaration.
3800
3801 2017-09-04  Pedro Alves  <palves@redhat.com>
3802
3803         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3804         types with more than one parameter as prototyped.
3805
3806 2017-09-04  Pedro Alves  <palves@redhat.com>
3807
3808         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3809         (disassemble_command): Use gdb_disassembly_flags instead of bare
3810         int.
3811         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3812         (dump_insns, do_mixed_source_and_assembly_deprecated)
3813         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3814         Use gdb_disassembly_flags instead of bare int.
3815         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3816         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3817         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3818         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3819         (enum gdb_disassembly_flag): ... values of this new enumeration.
3820         (gdb_disassembly_flags): Define.
3821         (gdb_disassembly)
3822         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3823         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3824         gdb_disassembly_flags instead of bare int.
3825         * record-btrace.c (btrace_insn_history)
3826         (record_btrace_insn_history, record_btrace_insn_history_range)
3827         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3828         instead of bare int.
3829         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3830         Use gdb_disassembly_flags instead of bare int.
3831         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3832         Define.
3833         * target-delegates.c: Regenerate.
3834         * target.c (target_insn_history, target_insn_history_from)
3835         (target_insn_history_range): Use gdb_disassembly_flags instead of
3836         bare int.
3837         * target.h: Include "disasm.h".
3838         (struct target_ops) <to_insn_history, to_insn_history_from,
3839         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3840         int.
3841         (target_insn_history, target_insn_history_from)
3842         (target_insn_history_range): Use gdb_disassembly_flags instead of
3843         bare int.
3844
3845 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3846
3847         * cli/cli-script.c (build_command_line): For if/while commands,
3848         check whether args is empty.
3849
3850 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3851
3852         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3853         (enum command_control_type): Likewise.
3854         (struct command_line): Likewise.
3855         (free_command_lines): Likewise.
3856         (struct command_lines_deleter): Likewise.
3857         (command_line_up): Likewise.
3858         (read_command_lines): Likewise.
3859         (read_command_lines_1): Likewise.
3860         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3861         (enum command_control_type): Likewise.
3862         (struct command_line): Likewise.
3863         (free_command_lines): Likewise.
3864         (struct command_lines_deleter): Likewise.
3865         (command_line_up): Likewise.
3866         (read_command_lines): Likewise.
3867         (read_command_lines_1): Likewise.
3868         * breakpoint.h: Include cli/cli-script.h.
3869         * extension-priv.h: Likewise.
3870         * gdbcmd.h: Likewise.
3871
3872 2017-09-04  Pedro Alves  <palves@redhat.com>
3873
3874         * ada-lang.c (is_known_support_routine): Move sal declaration to
3875         where it is initialized.
3876         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3877         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3878         (clear_command, update_static_tracepoint): Remove init_sal
3879         references.  Move declarations closer to initializations.
3880         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3881         initializations.
3882         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3883         references.  Move sal declarations closer to initializations.
3884         * frame.c (find_frame_sal): Return a symtab_and_line via function
3885         return instead of output parameter.  Remove init_sal references.
3886         * frame.h (find_frame_sal): Return a symtab_and_line via function
3887         return instead of output parameter.
3888         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3889         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3890         instead of memset.
3891         (gdbscm_find_pc_line): Remove init_sal reference.
3892         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3893         references.  Move declarations closer to initializations.
3894         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3895         initializations.
3896         (finish_backward): Remove init_sal references.  Move declarations
3897         closer to initializations.
3898         * infrun.c (process_event_stop_test, handle_step_into_function)
3899         (insert_hp_step_resume_breakpoint_at_frame)
3900         (insert_step_resume_breakpoint_at_caller): Likewise.
3901         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3902         (symbol_to_sal): Likewise.
3903         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3904         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3905         to its initialization.
3906         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3907         init_sal references.  Move declarations closer to initializations.
3908         * source.c (get_current_source_symtab_and_line): Remove brace
3909         initialization.
3910         (set_current_source_symtab_and_line): Now takes the sal by const
3911         reference.  Remove brace initialization.
3912         (line_info): Remove init_sal reference.
3913         * source.h (set_current_source_symtab_and_line): Now takes a
3914         symtab_and_line via const reference.
3915         * stack.c (set_current_sal_from_frame): Adjust.
3916         (print_frame_info): Adjust.
3917         (get_last_displayed_sal): Return the sal via function return
3918         instead of via output parameter.  Simplify.
3919         (frame_info): Adjust.
3920         * stack.h (get_last_displayed_sal): Return the sal via function
3921         return instead of via output parameter.
3922         * symtab.c (init_sal): Delete.
3923         (find_pc_sect_line): Remove init_sal references.  Move
3924         declarations closer to initializations.
3925         (find_function_start_sal): Remove init_sal references.  Move
3926         declarations closer to initializations.
3927         * symtab.h (struct symtab_and_line): In-class initialize all
3928         fields.
3929         * tracepoint.c (set_traceframe_context)
3930         (print_one_static_tracepoint_marker): Remove init_sal references.
3931         Move declarations closer to initializations.
3932         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3933         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3934         declarations closer to initializations.
3935         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3936         init_sal references.  Adjust.
3937
3938 2017-09-04  Pedro Alves  <palves@redhat.com>
3939
3940         * ax-gdb.c (agent_command_1): Use range-for.
3941         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3942         * breakpoint.c: Include "common/array-view.h".
3943         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3944         parameter from struct symtabs_and_lines to
3945         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3946         (breakpoint_sals_to_pc): Change sals parameter from struct
3947         symtabs_and_lines to std::vector reference.
3948         (check_fast_tracepoint_sals): Change sals parameter from struct
3949         symtabs_and_lines to std::array_view.  Use range-for.
3950         (decode_static_tracepoint_spec): Return a std::vector instead of
3951         symtabs_and_lines.  Update.
3952         (create_breakpoint): Update.
3953         (break_range_command, until_break_command, clear_command): Update.
3954         (base_breakpoint_decode_location, bkpt_decode_location)
3955         (bkpt_probe_create_sals_from_location)
3956         (bkpt_probe_decode_location, tracepoint_decode_location)
3957         (tracepoint_probe_decode_location)
3958         (strace_marker_create_sals_from_location): Return a std::vector
3959         instead of symtabs_and_lines.
3960         (strace_marker_create_breakpoints_sal): Update.
3961         (strace_marker_decode_location): Return a std::vector instead of
3962         symtabs_and_lines.  Update.
3963         (update_breakpoint_locations): Change struct symtabs_and_lines
3964         parameters to gdb::array_view.  Adjust.
3965         (location_to_sals): Return a std::vector instead of
3966         symtabs_and_lines.  Update.
3967         (breakpoint_re_set_default): Use std::vector instead of struct
3968         symtabs_and_lines.
3969         (decode_location_default): Return a std::vector instead of
3970         symtabs_and_lines.  Update.
3971         * breakpoint.h: Include "common/array-view.h".
3972         (struct breakpoint_ops) <decode_location>: Now returns a
3973         std::vector instead of returning a symtabs_and_lines via output
3974         parameter.
3975         (update_breakpoint_locations): Change sals parameters to use
3976         gdb::array_view.
3977         * cli/cli-cmds.c (edit_command, list_command): Update to use
3978         std::vector and gdb::array_view.
3979         (ambiguous_line_spec): Adjust to use gdb::array_view and
3980         range-for.
3981         (compare_symtabs): Rename to ...
3982         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3983         const reference and adjust.
3984         (filter_sals): Rewrite using std::vector and standard algorithms.
3985         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3986         (jump_command): Update to use std::vector.
3987         * linespec.c (struct linespec_state) <canonical_names>: Update
3988         comment.
3989         (add_sal_to_sals_basic): Delete.
3990         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3991         (decode_line_2, create_sals_line_offset)
3992         (convert_address_location_to_sals, convert_linespec_to_sals)
3993         (convert_explicit_location_to_sals, parse_linespec)
3994         (event_location_to_sals, decode_line_full, decode_line_1)
3995         (decode_line_with_current_source)
3996         (decode_line_with_last_displayed, decode_objc)
3997         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3998         (linespec_result::~linespec_result): Adjust to use std::vector
3999         instead of symtabs_and_lines.
4000         * linespec.h (linespec_sals::sals): Now a std::vector.
4001         (struct linespec_result): Use std::vector, bool, and in-class
4002         initialization.
4003         (decode_line_1, decode_line_with_current_source)
4004         (decode_line_with_last_displayed): Return std::vector.
4005         * macrocmd.c (info_macros_command): Use std::vector.
4006         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4007         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4008         std::vector.
4009         * probe.h (parse_probes): Return a std::vector.
4010         * python/python.c (gdbpy_decode_line): Use std::vector and
4011         gdb::array_view.
4012         * source.c (select_source_symtab, line_info): Use std::vector.
4013         * stack.c (func_command): Use std::vector.
4014         * symtab.h (struct symtabs_and_lines): Delete.
4015         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4016
4017 2017-09-04  Pedro Alves  <palves@redhat.com>
4018
4019         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4020         unittests/array-view-selftests.c.
4021         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4022         * common/array-view.h: New file.
4023         * unittests/array-view-selftests.c: New file.
4024
4025 2017-09-04  Pedro Alves  <palves@redhat.com>
4026
4027         * cli/cli-cmds.c (edit_command): Pass message to
4028         ambiguous_line_spec.
4029         (list_command): Pass message to ambiguous_line_spec.  Say
4030         "first"/"last" instead of "start" and "end" to be consistent with
4031         the manual.
4032         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4033         them to print formatted message.
4034
4035 2017-09-04  Pedro Alves  <palves@redhat.com>
4036
4037         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4038         ftrace_update_insns by reference instead of pointer.
4039
4040 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4041
4042         * i386-go32-tdep.c: Include x86-xstate.h.
4043         (i386_go32_init_abi): Call i386_target_description.
4044         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4045         if xcr0 is X86_XSTATE_X87_MASK.
4046         * i386-tdep.h (tdesc_i386): Remove the declaration.
4047         (tdesc_i386_mmx): Likewise.
4048
4049 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4050
4051         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4052         X86_XSTATE_SSE_MASK instead of 0.
4053
4054 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4055
4056         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4057         i386_target_description.
4058         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4059         i386_target_description.
4060         * i386-tdep.c (i386_gdbarch_init): Likewise.
4061
4062 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4063
4064         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4065         (x86_darwin_init_abi_64): Call amd64_target_description.
4066         * amd64-dicos-tdep.c: Likewise.
4067         * amd64-fbsd-nat.c: Likewise.
4068         * amd64-fbsd-tdep.c: Likewise.
4069         * amd64-nbsd-tdep.c: Likewise.
4070         * amd64-obsd-tdep.c: Likewise.
4071         * amd64-sol2-tdep.c: Likewise.
4072         * amd64-windows-tdep.c: Likewise.
4073         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4074
4075 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4076
4077         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4078         (btrace_function) <insn>: Change type to use std::vector.
4079         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4080         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4081         ftrace_update_insns, ftrace_compute_global_level_offset,
4082         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4083         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4084         change to std::vector.
4085         (ftrace_update_insns): Adjust to change to std::vector, change
4086         type of INSN parameter.
4087         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4088         * record-btrace.c (btrace_call_history_insn_range,
4089         btrace_compute_src_line_range,
4090         record_btrace_frame_prev_register): Adjust to change to
4091         std::vector.
4092         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4093         to change to std::vector.
4094
4095 2017-09-03  Tom Tromey  <tom@tromey.com>
4096
4097         * corefile.c (reopen_exec_file): Use std::string.
4098
4099 2017-09-03  Tom Tromey  <tom@tromey.com>
4100
4101         * compile/compile.c (compile_register_name_mangled): Return
4102         std::string.
4103         * compile/compile-loc2c.c (pushf_register_address): Update.
4104         (pushf_register): Update.
4105         * compile/compile-c-types.c (convert_array): Update.
4106         * compile/compile-c-symbols.c (generate_vla_size): Update.
4107         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4108         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4109         (convert_one_symbol): Update.
4110         (generate_c_for_for_one_variable): Update.
4111         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4112         std::string.
4113         (generate_register_struct): Update.
4114         * compile/compile-internal.h (c_get_range_decl_name): Return a
4115         std::string.
4116         (compile_register_name_mangled): Return std::string.
4117
4118 2017-09-03  Tom Tromey  <tom@tromey.com>
4119
4120         * utils.c (perror_string): Return a std::string.
4121         (throw_perror_with_name, perror_warning_with_name): Update.
4122
4123 2017-09-03  Tom Tromey  <tom@tromey.com>
4124
4125         * demangle.c (demangle_command): Use std::string,
4126         unique_xmalloc_ptr.
4127
4128 2017-09-03  Tom Tromey  <tom@tromey.com>
4129
4130         * cli/cli-setshow.c (do_set_command): Use std::string.
4131
4132 2017-09-03  Tom Tromey  <tom@tromey.com>
4133
4134         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4135
4136 2017-09-03  Tom Tromey  <tom@tromey.com>
4137
4138         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4139
4140 2017-09-03  Tom Tromey  <tom@tromey.com>
4141
4142         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4143         gdb::unique_xmalloc_ptr.
4144
4145 2017-09-03  Tom Tromey  <tom@tromey.com>
4146
4147         * thread.c (print_thread_info_1): Use string_printf.
4148         (thread_apply_command, thread_apply_all_command): Use
4149         std::string.
4150
4151 2017-09-03  Tom Tromey  <tom@tromey.com>
4152
4153         * valprint.c (val_print_string): Update.
4154         * gdbcore.h (memory_error_message): Return std::string.
4155         * corefile.c (memory_error_message): Return std::string.
4156         (memory_error): Update.
4157         * breakpoint.c (insert_bp_location): Update.
4158
4159 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4160
4161         * target/waitstatus.h (target_waitstatus_to_string): Change
4162         return type to std::string.
4163         * target/waitstatus.c (target_waitstatus_to_string): Return
4164         std::string.
4165         * target.h (target_waitstatus_to_string): Remove declaration.
4166         * infrun.c (resume, clear_proceed_status_thread,
4167         print_target_wait_results, do_target_wait, save_waitstatus,
4168         stop_all_threads): Adjust.
4169         * record-btrace.c (record_btrace_wait): Adjust.
4170         * target-debug.h
4171         (target_debug_print_struct_target_waitstatus_p): Adjust.
4172
4173 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4174
4175         PR gdb/22046
4176         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4177         detection.
4178
4179 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4180
4181         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4182         for setting/unsetting environment variables on the remote target.
4183         (New remote packets): Add entries for QEnvironmentHexEncoded,
4184         QEnvironmentUnset and QEnvironmentReset.
4185         * common/environ.c (gdb_environ::operator=): Extend method to
4186         handle m_user_set_env_list and m_user_unset_env_list.
4187         (gdb_environ::clear): Likewise.
4188         (match_var_in_string): Change type of first parameter from 'char
4189         *' to 'const char *'.
4190         (gdb_environ::set): Extend method to handle
4191         m_user_set_env_list and m_user_unset_env_list.
4192         (gdb_environ::unset): Likewise.
4193         (gdb_environ::clear_user_set_env): New method.
4194         (gdb_environ::user_set_envp): Likewise.
4195         (gdb_environ::user_unset_envp): Likewise.
4196         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4197         m_user_unset_env_list on move constructor/assignment.
4198         (unset): Add new default parameter 'update_unset_list = true'.
4199         (clear_user_set_env): New method.
4200         (user_set_envp): Likewise.
4201         (user_unset_envp): Likewise.
4202         (m_user_set_env_list): New std::set.
4203         (m_user_unset_env_list): Likewise.
4204         * common/rsp-low.c (hex2str): New function.
4205         (bin2hex): New overload for bin2hex function.
4206         * common/rsp-low.c (hex2str): New prototype.
4207         (str2hex): New overload prototype.
4208         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4209         QEnvironmentUnset and QEnvironmentReset.
4210         (remote_protocol_features): Add QEnvironmentHexEncoded,
4211         QEnvironmentUnset and QEnvironmentReset packets.
4212         (send_environment_packet): New function.
4213         (extended_remote_environment_support): Likewise.
4214         (extended_remote_create_inferior): Call
4215         extended_remote_environment_support.
4216         (_initialize_remote): Add QEnvironmentHexEncoded,
4217         QEnvironmentUnset and QEnvironmentReset packet configs.
4218         * unittests/environ-selftests.c (gdb_selftest_env_var):
4219         New variable.
4220         (test_vector_initialization): New function.
4221         (test_init_from_host_environ): Likewise.
4222         (test_reinit_from_host_environ): Likewise.
4223         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4224         Likewise.
4225         (test_unset_set_empty_vector): Likewise.
4226         (test_vector_clear): Likewise.
4227         (test_std_move): Likewise.
4228         (test_move_constructor):
4229         (test_self_move): Likewise.
4230         (test_set_unset_reset): Likewise.
4231         (run_tests): Rewrite in terms of the functions above.
4232
4233 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4234
4235         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4236         (adi_available): Use a temp variable of type CORE_ADDR as argument
4237         3 when calling target_auxv_search.
4238         (adi_normalize_address): Use masks and xor operators to calculate
4239         normalized address.
4240         (adi_read_versions, adi_write_versions, adi_print_versions)
4241         (do_examine, do_assign): Use paddress.
4242
4243 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4244
4245         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4246         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4247         out of loop and add supply of FIR.
4248         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4249         add collect of FIR.
4250
4251 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4252
4253         PR gdb/21827
4254         * cli/cli-script.c (define_command): Don't convert command name
4255         to lower case.
4256
4257 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4258
4259         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4260         Update all callers accordingly. Remove all code blocks handling
4261         the case where DISPP is not NULL.
4262
4263 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4264
4265         PR symtab/22003
4266         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4267         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4268         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4269
4270 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4271
4272         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4273         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4274         (read_comp_units_from_section): New parameter abbrev_section, use
4275         read_and_check_comp_unit_head, allocate signatured_type if needed.
4276         (create_all_comp_units): Update read_comp_units_from_section caller.
4277
4278 2017-08-23  Pedro Alves  <palves@redhat.com>
4279
4280         PR remote/21852
4281         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4282         to null_ptid and switch to thread without reading the registers
4283         after adding the inferior.
4284
4285 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4286
4287         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4288         compile-gcc.
4289         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4290         (compile_to_object): Implement compile_gcc.
4291         (_initialize_compile): Install "set compile-gcc".  Initialize
4292         compile_gcc.
4293
4294 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4295
4296         * compile/compile.c (compile_to_object): Conditionally call
4297         set_verbose.  Conditionally call compile or compile_v0.
4298
4299 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4300
4301         * sparc64-tdep.h: (adi_normalize_address): New export.
4302         * sparc-nat.h: (open_adi_tag_fd): New export.
4303         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4304         * sparc64-linux-tdep.c:
4305         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4306         (sparc64_linux_handle_segmentation_fault): New function.
4307         (sparc64_linux_init_abi): Register
4308         sparc64_linux_handle_segmentation_fault
4309         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4310         (sparc64_addr_bits_remove): New function.
4311         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4312         (MAX_PROC_NAME_SIZE): New macro.
4313         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4314         (sparc64adilist): New variable.
4315         (adi_proc_list): New variable.
4316         (find_adi_info): New function.
4317         (add_adi_info): New function.
4318         (get_adi_info_proc): New function.
4319         (get_adi_info): New function.
4320         (info_adi_command): New function.
4321         (read_maps_entry): New function.
4322         (adi_available): New function.
4323         (adi_normalize_address): New function.
4324         (adi_align_address): New function.
4325         (adi_convert_byte_count): New function.
4326         (adi_tag_fd): New function.
4327         (adi_is_addr_mapped): New function.
4328         (adi_read_versions): New function.
4329         (adi_write_versions): New function.
4330         (adi_print_versions): New function.
4331         (do_examine): New function.
4332         (do_assign): New function.
4333         (adi_examine_command): New function.
4334         (adi_assign_command): New function.
4335         (_initialize_sparc64_adi_tdep): New function.
4336
4337 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * breakpoint.c (breakpoints_info): Rename to ...
4340         (info_breakpoints_command): ... this.
4341         (watchpoints_info): Rename to ...
4342         (info_watchpoints_command): ... this.
4343         (tracepoints_info): Rename to ...
4344         (info_tracepoints_command): ... this.
4345         (_initialize_breakpoint): Adjust.
4346         * dcache.c (dcache_info): Rename to ...
4347         (info_display_command): ... this.
4348         (_initialize_dcache): Adjust.
4349         * frame.h (args_info): Rename to ...
4350         (info_args_command): ... this.
4351         (locals_info): Rename to ...
4352         (info_locals_command): ... this.
4353         * infcmd.c (nofp_registers_info): Rename to ...
4354         (info_registers_command): ... this.
4355         (float_info): Rename to ...
4356         (info_float_command): ... this.
4357         (program_info): Rename to ...
4358         (info_program_command): ... this.
4359         (all_registers_info): Rename to ...
4360         (info_all_registers_command): ... this.
4361         (vector_info): Rename to ...
4362         (info_vector_command): ... this.
4363         (float_info): Rename to ...
4364         (info_float_command): ... this.
4365         (_initialize_infcmd): Adjust.
4366         * inferior.h (term_info): Rename to ...
4367         (info_terminal_command): ... this.
4368         * inflow.c (term_info): Rename to ...
4369         (info_terminal_command): ... this.
4370         (_initialize_inflow): Adjust.
4371         * infrun.c (signals_info): Rename to ...
4372         (info_signals_command): ... this.
4373         (_initialize_infrun): Adjust.
4374         * objc-lang.c (classes_info): Rename to ...
4375         (info_classes_command): ... this.
4376         (selectors_info): Rename to ...
4377         (info_selectors_command): ... this.
4378         (_initialize_objc_language): Adjust.
4379         * printcmd.c (sym_info): Rename to ...
4380         (info_symbol_command): ... this.
4381         (address_info): Rename to ...
4382         (info_address_command): ... this.
4383         (display_info): Rename to ...
4384         (info_display_command): ... this.
4385         (_initialize_printcmd): Adjust.
4386         * reverse.c (bookmarks_info): Rename to ...
4387         (info_breakpoints_command): ... this.
4388         (_initialize_reverse): Adjust.
4389         * ser-go32.c (dos_info): Rename to ...
4390         (info_serial_command): ... this.
4391         (_initialize_ser_dos): Adjust.
4392         * skip.c (skip_info): Rename to ...
4393         (info_skip_command): ... this.
4394         (_initialize_step_skip): Adjust.
4395         * source.c (line_info): Rename to ...
4396         (info_line_command): ... this.
4397         (source_info): Rename to ...
4398         (info_source_command)
4399         * stack.c (frame_info): Rename to ...
4400         (info_frame_command): ... this.
4401         (locals_info): Rename to ...
4402         (info_locals_command): ... this.
4403         (args_info): Rename to ...
4404         (info_args_command): ... this.
4405         (_initialize_stack): Adjust.
4406         * symtab.c (sources_info): Rename to ...
4407         (info_sources_command): ... this.
4408         (variables_info): Rename to ...
4409         (info_variables_command): ... this.
4410         (functions_info): Rename to ...
4411         (info_functions_command): ... this.
4412         (types_info): Rename to ...
4413         (info_types_command): ... this.
4414         (_initialize_symtab): Adjust.
4415         * target.c (target_info): Rename to ...
4416         (info_target_command): ... this.
4417         (initialize_targets): Adjust.
4418         * tracepoint.c (tvariables_info): Rename to ...
4419         (info_tvariables_command): ... this.
4420         (scope_info): Rename to ...
4421         (info_scope_command): ... this.
4422         (trace_dump_actions): Adjust.
4423         (_initialize_tracepoint): Adjust.
4424
4425 2017-08-22  Tom Tromey  <tom@tromey.com>
4426
4427         * breakpoint.h (install_breakpoint): Update.
4428         * breakpoint.c (add_solib_catchpoint): Update.
4429         (install_breakpoint): Change argument to a std::unique_ptr.
4430         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4431         (create_breakpoint_sal, create_breakpoint): Update.
4432         (watch_command_1, catch_exec_command_1)
4433         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4434         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4435         Return the breakpoint.
4436         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4437         (new_single_step_breakpoint): Update.
4438         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4439         std::unique_ptr.
4440         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4441         std::unique_ptr.
4442         * break-catch-sig.c (create_signal_catchpoint): Use
4443         std::unique_ptr.
4444         * ada-lang.c (create_ada_exception_catchpoint): Use
4445         std::unique_ptr.
4446
4447 2017-08-22  Tom Tromey  <tom@tromey.com>
4448
4449         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4450
4451 2017-08-22  Tom Tromey  <tom@tromey.com>
4452
4453         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4454         (lookup_partial_symbol): Update.
4455
4456 2017-08-22  Tom Tromey  <tom@tromey.com>
4457
4458         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4459         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4460         (find_and_open_source, symtab_to_fullname): Update.
4461         * psymtab.c (psymtab_to_fullname): Update.
4462
4463 2017-08-22  Tom Tromey  <tom@tromey.com>
4464
4465         * exec.c (exec_file_attach): Update.
4466         * linux-thread-db.c (try_thread_db_load): Update.
4467         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4468         * utils.c (gdb_realpath): Change return type.
4469         (gdb_realpath_keepfile): Update.
4470         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4471         (_initialize_utils): Register the new self test.
4472         * source.c (openp): Update.
4473         (find_and_open_source): Update.
4474         * nto-tdep.c (nto_find_and_open_solib): Update.
4475         * main.c (set_gdb_data_directory): Update.
4476         (captured_main_1): Update.
4477         * dwarf2read.c (dwarf2_get_dwz_file): Update
4478         (dw2_map_symbol_filenames): Update.
4479         * auto-load.c (auto_load_safe_path_vec_update): Update.
4480         (filename_is_in_auto_load_safe_path_vec): Change type of
4481         "filename_realp".
4482         (auto_load_objfile_script): Update.
4483         (file_is_auto_load_safe): Update.  Use std::string.
4484         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4485
4486 2017-08-22  Tom Tromey  <tom@tromey.com>
4487
4488         * utils.c (gdb_realpath_keepfile): Return a
4489         gdb::unique_xmalloc_ptr.
4490         * exec.c (exec_file_attach): Update.
4491         * utils.h (gdb_realpath_keepfile): Return a
4492         gdb::unique_xmalloc_ptr.
4493
4494 2017-08-22  Tom Tromey  <tom@tromey.com>
4495
4496         * compile/compile.c (compile_file_command): Use
4497         gdb::unique_xmalloc_ptr, std::string.
4498         * utils.c (gdb_abspath): Change return type.
4499         * source.c (openp): Update.
4500         * objfiles.c (allocate_objfile): Update.
4501         * main.c (set_gdb_data_directory): Update.
4502         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4503
4504 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4505
4506         * cli-cmds.c (list_commands): List actual code around more than
4507         one location.
4508
4509 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4510
4511         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4512
4513 2017-08-21  Pedro Alves  <palves@redhat.com>
4514
4515         PR gdb/19487
4516         * c-exp.y (variable production): Handle function aliases.
4517         * minsyms.c (msymbol_is_text): New function.
4518         * minsyms.h (msymbol_is_text): Declare.
4519         * symtab.c (find_function_alias_target): New function.
4520         * symtab.h (find_function_alias_target): Declare.
4521
4522 2017-08-21  Pedro Alves  <palves@redhat.com>
4523
4524         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4525         typedefs.
4526         * typeprint.c (whatis_exp): If handling "whatis", and expression
4527         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4528         typedefs here.
4529         * valops.c (value_cast): Save "to" type before resolving
4530         stubs/typedefs.  Use that type as resulting value's type.
4531
4532 2017-08-18  Tom Tromey  <tom@tromey.com>
4533             Pedro Alves  <palves@redhat.com>
4534
4535         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4536         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4537         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4538         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4539         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4540         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4541         (linux_get_siginfo_data): Add "thread" argument.  Use
4542         scoped_restore.
4543         * linux-nat.c (linux_child_follow_fork)
4544         (check_stopped_by_watchpoint): Use scoped_restore.
4545         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4546         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4547         (restore_inferior_ptid, save_inferior_ptid): Remove.
4548         * btrace.c (btrace_fetch): Use scoped_restore.
4549         * bsd-uthread.c (bsd_uthread_fetch_registers)
4550         (bsd_uthread_store_registers): Use scoped_restore.
4551         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4552         scoped_restore.
4553         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4554         (aix_thread_xfer_partial): Use scoped_restore.
4555         * inferior.h (save_inferior_ptid): Remove.
4556
4557 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4558
4559         PR tdep/21818
4560         * arm-tdep.c (gdb_print_insn_arm): Mark
4561         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4562
4563 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4564
4565         * NEWS: Mention GDBserver's new option "--selftest".
4566         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4567         * selftest.c: Move it to common/selftest.c.
4568         * selftest.h: Move it to common/selftest.h.
4569         * selftest-arch.c (reset): New function.
4570         (tests_with_arch): Call reset.
4571
4572 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4573
4574         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4575         instead of exception_fprintf and printf_filtered.
4576
4577 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4578
4579         * selftest.c (register_self_test): Rename it to
4580         selftests::register_test.
4581         (run_self_tests): selftest::run_tests.
4582         * selftest.h: Update declarations.
4583         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4584         selftests::register_test_foreach_arch.
4585         * selftest-arch.h: Update declaration.
4586         * aarch64-tdep.c: Update.
4587         * arm-tdep.c: Likewise.
4588         * disasm-selftests.c: Likewise.
4589         * dwarf2loc.c: Likewise.
4590         * dwarf2-frame.c: Likewise.
4591         * findvar.c: Likewise.
4592         * gdbarch-selftests.c: Likewise.
4593         * maint.c (maintenance_selftest): Likewise.
4594         * regcache.c: Likewise.
4595         * rust-exp.y: Likewise.
4596         * selftest-arch.c: Likewise.
4597         * unittests/environ-selftests.c: Likewise.
4598         * unittests/function-view-selftests.c: Likewise.
4599         * unittests/offset-type-selftests.c: Likewise.
4600         * unittests/optional-selftests.c: Likewise.
4601         * unittests/scoped_restore-selftests.c: Likewise.
4602         * utils-selftests.c: Likewise.
4603
4604 2017-08-17  Pedro Alves  <palves@redhat.com>
4605
4606         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4607         local.
4608
4609 2017-08-17  Pedro Alves  <palves@redhat.com>
4610
4611         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4612         field.
4613         (reset_die_in_process): Delete, replaced by ...
4614         (process_die_scope): ... this new class.  Make it responsible for
4615         freeing cu->line_header too.
4616         (process_die): Use process_die_scope.
4617         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4618         cu->line_header_die_owner.  Don't release the line header if it's
4619         owned by the CU.
4620         (setup_type_unit_groups): Make the CU/DIE own the line header.
4621         Don't release the line header here.
4622
4623 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4624
4625         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4626
4627 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4628
4629         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4630         Single-Key mode
4631
4632 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4633
4634         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4635         mode command list.
4636
4637 2017-08-15  Stafford Horne  <shorne@gmail.com>
4638
4639         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4640
4641 2017-08-15  Stafford Horne  <shorne@gmail.com>
4642
4643         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4644
4645 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4646
4647         PR gdb/21954
4648         * infcmd.c (unset_environment_command): Use the 'clear' method on
4649         the environment instead of resetting it.
4650
4651 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4652
4653         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4654         platforms.
4655
4656 2017-08-14  Tom Tromey  <tom@tromey.com>
4657
4658         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4659         (print_binary_chars): Likewise.
4660         (BITS_IN_BYTES): Remove.
4661
4662 2017-08-14  Tom Tromey  <tom@tromey.com>
4663
4664         PR gdb/21675
4665         * valprint.c (LOW_ZERO): Change value to 034.
4666         (print_octal_chars): Add static_asserts for octal constants.
4667         * printcmd.c (print_scalar_formatted): Add 'd' case.
4668
4669 2017-08-11  Tom Tromey  <tom@tromey.com>
4670
4671         * symfile.c (add_symbol_file_command): Use std::vector.
4672
4673 2017-08-14  Tom Tromey  <tom@tromey.com>
4674
4675         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4676         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4677         std::move.
4678         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4679
4680 2017-08-11  Pedro Alves  <palves@redhat.com>
4681
4682         * infrun.c (process_event_stop_test): Adjust
4683         function_name_is_marked_for_skip call.
4684         * skip.c: Include <list>.
4685         (skiplist_entry): Make it a class with private fields, and
4686         getters/setters.
4687         (skiplist_entry_chain): Delete.
4688         (skiplist_entries): New.
4689         (skiplist_entry_count): Delete.
4690         (highest_skiplist_entry_num): New.
4691         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4692         (add_skiplist_entry): Delete.
4693         (skiplist_entry::skiplist_entry): New.
4694         (skiplist_entry::add_entry): New.
4695         (skip_file_command, skip_function): Adjust.
4696         (compile_skip_regexp): Delete.
4697         (skip_command): Don't compile regexp here.  Adjust to use
4698         skiplist_entry::add_entry.
4699         (skip_info): Adjust to use range-for and getters.
4700         (skip_enable_command, skip_disable_command): Adjust to use
4701         range-for and setters.
4702         (skip_delete_command): Adjust to use std::list.
4703         (add_skiplist_entry): Delete.
4704         (skip_file_p): Delete, refactored as ...
4705         (skiplist_entry::do_skip_file_p): ... this new method.
4706         (skip_gfile_p): Delete, refactored as ...
4707         (skiplist_entry::do_gskip_file_p): ... this new method.
4708         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4709         (skiplist_entry::skip_function_p): ... this new method.
4710         (function_name_is_marked_for_skip): Now returns bool, and takes
4711         the function sal by const reference.  Adjust to use range-for and
4712         skiplist_entry methods.
4713         (_initialize_step_skip): Remove references to
4714         skiplist_entry_chain, skiplist_entry_count.
4715         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4716         takes the function sal by const reference.
4717
4718 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4719
4720         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4721         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4722         (dwarf2_frame_cache):
4723         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4724         RETURN_MASK_ALL and set *this_case to NULL.
4725         * frame-unwind.h: Update comments.
4726
4727 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4728
4729         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4730         (dwarf2_frame_state_copy_regs): Remove.
4731         (dwarf2_frame_state_free_regs): Remove.
4732         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4733         (dwarf2_restore_rule): Call method .alloc_regs instead of
4734         dwarf2_frame_state_alloc_regs.
4735         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4736         constructor.  Call std::move.
4737         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4738         (dwarf2_frame_cache): Likewise.
4739
4740         [GDB_SELF_TEST]: Include selftest.h and
4741         selftest-arch.h.
4742         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4743         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4744         execute_cfa_program_test.
4745
4746         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4747         copy ctor, assignment operator, move assignment.
4748         <alloc_regs>: New method.
4749         <swap>: New method.
4750         (struct dwarf2_frame_state): Delete dtor.
4751         (dwarf2_frame_state_alloc_regs): Remove declaration.
4752         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4753         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4754
4755 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4756
4757         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4758         (dwarf2_frame_state::dwarf2_frame_state): New.
4759         (dwarf2_frame_state::~dwarf2_frame_state): New.
4760         (dwarf2_fetch_cfa_info): Update.
4761         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4762         rather than a pointer.  Update code.
4763         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4764         dtor.
4765         <data_align, code_align, retaddr_column>: Change them to const.
4766         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4767         to bool.
4768
4769 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4770
4771         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4772         <loc.exp>: New field.
4773         * dwarf2-frame.c (execute_cfa_program): Update.
4774         (dwarf2_frame_prev_register): Update.
4775
4776 2017-08-10  Pedro Alves  <palves@redhat.com>
4777
4778         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4779
4780 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4781
4782         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4783         (fbsd_pending_children): Use std::list.
4784         (fbsd_remember_child): Likewise.
4785         (fbsd_is_child_pending): Likewise.
4786         (fbsd_pending_vfork_done): Use std::forward_list.
4787         (fbsd_add_vfork_done): Likewise.
4788         (fbsd_is_vfork_done_pending): Likewise.
4789         (fbsd_next_vfork_done): Likewise.
4790
4791 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4792
4793         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4794         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4795         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4796         for `mapfilename'.
4797         (fbsd_xfer_partial): Use gdb::byte_vector.
4798         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4799
4800 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4801
4802         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4803         "filestuff.h".
4804         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4805
4806 2017-08-09  Tom Tromey  <tom@tromey.com>
4807
4808         * skip.c (skiplist_entry): New constructor.
4809         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4810         (skiplist_entry::file_is_glob): Now bool.
4811         (skiplist_entry::file, skiplist_entry::function): Now
4812         std::string.
4813         (make_skip_entry): Return a unique_ptr.  Use new.
4814         (free_skiplist_entry, free_skiplist_entry_cleanup)
4815         (make_free_skiplist_entry_cleanup): Remove.
4816         (skip_command, skip_disable_command, add_skiplist_entry)
4817         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4818         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4819         (function_name_is_marked_for_skip): Update.
4820         (skip_delete_command): Update.  Use delete.
4821
4822 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4823
4824         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4825         (aarch64_linux_core_read_description): New function.
4826         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4827
4828 2017-08-09  Pedro Alves  <palves@redhat.com>
4829
4830         * cp-name-parser.y (cp_comp_to_string): Return a
4831         gdb::unique_xmalloc_ptr<char>.
4832         * cp-support.c (replace_typedefs_qualified_name)
4833         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4834         (cp_canonicalize_string_full): Use op= instead of explicit
4835         convertion.
4836         (cp_class_name_from_physname, method_name_from_physname)
4837         (cp_func_name, cp_remove_params): Adjust to use
4838         gdb::unique_xmalloc_ptr<char>.
4839         * cp-support.h (cp_comp_to_string): Return a
4840         gdb::unique_xmalloc_ptr<char>.
4841         * python/py-type.c (typy_lookup_type): Adjust to use
4842         gdb::unique_xmalloc_ptr<char>.
4843
4844 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4845
4846         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4847
4848 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4849             Yao Qi  <yao.qi@linaro.org>
4850
4851         * cp-support.c (cp_canonicalize_string_full): Use
4852         gdb::unique_xmalloc_ptr<char>.
4853         (cp_canonicalize_string): Likewise.
4854
4855 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4856
4857         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4858         * regformats/i386/amd64-avx-avx512.dat: Remove.
4859         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4860         * regformats/i386/amd64-avx-mpx.dat:Remove.
4861         * regformats/i386/amd64-avx.dat: Remove.
4862         * regformats/i386/amd64-mpx.dat: Remove.
4863         * regformats/i386/i386-avx-avx512.dat: Remove.
4864         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4865         * regformats/i386/i386-avx-mpx.dat: Remove.
4866         * regformats/i386/i386-mmx.dat: Remove.
4867         * regformats/i386/i386-mpx.dat: Remove.
4868
4869 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4870
4871         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4872         * amd64-tdep.c: Don't include features/i386/x32*.c.
4873         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4874         functions.
4875         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4876         and i386/x32-avx-avx512.
4877         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4878         and i386/x32.xml.
4879         * features/i386/x32-avx-avx512.c: Removed.
4880         * features/i386/x32-avx-avx512.xml: Removed.
4881         * features/i386/x32-avx.c: Removed.
4882         * features/i386/x32-avx.xml: Removed.
4883         * features/i386/x32.c: Removed.
4884         * features/i386/x32.xml: Removed.
4885         * regformats/i386/x32-avx-avx512.dat: Removed.
4886         * regformats/i386/x32-avx.dat: Removed.
4887         * regformats/i386/x32.dat: Removed.
4888
4889 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4890
4891         PR breakpoints/21886
4892         * mem-break.c (default_memory_insert_breakpoint): Use
4893         `->placed_address' rather than `->reqstd_address' for the
4894         breakpoint location.
4895
4896 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4897
4898         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4899         assertions.
4900
4901 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4902
4903         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4904         a union of `tdep_info', `tdesc_data' and `id'.
4905         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4906         rather than `info.tdep_info'.
4907         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4908         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4909         * i386-tdep.c (i386_gdbarch_init): Likewise.
4910         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4911         * mips-tdep.c (mips_gdbarch_init): Likewise.
4912         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4913         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4914         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4915         `info.tdep_info'.
4916         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4917         `info.tdep_info'.
4918         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4919         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4920         `info.tdep_info'.
4921         * spu-tdep.c (spu_gdbarch_init): Likewise.
4922         * gdbarch.h: Regenerate.
4923
4924 2017-08-07  Leszek Swirski  <leszeks@google.com>
4925
4926         PR symtab/20899
4927         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4928
4929 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4930
4931         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4932         (gdbsim_open): Rename gdb_argv args object to argv.
4933
4934 2017-08-05  Tom Tromey  <tom@tromey.com>
4935
4936         * compile/compile-object-load.c (compile_object_load): Use
4937         gdb::unique_xmalloc_ptr.
4938         * cli/cli-dump.c (scan_filename): Rename from
4939         scan_filename_with_cleanup.  Change return type.
4940         (scan_expression): Rename from scan_expression_with_cleanup.
4941         Change return type.
4942         (dump_memory_to_file, dump_value_to_file, restore_command):
4943         Use gdb::unique_xmalloc_ptr.  Update.
4944         * cli/cli-cmds.c (find_and_open_script): Use
4945         gdb::unique_xmalloc_ptr.
4946         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4947         * symmisc.c (maintenance_print_symbols)
4948         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4949         * symfile.c (symfile_bfd_open, generic_load)
4950         (add_symbol_file_command, remove_symbol_file_command): Use
4951         gdb::unique_xmalloc_ptr.
4952         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4953         * psymtab.c (maintenance_print_psymbols): Use
4954         gdb::unique_xmalloc_ptr.
4955         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4956         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4957         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4958         (reload_shared_libraries_1): Likewise.
4959
4960 2017-08-05  Tom Tromey  <tom@tromey.com>
4961
4962         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4963         (rust_op_vector, rust_set_vector): New typedefs.
4964         (current_parser): New global.
4965         (work_obstack): Change to pointer type.  Update all users.
4966         (rust_ast, pstate): Remove globals.
4967         (struct rust_parser): New.
4968         (%union) <params, field_inits>: Change type.
4969         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4970         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4971         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4972         (convert_params_to_types, convert_params_to_expression): Change
4973         type of "params".
4974         (ast_string): Change type of "fields".
4975         (rust_parse): Make a rust_parser.  Remove cleanups.
4976         (rust_lex_tests): Make and install an auto_obstack.
4977
4978 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4979
4980         * configure.srv (ipa_x32_linux_regobj): New.
4981         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4982         instead of X86_TDESC_AVX512.
4983         (initialize_low_tracepoint): Call
4984         init_registers_x32_avx_avx512_linux.
4985
4986 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4987
4988         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4989
4990 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4991
4992         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4993
4994 2017-08-03  Tom Tromey  <tom@tromey.com>
4995
4996         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4997         Remove.
4998         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4999
5000 2017-08-03  Tom Tromey  <tom@tromey.com>
5001
5002         * python/py-param.c (compute_enum_values): Use gdb_argv.
5003
5004 2017-08-03  Tom Tromey  <tom@tromey.com>
5005
5006         * utils.h (struct gdb_argv_deleter): New.
5007         (gdb_argv): New class.
5008         * utils.c (gdb_argv::reset): New method.
5009         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5010         * tracefile.c (tsave_command): Use gdb_argv.
5011         * top.c (new_ui_command): Use gdb_argv.
5012         * symmisc.c (maintenance_print_symbols)
5013         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5014         * symfile.c (symbol_file_command, generic_load)
5015         (remove_symbol_file_command): Use gdb_argv.
5016         * stack.c (backtrace_command): Use gdb_argv.
5017         * source.c (add_path, show_substitute_path_command)
5018         (unset_substitute_path_command, set_substitute_path_command):
5019         Use gdb_argv.
5020         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5021         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5022         * remote.c (extended_remote_run, remote_put_command)
5023         (remote_get_command, remote_delete_command): Use gdb_argv.
5024         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5025         (gdbsim_open): Use gdb_argv.
5026         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5027         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5028         * procfs.c (procfs_info_proc): Use gdb_argv.
5029         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5030         * infrun.c (handle_command): Use gdb_argv.
5031         * inferior.c (add_inferior_command, clone_inferior_command):
5032         Use gdb_argv.
5033         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5034         * exec.c (exec_file_command): Use gdb_argv.
5035         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5036         * compile/compile.c (build_argc_argv): Use gdb_argv.
5037
5038 2017-08-03  Tom Tromey  <tom@tromey.com>
5039
5040         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5041
5042 2017-08-03  Tom Tromey  <tom@tromey.com>
5043
5044         * python/python.c (compute_python_string): Return std::string.
5045         (gdbpy_eval_from_control_command): Update.
5046         (do_start_initialization): Use std::string.
5047         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5048         xstrprintf.
5049         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5050         xstrprintf.
5051
5052 2017-08-03  Tom Tromey  <tom@tromey.com>
5053
5054         * top.h (do_restore_instream_cleanup): Remove.
5055         * top.c (do_restore_instream_cleanup): Remove.
5056         (read_command_file): Use scoped_restore.
5057         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5058
5059 2017-08-03  Tom Tromey  <tom@tromey.com>
5060
5061         * cli/cli-script.c (execute_user_command)
5062         (execute_control_command): Use scoped_restore.
5063
5064 2017-08-03  Tom Tromey  <tom@tromey.com>
5065
5066         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5067         (execute_user_command): Remove user_call_depth; use
5068         user_args_stack's size instead.
5069
5070 2017-08-03  Tom Tromey  <tom@tromey.com>
5071
5072         * top.h (in_user_command): Remove.
5073         * top.c (in_user_command): Remove.
5074         * cli/cli-script.c (do_restore_user_call_depth)
5075         (execute_user_command): Update.
5076
5077 2017-08-03  Tom Tromey  <tom@tromey.com>
5078
5079         * valops.c (search_struct_method): Use gdb::byte_vector.
5080         * valarith.c (value_concat): Use std::vector.
5081         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5082         (simple_search_memory): Likewise.
5083         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5084         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5085         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5086         * elfread.c (elf_rel_plt_read): Use std::string.
5087         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5088         * cli/cli-dump.c (restore_section_callback): Use
5089         gdb::byte_vector.
5090
5091 2017-08-03  Tom Tromey  <tom@tromey.com>
5092
5093         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5094
5095 2017-08-03  Tom Tromey  <tom@tromey.com>
5096
5097         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5098         (tui_register_format): Use scoped_restore.
5099
5100 2017-08-03  Tom Tromey  <tom@tromey.com>
5101
5102         * reverse.c (exec_direction_default): Remove.
5103         (exec_reverse_once): Use scoped_restore.
5104         * remote.c (restore_remote_timeout): Remove.
5105         (remote_flash_erase, remote_flash_write, remote_flash_done)
5106         (readchar, remote_serial_write): Use scoped_restore.
5107         * cli/cli-script.c (struct source_cleanup_lines_args)
5108         (source_cleanup_lines): Remove.
5109         (script_from_file): Use scoped_restore.
5110         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5111         (source_command): Use scoped_restore.
5112
5113 2017-08-03  Tom Tromey  <tom@tromey.com>
5114
5115         * utils.h (make_cleanup_free_so): Remove.
5116         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5117         * solist.h (struct so_deleter): New.
5118         (so_list_up): New typedef.
5119         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5120
5121 2017-08-03  Tom Tromey  <tom@tromey.com>
5122
5123         * utils.h (make_cleanup_restore_current_language): Remove.
5124         * utils.c (do_restore_current_language)
5125         (make_cleanup_restore_current_language): Remove.
5126         * parse.c (parse_exp_in_context_1)
5127         (parse_expression_with_language): Use
5128         scoped_restore_current_language.
5129         * mi/mi-main.c (mi_cmd_execute): Use
5130         scoped_restore_current_language.
5131         * language.h (scoped_restore_current_language): New class.
5132
5133 2017-08-03  Tom Tromey  <tom@tromey.com>
5134
5135         * compile/compile.c (cleanup_unlink_file): Remove.
5136         (compile_to_object): Use gdb::unlinker.
5137         (eval_compile_command): Likewise.
5138
5139 2017-08-03  Tom Tromey  <tom@tromey.com>
5140
5141         * utils.h (make_cleanup_fclose): Remove.
5142         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5143
5144 2017-08-03  Tom Tromey  <tom@tromey.com>
5145
5146         * top.c (open_terminal_stream): Return gdb_file_up.
5147         (new_ui_command): Update.
5148
5149 2017-08-03  Tom Tromey  <tom@tromey.com>
5150
5151         * source.c (print_source_lines_base, forward_search_command)
5152         (reverse_search_command): Use gdb_file_up.
5153
5154 2017-08-03  Tom Tromey  <tom@tromey.com>
5155
5156         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5157
5158 2017-08-03  Tom Tromey  <tom@tromey.com>
5159
5160         * cli/cli-cmds.c (find_and_open_script): Change return type.
5161         Remove "streamp" and "full_path" parameters.
5162         (source_script_with_search): Update.
5163         * auto-load.c (source_script_file): Update.
5164         * cli/cli-cmds.h (find_and_open_script): Change type.
5165         (open_script): New struct.
5166
5167 2017-08-03  Tom Tromey  <tom@tromey.com>
5168
5169         * xml-support.c (xml_fetch_content_from_file): Update.
5170         * ui-file.c (stdio_file::open): Update.
5171         * tracefile-tfile.c (tfile_start): Update.
5172         * remote.c (remote_file_put, remote_file_get): Update.
5173         * nat/linux-procfs.c (linux_proc_get_int)
5174         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5175         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5176         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5177         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5178         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5179         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5180         * linux-nat.c (linux_proc_pending_signals): Update.
5181         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5182         (file_closer): Remove.
5183         * compile/compile.c (compile_to_object): Update.
5184         * common/filestuff.h (struct gdb_file_deleter): New.
5185         (gdb_file_up): New typedef.
5186         (gdb_fopen_cloexec): Change return type.
5187         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5188         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5189         (dump_binary_file, restore_binary_file): Update.
5190         * auto-load.c (auto_load_objfile_script_1): Update.
5191
5192 2017-08-03  Tom Tromey  <tom@tromey.com>
5193
5194         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5195         (info_static_tracepoint_markers_command): Likewise.
5196         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5197         * skip.c (skip_info): Use ui_out_emit_table.
5198         * progspace.c (print_program_space): Use ui_out_emit_table.
5199         * osdata.c (info_osdata): Use ui_out_emit_table.
5200         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5201         ui_out_emit_table.
5202         * linux-thread-db.c (info_auto_load_libthread_db): Use
5203         ui_out_emit_table.
5204         * inferior.c (print_inferior): Use ui_out_emit_table.
5205         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5206         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5207         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5208         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5209         * ui-out.h (class ui_out_emit_table): New.
5210
5211 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5212
5213         * mips-tdep.c (mips_fpu_type_str): New function.
5214         (mips_dump_tdep): Call it.
5215
5216 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5217
5218         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5219         `->mips_fpu_type'.
5220
5221 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5222
5223         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5224
5225 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5226
5227         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5228
5229 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5230
5231         * cli/cli-cmds.c (maintenancechecklist): New variable.
5232         * gdbcmd.h (maintenancechecklist): Declare it.
5233         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5234         Call i386_linux_read_description with different masks.
5235         * maint.c (maintenance_check_command): New function.
5236         (_initialize_maint_cmds): Call add_prefix_cmd.
5237         * target-descriptions.c (tdesc_reg): override operator != and ==.
5238         (tdesc_type): Likewise.
5239         (tdesc_feature): Likewise.
5240         (target_desc): Likewise.
5241         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5242         (maintenance_check_xml_descriptions): New function.
5243         (_initialize_target_descriptions) Add command "xml-descriptions".
5244         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5245
5246 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5247
5248         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5249         Include features/i386/32bit-*.c.
5250         (i386_linux_read_description): Generate target description if it
5251         doesn't exist.
5252         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5253         functions.
5254         * features/i386/32bit-linux.c: Re-generated.
5255         * features/i386/32bit-sse.c: Likewise.
5256         * target-descriptions.c (print_c_feature::visit): Print code to
5257         set register number if needed.
5258         (print_c_feature) <m_next_regnum>: New field.
5259
5260 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5261
5262         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5263         (FEATURE_XMLFILES): New.
5264         (FEATURE_CFILES): New.
5265         New rules.
5266         (clean-cfiles): Remove generated c files.
5267         * features/i386/32bit-avx.c: Generated.
5268         * features/i386/32bit-avx512.c: Generated.
5269         * features/i386/32bit-core.c: Generated.
5270         * features/i386/32bit-linux.c: Generated.
5271         * features/i386/32bit-mpx.c: Generated.
5272         * features/i386/32bit-pkeys.c: Generated.
5273         * features/i386/32bit-sse.c: Generated.
5274         * target-descriptions.c: Include algorithm.
5275         (tdesc_element_visitor): Add method visit_end.
5276         (print_c_tdesc): Implement visit_end.
5277         (print_c_tdesc:: m_filename_after_features): Move it to
5278         protected.
5279         (print_c_feature): New class.
5280         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5281         name starts with "i386/32bit-".
5282
5283 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5284
5285         * target-descriptions.c (tdesc_element_visitor): New class.
5286         (tdesc_element): New class.
5287         (tdesc_reg): Inherit from tdesc_element.
5288         (tdesc_reg::accept): New function.
5289         (tdesc_type): Inherit from tdesc_element.
5290         (tdesc_type::accept): New function.
5291         (tdesc_feature): Inherit from tdesc_element.
5292         (tdesc_feature::accept): New function.
5293         (target_desc): Inherit from tdesc_element.
5294         (target_desc::target_desc): New.
5295         (target_desc::~target_desc): New.
5296         (target_desc::accept): New.
5297         (allocate_target_description): Use new.
5298         (free_target_description): Use delete.
5299         (print_c_tdesc): New class.
5300         (maint_print_c_tdesc_cmd): Adjust.
5301
5302         * features/aarch64.c: Re-generated.
5303         * features/arc-arcompact.c: Re-generated.
5304         * features/arc-v2.c: Re-generated.
5305         * features/arm/arm-with-iwmmxt.c: Re-generated.
5306         * features/arm/arm-with-m.c: Re-generated.
5307         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5308         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5309         * features/arm/arm-with-neon.c: Re-generated.
5310         * features/arm/arm-with-vfpv2.c: Re-generated.
5311         * features/arm/arm-with-vfpv3.c: Re-generated.
5312         * features/i386/amd64-avx-avx512.c: Re-generated.
5313         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5314         * features/i386/amd64-avx.c: Re-generated.
5315         * features/i386/amd64-avx-linux.c: Re-generated.
5316         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5317         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5318         * features/i386/amd64-avx-mpx.c: Re-generated.
5319         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5320         * features/i386/amd64.c: Re-generated.
5321         * features/i386/amd64-linux.c: Re-generated.
5322         * features/i386/amd64-mpx.c: Re-generated.
5323         * features/i386/amd64-mpx-linux.c: Re-generated.
5324         * features/i386/i386-avx-avx512.c: Re-generated.
5325         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5326         * features/i386/i386-avx.c: Re-generated.
5327         * features/i386/i386-avx-linux.c: Re-generated.
5328         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5329         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5330         * features/i386/i386-avx-mpx.c: Re-generated.
5331         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5332         * features/i386/i386.c: Re-generated.
5333         * features/i386/i386-linux.c: Re-generated.
5334         * features/i386/i386-mmx.c: Re-generated.
5335         * features/i386/i386-mmx-linux.c: Re-generated.
5336         * features/i386/i386-mpx.c: Re-generated.
5337         * features/i386/i386-mpx-linux.c: Re-generated.
5338         * features/i386/x32-avx-avx512.c: Re-generated.
5339         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5340         * features/i386/x32-avx.c: Re-generated.
5341         * features/i386/x32-avx-linux.c: Re-generated.
5342         * features/i386/x32.c: Re-generated.
5343         * features/i386/x32-linux.c: Re-generated.
5344         * features/microblaze.c: Re-generated.
5345         * features/microblaze-with-stack-protect.c: Re-generated.
5346         * features/mips64-dsp-linux.c: Re-generated.
5347         * features/mips64-linux.c: Re-generated.
5348         * features/mips-dsp-linux.c: Re-generated.
5349         * features/mips-linux.c: Re-generated.
5350         * features/nds32.c: Re-generated.
5351         * features/nios2.c: Re-generated.
5352         * features/nios2-linux.c: Re-generated.
5353         * features/rs6000/powerpc-32.c: Re-generated.
5354         * features/rs6000/powerpc-32l.c: Re-generated.
5355         * features/rs6000/powerpc-403.c: Re-generated.
5356         * features/rs6000/powerpc-403gc.c : Re-generated.
5357         * features/rs6000/powerpc-405.c: Re-generated.
5358         * features/rs6000/powerpc-505.c: Re-generated.
5359         * features/rs6000/powerpc-601.c: Re-generated.
5360         * features/rs6000/powerpc-602.c: Re-generated.
5361         * features/rs6000/powerpc-603.c: Re-generated.
5362         * features/rs6000/powerpc-604.c: Re-generated.
5363         * features/rs6000/powerpc-64.c: Re-generated.
5364         * features/rs6000/powerpc-64l.c: Re-generated.
5365         * features/rs6000/powerpc-7400.c: Re-generated.
5366         * features/rs6000/powerpc-750.c: Re-generated.
5367         * features/rs6000/powerpc-860.c: Re-generated.
5368         * features/rs6000/powerpc-altivec32.c: Re-generated.
5369         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5370         * features/rs6000/powerpc-altivec64.c: Re-generated.
5371         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5372         * features/rs6000/powerpc-cell32l.c: Re-generated.
5373         * features/rs6000/powerpc-cell64l.c: Re-generated.
5374         * features/rs6000/powerpc-e500.c: Re-generated.
5375         * features/rs6000/powerpc-e500l.c: Re-generated.
5376         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5377         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5378         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5379         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5380         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5381         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5382         * features/rs6000/powerpc-vsx32.c: Re-generated.
5383         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5384         * features/rs6000/powerpc-vsx64.c: Re-generated.
5385         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5386         * features/rs6000/rs6000.c: Re-generated.
5387         * features/s390-linux32.c: Re-generated.
5388         * features/s390-linux32v1.c: Re-generated.
5389         * features/s390-linux32v2.c: Re-generated.
5390         * features/s390-linux64.c: Re-generated.
5391         * features/s390-linux64v1.c: Re-generated.
5392         * features/s390-linux64v2.c: Re-generated.
5393         * features/s390-te-linux64.c: Re-generated.
5394         * features/s390-tevx-linux64.c: Re-generated.
5395         * features/s390-vx-linux64.c: Re-generated.
5396         * features/s390x-linux64.c: Re-generated.
5397         * features/s390x-linux64v1.c: Re-generated.
5398         * features/s390x-linux64v2.c: Re-generated.
5399         * features/s390x-te-linux64.c: Re-generated.
5400         * features/s390x-tevx-linux64.c: Re-generated.
5401         * features/s390x-vx-linux64.c: Re-generated.
5402         * features/sparc/sparc32-solaris.c: Re-generated.
5403         * features/sparc/sparc64-solaris.c: Re-generated.
5404         * features/tic6x-c62x.c: Re-generated.
5405         * features/tic6x-c62x-linux.c: Re-generated.
5406         * features/tic6x-c64x.c: Re-generated.
5407         * features/tic6x-c64x-linux.c: Re-generated.
5408         * features/tic6x-c64xp.c: Re-generated.
5409         * features/tic6x-c64xp-linux.c: Re-generated.
5410
5411 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5412
5413         * i386-linux-tdep.c (i386_linux_read_description): New function.
5414         (i386_linux_core_read_description): Call
5415         i386_linux_read_description.
5416         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5417         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5418         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5419         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5420         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5421         * x86-linux-nat.c (x86_linux_read_description): Call
5422         i386_linux_read_description.
5423
5424 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5425
5426         * NEWS: Mention it.
5427         * features/Makefile (%.c: %.xml): Pass the xml file name to
5428         command "maint print c-tdesc".
5429         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5430         name from 'arg'.
5431
5432 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5433
5434         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5435         in-class initialization.
5436         (tdesc_create_feature): Call new instead of XCNEW.
5437         (free_target_description): Ue delete.
5438
5439 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5440
5441         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5442
5443 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5444
5445         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5446         constant.
5447         (amd64_x32_init_abi): Likewise.
5448         * amd64-tdep.h (amd64_init_abi): Update declaration.
5449         (amd64_x32_init_abi): Likewise.
5450
5451 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5452
5453         PR tdep/21717
5454         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5455         condition for FPSCR.
5456         (arm_linux_store_inferior_registers): Likewise.
5457
5458 2017-07-22  Tom Tromey  <tom@tromey.com>
5459
5460         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5461         <syscalls_counts>: Now a std::vector.
5462         (get_catch_syscall_inferior_data): Use "new".
5463         (catch_syscall_inferior_data_cleanup): Use "delete".
5464         (insert_catch_syscall, remove_catch_syscall)
5465         (clear_syscall_counts): Update.
5466
5467 2017-07-22  Tom Tromey  <tom@tromey.com>
5468
5469         * break-catch-syscall.c (syscall_catchpoint)
5470         <syscalls_to_be_caught>: Now a std::vector<int>
5471         (~syscall_catchpoint): Remove.
5472         (insert_catch_syscall, remove_catch_syscall)
5473         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5474         (print_mention_catch_syscall, print_recreate_catch_syscall):
5475         Update.
5476         (create_syscall_event_catchpoint): Change type of "filter"
5477         parameter.
5478         (catch_syscall_split_args): Return a std::vector.
5479         (catch_syscall_command_1, catching_syscall_number_1): Update.
5480
5481 2017-07-22  Tom Tromey  <tom@tromey.com>
5482
5483         * break-catch-throw.c (struct exception_catchpoint)
5484         <exception_rx>: Now a std::string.
5485         (~exception_catchpoint): Remove.
5486         (print_one_detail_exception_catchpoint): Update.
5487         (handle_gnu_v3_exceptions): Change type of except_rx.
5488         (extract_exception_regexp): Return a std::string.
5489         (catch_exception_command_1): Update.
5490
5491 2017-07-22  Tom Tromey  <tom@tromey.com>
5492
5493         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5494         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5495         std::vector.
5496         <catch_all>: Now a bool.
5497         (~signal_catchpoint): Remove.
5498         (signal_catchpoint_insert_location)
5499         (signal_catchpoint_remove_location)
5500         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5501         (signal_catchpoint_print_mention)
5502         (signal_catchpoint_print_recreate)
5503         (signal_catchpoint_explains_signal): Update.
5504         (create_signal_catchpoint): Change type of "filter" and
5505         "catch_all".
5506         (catch_signal_split_args): Return a std::vector.  Change type of
5507         "catch_all".
5508         (catch_signal_command): Update.
5509
5510 2017-07-20  Pedro Alves  <palves@redhat.com>
5511
5512         * ada-lang.c (ada_language_defn): Make extern.
5513         (_initialize_ada_language): Remove add_language call.
5514         * c-lang.c (c_language_defn, cplus_language_defn)
5515         (asm_language_defn, minimal_language_defn): Make extern.
5516         (_initialize_c_language): Delete.
5517         * completer.c (compare_cstrings): Delete, moved to utils.h.
5518         * d-lang.c (d_language_defn): Make extern.
5519         (_initialize_d_language): Remove add_language calls.
5520         * defs.h (enum language): Add comment.
5521         * f-lang.c (f_language_defn): Make extern.
5522         (_initialize_f_language): Remove add_language call.
5523         * go-lang.c (go_language_defn): Make extern.
5524         (_initialize_go_language): Remove add_language call.
5525         * language.c: Include <algorithm>.
5526         (languages): Redefine as const array.
5527         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5528         (set_language_command): Handle "local".  Use for-range loop.
5529         (set_language): Remove loop.
5530         (language_enum): Rewrite.
5531         (language_def, language_str): Remove loops.
5532         (add_language): Delete.
5533         (add_set_language_command): New, based on add_languages.
5534         (skip_language_trampoline): Adjust.
5535         (local_language_defn): Delete.
5536         (language_gdbarch_post_init): Adjust.
5537         (_initialize_language): Remove add_language calls.  Call
5538         add_set_language_command.
5539         * language.h (add_language): Delete.
5540         (auto_language_defn)
5541         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5542         (asm_language_defn, c_language_defn, cplus_language_defn)
5543         (d_language_defn, f_language_defn, go_language_defn)
5544         (m2_language_defn, objc_language_defn, opencl_language_defn)
5545         (pascal_language_defn, rust_language_defn): Declare.
5546         * m2-lang.c (m2_language_defn): Make extern.
5547         (_initialize_m2_language): Remove add_language call.
5548         * objc-lang.c (objc_language_defn): Make extern.
5549         (_initialize_objc_language): Remove add_language call.
5550         * opencl-lang.c (opencl_language_defn): Make extern.
5551         (_initialize_opencl_language): Remove add_language call.
5552         * p-lang.c (pascal_language_defn): Make extern.
5553         (_initialize_pascal_language): Delete.
5554         * rust-lang.c (rust_language_defn): Make extern.
5555         (_initialize_rust_language): Delete.
5556         * utils.h (compare_cstrings): New static inline function.
5557
5558 2017-07-20  Pedro Alves  <palves@redhat.com>
5559
5560         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5561         (get_var_value): Constify parameters.
5562         (get_int_var_value): Change prototype.
5563         (to_fixed_range_type): Adjust.
5564         * ada-lang.h (get_int_var_value): Change prototype.
5565
5566 2017-07-20  Pedro Alves  <palves@redhat.com>
5567
5568         * dwarf2read.c (dw2_lookup_symbol): Use
5569         SYMBOL_MATCHES_SEARCH_NAME.
5570         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5571
5572 2017-07-20  Pedro Alves  <palves@redhat.com>
5573
5574         * block.c (block_iter_name_step, block_iter_name_first)
5575         (block_iter_name_next): Delete.
5576         (block_lookup_symbol_primary): Adjust to use
5577         dict_iter_match_first/dict_iter_match_next.
5578         * block.h (block_iter_name_first, block_iter_name_next): Delete
5579         declarations.
5580         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5581         dict_iter_match_first/dict_iter_match_next.
5582
5583 2017-07-20  Pedro Alves  <palves@redhat.com>
5584
5585         * cp-support.c (cp_find_first_component_aux): Add missing case for
5586         end of string.
5587
5588 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5589
5590         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5591         of dwo_cu's dwo_file.
5592
5593 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5594
5595         * remote.c (store_registers_using_G): Remove one line comment.
5596
5597 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5598
5599         * regcache.c (regcache_cpy): Simplify it.
5600         (regcache::cpy_no_passthrough): Remove it.
5601         * regcache.h (cpy_no_passthrough): Remove it.
5602         (regcache_dup, regcache_cpy): Update comments.
5603
5604 2017-07-18  Pedro Alves  <palves@redhat.com>
5605
5606         * remote-sim.c (sim_command_completer): Adjust to work with a
5607         completion_tracker instead of a VEC.
5608
5609 2017-07-17  Pedro Alves  <palves@redhat.com>
5610
5611         * completer.c (complete_source_filenames): New function.
5612         (complete_address_and_linespec_locations): New function.
5613         (location_completer): Use complete_address_and_linespec_locations.
5614         (completion_tracker::build_completion_result): Honor the tracker's
5615         request to suppress append.
5616         * completer.h (completion_tracker::suppress_append_ws)
5617         (completion_tracker::set_suppress_append_ws): New methods.
5618         (completion_tracker::m_suppress_append_ws): New field.
5619         (complete_source_filenames): New declaration.
5620         * linespec.c (linespec_complete_what): New.
5621         (struct ls_parser) <complete_what, completion_word,
5622         completion_quote_char, completion_quote_end, completion_tracker>:
5623         New fields.
5624         (string_find_incomplete_keyword_at_end): New.
5625         (linespec_lexer_lex_string): Record quote char.  If in completion
5626         mode, don't throw.
5627         (linespec_lexer_consume_token): Advance the completion word point.
5628         (linespec_lexer_peek_token): Save/restore completion info.
5629         (save_stream_and_consume_token): New.
5630         (set_completion_after_number): New.
5631         (linespec_parse_basic): Set what to complete next depending on
5632         token.  Handle function and label completions specially.
5633         (parse_linespec): Disable objc shortcut in completion mode.  Set
5634         what to complete next depending on token type.  Skip keyword if in
5635         completion mode.
5636         (complete_linespec_component, linespec_complete): New.
5637         * linespec.h (linespec_complete): Declare.
5638
5639 2017-07-17  Pedro Alves  <palves@redhat.com>
5640
5641         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5642         Handle 'operator<' / 'operator<<'.
5643
5644 2017-07-17  Pedro Alves  <palves@redhat.com>
5645
5646         * completer.c (collect_explicit_location_matches): Handle
5647         MATCH_LABEL.
5648         (convert_explicit_location_to_linespec): New, factored out from
5649         ...
5650         (convert_explicit_location_to_sals): ... this.
5651         (complete_label): New.
5652         (linespec_complete_label, find_label_symbols_in_block): New.
5653         (find_label_symbols): Add completion_mode parameter and adjust to
5654         call find_label_symbols_in_block.
5655         * linespec.h (linespec_complete_label): Declare.
5656
5657 2017-07-17  Pedro Alves  <palves@redhat.com>
5658
5659         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5660         complete_symbol_mode parameter.
5661         * cli/cli-cmds.c (complete_command): Get the completion result out
5662         of the handle_brkchars tracker if used a custom word point.
5663         * completer.c: Include "linespec.h".
5664         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5665         (advance_to_expression_complete_word_point): New.
5666         (completion_tracker::completes_to_completion_word): New.
5667         (complete_files_symbols): Pass down
5668         complete_symbol_mode::EXPRESSION.
5669         (explicit_options, probe_options): New.
5670         (collect_explicit_location_matches): Complete on the
5671         explictit_loc->foo instead of word.  Use
5672         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5673         keyword and options completions.
5674         (backup_text_ptr): Delete.
5675         (skip_keyword): New.
5676         (complete_explicit_location): Remove 'word' parameter.  Add
5677         language, quoted_arg_start and quoted_arg_end parameters.
5678         Rewrite, parsing left to right.
5679         (location_completer): Rewrite.
5680         (location_completer_handle_brkchars): New function.
5681         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5682         (enum complete_line_internal_reason): Adjust comments.
5683         (completion_tracker::discard_completions): New.
5684         (completer_handle_brkchars_func_for_completer): Handle
5685         location_completer.
5686         (gdb_custom_word_point_brkchars)
5687         (gdb_org_rl_basic_quote_characters): New.
5688         (gdb_completion_word_break_characters_throw)
5689         (completion_find_completion_word): Handle trackers that use a
5690         custom word point.
5691         (completion_tracker::advance_custom_word_point_by): New.
5692         (completion_tracker::build_completion_result): Don't rely on
5693         readline appending the quote char.
5694         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5695         use a custom word point.
5696         (gdb_rl_attempted_completion_function): Restore
5697         rl_basic_quote_characters.
5698         * completer.h (class completion_tracker): Extend intro comment.
5699         (completion_tracker::set_quote_char)
5700         (completion_tracker::quote_char)
5701         (completion_tracker::set_use_custom_word_point)
5702         (completion_tracker::use_custom_word_point)
5703         (completion_tracker::custom_word_point)
5704         (completion_tracker::set_custom_word_point)
5705         (completion_tracker::advance_custom_word_point_by)
5706         (completion_tracker::completes_to_completion_word)
5707         (completion_tracker::discard_completions): New methods.
5708         (completion_tracker::m_quote_char)
5709         (completion_tracker::m_use_custom_word_point)
5710         (completion_tracker::m_custom_word_point): New fields.
5711         (advance_to_expression_complete_word_point): Declare.
5712         * f-lang.c (f_collect_symbol_completion_matches): Add
5713         complete_symbol_mode parameter.
5714         * language.h (struct language_defn)
5715         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5716         parameter.
5717         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5718         (linespec_complete_function): New function.
5719         (linespec_lexer_lex_keyword): Adjust.
5720         * linespec.h (linespec_keywords, linespec_complete_function): New
5721         declarations.
5722         * location.c (find_end_quote): New function.
5723         (explicit_location_lex_one): Add explicit_completion_info
5724         parameter.  Save quoting info.  Don't throw if being called for
5725         completion.  Don't handle Ada operators here.
5726         (is_cp_operator, skip_op_false_positives, first_of)
5727         (explicit_location_lex_one_function): New function.
5728         (string_to_explicit_location): Replace 'dont_throw' parameter with
5729         an explicit_completion_info pointer parameter.  Handle it.  Don't
5730         use explicit_location_lex_one to lex function names.  Use
5731         explicit_location_lex_one_function instead.
5732         * location.h (struct explicit_completion_info): New.
5733         (string_to_explicit_location): Replace 'dont_throw' parameter with
5734         an explicit_completion_info pointer parameter.
5735         * symtab.c (default_collect_symbol_completion_matches_break_on):
5736         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5737         (default_collect_symbol_completion_matches)
5738         (collect_symbol_completion_matches): Add complete_symbol_mode
5739         parameter.
5740         (collect_symbol_completion_matches_type): Pass down
5741         complete_symbol_mode::EXPRESSION.
5742         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5743         parameter.  Handle LINESPEC mode.
5744         * symtab.h (complete_symbol_mode): New.
5745         (default_collect_symbol_completion_matches_break_on)
5746         (default_collect_symbol_completion_matches)
5747         (collect_symbol_completion_matches)
5748         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5749         parameter.
5750
5751 2017-07-17  Pedro Alves  <palves@redhat.com>
5752
5753         * utils.c (enum class strncmp_iw_mode): New.
5754         (strcmp_iw): Rename to ...
5755         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5756         parameters.  Handle them.
5757         (strncmp_iw): New.
5758         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5759         * utils.h (strncmp_iw): Declare.
5760         (strcmp_iw): Move describing comments here.
5761
5762 2017-07-17  Pedro Alves  <palves@redhat.com>
5763
5764         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5765         CP_OPERATOR_STR.
5766         * c-typeprint.c (is_type_conversion_operator): Use
5767         CP_OPERATOR_STR.
5768         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5769         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5770         CP_OPERATOR_LEN.
5771         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5772         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5773         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5774         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5775         CP_OPERATOR_STR.
5776         * location.c: Include "cp-support.h".
5777         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5778         CP_OPERATOR_STR.
5779         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5780         CP_OPERATOR_LEN.
5781
5782 2017-07-17  Pedro Alves  <palves@redhat.com>
5783
5784         * cli/cli-cmds.c (complete_command): Use a completion tracker
5785         along with completion_find_completion_word for handle_brkchars
5786         phase.
5787         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5788         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5789         (struct gdb_rl_completion_word_info): New.
5790         (gdb_rl_find_completion_word): New.
5791         (completion_find_completion_word): New.
5792         * completer.h (completion_find_completion_word): Declare.
5793
5794 2017-07-17  Pedro Alves  <palves@redhat.com>
5795
5796         * ada-lang.c (symbol_completion_match): Adjust comments.
5797         (symbol_completion_add): Replace vector parameter with
5798         completion_tracker parameter.  Use it.
5799         (ada_make_symbol_completion_list): Rename to...
5800         (ada_collect_symbol_completion_matches): ... this.  Add
5801         completion_tracker parameter and use it.
5802         (ada_language_defn): Adjust.
5803         * break-catch-syscall.c (catch_syscall_completer): Adjust
5804         prototype and work with completion_tracker instead of VEC.
5805         * breakpoint.c (condition_completer): Adjust prototype and work
5806         with completion_tracker instead of VEC.
5807         * c-lang.c (c_language_defn, cplus_language_defn)
5808         (asm_language_defn, minimal_language_defn): Adjust to renames.
5809         * cli/cli-cmds.c (complete_command): Rework using
5810         completion_tracker.  Catch exceptions when completing.
5811         * cli/cli-decode.c (integer_unlimited_completer)
5812         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5813         with completion_tracker instead of VEC.
5814         * command.h (struct completion_tracker): Forward declare.
5815         (completer_ftype, completer_handle_brkchars_ftype): Change
5816         types.
5817         (complete_on_cmdlist, complete_on_enum): Adjust.
5818         * completer.c: Include <algorithm>.
5819         (struct gdb_completer_state): New.
5820         (current_completion): New global.
5821         (readline_line_completion_function): Delete.
5822         (noop_completer, filename_completer)
5823         (filename_completer_handle_brkchars, complete_files_symbols)
5824         (linespec_location_completer): Adjust to work with a
5825         completion_tracker instead of a VEC.
5826         (string_or_empty): New.
5827         (collect_explicit_location_matches): Adjust to work with a
5828         completion_tracker instead of a VEC.
5829         (explicit_location_completer): Rename to ...
5830         (complete_explicit_location): ... this and adjust to work with a
5831         completion_tracker instead of a VEC.
5832         (location_completer): Adjust to work with a completion_tracker
5833         instead of a VEC.
5834         (add_struct_fields): Adjust to work with a completion_list instead
5835         of VEC.
5836         (expression_completer): Rename to ...
5837         (complete_expression): ... this and adjust to work with a
5838         completion_tracker instead of a VEC.  Use complete_files_symbols.
5839         (expression_completer): Reimplement on top of complete_expression.
5840         (symbol_completer): Adjust to work with a completion_tracker
5841         instead of a VEC.
5842         (enum complete_line_internal_reason): Add describing comments.
5843         (complete_line_internal_normal_command): Adjust to work with a
5844         completion_tracker instead of a VEC.
5845         (complete_line_internal): Rename to ...
5846         (complete_line_internal_1): ... this and adjust to work with a
5847         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5848         handle_brkchars phase.
5849         (new_completion_tracker): Delete.
5850         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5851         complete_line_internal_1.
5852         (free_completion_tracker): Delete.
5853         (INITIAL_COMPLETION_HTAB_SIZE): New.
5854         (completion_tracker::completion_tracker)
5855         (completion_tracker::~completion_tracker): New.
5856         (maybe_add_completion): Delete.
5857         (completion_tracker::maybe_add_completion)
5858         (completion_tracker::add_completion)
5859         (completion_tracker::add_completions): New.
5860         (throw_max_completions_reached_error): Delete.
5861         (complete_line): Adjust to work with a completion_tracker instead
5862         of a VEC.  Don't create a completion_tracker_t or check for max
5863         completions here.
5864         (command_completer, command_completer_handle_brkchars)
5865         (signal_completer, reg_or_group_completer_1)
5866         (reg_or_group_completer, default_completer_handle_brkchars):
5867         Adjust to work with a completion_tracker.
5868         (gdb_completion_word_break_characters_throw): New.
5869         (gdb_completion_word_break_characters): Reimplement.
5870         (line_completion_function): Delete.
5871         (completion_tracker::recompute_lowest_common_denominator)
5872         (expand_preserving_ws)
5873         (completion_tracker::build_completion_result)
5874         (completion_result::completion_result)
5875         (completion_result::completion_result)
5876         (completion_result::~completion_result)
5877         (completion_result::completion_result)
5878         (completion_result::release_match_list, compare_cstrings)
5879         (completion_result::sort_match_list)
5880         (completion_result::reset_match_list)
5881         (gdb_rl_attempted_completion_function_throw)
5882         (gdb_rl_attempted_completion_function): New.
5883         * completer.h (completion_list, struct completion_result)
5884         (class completion_tracker): New.
5885         (complete_line): Add completion_tracker parameter.
5886         (readline_line_completion_function): Delete.
5887         (gdb_rl_attempted_completion_function): New.
5888         (noop_completer, filename_completer, expression_completer)
5889         (location_completer, symbol_completer, command_completer)
5890         (signal_completer, reg_or_group_completer): Update prototypes.
5891         (completion_tracker_t, new_completion_tracker)
5892         (make_cleanup_free_completion_tracker): Delete.
5893         (enum maybe_add_completion_enum): Delete.
5894         (maybe_add_completion): Delete.
5895         (throw_max_completions_reached_error): Delete.
5896         * corefile.c (complete_set_gnutarget): Adjust to work with a
5897         completion_tracker instead of a VEC.
5898         * cp-abi.c (cp_abi_completer): Adjust to work with a
5899         completion_tracker instead of a VEC.
5900         * d-lang.c (d_language_defn): Adjust.
5901         * disasm.c (disassembler_options_completer): Adjust to work with a
5902         completion_tracker instead of a VEC.
5903         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5904         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5905         with a completion_tracker instead of a VEC.
5906         (f_language_defn): Adjust.
5907         * go-lang.c (go_language_defn): Adjust.
5908         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5909         Adjust to work with a completion_tracker instead of a VEC.
5910         * infrun.c (handle_completer): Likewise.
5911         * interps.c (interpreter_completer): Likewise.
5912         * interps.h (interpreter_completer): Likewise.
5913         * language.c (unknown_language_defn, auto_language_defn)
5914         (local_language_defn): Adjust.
5915         * language.h (language_defn::la_make_symbol_completion_list):
5916         Rename to ...
5917         (language_defn::la_collect_symbol_completion_matches): ... this
5918         and adjust to work with a completion_tracker instead of a VEC.
5919         * m2-lang.c (m2_language_defn): Adjust.
5920         * objc-lang.c (objc_language_defn): Adjust.
5921         * opencl-lang.c (opencl_language_defn): Adjust.
5922         * p-lang.c (pascal_language_defn): Adjust.
5923         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5924         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5925         with a completion_tracker.
5926         * rust-lang.c (rust_language_defn): Adjust.
5927         * symtab.c (free_completion_list, do_free_completion_list)
5928         (return_val, completion_tracker): Delete.
5929         (completion_list_add_name, completion_list_add_symbol)
5930         (completion_list_add_msymbol, completion_list_objc_symbol)
5931         (completion_list_add_fields, add_symtab_completions): Add
5932         completion_tracker parameter and use it.
5933         (default_make_symbol_completion_list_break_on_1): Rename to...
5934         (default_collect_symbol_completion_matches_break_on): ... this.
5935         Add completion_tracker parameter and use it instead of allocating
5936         a completion tracker here.
5937         (default_make_symbol_completion_list_break_on): Delete old
5938         implementation.
5939         (default_make_symbol_completion_list): Delete.
5940         (default_collect_symbol_completion_matches): New.
5941         (make_symbol_completion_list): Delete.
5942         (collect_symbol_completion_matches): New.
5943         (make_symbol_completion_type): Rename to ...
5944         (collect_symbol_completion_matches_type): ... this.  Add
5945         completion_tracker parameter and use it instead of VEC.
5946         (make_file_symbol_completion_list_1): Rename to...
5947         (collect_file_symbol_completion_matches): ... this.  Add
5948         completion_tracker parameter and use it instead of VEC.
5949         (make_file_symbol_completion_list): Delete.
5950         (add_filename_to_list): Use completion_list instead of a VEC.
5951         (add_partial_filename_data::list): Now a completion_list.
5952         (make_source_files_completion_list): Work with a completion_list
5953         instead of a VEC.
5954         * symtab.h: Include "completer.h".
5955         (default_make_symbol_completion_list_break_on)
5956         (default_make_symbol_completion_list, make_symbol_completion_list)
5957         (make_symbol_completion_type, make_file_symbol_completion_list)
5958         (make_source_files_completion_list): Delete.
5959         (default_collect_symbol_completion_matches_break_on)
5960         (default_collect_symbol_completion_matches)
5961         (collect_symbol_completion_matches)
5962         (collect_symbol_completion_matches_type)
5963         (collect_file_symbol_completion_matches)
5964         (make_source_files_completion_list): New.
5965         * top.c (init_main): Don't install a rl_completion_entry_function
5966         hook.  Install a rl_attempted_completion_function hook instead.
5967         * tui/tui-layout.c (layout_completer): Adjust to work with a
5968         completion_tracker.
5969         * tui/tui-regs.c (tui_reggroup_completer):
5970         * tui/tui-win.c (window_name_completer, focus_completer)
5971         (winheight_completer): Adjust to work with a completion_tracker.
5972         * value.c: Include "completer.h".
5973         (complete_internalvar): Adjust to work with a completion_tracker.
5974         * value.h (complete_internalvar): Likewise.
5975
5976 2017-07-17  Pedro Alves  <palves@redhat.com>
5977
5978         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5979         renames.
5980         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5981         comments to completer_ftype's declaration.
5982         <completer_handle_brkchars>: Change type to
5983         completer_handle_brkchars_ftype.
5984         * command.h (completer_ftype): Add describing comment and give
5985         names to parameters.
5986         (completer_ftype_void): Rename to ...
5987         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5988         (set_cmd_completer_handle_brkchars): Adjust.
5989         * completer.c (filename_completer_handle_brkchars): New function.
5990         (complete_line_internal_normal_command): New function, factored
5991         out from ...
5992         (complete_line_internal): ... here.
5993         (command_completer_handle_brkchars)
5994         (default_completer_handle_brkchars)
5995         (completer_handle_brkchars_func_for_completer): New functions.
5996         * completer.h (set_gdb_completion_word_break_characters): Delete
5997         declaration.
5998         (completer_handle_brkchars_func_for_completer): New declaration.
5999         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6000         completer_handle_brkchars_func_for_completer.
6001
6002 2017-07-17  Pedro Alves  <palves@redhat.com>
6003
6004         * completer.c (symbol_completer): New function, based on
6005         make_symbol_completion_list_fn.
6006         * completer.h (symbol_completer): New declaration.
6007         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6008         * python/py-cmd.c (completers): Adjust.
6009         * symtab.c (make_symbol_completion_list_fn): Delete.
6010         * symtab.h (make_symbol_completion_list_fn): Delete.
6011         * cli/cli-decode.c (add_cmd): Adjust.
6012
6013 2017-07-17  Pedro Alves  <palves@redhat.com>
6014
6015         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6016         * dwarf2read.c: Include "filename-seen-cache.h".
6017         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6018         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6019         * filename-seen-cache.c: New file.
6020         * filename-seen-cache.h: New file.
6021         * symtab.c: Include "filename-seen-cache.h".
6022         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6023         (create_filename_seen_cache, clear_filename_seen_cache)
6024         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6025         to filename-seen-cache.h/filename-seen-cache.c.
6026         (output_source_filename, sources_info)
6027         (maybe_add_partial_symtab_filename)
6028         (make_source_files_completion_list): Adjust to use
6029         filename_seen_cache.
6030
6031 2017-07-17  Pedro Alves  <palves@redhat.com>
6032
6033         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6034         fields.
6035         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6036         dwarf2_debug_sections*)): New.
6037         (dwarf2_per_objfile::dwarf2_per_objfile(const
6038         dwarf2_per_objfile&)): Declare as deleted.
6039         (dwarf2_per_objfile::operator=): Declare as deleted.
6040         (dwarf2_per_objfile::dwarf2_per_objfile)
6041         (dwarf2_per_objfile::~dwarf2_per_objfile)
6042         (dwarf2_per_objfile::free_cached_comp_units): New.
6043         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6044         ctor.  Call dwarf2_per_objfile's ctor manually.
6045         (dwarf2_locate_sections): Deleted/refactored as ...
6046         (dwarf2_per_objfile::locate_sections): ... this new method.
6047         (free_cached_comp_units): Defer to
6048         dwarf2_per_objfile::free_cached_comp_units.
6049         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6050
6051 2017-07-14  Tom Tromey  <tom@tromey.com>
6052
6053         PR rust/21764:
6054         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6055         parameter.
6056         <UNOP_SIZEOF>: Split into separate case.
6057         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6058
6059 2017-07-14  Tom Tromey  <tom@tromey.com>
6060
6061         PR rust/21763:
6062         * symtab.c (symbol_matches_domain): Add language_rust to special
6063         case.
6064         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6065         treat LOC_TYPEDEF symbols as variables.
6066
6067 2017-07-14  Pedro Alves  <palves@redhat.com>
6068
6069         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6070         symtabs matching all symtabs with SRCFILE as file name instead of
6071         only considering the first hit, with lookup_symtab.
6072
6073 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6074
6075         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6076         operator_name parameters.
6077         (gen_expr): Update function call.
6078
6079 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6080
6081         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6082         parameter.
6083         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6084         Likewise.
6085         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6086         parameter, use agent_expr::gdbarch instead, update function
6087         calls.
6088         (locexpr_tracepoint_var_ref): Likewise.
6089         (loclist_tracepoint_var_ref): Likewise.
6090         * ax-gdb.c (gen_trace_static_fields): Likewise.
6091         (gen_traced_pop): Likewise.
6092         (gen_frame_args_address): Likewise.
6093         (gen_frame_locals_address): Likewise.
6094         (gen_var_ref): Likewise.
6095         (gen_struct_ref_recursive): Likewise.
6096         (gen_static_field): Likewise.
6097         (gen_maybe_namespace_elt): Likewise.
6098         (gen_expr): Likewise.
6099         (gen_trace_for_var): Likewise.
6100         (gen_trace_for_expr): Likewise.
6101         (gen_trace_for_return_address): Likewise.
6102
6103 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6104
6105         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6106         parameter.
6107         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6108
6109 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6110
6111         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6112         from ax, update calls.
6113         (gen_usual_arithmetic): Likewise.
6114         (gen_integral_promotions): Likewise.
6115         (gen_bitfield_ref): Likewise.
6116         (gen_primitive_field): Likewise.
6117         (gen_struct_ref_recursive): Likewise.
6118         (gen_struct_ref): Likewise.
6119         (gen_maybe_namespace_elt): Likewise.
6120         (gen_struct_elt_for_reference): Likewise.
6121         (gen_namespace_elt): Likewise.
6122         (gen_aggregate_elt_ref): Likewise.
6123         (gen_expr): Get gdbarch from ax, update calls.
6124         (gen_expr_binop_rest): Likewise.
6125
6126 2017-07-13  Pedro Alves  <palves@redhat.com>
6127
6128         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6129         as default tdesc.
6130         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6131         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6132         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6133         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6134         tdep.
6135         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6136         Get final tdesc from the tdep.
6137         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6138         default tdesc.
6139         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6140         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6141         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6142         Use it as default tdesc.
6143         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6144         down to amd_init_abi.  No longer handle fallback tdesc here.
6145         * amd64-tdep.h (tdesc_x32): Declare.
6146         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6147         parameter.
6148         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6149         as default tdesc.
6150
6151 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6152
6153         * s390-linux-tdep.c (s390_process_record): Add support for
6154         instructions new in arch12.
6155
6156 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6157
6158         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6159         PT_GETFSBASE and PT_GETGSBASE.
6160         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6161         PT_SETGSBASE.
6162
6163 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6164
6165         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6166         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6167         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6168         those rules.
6169         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6170         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6171         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6172         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6173         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6174         * features/i386/amd64.xml: Add 64bit-segments.xml.
6175         * features/i386/amd64-avx-avx512.c: Regenerated.
6176         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6177         * features/i386/amd64-avx-mpx.c: Regenerated.
6178         * features/i386/amd64-avx.c: Regenerated.
6179         * features/i386/amd64-mpx.c: Regenerated.
6180         * features/i386/amd64.c: Regenerated.
6181         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6182         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6183         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6184         * regformats/i386/amd64-avx.dat: Regenerated.
6185         * regformats/i386/amd64-mpx.dat: Regenerated.
6186         * regformats/i386/amd64.dat: Regenerated.
6187
6188 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6189
6190         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6191         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6192
6193 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6194
6195         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6196         unsetenv.
6197         * gnulib/aclocal.m4: Regenerate.
6198         * gnulib/config.in: Regenerate.
6199         * gnulib/configure: Regenerate.
6200         * gnulib/import/Makefile.am: Regenerate.
6201         * gnulib/import/Makefile.in: Regenerate.
6202         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6203         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6204         * gnulib/import/m4/environ.m4: New file.
6205         * gnulib/import/m4/setenv.m4: New file.
6206         * gnulib/import/setenv.c: New file.
6207         * gnulib/import/unsetenv.c: New file.
6208
6209 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6210
6211         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6212         address when op is DW_OP_addr.
6213
6214 2017-07-09  Tom Tromey  <tom@tromey.com>
6215
6216         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6217         check and apply to outer type.
6218
6219 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6220
6221         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6222         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6223         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6224         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6225
6226 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6227
6228         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6229
6230 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6231
6232         * corelow.c (get_core_siginfo): Remove.
6233         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6234         instead of get_core_siginfo.
6235         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6236         * gdbarch.h: Re-generate.
6237         * gdbarch.c: Re-generate.
6238         * linux-tdep.c (linux_core_xfer_siginfo): New.
6239         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6240
6241 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6242
6243         * corelow.c (thread_section_name): Move to ...
6244         * gdbcore.h (thread_section_name): ... here.
6245
6246 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6247
6248         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6249         (struct siginfo32): New.
6250         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6251         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6252         via ptrace(PT_LWPINFO).
6253
6254 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6255
6256         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6257         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6258         (fbsd_get_siginfo_type): New.
6259         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6260         (_initialize_fbsd_tdep): New.
6261
6262 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6263
6264         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6265         a singular dwo_unit*) to support multiple CUs in the same way that
6266         multiple TUs are supported.
6267         (create_cus_hash_table): Replace create_dwo_cu with a function for
6268         parsing multiple CUs from a DWO file.
6269         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6270         create_dwo_cu.
6271         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6272         htab_find, rather than comparing the signature to a singleton CU in
6273         the dwo_file.
6274
6275 2017-07-06  Pedro Alves  <palves@redhat.com>
6276
6277         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6278
6279 2017-07-04  Pedro Alves  <palves@redhat.com>
6280
6281         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6282         * gdbtypes.h (TYPE_STATIC): Delete.
6283         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6284         is_synchronized, is_native>: Delete.
6285         <dummy>: Bump.
6286         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6287         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6288         (TYPE_FN_FIELD_ABSTRACT): Delete.
6289
6290 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6291
6292         * buffer.h (buffer_finish): Fix spelling mistakes.
6293
6294 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6295
6296         * .dir-locals.el: Automatically switch to C-style comments in
6297         versions of Emacs that support the feature.
6298
6299 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6300             Pedro Alves  <palves@redhat.com>
6301
6302         PR cli/21688
6303         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6304         (process_next_line): New variable 'inline_cmd'.
6305         Adjust 'if' clauses for "python", "compile" and "guile" to use
6306         'command_name_equals' and check for '!inline_cmd'.
6307
6308 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6309
6310         PR cli/21688
6311         * cli/cli-script.c (command_name_equals_not_inline): New function.
6312         (process_next_line): Adjust 'if' clauses for "python", "compile"
6313         and "guile" to use command_name_equals_not_inline.
6314
6315 2017-06-29  Pedro Alves  <palves@redhat.com>
6316
6317         * completer.c (expression_completer): Call
6318         linespec_location_completer instead of location_completer.
6319
6320 2017-06-29  Pedro Alves  <palves@redhat.com>
6321
6322         * completer.c (expression_completer): Remove code that recomputes
6323         'text' from 'word'.
6324
6325 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6326
6327         * regformats/regdat.sh: Generate code with
6328         "ifndef IN_PROCESS_AGENT".
6329
6330 2017-06-28  Pedro Alves  <palves@redhat.com>
6331
6332         * command.h: Include "common/scoped_restore.h".
6333
6334 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6335
6336         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6337         instead of obstack_grow.
6338
6339 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6340
6341         PR gdb/21337
6342         * symfile.c (reread_symbols): Call objfiles_changed just before
6343         read_symbols.
6344
6345 2017-06-27  Pedro Alves  <palves@redhat.com>
6346
6347         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6348         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6349         (completion_list_add_symbol, completion_list_add_msymbol):
6350         ... these new functions.
6351         (add_symtab_completions)
6352         (default_make_symbol_completion_list_break_on_1): Adjust.
6353
6354 2017-06-27  Pedro Alves  <palves@redhat.com>
6355
6356         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6357         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6358         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6359         dtor.
6360         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6361         'storage_obstack' field an auto_obstack.  In-class initialize all
6362         non-bitfield fields.  Make minsyms_read bool.
6363         * symfile.c (read_symbols): Adjust.
6364
6365 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6366
6367         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6368         (gdbsim_store_register): Likewise.
6369
6370 2017-06-27  Pedro Alves  <palves@redhat.com>
6371
6372         * c-exp.y (name_obstack): Now an auto_obstack.
6373         (yylex): Use auto_obstack::clear.
6374         (c_parse): Use auto_obstack::clear instead of reinitializing and
6375         freeing the obstack.
6376         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6377         * d-exp.y (name_obstack): Now an auto_obstack.
6378         (yylex): Use auto_obstack::clear.
6379         (d_parse): Use auto_obstack::clear instead of reinitializing and
6380         freeing the obstack.
6381         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6382         auto_obstack.
6383         * dwarf2read.c (create_addrmap_from_index)
6384         (dwarf2_build_psymtabs_hard)
6385         (update_enumeration_type_from_children): Likewise.
6386         * gdb_obstack.h (auto_obstack): New type.
6387         * go-exp.y (name_obstack): Now an auto_obstack.
6388         (build_packaged_name): Use auto_obstack::clear.
6389         (go_parse): Use auto_obstack::clear instead of reinitializing and
6390         freeing the obstack.
6391         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6392         auto_obstack.
6393         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6394         * rust-exp.y (work_obstack): Now an auto_obstack.
6395         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6396         reinitializing and freeing the obstack.
6397         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6398         (host_char_to_target): Use auto_obstack.
6399         * utils.h (make_cleanup_obstack_free): Delete declaration.
6400         * valprint.c (generic_emit_char, generic_printstr): Use
6401         auto_obstack.
6402
6403 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6404
6405         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6406         thread.
6407         (darwin_init_thread_list): Don't update dummy thread.
6408         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6409
6410 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6411
6412         * record-full.c (netorder16): Remove.
6413
6414 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6415
6416         * common/diagnostics.h: Define macros for GCC.
6417         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6418         * common/vec.h: Include diagnostics.h.
6419         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6420         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6421         warning.
6422
6423 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6424
6425         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6426         New macro.
6427         * ada-lex.l: Ignore deprecated register warnings.
6428
6429 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6430
6431         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6432         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6433
6434 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6435
6436         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6437         its own line.
6438
6439 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6440
6441         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6442
6443 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6444
6445         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6446         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6447         (xtensa_register_read_masked): Likewise.
6448
6449 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6450
6451         * common/environ.c (gdb_environ::unset): Update comment.
6452
6453 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6454
6455         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6456         registers.
6457
6458 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6459
6460         * record-full.c (record_full_exec_insn): Use byte_vector.
6461
6462 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6463
6464         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6465         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6466
6467 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6468
6469         * remote.c (cached_reg): Move from here...
6470         * regcache.h (cached_reg): ...to here.
6471         * python/py-unwind.c (struct reg_info): Remove.
6472         (cached_frame_info): Use cached_reg_t.
6473         (pyuw_prev_register): Likewise.
6474         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6475         (pyuw_dealloc_cache): Free all registers.
6476
6477 2017-06-22  Pedro Alves  <palves@redhat.com>
6478             Simon Marchi  <simon.marchi@ericsson.com>
6479
6480         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6481         warning.
6482         * common/diagnostics.h: New file.
6483
6484 2017-06-22  Pedro Alves  <palves@redhat.com>
6485
6486         * common/agent.h: Add include guards.
6487
6488 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6489
6490         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6491         talk about addressable units instead of bytes.
6492
6493 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6494
6495         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6496         of '::const_iterator'.
6497
6498 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6499
6500         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6501         'unittests/environ-selftests.c'.
6502         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6503         * charset.c (find_charset_names): Declare object 'iconv_env'.
6504         Update code to use 'iconv_env' object.  Remove call to
6505         'free_environ'.
6506         * common/environ.c: Include <utility>.
6507         (make_environ): Delete function.
6508         (free_environ): Delete function.
6509         (gdb_environ::clear): New function.
6510         (gdb_environ::operator=): New function.
6511         (gdb_environ::get): Likewise.
6512         (environ_vector): Delete function.
6513         (set_in_environ): Delete function.
6514         (gdb_environ::set): New function.
6515         (unset_in_environ): Delete function.
6516         (gdb_environ::unset): New function.
6517         (gdb_environ::envp): Likewise.
6518         * common/environ.h: Include <vector>.
6519         (struct gdb_environ): Delete; transform into...
6520         (class gdb_environ): ... this class.
6521         (free_environ): Delete prototype.
6522         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6523         environ_vector): Likewise.
6524         * infcmd.c (run_command_1): Update code to call
6525         'envp' from 'gdb_environ' class.
6526         (environment_info): Update code to call methods from 'gdb_environ'
6527         class.
6528         (unset_environment_command): Likewise.
6529         (path_info): Likewise.
6530         (path_command): Likewise.
6531         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6532         (inferior::inferior): Initialize 'environment' using the host's
6533         information.
6534         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6535         Include "environ.h".
6536         (class inferior) <environment>: Change type from 'struct
6537         gdb_environ' to 'gdb_environ'.
6538         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6539         methods from 'gdb_environ' class.
6540         * solib.c (solib_find_1): Likewise
6541         * unittests/environ-selftests.c: New file.
6542
6543 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6544
6545         * features/i386/i386-linux.xml: Exchange the order of including
6546         32bit-linux.xml and 32bit-sse.xml.
6547         * features/i386/i386-linux.c: Regenerated.
6548
6549 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6550
6551         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6552         Delete copy ctor and assignment operator.
6553         (tdesc_type): Likewise.
6554         (tdesc_feature): Likewise.
6555         (tdesc_free_reg): Remove.
6556         (tdesc_create_reg): Use new.
6557         (tdesc_free_type): Remove.
6558         (tdesc_create_vector): Use new.
6559         (tdesc_create_union): Likewise.
6560         (tdesc_create_flags): Likewise.
6561         (tdesc_create_enum): Likewise.
6562         (tdesc_free_feature): Delete.
6563         (free_target_description): Use delete.
6564
6565 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6566
6567         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6568         registers.
6569
6570 2017-06-19  Pedro Alves  <palves@redhat.com>
6571
6572         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6573         after gdb::unlinker.
6574
6575 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6576
6577         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6578         gdb_environ to access an environment variable.
6579
6580 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6581
6582         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6583         gdb_byte*.
6584
6585 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6586
6587         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6588
6589 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6590
6591         * configure: Re-generate.
6592         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6593
6594 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6595
6596         * configure: Re-generate.
6597         * warning.m4: Pass -Werror to compiler when checking for
6598         supported warning flags.
6599
6600 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6601
6602         * Makefile.in (COMPILE.pre): Add "-x c++".
6603
6604 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6605             Pedro Alves  <palves@redhat.com>
6606             Yao Qi  <yao.qi@linaro.org>
6607
6608         * defs.h (RequireLongest): New.
6609         (extract_integer): Declare function template.
6610         (extract_signed_integer): Remove the declaration, but define it
6611         static inline.
6612         (extract_unsigned_integer): Likewise.
6613         (store_integer): Declare function template.
6614         (store_signed_integer): Remove the declaration, but define it
6615         static inline.
6616         (store_unsigned_integer): Likewise.
6617         * findvar.c (extract_integer): New function template.
6618         (extract_signed_integer): Remove.
6619         (extract_unsigned_integer): Remove.
6620         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6621         instantiations.
6622         (store_integer): New function template.
6623         (store_signed_integer): Remove.
6624         (store_unsigned_integer): Remove.
6625         (store_integer): Explicit instantiations.
6626         * regcache.c (regcache_raw_read_signed): Update.
6627         (regcache::raw_read): New function.
6628         (regcache::raw_read_signed): Remove.
6629         (regcache::raw_read_unsigned): Remove.
6630         (regcache_raw_read_unsigned): Update.
6631         (regcache_raw_write_unsigned): Update.
6632         (regcache::raw_write_signed): Remove.
6633         (regcache::raw_write): New function.
6634         (regcache_cooked_read_signed): Update.
6635         (regcache::raw_write_unsigned): Remove.
6636         (regcache::cooked_read_signed): Remove.
6637         (regcache_cooked_read_unsigned): Update.
6638         (regcache::cooked_read_unsigned): Remove.
6639         (regcache_cooked_write_signed): Update.
6640         (regcache_cooked_write_unsigned): Update.
6641         * regcache.h (regcache) <raw_read_signed>: Remove.
6642         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6643         <raw_read, raw_write>: New.
6644         <cooked_read_signed, cooked_write_signed>: Remove.
6645         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6646         <cooked_read, cooked_write>: New.
6647         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6648         (sh64_pseudo_register_write): Update.
6649
6650 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6651
6652         * arc-tdep.c (arc_disassembler_options): New variable.
6653         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6654         of default_print_insn.
6655         (arc_delayed_print_insn): Set info->section when needed,
6656         use default_print_insn to retrieve a disassembler.
6657
6658 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6659
6660         PR gdb/21574
6661         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6662         to mention $SHELL and startup-with-shell.
6663
6664 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6665
6666         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6667
6668 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6669
6670         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6671         default_print_insn instead of print_insn_aarch64.
6672         * arm-tdep.c (gdb_print_insn_arm): Call
6673         default_print_insn instead of print_insn_big_arm
6674         and print_insn_little_arm.
6675         * i386-tdep.c (i386_print_insn): Call default_print_insn
6676         instead of print_insn_i386.
6677         * ia64-tdep.c (ia64_print_insn): Call
6678         default_print_insn instead of print_insn_ia64.
6679         * mips-tdep.c (gdb_print_insn_mips): Call
6680         default_print_insn instead of print_insn_big_mips
6681         and print_insn_little_mips.
6682         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6683         instead of print_insn_spu.
6684
6685 2017-06-14  Pedro Alves  <palves@redhat.com>
6686
6687         * ada-lang.c: Include "common/byte-vector.h".
6688         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6689         * charset.c (wchar_iterator::iterate): Resize the vector instead
6690         of reserving it.
6691         * common/byte-vector.h: Include "common/def-vector.h".
6692         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6693         * cli/cli-dump.c: Include "common/byte-vector.h".
6694         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6695         * common/byte-vector.h: New file.
6696         * common/def-vector.h: New file.
6697         * common/default-init-alloc.h: New file.
6698         * dwarf2loc.c: Include "common/byte-vector.h".
6699         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6700         instead of reserving it.
6701         * dwarf2read.c: Include "common/byte-vector.h".
6702         (data_buf::m_vec): Now a gdb::byte_vector.
6703         * gdb_regex.c: Include "common/def-vector.h".
6704         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6705         * mi/mi-main.c: Include "common/byte-vector.h".
6706         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6707         * printcmd.c: Include "common/byte-vector.h".
6708         (print_scalar_formatted): Use gdb::byte_vector.
6709         * valprint.c: Include "common/byte-vector.h".
6710         (maybe_negate_by_bytes, print_decimal_chars): Use
6711         gdb::byte_vector.
6712
6713 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6714
6715         * darwin-nat.c: Include "nat/fork-inferior.h".
6716
6717 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6718
6719         * configure.nat: Factor out Darwin bits that are not
6720         architecture-specific.  Add fork-inferior.o.
6721
6722 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6723
6724         * configure.nat: Factor out AIX bits that are not
6725         architecture-specific.  Add fork-inferior.o.
6726
6727 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6728
6729         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6730         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6731         wrappers that just call rw_pieced_value.
6732
6733 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6734
6735         * dwarf2loc.c (write_pieced_value): When writing the data for a
6736         memory piece, use write_memory_with_notification instead of
6737         write_memory.
6738
6739 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6740
6741         * valops.c (read_value_memory): Change embedded_offset to
6742         represent a bit offset instead of a byte offset.
6743         * value.h (read_value_memory): Adjust comment.
6744
6745 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6746
6747         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6748         dest_offset_bits and source_offset_bits.
6749         (write_pieced_value): Likewise.
6750
6751 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6752
6753         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6754         given by DW_OP_bit_piece.
6755         (write_pieced_value): Likewise.
6756
6757 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6758
6759         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6760         some other preparations to the places where sufficient information
6761         is available.
6762         (write_pieced_value): Likewise.
6763
6764 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6765
6766         * dwarf2loc.c (bits_to_bytes): New function.
6767         (read_pieced_value): Fix offset calculations for register pieces
6768         on big-endian targets.
6769         (write_pieced_value): Likewise.
6770
6771 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6772
6773         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6774         (write_pieced_value): Likewise.
6775
6776 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6777
6778         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6779         transfer the source value's least significant bits, instead of its
6780         lowest-addressed ones.  Rename type_len to max_offset.
6781         (read_pieced_value): Mirror above changes to write_pieced_value as
6782         applicable.
6783
6784 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6785
6786         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6787         truncate full bytes from dest_offset_bits before using it as an
6788         offset into the buffer.
6789
6790 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6791
6792         * dwarf2loc.c (write_pieced_value): Include transfer size in
6793         byte-wise check.
6794
6795 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6796
6797         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6798         calculation of this_size.
6799
6800 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6801
6802         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6803         when targeting a bit-field.
6804         (write_pieced_value): Likewise.
6805
6806 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6807
6808         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6809         (allocate_piece_closure): Drop addr_size parameter.
6810         (dwarf2_evaluate_loc_desc_full): Adjust call to
6811         allocate_piece_closure.
6812
6813 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6814
6815         PR gdb/21226
6816         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6817         the LSB end, independent of endianness.
6818
6819 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6820
6821         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6822         size capping.
6823
6824 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6825
6826         * mips-linux-nat.c: Move include features/mips*-linux.c to
6827         mips-linux-tdep.c.
6828         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6829         to mips-linux-tdep.c.
6830         * mips-linux-tdep.c: Include features/mips*-linux.c
6831         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6832         functions.
6833         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6834         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6835         (tdesc_mips64_dsp_linux): Declare.
6836
6837 2017-06-12  Tom Tromey  <tom@tromey.com>
6838
6839         * valprint.h (val_print_type_code_int): Remove.
6840         * valprint.c (generic_val_print_int): Always call
6841         val_print_scalar_formatted.
6842         (val_print_type_code_int): Remove.
6843         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6844         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6845         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6846         * ada-valprint.c (ada_val_print_num): Use
6847         val_print_scalar_formatted.
6848
6849 2017-06-12  Tom Tromey  <tom@tromey.com>
6850
6851         * printcmd.c (print_scalar_formatted): Unify the two switches.
6852         Don't convert scalars to LONGEST.
6853
6854 2017-06-12  Tom Tromey  <tom@tromey.com>
6855
6856         PR exp/16225:
6857         * valprint.h (print_decimal_chars): Update.
6858         * valprint.c (maybe_negate_by_bytes): New function.
6859         (print_decimal_chars): Add "is_signed" argument.
6860         * printcmd.c (print_scalar_formatted): Update.
6861
6862 2017-06-12  Tom Tromey  <tom@tromey.com>
6863
6864         PR exp/16225:
6865         * valprint.h (print_binary_chars, print_hex_chars): Update.
6866         * valprint.c (val_print_type_code_int): Update.
6867         (print_binary_chars): Add "zero_pad" argument.
6868         (emit_octal_digit): New function.
6869         (print_octal_chars): Don't zero-pad.
6870         (print_decimal_chars): Likewise.
6871         (print_hex_chars): Add "zero_pad" argument.
6872         * sh64-tdep.c (sh64_do_fp_register): Update.
6873         * regcache.c (regcache::dump): Update.
6874         * printcmd.c (print_scalar_formatted): Update.
6875         * infcmd.c (default_print_one_register_info): Update.
6876
6877 2017-06-12  Pedro Alves  <palves@redhat.com>
6878             Alan Hayward  <alan.hayward@arm.com>
6879
6880         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6881         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6882         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6883         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6884         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6885
6886 2017-06-12  Pedro Alves  <palves@redhat.com>
6887
6888         * dwarf2read.c (mapped_symtab::data): Now a vector of
6889         symtab_index_entry instead of vector of
6890         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6891         whether an element's name is NULL instead of checking whether the
6892         element itself is NULL.
6893         (find_slot): Change return type.  Adjust.
6894         (hash_expand, , add_index_entry, uniquify_cu_indices)
6895         (write_hash_table): Adjust.
6896
6897 2017-06-12  Pedro Alves  <palves@redhat.com>
6898
6899         * dwarf2read.c (recursively_count_psymbols): New function.
6900         (write_psymtabs_to_index): Call it to compute number of psyms and
6901         pass estimate size of psyms_seen to unordered_set's ctor.
6902
6903 2017-06-12  Pedro Alves  <palves@redhat.com>
6904
6905         * dwarf2read.c (write_hash_table): Check if key already exists
6906         before emplacing.
6907
6908 2017-06-12  Pedro Alves  <palves@redhat.com>
6909
6910         * dwarf2read.c (data_buf::append_space): Rename to...
6911         (data_buf::grow): ... this, and make private.  Adjust all callers.
6912         (data_buf::append_uint): New method.
6913         (add_address_entry, write_one_signatured_type)
6914         (write_psymtabs_to_index): Use it.
6915
6916 2017-06-12  Pedro Alves  <palves@redhat.com>
6917
6918         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6919         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6920         (data_buf::file_write): Call ::fwrite directly.
6921
6922 2017-06-12  Pedro Alves  <palves@redhat.com>
6923
6924         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6925         std::vector::erase.
6926
6927 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6928
6929         Code cleanup: C++ify .gdb_index producer.
6930         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6931         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6932         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6933         (create_strtab, add_string): Remove.
6934         (file_write, data_buf): New.
6935         (struct symtab_index_entry): Use std::vector for cu_indices.
6936         (struct mapped_symtab): Use std::vector for data.
6937         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6938         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6939         Remove.
6940         (find_slot): Change return type.  Update it to the new data structures.
6941         (hash_expand, add_index_entry): Update it to the new data structures.
6942         (offset_type_compare): Remove.
6943         (uniquify_cu_indices): Update it to the new data structures.
6944         (c_str_view, c_str_view_hasher, vector_hasher): New.
6945         (add_indices_to_cpool): Remove.
6946         (write_hash_table): Update it to the new data structures.
6947         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6948         (eq_psymtab_cu_index): Remove.
6949         (psym_index_map): New typedef.
6950         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6951         reference and std::unordered_map for cu_index_htab.
6952         (add_address_entry, add_address_entry_worker, write_address_map)
6953         (write_psymbols): Update it to the new data structures.
6954         (write_obstack): Remove.
6955         (struct signatured_type_index_data): Change types_list to a data_buf
6956         reference and psyms_seen to a std::unordered_set reference.
6957         (write_one_signatured_type, recursively_write_psymbols)
6958         (write_psymtabs_to_index): Update it to the new data structures.
6959
6960 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6961
6962         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6963         separate-debug-file commands.
6964         * symfile.h (separate_debug_file_debug): New global.
6965         * symfile.c (separate_debug_file_debug): New global.
6966         (separate_debug_file_exists, find_separate_debug_file): Add
6967         debug output.
6968         (_initialize_symfile): Add "set debug separate-debug-file"
6969         command.
6970         * build-id.c (build_id_to_debug_bfd,
6971         find_separate_debug_file_by_buildid): Add debug output.
6972
6973 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6974
6975         * gdbarch.sh (displaced_step_free_closure): Remove.
6976         * gdbarch.h, gdbarch.c: Re-generate.
6977         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6978         displaced_step_free_closure.
6979         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6980         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6981         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6982         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6983         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6984         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6985         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6986         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6987         * infrun.c (displaced_step_clear): Call xfree instead of
6988         gdbarch_displaced_step_free_closure.
6989
6990 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6991
6992         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6993         NULL".
6994
6995 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6996
6997         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6998         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6999         (mn10300_push_dummy_call): Likewise.
7000
7001 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7002
7003         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7004
7005 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7006
7007         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7008
7009 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7010
7011         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7012         able to start inferiors using a shell.
7013         (New remote packets): Announce new packet "QStartupWithShell".
7014         * remote.c: Add PACKET_QStartupWithShell.
7015         (extended_remote_create_inferior): Handle new
7016         PACKET_QStartupWithShell.
7017         (remote_protocol_features) <QStartupWithShell>: New entry for
7018         PACKET_QStartupWithShell.
7019         (_initialize_remote): Call "add_packet_config_cmd" for
7020         QStartupShell.
7021
7022 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7023             Pedro Alves  <palves@redhat.com>
7024
7025         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7026         and "nat/fork-inferior.h".
7027         * common/common-inferior.h: New file, with contents from
7028         "gdb/inferior.h".
7029         * commom/common-utils.c: Include "common-utils.h".
7030         (stringify_argv): New function.
7031         * common/common-utils.h (stringify_argv): New prototype.
7032         * configure.nat: Add "fork-inferior.o" as a dependency for
7033         "*linux*", "fbsd*" and "nbsd*" hosts.
7034         * corefile.c (get_exec_file): Update comment.
7035         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7036         instead of "startup_inferior".
7037         (darwin_create_inferior): Call "add_thread_silent" after
7038         "fork_inferior".
7039         * fork-child.c: Cleanup unnecessary includes.
7040         (SHELL_FILE): Move to "common/common-fork-child.c".
7041         (environ): Likewise.
7042         (exec_wrapper): Initialize.
7043         (get_exec_wrapper): New function.
7044         (breakup_args): Move to "common/common-fork-child.c"; rename to
7045         "breakup_args_for_exec".
7046         (escape_bang_in_quoted_argument): Move to
7047         "common/common-fork-child.c".
7048         (saved_ui): New variable.
7049         (prefork_hook): New function.
7050         (postfork_hook): Likewise.
7051         (postfork_child_hook): Likewise.
7052         (gdb_startup_inferior): Likewise.
7053         (fork_inferior): Move to "common/common-fork-child.c".  Update
7054         function to support gdbserver.
7055         (startup_inferior): Likewise.
7056         * gdbcore.h (get_exec_file): Remove declaration.
7057         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7058         instead of "startup_inferior".  Call "add_thread_silent" after
7059         "fork_inferior".
7060         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7061         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7062         instead of "startup_inferior".  Call "add_thread_silent" after
7063         "fork_inferior".
7064         * inferior.h: Include "common-inferior.h".
7065         (trace_start_error): Move to "common/common-utils.h".
7066         (trace_start_error_with_name): Likewise.
7067         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7068         (startup_inferior): Likewise.
7069         (gdb_startup_inferior): New prototype.
7070         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7071         * nat/fork-inferior.h: New file.
7072         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7073         instead of "startup_inferior".  Call "add_thread_silent" after
7074         "fork_inferior".
7075         * target.h (target_terminal_init): Move prototype to
7076         "target/target.h".
7077         (target_terminal_inferior): Likewise.
7078         (target_terminal_ours): Likewise.
7079         * target/target.h (target_terminal_init): New prototype, moved
7080         from "target.h".
7081         (target_terminal_inferior): Likewise.
7082         (target_terminal_ours): Likewise.
7083         * utils.c (gdb_flush_out_err): New function.
7084
7085 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7086
7087         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7088         * common/common-gdbthread.h: New file, with parts from
7089         "gdb/gdbthread.h".
7090         * gdbthread.h: Include "common-gdbthread.h".
7091         (switch_to_thread): Moved to "common/common-gdbthread.h".
7092
7093 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7094
7095         * Makefile.in (SFILES): Add "common/job-control.c".
7096         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7097         (COMMON_OBS): Add "job-control.o".
7098         * common/job-control.c: New file, with contents from
7099         "gdb/inflow.c".
7100         * common/job-control.h: New file, with contents from "terminal.h".
7101         * fork-child.c: Include "job-control.h".
7102         * inflow.c: Include "job-control.h".
7103         (gdb_setpgid): Move to "common/common-inflow.c".
7104         (_initialize_inflow): Move setting of "job_control" to
7105         "handle_job_control".
7106         * terminal.h (job_control): Moved to "common/common-terminal.h".
7107         (gdb_setpgid): Likewise.
7108         * top.c: Include "job_control.h".
7109         * utils.c: Likewise.
7110         (job_control): Moved to "job-control.c".
7111
7112 2017-06-07  Pedro Alves  <palves@redhat.com>
7113
7114         * Makefile.in (SFILES): Add gdb_regex.c.
7115         (COMMON_OBS): Add gdb_regex.o.
7116         * ada-lang.c (ada_add_standard_exceptions)
7117         (ada_add_exceptions_from_frame, name_matches_regex)
7118         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7119         parameter type to compiled_regex.  Adjust.
7120         (ada_exceptions_list): Use compiled_regex.
7121         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7122         std::unique_ptr<compiled_regex>.
7123         (exception_catchpoint::~exception_catchpoint): Remove regfree
7124         call.
7125         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7126         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7127         * breakpoint.c (solib_catchpoint::compiled): Now a
7128         std::unique_ptr<compiled_regex>.
7129         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7130         (check_status_catch_solib): Adjust to use compiled_regex.
7131         (add_solib_catchpoint): Adjust to use compiled_regex.
7132         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7133         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7134         compiled_regex reference.  Adjust to use it.
7135         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7136         declaration.  Include "gdb_regex.h".
7137         (apropos_cmd): Change regex parameter to compiled_regex reference.
7138         * gdb_regex.c: New file.
7139         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7140         declarations.
7141         (class compiled_regex): New.
7142         * linux-tdep.c: Include "common/gdb_optional.h".
7143         (struct mapping_regexes): New, factored out from
7144         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7145         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7146         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7147         * probe.c: Include "common/gdb_optional.h".
7148         (collect_probes): Use compiled_regex and gdb::optional and remove
7149         cleanups.
7150         * skip.c: Include "common/gdb_optional.h".
7151         (skiplist_entry::compiled_function_regexp): Now a
7152         gdb::optional<compiled_regex>.
7153         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7154         (free_skiplist_entry): Remove regfree call.
7155         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7156         compiled_regex and gdb::optional.
7157         * symtab.c: Include "common/gdb_optional.h".
7158         (search_symbols): Use compiled_regex and gdb::optional.
7159         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7160         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7161         to gdb_regex.c.
7162
7163 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7164
7165         * regcache.c (regcache::save): Avoid buffer use.
7166         (regcache::dump): Likewise.
7167
7168 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7169
7170         * sh-tdep.c (sh_pseudo_register_read): Remove
7171         MAX_REGISTER_SIZE.
7172         (sh_pseudo_register_write): Likewise.
7173         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7174         (sh64_pseudo_register_write): Likewise
7175
7176 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7177
7178         * aarch64-tdep.c (aarch64_store_return_value): Use
7179         V_REGISTER_SIZE.
7180         (aarch64_pseudo_read_value): Likewise.
7181         (aarch64_pseudo_write): Likewise.
7182
7183 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7184
7185         * regformats/regdef.h (set_register_cache): Remove the
7186         declaration.
7187
7188 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7189
7190         * frame.c (frame_unwind_register_signed): Use
7191         frame_unwind_register_value.
7192
7193 2017-06-06  Pedro Alves  <palves@redhat.com>
7194
7195         PR breakpoints/21553
7196         * breakpoint.c (create_breakpoints_sal_default)
7197         (init_breakpoint_sal, create_breakpoint_sal): Use
7198         gdb::unique_xmalloc_ptr for string parameters.
7199         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7200         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7201         (base_breakpoint_create_breakpoints_sal)
7202         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7203         (strace_marker_create_breakpoints_sal)
7204         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7205         string parameters.
7206         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7207         gdb::unique_xmalloc_ptr for string parameters.
7208         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7209         parameters.
7210
7211 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7212
7213         * alpha-tdep.c (alpha_register_to_value): Use
7214         get_frame_register_value.
7215         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7216
7217 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7218
7219         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7220         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7221         (ia64_value_to_register): Likewise.
7222         (ia64_extract_return_value): Likewise.
7223         (ia64_store_return_value): Likewise.
7224         (ia64_push_dummy_call): Likewise.
7225
7226 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7227
7228         GDB 8.0 released.
7229
7230 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7231
7232         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7233
7234 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7235
7236         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7237         parameter.
7238         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7239
7240 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7241
7242         * event-loop.c (poll_timers): Unallocate timer using delete
7243         instead of xfree.
7244
7245 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7246
7247         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7248         (struct breakpoint) <~breakpoint>: New.
7249         (struct watchpoint): Inherit from breakpoint.
7250         <~watchpoint>: New.
7251         <base>: Remove.
7252         (struct tracepoint): Inherit from breakpoint.
7253         <base>: Remove.
7254         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7255         (struct longjmp_breakpoint): Inherit from breakpoint.
7256         <~longjmp_breakpoint>: New.
7257         <base>: Remove.
7258         (new_breakpoint_from_type): Remove casts.
7259         (watchpoint_in_thread_scope): Remove reference to base field.
7260         (watchpoint_del_at_next_stop): Likewise.
7261         (update_watchpoint): Likewise.
7262         (watchpoint_check): Likewise.
7263         (bpstat_check_watchpoint): Likewise.
7264         (set_longjmp_breakpoint): Likewise.
7265         (struct fork_catchpoint): Inherit from breakpoint.
7266         <base>: Remove.
7267         (struct solib_catchpoint): Inherit from breakpoint.
7268         <~solib_catchpoint>: New.
7269         <base>: Remove.
7270         (dtor_catch_solib): Change to ...
7271         (solib_catchpoint::~solib_catchpoint): ... this.
7272         (breakpoint_hit_catch_solib): Remove reference to base field.
7273         (add_solib_catchpoint): Likewise.
7274         (create_fork_vfork_event_catchpoint): Likewise.
7275         (struct exec_catchpoint): Inherit from breakpoint.
7276         <~exec_catchpoint>: New.
7277         <base>: Remove.
7278         (dtor_catch_exec): Change to ...
7279         (exec_catchpoint::~exec_catchpoint): ... this.
7280         (dtor_watchpoint): Change to ...
7281         (watchpoint::~watchpoint): ... this.
7282         (watch_command_1): Remove reference to base field.
7283         (catch_exec_command_1): Likewise.
7284         (base_breakpoint_dtor): Change to ...
7285         (breakpoint::~breakpoint): ... this.
7286         (base_breakpoint_ops): Remove dtor field value.
7287         (longjmp_bkpt_dtor): Change to ...
7288         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7289         (strace_marker_create_breakpoints_sal): Remove reference to base
7290         field.
7291         (delete_breakpoint): Don't manually call breakpoint destructor.
7292         (create_tracepoint_from_upload): Remove reference to base field.
7293         (trace_pass_set_count): Likewise.
7294         (initialize_breakpoint_ops): Don't initialize
7295         momentary_breakpoint_ops, don't set dtors.
7296         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7297         <~ada_catchpoint>: New.
7298         <base>: Remove.
7299         (create_excep_cond_exprs): Remove reference to base field.
7300         (dtor_exception): Change to ...
7301         (ada_catchpoint::~ada_catchpoint): ... this.
7302         (dtor_catch_exception): Remove.
7303         (dtor_catch_exception_unhandled): Remove.
7304         (dtor_catch_assert): Remove.
7305         (create_ada_exception_catchpoint): Remove reference to base
7306         field.
7307         (initialize_ada_catchpoint_ops): Don't set dtors.
7308         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7309         breakpoint.
7310         <~signal_catchpoint>: New.
7311         <base>: Remove.
7312         (signal_catchpoint_dtor): Change to ...
7313         (signal_catchpoint::~signal_catchpoint): ... this.
7314         (create_signal_catchpoint): Remove reference to base field.
7315         (initialize_signal_catchpoint_ops): Don't set dtor.
7316         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7317         from breakpoint.
7318         <~syscall_catchpoint>: New.
7319         <base>: Remove.
7320         (dtor_catch_syscall): Change to ...
7321         (syscall_catchpoint::~syscall_catchpoint): ... this.
7322         (create_syscall_event_catchpoint): Remove reference to base
7323         field.
7324         (initialize_syscall_catchpoint_ops): Don't set dtor.
7325         * break-catch-throw.c (struct exception_catchpoint): Inherit
7326         from breakpoint.
7327         <~exception_catchpoint>: New.
7328         <base>: Remove.
7329         (dtor_exception_catchpoint): Change to ...
7330         (exception_catchpoint::~exception_catchpoint): ... this.
7331         (handle_gnu_v3_exceptions): Remove reference to base field.
7332         (initialize_throw_catchpoint_ops): Don't set dtor.
7333         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7334         field.
7335         * remote.c (remote_get_tracepoint_status): Likewise.
7336         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7337         * tracefile.c (tracefile_fetch_registers): Likewise.
7338         * tracepoint.c (actions_command): Likewise.
7339         (validate_actionline): Likewise.
7340         (tfind_1): Likewise.
7341         (get_traceframe_location): Likewise.
7342         (find_matching_tracepoint_location): Likewise.
7343         (parse_tracepoint_status): Likewise.
7344         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7345
7346 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7347
7348         * breakpoint.c (struct longjmp_breakpoint): New struct.
7349         (is_tracepoint_type): Change return type to bool.
7350         (is_longjmp_type): New function.
7351         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7352         (set_raw_breakpoint_without_location): Use
7353         new_breakpoint_from_type.
7354         (set_raw_breakpoint): Likewise.
7355
7356 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7357
7358         * breakpoint.c (new_breakpoint_from_type): New function.
7359         (create_breakpoint_sal): Use new_breakpoint_from_type and
7360         unique_ptr.
7361         (create_breakpoint): Likewise.
7362
7363 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7364
7365         * memattr.c (mem_info_command): Rename to ...
7366         (info_mem_command): ... this.
7367         (mem_enable_command): Rename to ...
7368         (enable_mem_command): ... this.
7369         (mem_disable_command): Rename to ...
7370         (disable_mem_command): ... this.
7371         (mem_delete_command): Rename to ...
7372         (delete_mem_command): ... this.
7373         (_initialize_mem): Adjust function names.
7374
7375 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7376
7377         * btrace.c (handle_pt_insn_events): New.
7378         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7379         STATUS.  Split into this and ...
7380         (handle_pt_insn_event_flags): ... this.
7381
7382 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7383
7384         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7385         and struct pt_insn.resynced.
7386         * configure: Regenerated.
7387         * config.in: Regenerated.
7388
7389 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7390
7391         * btrace.c (ftrace_find_call_by_number): New function.
7392         (ftrace_new_function): Store objects, not pointers.
7393         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7394         ftrace_new_gap, ftrace_update_function,
7395         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7396         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7397         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7398         btrace_ends_with_single_insn, btrace_call_get): Account for
7399         btrace_thread_info::functions now storing objects.
7400         * btrace.h (struct btrace_thread_info): Add constructor.
7401         (struct btrace_thread_info) <functions>: Make std::vector.
7402         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7403         Initialize with default values.
7404         * record-btrace.c (record_btrace_frame_sniffer): Account for
7405         btrace_thread_info::functions now storing objects.
7406
7407 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7408
7409         * btrace.c: Remove typedef bfun_s.
7410         (ftrace_new_gap): Directly add gaps to the list of gaps.
7411         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7412         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7413         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7414         instead of gdb VEC.
7415
7416 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7417
7418         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7419         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7420         with btrace_thread_info::next_segment and
7421         btrace_thread_info::prev_segment.
7422         * btrace.h: Remove struct btrace_func_link.
7423         (struct btrace_function): Replace pair of function segment pointers
7424         with pair of indices.
7425         * python/py-record-btrace.c (btpy_call_prev_sibling,
7426         btpy_call_next_sibling): Replace references to
7427         btrace_thread_info::segment with btrace_thread_info::next_segment and
7428         btrace_thread_info::prev_segment.
7429         * record-btrace.c (record_btrace_frame_this_id): Use
7430         btrace_find_call_by_number.
7431
7432 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7433
7434         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7435         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7436         btrace_insn_next, btrace_insn_prev): Remove references to
7437         btrace_thread_info::flow.
7438         * btrace.h (struct btrace_function): Remove FLOW.
7439
7440 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7441
7442         * btrace.c (ftrace_find_call_by_number): New function.
7443         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7444         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7445         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7446         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7447         index.
7448         * btrace.h (struct btrace_function): Turn UP into an index.
7449         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7450         as an index.
7451         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7452         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7453         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7454
7455 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7456
7457         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7458         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7459         ftrace_update_function, ftrace_compute_global_level_offset,
7460         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7461         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7462         btrace_insn_end, btrace_is_empty): Remove references to
7463         btrace_thread_info::begin and btrace_thread_info::end.
7464         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7465         (struct btrace_thread_info) <functions>: Adjust comment.
7466         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7467         btrace_thread_info::begin.
7468
7469 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7470
7471         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7472         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7473         ftrace_update_function): Remove arguments that implicitly were always
7474         BTINFO->END.
7475         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7476         Don't pass BTINFO->END.
7477
7478 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7479
7480         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7481         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7482         btrace_find_insn_by_number): Replace function segment pointer with
7483         index.
7484         (btrace_insn_cmp): Simplify.
7485         * btrace.h: (struct btrace_insn_iterator) Rename index to
7486         insn_index.  Replace function segment pointer with index into function
7487         segment vector.
7488         * record-btrace.c (record_btrace_call_history): Replace function
7489         segment pointer use with index.
7490         (record_btrace_frame_sniffer): Retrieve function call segment through
7491         vector.
7492         (record_btrace_set_replay): Remove defunc't safety check.
7493
7494 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7495
7496         * btrace.c (btrace_ends_with_single_insn): New function.
7497         (btrace_call_get, btrace_call_number, btrace_call_begin,
7498         btrace_call_end, btrace_call_next, btrace_call_prev,
7499         btrace_find_call_by_number): Use index into call segment vector
7500         instead of pointer.
7501         (btrace_call_cmp): Simplify.
7502         * btrace.h (struct btrace_call_iterator): Replace function call segment
7503         pointer with index into vector.
7504         * record-btrace.c (record_btrace_call_history): Use index instead of
7505         pointer.
7506
7507 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7508
7509         * btrace.c (btrace_insn_begin, btrace_insn_end,
7510         btrace_find_insn_by_number): Add btinfo to iterator.
7511         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7512
7513 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7514
7515         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7516         and save pointers directly.
7517         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7518         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7519         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7520         changed signature of functions.
7521         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7522         (btrace_fetch): Remove code that adds btrace_function pointers to
7523         vector of btrace_functions.
7524         (btrace_clear): Simplify freeing vector of btrace_functions.
7525
7526 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7527
7528         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7529         Replace VEC_* with std::vector functions.
7530         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7531         (struct btrace_thread_info)<functions>: Change type to std::vector.
7532
7533 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7534
7535         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7536         "Removed targets and native configurations" up.  Merge duplicate
7537         "New commands" sub-sections.  Add "New options" sub-sections.
7538
7539 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7540
7541         * defs.h (copy_integer_to_size): New declaration.
7542         * findvar.c (copy_integer_to_size): New function.
7543         (do_cint_test): New selftest function.
7544         (copy_integer_to_size_test): Likewise.
7545         (_initialize_findvar): Likewise.
7546         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7547         (mips_fbsd_collect_reg): Use raw_collect_integer.
7548         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7549         (mips64_fill_gregset): Use raw_collect_integer
7550         (mips64_fill_fpregset): Use raw_supply_integer.
7551         * regcache.c (regcache::raw_supply_integer): New function.
7552         (regcache::raw_collect_integer): Likewise.
7553         * regcache.h: (regcache::raw_supply_integer): New declaration.
7554         (regcache::raw_collect_integer): Likewise.
7555
7556 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7557
7558         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7559         (COMMON_OBS): Add gdbarch-selftests.o.
7560         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7561         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7562         * gdbarch-selftests.c: New file.
7563         * regcache.h (regcache) <~regcache>: Mark it virtual if
7564         GDB_SELF_TEST.
7565         <raw_write>: Likewise.
7566
7567 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7568
7569         * regcache.c (current_regcache): Change it to
7570         regcache::current_regcache.
7571         (regcache_observer_target_changed): Update.
7572         (regcache_thread_ptid_changed): Make it a regcache static
7573         method.
7574         (regcache_thread_ptid_changed): Update.
7575         (class regcache_access): New.
7576         (current_regcache_test): Update.
7577         (_initialize_regcache): Update.
7578         * regcache.h: Include forward_list.
7579         (regcache): Declare regcache_thread_ptid_changed and declare
7580         registers_changed_ptid as friend.
7581
7582 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7583
7584         * i387-tdep.c (i387_register_to_value): Use register_size
7585         instead of TYPE_LENGTH.
7586         * m68k-tdep.c (m68k_register_to_value): Likewise.
7587
7588 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7589
7590         * i387-tdep.c (i387_convert_register_p): Return false if type
7591         code isn't TYPE_CODE_FLT.
7592
7593 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7594
7595         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7596         length is 4.
7597         (alpha_register_to_value): Remove type length check.
7598         (alpha_value_to_register): Likewise.
7599
7600 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7601
7602         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7603         TYPE_CODE_FLT.
7604
7605 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7606
7607         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7608         TYPE_CODE_FLT or not.
7609
7610 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7611
7612         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7613         * avr-tdep.c (avr_gdbarch_init): Likewise.
7614         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7615         * cris-tdep.c (cris_gdbarch_init): Likewise.
7616         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7617         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7618         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7619         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7620         * mep-tdep.c (mep_gdbarch_init): Likewise.
7621         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7622         * mips-tdep.c (mips_gdbarch_init): Likewise.
7623         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7624         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7625         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7626         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7627         * v850-tdep.c (v850_gdbarch_init): Likewise.
7628
7629 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7630
7631         * selftest-arch.c (tests_with_arch): Call registers_changed
7632         and reinit_frame_cache.
7633         * selftest.c (run_self_tests): Likewise.
7634
7635 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7636
7637         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7638         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7639
7640 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7641
7642         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7643         set_gdbarch_print_insn.
7644
7645 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7646
7647         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7648         set_gdbarch_print_insn.
7649
7650 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7651
7652         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7653         set_gdbarch_print_insn.
7654         * arc-tdep.c (arc_gdbarch_init): Likewise.
7655         * arch-utils.c: include dis-asm.h.
7656         (default_print_insn): New function.
7657         * arch-utils.h (default_print_insn): Declare.
7658         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7659         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7660         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7661         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7662         * frv-tdep.c (frv_gdbarch_init): Likewise.
7663         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7664         * gdbarch.sh (print_insn): Use default_print_insn.
7665         * gdbarch.c: Regenerated.
7666         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7667         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7668         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7669         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7670         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7671         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7672         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7673         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7674         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7675         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7676         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7677         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7678         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7679         * mt-tdep.c (mt_gdbarch_init): Likewise.
7680         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7681         * nios2-tdep.c (nios2_print_insn): Remove.
7682         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7683         * rx-tdep.c (rx_gdbarch_init): Likewise.
7684         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7685         * score-tdep.c (score_print_insn): Remove.
7686         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7687         * sh-tdep.c (sh_gdbarch_init): Likewise.
7688         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7689         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7690         * tic6x-tdep.c (tic6x_print_insn): Remove.
7691         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7692         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7693         * v850-tdep.c (v850_gdbarch_init): Likewise.
7694         * vax-tdep.c (vax_gdbarch_init): Likewise.
7695         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7696         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7697
7698 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7699
7700         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7701         (MIPS_FP0_REGNUM): Remove.
7702         (MIPS_FSR_REGNUM): Remove.
7703         (mips_fbsd_supply_fpregs): Use mips_regnum.
7704         (mips_fbsd_supply_gregs): Likewise.
7705         (mips_fbsd_collect_fpregs): Likewise.
7706         (mips_fbsd_collect_gregs): Likewise.
7707
7708 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7709
7710         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7711         (getpfpregs_supplies): New function.
7712         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7713         getfpregs_supplies.
7714         (mips_fbsd_store_inferior_registers): Likewise.
7715
7716 2017-05-22  Pedro Alves <palves@redhat.com>
7717
7718         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7719         maintainer.
7720
7721 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7722
7723         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7724         (store_register): Likewise.
7725         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7726         (get_decimal_float_return_value): Likewise.
7727         (do_ppc_sysv_return_value): Likewise.
7728         (ppc64_sysv_abi_push_integer): Likewise.
7729         (ppc64_sysv_abi_push_freg): Likewise.
7730         (ppc64_sysv_abi_return_value_base): Likewise.
7731         (ppc64_sysv_abi_return_value): Likewise.
7732         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7733         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7734         * rs6000-nat.c: Likewise.
7735         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7736         (rs6000_value_to_register): Likewise.
7737         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7738
7739 2017-05-21  Tom Tromey  <tom@tromey.com>
7740
7741         PR rust/21466:
7742         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7743         arrays as "[T]", not "[T; ]".
7744
7745 2017-05-19  Tom Tromey  <tom@tromey.com>
7746
7747         PR rust/21484:
7748         * rust-lang.c (exp_descriptor_rust): New function.
7749         (rust_language_defn): Use it.
7750         * p-lang.c (pascal_language_defn): Update.
7751         * opencl-lang.c (opencl_language_defn): Update.
7752         * objc-lang.c (objc_language_defn): Update.
7753         * m2-lang.c (m2_language_defn): Update.
7754         * language.h (struct language_defn)
7755         <la_watch_location_expression>: New member.
7756         * language.c (unknown_language_defn, auto_language_defn)
7757         (local_language_defn): Update.
7758         * go-lang.c (go_language_defn): Update.
7759         * f-lang.c (f_language_defn): Update.
7760         * d-lang.c (d_language_defn): Update.
7761         * c-lang.h (c_watch_location_expression): Declare.
7762         * c-lang.c (c_watch_location_expression): New function.
7763         (c_language_defn, cplus_language_defn, asm_language_defn)
7764         (minimal_language_defn): Use it.
7765         * breakpoint.c (watch_command_1): Call
7766         la_watch_location_expression.
7767         * ada-lang.c (ada_language_defn): Update.
7768
7769 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7770
7771         PR tui/21482
7772         * gdb_curses.h (NOMACROS): Define.
7773         (NCURSES_NOMACROS): Define.
7774
7775 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7776
7777         PR tui/21482
7778         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7779         arg to char *.
7780         * tui/tui-wingeneral.c (box_win): Likewise.
7781         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7782         (tui_show_source_line): Likewise.
7783         (tui_show_exec_info_content): Likewise.
7784
7785 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7786
7787         * sparc-tdep.c (sparc_structure_return_p)
7788         (sparc_arg_on_registers_p): New functions.
7789         (sparc32_store_arguments): Use them.
7790         * sparc64-tdep.c (sparc64_16_byte_align_p)
7791         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7792         Handle TYPE_CODE_ARRAY.
7793
7794 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7795
7796         * cli/cli-decode.c (add_alias_cmd): New function.
7797         * command.h (add_alias_cmd): Declare.
7798         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7799         instead call add_alias_cmd.
7800
7801 2017-05-17  Pedro Alves  <palves@redhat.com>
7802
7803         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7804         (nat_makefile_frag): ... this.  All references updated.
7805         * configure.ac: Likewise.
7806         * configure.nat: Likewise.  Enhance comments.
7807         * configure: Regenerate.
7808
7809 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7810
7811         * procfs.c (procfs_create_inferior): Change prototype to match
7812         definition.
7813
7814 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7815
7816         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7817         C++ compiler warning.
7818
7819 2017-05-12  Tom Tromey  <tom@tromey.com>
7820
7821         PR rust/21483:
7822         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7823         recurse, just call value_struct_elt directly.
7824
7825 2017-05-12  Tom Tromey  <tom@tromey.com>
7826
7827         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7828         OP_RUST_ARRAY>: Fix.
7829
7830 2017-05-12  Tom Tromey  <tom@tromey.com>
7831
7832         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7833
7834 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7835
7836         * regcache.c: Include <forward_list>.
7837         (struct regcache_list): Remove.
7838         (current_regcache): Update.
7839         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7840         (regcache_thread_ptid_changed): Likewise.
7841         (registers_changed_ptid): Likewise.
7842         (current_regcache_size): Likewise.
7843
7844 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7845
7846         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7847         (current_regcache_size): New function.
7848         (current_regcache_test): New function.
7849         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7850
7851 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7852
7853         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7854         (print_gp_register_row): Use get_frame_register_value.
7855
7856 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7857
7858         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7859         (mips_supply_fpregset): Likewise.
7860         (mips64_supply_gregset): Likewise.
7861
7862 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7863
7864         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7865         regcache->raw_supply_zeroed.
7866
7867 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7868
7869         * configure.nat: Rearrange 'case' statements to match
7870         host before cpu.
7871
7872 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7873
7874         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7875         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7876         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7877         "@nat_extra_makefile_frag@".
7878         (Makefile): Remove dependency on "@frags@".
7879         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7880         (data-directory/Makefile): Likewise.
7881         * config/aarch64/linux.mh: Deleted; moved contents to
7882         "gdb/configure.nat".
7883         * config/alpha/alpha-linux.mh: Likewise.
7884         * config/alpha/nbsd.mh: Likewise.
7885         * config/arm/linux.mh: Likewise.
7886         * config/arm/nbsdelf.mh: Likewise.
7887         * config/i386/cygwin.mh: Likewise.
7888         * config/i386/cygwin64.mh: Likewise.
7889         * config/i386/darwin.mh: Likewise.
7890         * config/i386/fbsd.mh: Likewise.
7891         * config/i386/fbsd64.mh: Likewise.
7892         * config/i386/go32.mh: Likewise.
7893         * config/i386/i386gnu.mh: Likewise.
7894         * config/i386/i386sol2.mh: Likewise.
7895         * config/i386/linux.mh: Likewise.
7896         * config/i386/linux64.mh: Likewise.
7897         * config/i386/mingw.mh: Likewise.
7898         * config/i386/mingw64.mh: Likewise.
7899         * config/i386/nbsd64.mh: Likewise.
7900         * config/i386/nbsdelf.mh: Likewise.
7901         * config/i386/nto.mh: Likewise.
7902         * config/i386/obsd.mh: Likewise.
7903         * config/i386/obsd64.mh: Likewise.
7904         * config/i386/sol2-64.mh: Likewise.
7905         * config/ia64/linux.mh: Likewise.
7906         * config/m32r/linux.mh: Likewise.
7907         * config/m68k/linux.mh: Likewise.
7908         * config/m68k/nbsdelf.mh: Likewise.
7909         * config/m68k/obsd.mh: Likewise.
7910         * config/m88k/obsd.mh: Likewise.
7911         * config/mips/fbsd.mh: Likewise.
7912         * config/mips/linux.mh: Likewise.
7913         * config/mips/nbsd.mh: Likewise.
7914         * config/mips/obsd64.mh: Likewise.
7915         * config/pa/linux.mh: Likewise.
7916         * config/pa/nbsd.mh: Likewise.
7917         * config/pa/obsd.mh: Likewise.
7918         * config/powerpc/aix.mh: Likewise.
7919         * config/powerpc/fbsd.mh: Likewise.
7920         * config/powerpc/linux.mh: Likewise.
7921         * config/powerpc/nbsd.mh: Likewise.
7922         * config/powerpc/obsd.mh: Likewise.
7923         * config/powerpc/ppc64-linux.mh: Likewise.
7924         * config/powerpc/spu-linux.mh: Likewise.
7925         * config/s390/linux.mh: Likewise.
7926         * config/sh/nbsd.mh: Likewise.
7927         * config/sparc/fbsd.mh: Likewise.
7928         * config/sparc/linux.mh: Likewise.
7929         * config/sparc/linux64.mh: Likewise.
7930         * config/sparc/nbsd64.mh: Likewise.
7931         * config/sparc/nbsdelf.mh: Likewise.
7932         * config/sparc/obsd64.mh: Likewise.
7933         * config/sparc/sol2.mh: Likewise.
7934         * config/tilegx/linux.mh: Likewise.
7935         * config/vax/nbsdelf.mh: Likewise.
7936         * config/vax/obsd.mh: Likewise.
7937         * config/xtensa/linux.mh: Likewise.
7938         * config/i386/i386gnu.mn: New file, with excerpts from
7939         "config/i386/i386gnu.mh".
7940         * configure: Regenerate.
7941         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7942         *.mh files under "gdb/config".
7943         * configure.nat: New file, with contents from the
7944         "gdb/config/*/*.mh" files.
7945
7946 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7947
7948         * btrace.c (btrace_clear): Free insn vector.
7949
7950 2017-05-05  Pedro Alves  <palves@redhat.com>
7951
7952         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7953         * configure: Regenerate.
7954
7955 2017-05-04  Pedro Alves  <palves@redhat.com>
7956
7957         * Makefile.in (SFILES): Add progspace-and-thread.c.
7958         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7959         (COMMON_OBS): Add progspace-and-thread.o.
7960         * breakpoint.c: Include "progspace-and-thread.h".
7961         (update_inserted_breakpoint_locations)
7962         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7963         Use scoped_restore_current_pspace_and_thread.
7964         (create_std_terminate_master_breakpoint): Use
7965         scoped_restore_current_program_space.
7966         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7967         (print_breakpoint_location): Use
7968         scoped_restore_current_program_space.
7969         (bp_loc_is_permanent): Use
7970         scoped_restore_current_pspace_and_thread.
7971         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7972         (download_tracepoint_locations): Use
7973         scoped_restore_current_pspace_and_thread.
7974         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7975         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7976         (enum step_over_calls_kind): Moved from inferior.h.
7977         (class scoped_restore_current_thread): New class.
7978         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7979         declaration.
7980         (scoped_restore_current_thread): New class.
7981         * infcmd.c: Include "common/gdb_optional.h".
7982         (continue_1, proceed_after_attach): Use
7983         scoped_restore_current_thread.
7984         (notice_new_inferior): Use scoped_restore_current_thread.
7985         * inferior.c: Include "progspace-and-thread.h".
7986         (restore_inferior, save_current_inferior): Delete.
7987         (add_inferior_command, clone_inferior_command): Use
7988         scoped_restore_current_pspace_and_thread.
7989         * inferior.h (scoped_restore_current_inferior): New class.
7990         * infrun.c: Include "progspace-and-thread.h" and
7991         "common/gdb_optional.h".
7992         (follow_fork_inferior): Use
7993         scoped_restore_current_pspace_and_thread.
7994         (scoped_restore_exited_inferior): New class.
7995         (handle_vfork_child_exec_or_exit): Use
7996         scoped_restore_exited_inferior,
7997         scoped_restore_current_pspace_and_thread,
7998         scoped_restore_current_thread and scoped_restore.
7999         (fetch_inferior_event): Use scoped_restore_current_thread.
8000         * linespec.c (decode_line_full, decode_line_1): Use
8001         scoped_restore_current_program_space.
8002         * mi/mi-main.c: Include "progspace-and-thread.h".
8003         (exec_continue): Use scoped_restore_current_thread.
8004         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8005         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8006         * proc-service.c (ps_pglobal_lookup): Use
8007         scoped_restore_current_program_space.
8008         * progspace-and-thread.c: New file.
8009         * progspace-and-thread.h: New file.
8010         * progspace.c (release_program_space, clone_program_space): Use
8011         scoped_restore_current_program_space.
8012         (restore_program_space, save_current_program_space)
8013         (save_current_space_and_thread): Delete.
8014         (switch_to_program_space_and_thread): Moved to
8015         progspace-and-thread.c.
8016         * progspace.h (save_current_program_space)
8017         (save_current_space_and_thread): Delete declarations.
8018         (scoped_restore_current_program_space): New class.
8019         * remote.c (remote_btrace_maybe_reopen): Use
8020         scoped_restore_current_thread.
8021         * symtab.c: Include "progspace-and-thread.h".
8022         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8023         * thread.c (print_thread_info_1): Use
8024         scoped_restore_current_thread.
8025         (struct current_thread_cleanup): Delete.
8026         (do_restore_current_thread_cleanup)
8027         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8028         (scoped_restore_current_thread::~scoped_restore_current_thread):
8029         ... this new dtor.
8030         (make_cleanup_restore_current_thread): Rename/convert to ...
8031         (scoped_restore_current_thread::scoped_restore_current_thread):
8032         ... this new ctor.
8033         (thread_apply_all_command): Use scoped_restore_current_thread.
8034         (thread_apply_command): Use scoped_restore_current_thread.
8035         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8036         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8037
8038 2017-05-04  Pedro Alves  <palves@redhat.com>
8039
8040         * thread.c (make_cleanup_restore_current_thread): Move
8041         find_thread_ptid call before the is_stopped call.  Assert that the
8042         thread is found.  Replace is_stopped call by checking the thread's
8043         state directly.  Remove unnecessary NULL-thread check.
8044
8045 2017-05-04  Pedro Alves  <palves@redhat.com>
8046
8047         * corelow.c (thread_section_name): New class.
8048         (get_core_register_section, get_core_siginfo): Use it.
8049
8050 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8051
8052         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8053         (get_core_register_section): Remove xfree of NULL pointer.
8054
8055 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8056
8057         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8058         * regcache.c (regcache::raw_supply_zeroed): New function.
8059         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8060
8061 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8062
8063         * gdbarch.sh: Remove commented out definition of
8064         TARGET_CHAR_BIT.
8065         * gdbarch.h: Re-generate.
8066
8067 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8068
8069         * configure: Regenerate.
8070
8071 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8072
8073         * solib-target.c (solib_target_relocate_section_addresses):
8074         Remove num_section_bases, num_bases, segment_bases variables.
8075
8076 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8077
8078         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8079
8080 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8081
8082         * solib-target.c: Include <vector>
8083         (struct lm_info_target) <~lm_info_target>: Remove.
8084         <segment_bases, section_bases>: Change type to
8085         std::vector<CORE_ADDR>.
8086         (library_list_start_segment, library_list_start_section,
8087         library_list_end_library,
8088         solib_target_relocate_section_addresses): Adjust.
8089
8090 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8091
8092         * gdbarch.sh (software_single_step): Change return type to
8093         std::vector<CORE_ADDR>.
8094         * gdbarch.c, gdbarch.h: Re-generate.
8095         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8096         Adjust.
8097         (arm_deal_with_atomic_sequence_raw): Adjust.
8098         (thumb_get_next_pcs_raw): Adjust.
8099         (arm_get_next_pcs_raw): Adjust.
8100         (arm_get_next_pcs): Adjust.
8101         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8102         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8103         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8104         (alpha_software_single_step): Adjust.
8105         * alpha-tdep.h (alpha_software_single_step): Adjust.
8106         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8107         * arm-tdep.c (arm_software_single_step): Adjust.
8108         (arm_breakpoint_kind_from_current_state): Adjust.
8109         * arm-tdep.h (arm_software_single_step): Adjust.
8110         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8111         * cris-tdep.c (cris_software_single_step): Adjust.
8112         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8113         (micromips_deal_with_atomic_sequence): Adjust.
8114         (deal_with_atomic_sequence): Adjust.
8115         (mips_software_single_step): Adjust.
8116         * mips-tdep.h (mips_software_single_step): Adjust.
8117         * moxie-tdep.c (moxie_software_single_step): Adjust.
8118         * nios2-tdep.c (nios2_software_single_step): Adjust.
8119         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8120         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8121         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8122         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8123         * sparc-tdep.c (sparc_software_single_step): Adjust.
8124         * spu-tdep.c (spu_software_single_step): Adjust.
8125         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8126
8127 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8128
8129         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8130         * gdbarch.h: Re-generate.
8131
8132 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8133
8134         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8135         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8136         * python/py-instruction.c, python/py-instruction.h: New file.
8137         * python/py-record.c: Add py-instruction.h include.
8138         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8139         gdb.RecordInstruction.
8140         * python/python-internal.h: Add gdbpy_initialize_instruction
8141         declaration.
8142         * python/python.c (do_start_initialization): Add
8143         gdbpy_initialize_instruction.
8144
8145 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8146
8147         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8148         Remove.
8149         (btrace_func_from_recpy_func): New function.
8150         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8151         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8152         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8153         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8154         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8155         Also, use new helper functions.
8156         (btpy_list_item): Use new helper functions.
8157         (recpy_bt_function_call_history): Use new type name.
8158         (btpy_call_getset): Remove.
8159         (gdbpy_initialize_btrace): Remove code to initialize
8160         gdb.BtraceFunctionCall.
8161         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8162         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8163         recpy_bt_func_prev, recpy_bt_func_next): New export.
8164         * python/py-record.c (recpy_func_type): New static object.
8165         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8166         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8167         recpy_func_next): New function.
8168         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8169         (recpy_func_getset): New static object.
8170         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8171         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8172
8173 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8174
8175         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8176         (btpy_object, btpy_insn_type, btpy_new): Remove.
8177         (btpy_list_object): Use gdb.RecordInstruction type instead of
8178         gdb.BtraceInstruction type.
8179         (btrace_insn_from_recpy_insn): New function.
8180         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8181         btpy_new.
8182         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8183         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8184         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8185         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8186         instead of btpy_object.
8187         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8188         btpy_insn_data, btpy_insn_decode): Rename to ...
8189         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8190         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8191         recpy_bt_insn_decode): This.  Also, use new helper functions.
8192         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8193         recpy_insn_type.
8194         (btpy_insn_getset): Remove.
8195         (gdbpy_initialize_btrace): Remove code to initialize
8196         gdb.BtraceInstruction.  Use recpy_element_object.
8197         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8198         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8199         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8200         * python/py-record.c (recpy_insn_type): New static object.
8201         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8202         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8203         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8204         New function.
8205         (recpy_insn_getset): New static object.
8206         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8207         * python/py-record.h (recpy_element_object): New typedef.
8208         (recpy_insn_type, recpy_insn_new): New export.
8209
8210 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8211
8212         * py-record-btrace.c (btpy_insn_new): Removed.
8213         (btpy_insn_or_gap_new): New function.
8214         (btpy_insn_error): Removed.
8215         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8216         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8217         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8218         btpy_insn_or_gap_new instead of btpy_insn_new.
8219         (btpy_insn_getset): Remove btpy_insn_error.
8220         * py-record.c (recpy_gap_type): New static object.
8221         (recpy_gap_object): New typedef.
8222         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8223         recpy_gap_reason_string): New function.
8224         (recpy_gap_getset): New static object.
8225         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8226         * py-record.h (recpy_gap_new): New export.
8227
8228 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8229
8230         * python/py-record.c (recpy_ptid): Remove.
8231         (recpy_record_getset): Remove recpy_ptid.
8232
8233 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8234
8235         * btrace.c (btrace_fetch): Set inferior_ptid.
8236         * python/py-record-btrace.c: Add "py-record.h" include.
8237         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8238         recpy_bt_end, recpy_bt_instruction_history,
8239         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8240         in gdb.Record object instead of current ptid.
8241         * python/py-record.c: Include new "py-record.h" file.
8242         (recpy_record_object): Moved to py-record.h.
8243         * python/py-record.h: New file.
8244
8245 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8246
8247         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8248         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8249         indentation.
8250
8251 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8252
8253         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8254         the past maintainers section.
8255
8256 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8257
8258         * infcmd.c (get_return_value): Use regcache ctor, and remove
8259         cleanup.
8260
8261 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8262             Pedro Alves  <palves@redhat.com>
8263
8264         * regcache.c (regcache::regcache): New tag dispatch ctor.
8265         (do_cooked_read): Moved above.
8266         (regcache_dup): Use the tag dispatch ctor..
8267         * regcache.h (regcache): Declare ctor, delete copy ctor and
8268         assignment operator, remove friend regcache_dup.
8269
8270 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8271
8272         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8273         call method save instead of regcache_cpy.
8274         * regcache.h (struct regcache): Make regcache_dup a friend.
8275
8276 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8277
8278         * regcache.c (struct regcache): Move to regcache.h
8279         (regcache::arch): New method.
8280         (regcache_get_ptid): Update.
8281         (get_regcache_arch): Call arch method.
8282         (get_regcache_aspace): Call method aspace.
8283         (register_buffer): Change it to method.
8284         (regcache_save): Change it to regcache::save.
8285         (regcache_restore): Likewise.
8286         (regcache_cpy_no_passthrough): Remove the declaration.
8287         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8288         (regcache_cpy_no_passthrough): Change it to method
8289         cpy_no_passthrough.
8290         (regcache_register_status): Change it to method
8291         get_register_status.
8292         (regcache_invalidate): Change it to method invalidate.
8293         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8294         (regcache_raw_update): Change it to method raw_update.
8295         (regcache_raw_read): Likewise.
8296         (regcache_raw_read_signed): Likewise.
8297         (regcache_raw_read_unsigned): Likewise.
8298         (regcache_raw_write_signed): Likewise.
8299         (regcache_raw_write_unsigned): Likewise.
8300         (regcache_cooked_read): Likewise.
8301         (regcache_cooked_read_value): Likewise.
8302         (regcache_cooked_read_signed): Likewise.
8303         (regcache_cooked_read_unsigned): Likewise.
8304         (regcache_cooked_write_signed): Likewise.
8305         (regcache_cooked_write_unsigned): Likewise.
8306         (regcache_raw_set_cached_value): Likewise.
8307         (regcache_raw_write): Likewise.
8308         (regcache_cooked_write): Likewise.
8309         (regcache_xfer_part): Likewise.
8310         (regcache_raw_read_part): Likewise.
8311         (regcache_raw_write_part): Likewise.
8312         (regcache_cooked_read_part): Likewise.
8313         (regcache_cooked_write_part): Likewise.
8314         (regcache_raw_supply): Likewise.
8315         (regcache_raw_collect): Likewise.
8316         (regcache_transfer_regset): Likewise.
8317         (regcache_supply_regset): Likewise.
8318         (regcache_collect_regset): Likewise.
8319         (regcache_debug_print_register): Likewise.
8320         (enum regcache_dump_what): Move it to regcache.h.
8321         (regcache_dump): Change it to method dump.
8322         * regcache.h (enum regcache_dump_what): New.
8323         (class regcache): New.
8324         * target.c (target_fetch_registers): Call method
8325         debug_print_register.
8326         (target_store_registers): Likewise.
8327
8328 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8329
8330         * windows-nat.c (struct lm_info_windows): Initialize field.
8331         (windows_make_so): Allocate lm_info_windows with new.
8332         (windows_free_so): Free lm_info_windows with delete.
8333
8334 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8335
8336         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8337         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8338         cleanup.
8339         (darwin_free_so): Free lm_info_darwin with delete.
8340
8341 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8342
8343         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8344         <l_addr_p>: Change type to bool.
8345         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8346         (svr4_free_so): Free lm_info_svr4 with delete.
8347         (svr4_copy_library_list): Replace memcpy with call to copy
8348         constructor.
8349         (library_list_start_library, svr4_default_sos): Allocate
8350         lm_info_svr4 with new.
8351
8352 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8353
8354         * solib-target.c (struct lm_info_target): Add destructor,
8355         initialize fields.
8356         <name>: Change type to std::string.
8357         (library_list_start_library): Allocate lm_info_target with new.
8358         (solib_target_free_library_list): Free lm_info_target with
8359         delete.
8360         (solib_target_current_sos): Adapt to std::string.
8361         (solib_target_free_so): Free lm_info_target with delete.
8362
8363 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8364
8365         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8366         fields.
8367         (frv_current_sos): Allocate lm_info_frv with new.
8368         (frv_relocate_main_executable): Free lm_info_frv with delete,
8369         allocate with new.
8370         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8371
8372 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8373
8374         * solib-frv.c (struct lm_info_frv): Fix indentation.
8375
8376 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8377
8378         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8379         map field.
8380         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8381         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8382         and allocate with new.
8383         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8384
8385 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8386
8387         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8388         <filename, member_name>: Change type to std::string.
8389         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8390         (library_list_start_library): Allocate lm_info_aix with new.
8391         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8392         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8393         with copy constructor.
8394
8395 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8396
8397         * solist.h (struct lm_info): Remove.
8398         (struct lm_info_base): New class.
8399         (struct so_list) <lm_info>: Change type to lm_info_base *.
8400         * nto-tdep.c (struct lm_info): Remove.
8401         (lm_addr): Adjust.
8402         * solib-aix.c (struct lm_info): Rename to ...
8403         (struct lm_info_aix): ... this.  Extend lm_info_base.
8404         (lm_info_p): Rename to ...
8405         (lm_info_aix_p): ... this, and adjust.
8406         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8407         solib_aix_parse_libraries, library_list_start_library,
8408         solib_aix_free_library_list, solib_aix_parse_libraries,
8409         solib_aix_get_library_list,
8410         solib_aix_relocate_section_addresses, solib_aix_free_so,
8411         solib_aix_get_section_offsets,
8412         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8413         Adjust.
8414         (struct solib_aix_inferior_data) <library_list>: Adjust.
8415         * solib-darwin.c (struct lm_info): Rename to ...
8416         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8417         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8418         * solib-dsbt.c (struct lm_info): Rename to ...
8419         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8420         (struct dsbt_info) <main_executable_lm_info): Adjust.
8421         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8422         dsbt_relocate_section_addresses): Adjust.
8423         * solib-frv.c (struct lm_info): Rename to ...
8424         (struct lm_info_frv): ... this.  Extend lm_info_base.
8425         (main_executable_lm_info): Adjust.
8426         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8427         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8428         find_canonical_descriptor_in_load_object,
8429         frv_fdpic_find_canonical_descriptor): Adjust.
8430         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8431         to lm_info_svr4.
8432         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8433         svr4_clear_so, svr4_copy_library_list,
8434         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8435         svr4_current_sos, svr4_fetch_objfile_link_map,
8436         solist_update_incremental): Adjust.
8437         * solib-svr4.h (struct lm_info_svr4): Move here from
8438         solib-svr4.c.
8439         * solib-target.c (struct lm_info): Rename to ...
8440         (struct lm_info_target): ... this.  Extend lm_info_base.
8441         (lm_info_p): Rename to ...
8442         (lm_info_target_p): ... this.
8443         (solib_target_parse_libraries, library_list_start_segment,
8444         library_list_start_section, library_list_start_library,
8445         library_list_end_library, solib_target_free_library_list,
8446         solib_target_current_sos, solib_target_free_so,
8447         solib_target_relocate_section_addresses): Adjust.
8448         * windows-nat.c (struct lm_info): Rename to ...
8449         (struct lm_info_windows): ... this.  Extend lm_info_base.
8450         (windows_make_so, handle_load_dll, handle_unload_dll,
8451         windows_xfer_shared_libraries): Adjust.
8452
8453 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8454
8455         * solib-darwin.c (struct darwin_so_list): Remove.
8456         (darwin_current_sos): Allocate an so_list object instead of a
8457         darwin_so_list, separately allocate an lm_info object.
8458         (darwin_free_so): Free lm_info.
8459
8460 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8461
8462         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8463         with fprintf_filtered.
8464
8465 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8466
8467         * regcache.c (regcache::regcache): New function.
8468         (regcache::~regcache): New function.
8469         (regcache_xmalloc_1): Remove.
8470         (regcache_xmalloc): Call new regcache.
8471         (regcache_xfree): Call delete regcache.
8472         (get_thread_arch_aspace_regcache): Call new regcache.
8473
8474 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8475
8476         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8477         lwp instead of ptid_get_lwp.
8478
8479 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8480
8481         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8482         lwp_info instead of getting from inferior_ptid.
8483
8484 2017-04-27  Keith Seitz  <keiths@redhat.com>
8485
8486         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8487         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8488         (CV_CONVERSION_BADNESS): Define.
8489         (rank_one_type): Remove overly restrictive rvalue reference
8490         rank checks.
8491         Add cv-qualifier checks and subranks for type equality.
8492         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8493         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8494         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8495
8496 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8499         count when creating the object.
8500
8501 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8502             Ulrich Weigand  <uweigand@de.ibm.com>
8503
8504         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8505         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8506         is used in AIX.
8507         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8508         (process_xcoff_symbol): Likewise.
8509         (scan_xcoff_symtab): Likewise.
8510
8511 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8512
8513         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8514         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8515         (ia64_access_reg): Use get_frame_register_unsigned.
8516         (ia64_access_rse_reg): Likewise.
8517         (ia64_libunwind_frame_prev_register): Likewise.
8518
8519 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8520
8521         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8522         * gdbarch.c: Regenerated.
8523         * gdbarch.h: Regenerated.
8524         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8525         visibility external.
8526         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8527         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8528         (enum cfa_how_kind): Move to ...
8529         (struct dwarf2_frame_state_reg_info): Likewise.
8530         (struct dwarf2_frame_state): Likewise.
8531         * dwarf2-frame.h: ... here.
8532         (dwarf2_frame_state_alloc_regs): New declaration.
8533         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8534         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8535
8536 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8537
8538         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8539         regcache_raw_read_unsigned.
8540         (xtensa_pseudo_register_write): Likewise.
8541
8542 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8543
8544         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8545         (nds32_pseudo_register_write): Likewise.
8546
8547 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8548
8549         * regcache.c (struct regcache) <readonly_p>: Change its type
8550         to bool.
8551         (regcache_xmalloc_1): Update parameter type and callers update.
8552
8553 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8554
8555         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8556         set_gdbarch_wchar_bit.
8557         * arm-tdep.c (arm_gdbarch_init): Likewise.
8558
8559 2017-04-25  Pedro Alves  <palves@redhat.com>
8560
8561         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8562         (BothAreRelocatable, memcopy, memmove): Don't define.
8563         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8564         macros.
8565
8566 2017-04-25  Pedro Alves  <palves@redhat.com>
8567
8568         * common/common-defs.h: Include "common/poison.h".
8569         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8570         and adjust.
8571         * common/poison.h: New file.
8572         * common/traits.h: Include <type_traits>.
8573         (Not, Or, Requires): New, moved from common/function-view.h.
8574
8575 2017-04-25  Pedro Alves  <palves@redhat.com>
8576
8577         * breakpoint.h (struct breakpoint): In-class initialize all
8578         fields.  Make boolean fields "bool".
8579         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8580         memset call and initializations no longer necessary.
8581
8582 2017-04-25  Pedro Alves  <palves@redhat.com>
8583
8584         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8585         reference.
8586         (pt_btrace_insn): New function.
8587         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8588
8589 2017-04-25  Pedro Alves  <palves@redhat.com>
8590
8591         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8592         "base" field and inherit from "bp_location" instead.  Add
8593         non-default ctor.
8594         (allocate_location_exception): Use new non-default ctor.
8595         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8596         (init_bp_location): Convert to ...
8597         (bp_location::bp_location): ... this new ctor, and remove memset
8598         call.
8599         (base_breakpoint_allocate_location): Use the new non-default ctor.
8600         * breakpoint.h (bp_location): Now a class.  Declare default and
8601         non-default ctors.  In-class initialize all members.
8602         (init_bp_location): Remove declaration.
8603
8604 2017-04-25  Pedro Alves  <palves@redhat.com>
8605
8606         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8607         assignment operator.
8608
8609 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8610
8611         * doublest.c (convert_doublest_to_floatformat): Call
8612         floatformat_totalsize_bytes.
8613
8614 2017-04-22  Tom Tromey  <tom@tromey.com>
8615
8616         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8617         ui_out_emit_list.
8618         * stack.c (print_frame): Use ui_out_emit_list.
8619         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8620         ui_out_emit_list.
8621         * mi/mi-main.c (print_one_inferior)
8622         (mi_cmd_data_list_register_names)
8623         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8624         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8625         ui_out_emit_list.
8626         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8627         (mi_output_solib_attribs): Use ui_out_emit_list,
8628         ui_out_emit_tuple.
8629         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8630         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8631         (mi_cmd_stack_list_args, list_args_or_locals): Use
8632         ui_out_emit_list.
8633         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8634         * breakpoint.c (print_solib_event, output_thread_groups): Use
8635         ui_out_emit_list.
8636
8637 2017-04-22  Tom Tromey  <tom@tromey.com>
8638
8639         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8640         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8641         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8642
8643 2017-04-22  Tom Tromey  <tom@tromey.com>
8644
8645         * tracepoint.c (tvariables_info_1)
8646         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8647
8648 2017-04-22  Tom Tromey  <tom@tromey.com>
8649
8650         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8651         annotate_arg_emitter.
8652         * breakpoint.c (print_mention_watchpoint)
8653         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8654         * annotate.h (struct annotate_arg_emitter): New.
8655
8656 2017-04-22  Tom Tromey  <tom@tromey.com>
8657
8658         * record-btrace.c (record_btrace_insn_history)
8659         (record_btrace_insn_history_range, record_btrace_call_history)
8660         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8661         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8662         ui_out_emit_tuple.
8663         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8664         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8665         * skip.c (skip_info): Use ui_out_emit_tuple.
8666         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8667         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8668         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8669         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8670         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8671         ui_out_emit_tuple.
8672         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8673         (output_register, mi_cmd_data_read_memory)
8674         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8675         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8676         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8677         Use ui_out_emit_tuple.
8678         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8679         ui_out_emit_tuple.
8680         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8681         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8682         * linux-thread-db.c (info_auto_load_libthread_db): Use
8683         ui_out_emit_tuple.
8684         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8685         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8686         * disasm.c (do_mixed_source_and_assembly_deprecated)
8687         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8688         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8689         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8690         * breakpoint.c (print_one_breakpoint_location)
8691         (print_one_breakpoint): Use ui_out_emit_tuple.
8692         * auto-load.c (print_script, info_auto_load_cmd): Use
8693         ui_out_emit_tuple.
8694         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8695
8696 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8697
8698         * thread.c (print_thread_info_1): Remove dead code.
8699
8700 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8701
8702         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8703         GDB_SELF_TEST.
8704         * arm-tdep.c (selftests::arm_record_test): Likewise.
8705
8706 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8707
8708         * regcache.c (regcache_restore): Remove argument 2.  Replace
8709         argument 3 with regcache.  Get register status from
8710         src->register_status and get register contents from
8711         register_buffer (src, regnum).
8712         (regcache_cpy): Update.
8713
8714 2017-04-19  Pedro Alves  <palves@redhat.com>
8715
8716         * gdbthread.h (thread): Add missing closing parenthesis in
8717         comment.
8718
8719 2017-04-19  Pedro Alves  <palves@redhat.com>
8720
8721         * common/refcounted-object.h: New file.
8722         * gdbthread.h: Include "common/refcounted-object.h".
8723         (thread_info): Inherit from refcounted_object and add comments.
8724         (thread_info::incref, thread_info::decref)
8725         (thread_info::m_refcount): Delete.
8726         (thread_info::deletable): Use the refcounted_object::refcount()
8727         method.
8728         * inferior.c (current_inferior_): Add comment.
8729         (set_current_inferior): Increment/decrement refcounts.
8730         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8731         not-deletable instead of comparing with the current inferior.
8732         (initialize_inferiors): Increment the initial inferior's refcount.
8733         * inferior.h (struct inferior): Forward declare.
8734         Include "common/refcounted-object.h".
8735         (current_inferior, set_current_inferior): Move declaration to
8736         before struct inferior's definition, and fix comment.
8737         (inferior): Inherit from refcounted_object.  Add comments.
8738         * thread.c (switch_to_thread_no_regs): Reference the thread's
8739         inferior pointer directly instead of doing a ptid lookup.
8740         (switch_to_no_thread): New function.
8741         (switch_to_thread(thread_info *)): New function, factored out
8742         from ...
8743         (switch_to_thread(ptid_t)): ... this.
8744         (restore_current_thread): Delete.
8745         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8746         fields, and add 'inf' field.
8747         (do_restore_current_thread_cleanup): Check whether old->inf is
8748         alive instead of looking up an inferior by ptid.  Use
8749         switch_to_thread and switch_to_no_thread.
8750         (restore_current_thread_cleanup_dtor): Use old->inf directly
8751         instead of lookup up an inferior by id.  Decref the inferior.
8752         Don't restore 'removable'.
8753         (make_cleanup_restore_current_thread): Same the inferior pointer
8754         in old, instead of the inferior number.  Incref the inferior.
8755         Don't save/clear 'removable'.
8756
8757 2017-04-19  Pedro Alves  <palves@redhat.com>
8758
8759         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8760         unittests/scoped_restore-selftests.c.
8761         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8762         * common/scoped_restore.h (scoped_restore_base): Make "class".
8763         (scoped_restore_base::release): New public method.
8764         (scoped_restore_base::scoped_restore_base): New protected ctor.
8765         (scoped_restore_base::m_saved_var): New protected field.
8766         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8767         scoped_restore_base base class instead of m_saved_var directly.
8768         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8769         (scoped_restore_tmpl::scoped_restore_tmpl(const
8770         scoped_restore_tmpl<T>&)): Likewise.
8771         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8772         method.
8773         (scoped_restore_tmpl::saved_var): New method.
8774         (scoped_restore_tmpl::m_saved_var): Delete.
8775         * inferior.h (inferior::detaching): Now a bool.
8776         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8777         cleanup.
8778         * unittests/scoped_restore-selftests.c: New file.
8779
8780 2017-04-19  Pedro Alves  <palves@redhat.com>
8781
8782         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8783         Re-sort in alphabetic order.
8784
8785 2017-04-18  Pedro Alves  <palves@redhat.com>
8786
8787         * xml-support.c (obstack_xml_printf): Delete.
8788         * xml-support.h (obstack_xml_printf): Delete.
8789
8790 2017-04-18  Pedro Alves  <palves@redhat.com>
8791
8792         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8793         vdebug, verror, body_text, start_element, end_element, name,
8794         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8795         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8796         is_xinclude>: Make private and add m_ prefix.
8797         (gdb_xml_parser::body_text): New method, based on ...
8798         (gdb_xml_body_text): ... this.  Adjust.
8799         (gdb_xml_parser::vdebug): New method, based on ...
8800         (gdb_xml_debug): ... this.  Adjust.
8801         (gdb_xml_parser::verror): New method, based on ...
8802         (gdb_xml_error): ... this.  Adjust.
8803         (gdb_xml_parser::start_element): New method, based on ...
8804         (gdb_xml_start_element): ... this.  Adjust.
8805         (gdb_xml_start_element_wrapper): Defer to
8806         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8807         (gdb_xml_parser::end_element): New method, based on ...
8808         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8809         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8810         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8811         (gdb_xml_parser::use_dtd): New method, based on ...
8812         (gdb_xml_use_dtd): ... this.  Adjust.
8813         (gdb_xml_parser::parse): New method, based on ...
8814         (gdb_xml_parse): ... this.  Adjust.
8815         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8816         (xinclude_start_include): Adjust to call the parser's name method.
8817         (xml_xinclude_default, xml_xinclude_start_doctype)
8818         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8819         method.
8820         (xml_process_xincludes): Adjust to call parser methods.
8821         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8822         declarations.
8823
8824 2017-04-18  Pedro Alves  <palves@redhat.com>
8825
8826         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8827         gdb::optional<std::string>.
8828         * xml-support.c: Include <string>.
8829         (scope_level::scope_level(scope_level &&))
8830         (scope_level::~scope_level): Delete.
8831         (scope_level::body): Now a std::string.
8832         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8833         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8834         parameter.
8835         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8836         (xinclude_parsing_data::output): Now a std::string reference.
8837         (xinclude_start_include): Adjust.
8838         (xml_xinclude_default): Adjust.
8839         (xml_process_xincludes): Add 'output' parameter, and return bool.
8840         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8841         and return bool.
8842         * xml-tdesc.c: Include <unordered_map> and <string>.
8843         (tdesc_xml_cache): Delete.
8844         (tdesc_xml_cache_s): Delete.
8845         (xml_cache): Now an std::unordered_map.
8846         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8847         (target_fetch_description_xml): Change return type to
8848         gdb::optional<std::string>, and adjust.
8849         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8850         (target_fetch_description_xml): Change return type to
8851         gdb::optional<std::string>.
8852
8853 2017-04-18  Pedro Alves  <palves@redhat.com>
8854
8855         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8856         unittests/optional-selftests.c.
8857         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8858         * unittests/optional-selftests.c: New file.
8859         * unittests/optional/assignment/1.cc: New file.
8860         * unittests/optional/assignment/2.cc: New file.
8861         * unittests/optional/assignment/3.cc: New file.
8862         * unittests/optional/assignment/4.cc: New file.
8863         * unittests/optional/assignment/5.cc: New file.
8864         * unittests/optional/assignment/6.cc: New file.
8865         * unittests/optional/assignment/7.cc: New file.
8866         * unittests/optional/cons/copy.cc: New file.
8867         * unittests/optional/cons/default.cc: New file.
8868         * unittests/optional/cons/move.cc: New file.
8869         * unittests/optional/cons/value.cc: New file.
8870         * unittests/optional/in_place.cc: New file.
8871         * unittests/optional/observers/1.cc: New file.
8872         * unittests/optional/observers/2.cc: New file.
8873
8874 2017-04-18  Pedro Alves  <palves@redhat.com>
8875
8876         * common/gdb_optional.h: Include common/traits.h.
8877         (in_place_t): New type.
8878         (in_place): New constexpr variable.
8879         (optional::optional): Remove member initialization of
8880         m_instantiated.
8881         (optional::optional(in_place_t...)): New constructor.
8882         (optional::~optional): Use reset.
8883         (optional::optional(const optional&)): New.
8884         (optional::optional(const optional&&)): New.
8885         (optional::optional(T &)): New.
8886         (optional::optional(T &&)): New.
8887         (operator::operator=(const optional &)): New.
8888         (operator::operator=(optional &&)): New.
8889         (operator::operator= (const T &))
8890         (operator::operator= (T &&))
8891         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8892         (operator::reset): New.
8893         (operator::m_instantiated):: Add in-class initializer.
8894         * common/traits.h: Include <type_traits>.
8895         (struct And): New types.
8896
8897 2017-04-18  Pedro Alves  <palves@redhat.com>
8898
8899         * xml-support.c: Include <vector>.
8900         (scope_level::scope_level(const gdb_xml_element *))
8901         (scope_level::scope_level(scope_level&&)): New.
8902         (scope_level::~scope_level): New.
8903         (scope_level_s): Delete.
8904         (gdb_xml_parser::scopes): Now a std::vector.
8905         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8906         Use std::vector.
8907         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8908         scope cleanup code.
8909         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8910         of the scopes member.  Use std::vector::emplace_back.
8911
8912 2017-04-18  Pedro Alves  <palves@redhat.com>
8913
8914         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8915         a bool.
8916         (gdb_xml_end_element): Change type of first parameter.
8917         (gdb_xml_cleanup): Rename to ...
8918         (gdb_xml_parser::~gdb_xml_parser): ... this.
8919         (gdb_xml_create_parser_and_cleanup): Delete with ...
8920         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8921         to this new ctor.
8922         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8923         using gdb_xml_create_parser_and_cleanup.
8924         (xinclude_parsing_data): Add ctor/dtor.
8925         (xml_xinclude_cleanup): Delete.
8926         (xml_process_xincludes): Create a local xinclude_parsing_data
8927         instead of heap-allocating one.  Create a local gdb_xml_parser
8928         instead of heap-allocating one with
8929         gdb_xml_create_parser_and_cleanup.
8930
8931 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8932
8933         PR threads/20743
8934         * fbsd-nat.c (resume_one_thread_cb): Remove.
8935         (resume_all_threads_cb): Remove.
8936         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8937         iterate_over_threads.
8938
8939 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8940
8941         * NEWS: Create a new section for the next release branch.
8942         Rename the section of the current branch, now that it has
8943         been cut.
8944
8945 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8946
8947         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8948         * version.in: Bump version to 8.0.50.DATE-git.
8949
8950 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8951
8952         PR gdb/21385
8953         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8954         independently of the host, and fix build breakage on Cygwin.
8955
8956 2017-04-13  Pedro Alves  <palves@redhat.com>
8957
8958         * inferior.c (free_inferior): Convert to ...
8959         (inferior::~inferior): ... this dtor.
8960         (inferior::inferior): New ctor, factored out from ...
8961         (add_inferior_silent): ... here.  Allocate the inferior with a new
8962         expression.
8963         (delete_inferior): Call delete instead of free_inferior.
8964         * inferior.h (gdb_environ, continuation): Forward declare.
8965         (inferior): Now a class.  Add in-class initialization to all
8966         members.  Make boolean fields bool, except 'detaching'.
8967         (inferior::inferior): New explicit ctor.
8968         (inferior::~inferior): New.
8969
8970 2017-04-13  Pedro Alves  <palves@redhat.com>
8971
8972         * inferior.c (init_inferior_list): Delete.
8973         * inferior.h (init_inferior_list): Delete.
8974
8975 2017-04-13  Pedro Alves  <palves@redhat.com>
8976
8977         PR threads/13217
8978         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8979         (top level): Call it twice, with different thread sets.
8980
8981 2017-04-13  Pedro Alves  <palves@redhat.com>
8982
8983         * thread.c: Include <algorithm>.
8984         (thread_array_cleanup): Delete.
8985         (scoped_inc_dec_ref): New class.
8986         (live_threads_count): New function.
8987         (set_thread_refcount): Delete.
8988         (tp_array_compar_ascending): Now a bool.
8989         (tp_array_compar): Convert to a std::sort comparison function.
8990         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8991         and live_threads_count.
8992
8993 2017-04-13  Pedro Alves  <palves@redhat.com>
8994
8995         * infrun.c (follow_fork_inferior): Also switch the current
8996         inferior.
8997
8998 2017-04-13  Pedro Alves  <palves@redhat.com>
8999
9000         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9001         before calling create_internal_breakpoint.
9002
9003 2017-04-13  Pedro Alves  <palves@redhat.com>
9004
9005         * fork-child.c (execv_argv): New class.
9006         (breakup_args): Refactored as ...
9007         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9008         Copy arguments to storage and replace separators with NULL
9009         terminators in place.
9010         (escape_bang_in_quoted_argument): Adjust to return bool.
9011         (execv_argv::execv_argv): New ctor.
9012         (execv_argv::init_for_shell): New method, factored out from
9013         fork_inferior.  Don't strdup strings into the vector.
9014         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9015         Remove free_vector_argv call.
9016
9017 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9018
9019         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9020         tdep->rx_psw_type.
9021
9022 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9023
9024         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9025         * rx-tdep.c (rx_gdbarch_init): Likewise.
9026
9027 2017-04-13  Pedro Alves  <palves@redhat.com>
9028
9029         * breakpoint.h (struct breakpoint): Reindent.
9030
9031 2017-04-13  Pedro Alves  <palves@redhat.com>
9032
9033         * breakpoint.c (bp_location): Rename to ...
9034         (bp_locations): ... this.  All references updated.
9035         (bp_location_count): Rename to ...
9036         (bp_locations_count): ... this.  All references updated.
9037         (bp_location_placed_address_before_address_max): Rename to ...
9038         (bp_locations_placed_address_before_address_max): ... this.  All
9039         references updated.
9040         (bp_location_shadow_len_after_address_max): Rename to ...
9041         (bp_locations_shadow_len_after_address_max): ... this.  All
9042         references updated.
9043         (bp_location_compare_addrs): Rename to ...
9044         (bp_locations_compare_addrs): ... this.  All references updated.
9045         (bp_location_compare):Rename to ...
9046         (bp_locations_compare): ... this.  All references updated.
9047         (bp_location_target_extensions_update): Rename to ...
9048         (bp_locations_target_extensions_update): ... this.  All references
9049         updated.
9050
9051 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9052
9053         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9054         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9055         'sgtty.h'.
9056         * common/gdb_termios.h: New file, with parts of "terminal.h".
9057         * inflow.c: Include "gdb_termios.h".
9058         * ser-unix.c: Include "gdb_termios.h".
9059         * terminal.h: Move terminal-related defines to
9060         "common/gdb_termios.h".
9061
9062 2017-04-12  Tom Tromey  <tom@tromey.com>
9063
9064         * probe.c (parse_probes): Update.
9065         * location.h (delete_event_location): Don't declare.
9066         (event_location_deleter::operator()): Update.
9067         * location.c (event_location_deleter::operator()): Rename from
9068         delete_event_location.
9069         * linespec.h (linespec_result) <location>: Change type to
9070         event_location_up.
9071         * linespec.c (canonicalize_linespec, event_location_to_sals)
9072         (decode_objc): Update.
9073         (linespec_result): Don't call delete_event_location.
9074         * breakpoint.c (create_breakpoints_sal)
9075         (bkpt_probe_create_sals_from_location)
9076         (strace_marker_create_sals_from_location): Update.
9077
9078 2017-04-12  Tom Tromey  <tom@tromey.com>
9079
9080         * linespec.h (struct linespec_result): Add constructor and
9081         destructor.
9082         (init_linespec_result, destroy_linespec_result)
9083         (make_cleanup_destroy_linespec_result): Don't declare.
9084         * linespec.c (init_linespec_result): Remove.
9085         (linespec_result::~linespec_result): Rename from
9086         destroy_linespec_result.  Update.
9087         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9088         Remove.
9089         * breakpoint.c (create_breakpoint, break_range_command)
9090         (decode_location_default): Update.
9091         * ax-gdb.c (agent_command_1): Update.
9092
9093 2017-04-12  Tom Tromey  <tom@tromey.com>
9094
9095         * remote.c (remote_download_tracepoint): Update.
9096         * python/py-breakpoint.c (bppy_get_location): Update.
9097         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9098         (gdbscm_breakpoint_location): Update.
9099         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9100         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9101         Change type to event_location_up.
9102         * breakpoint.c (create_overlay_event_breakpoint)
9103         (create_longjmp_master_breakpoint)
9104         (create_std_terminate_master_breakpoint)
9105         (create_exception_master_breakpoint)
9106         (breakpoint_event_location_empty_p, print_breakpoint_location)
9107         (print_one_breakpoint_location, create_thread_event_breakpoint)
9108         (init_breakpoint_sal, create_breakpoint)
9109         (print_recreate_ranged_breakpoint, break_range_command)
9110         (init_ada_exception_breakpoint, say_where): Update.
9111         (base_breakpoint_dtor): Don't call delete_event_location.
9112         (bkpt_print_recreate, tracepoint_print_recreate)
9113         (dprintf_print_recreate, update_static_tracepoint)
9114         (breakpoint_re_set_default): Update.
9115
9116 2017-04-12  Tom Tromey  <tom@tromey.com>
9117
9118         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9119         type of "to_do".  Update.
9120         (compute_stack_depth): Use std::vector.
9121
9122 2017-04-12  Tom Tromey  <tom@tromey.com>
9123
9124         * printcmd.c (find_instruction_backward): Use std::vector.
9125
9126 2017-04-12  Tom Tromey  <tom@tromey.com>
9127
9128         * symfile.c (objfilep): Remove typedef.
9129         (reread_symbols): Use a std::vector.
9130
9131 2017-04-12  Tom Tromey  <tom@tromey.com>
9132
9133         * mi/mi-main.c (exec_direction_forward): Remove.
9134         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9135         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9136         scoped_restore.
9137         * guile/guile.c (guile_repl_command, guile_command)
9138         (gdbscm_execute_gdb_command): Use scoped_restore.
9139         * go-exp.y (go_parse): Use scoped_restore.
9140         * d-exp.y (d_parse): Use scoped_restore.
9141         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9142         * c-exp.y (c_parse): Use scoped_restore.
9143
9144 2017-04-12  Tom Tromey  <tom@tromey.com>
9145
9146         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9147         (mi_parse): Update return type.
9148         (mi_parse_free): Remove.
9149         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9150         (mi_parse::~mi_parse): Rename from mi_parse_free.
9151         (mi_parse_cleanup): Remove.
9152         (mi_parse): Return a unique_ptr.  Use new.
9153         * mi/mi-main.c (mi_execute_command): Update.
9154
9155 2017-04-12  Tom Tromey  <tom@tromey.com>
9156
9157         * location.c (explicit_location_lex_one): Return a
9158         unique_xmalloc_ptr.
9159         (string_to_explicit_location): Update.  Remove cleanups.
9160
9161 2017-04-12  Tom Tromey  <tom@tromey.com>
9162
9163         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9164         (compare_value_and_voffset): Change type.  Update.
9165         (compute_vtable_size): Change type of "offset_vec".
9166         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9167         (gnuv3_get_typeid): Remove extraneous declaration.
9168
9169 2017-04-12  Tom Tromey  <tom@tromey.com>
9170
9171         * charset.h (wchar_iterator): Fix comment.
9172
9173 2017-04-12  Tom Tromey  <tom@tromey.com>
9174
9175         * charset.c (iconv_wrapper): New class.
9176         (cleanup_iconv): Remove.
9177         (convert_between_encodings): Use it.
9178
9179 2017-04-12  Tom Tromey  <tom@tromey.com>
9180
9181         * symfile.h (increment_reading_symtab): Update type.
9182         * symfile.c (decrement_reading_symtab): Remove.
9183         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9184         * psymtab.c (psymtab_to_symtab): Update.
9185         * dwarf2read.c (dw2_instantiate_symtab): Update.
9186
9187 2017-04-12  Tom Tromey  <tom@tromey.com>
9188
9189         * jit.c (struct jit_reader): Declare separately.  Add constructor
9190         and destructor.  Change type of "handle".
9191         (loaded_jit_reader): Define separately.
9192         (jit_reader_load): Update.  New "new".
9193         (jit_reader_unload_command): Use "delete".
9194         * gdb-dlfcn.h (struct dlclose_deleter): New.
9195         (gdb_dlhandle_up): New typedef.
9196         (gdb_dlopen, gdb_dlsym): Update types.
9197         (gdb_dlclose): Remove.
9198         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9199         (gdb_dlsym): Change type of "handle".
9200         (make_cleanup_dlclose): Remove.
9201         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9202         * compile/compile-c-support.c (load_libcc): Update.
9203
9204 2017-04-12  Tom Tromey  <tom@tromey.com>
9205
9206         * symtab.h (find_pcs_for_symtab_line): Change return type.
9207         * symtab.c (find_pcs_for_symtab_line): Change return type.
9208         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9209         type of "vec".  Update.
9210         (ltpy_get_pcs_for_line): Update.
9211         * linespec.c (decode_digits_ordinary): Update.
9212
9213 2017-04-12  Tom Tromey  <tom@tromey.com>
9214
9215         * tracepoint.c (actions_command): Update.
9216         * python/python.c (python_command, python_interactive_command):
9217         Update.
9218         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9219         * guile/guile.c (guile_command): Update.
9220         * defs.h (read_command_lines, read_command_lines_1): Return
9221         command_line_up.
9222         (command_lines_deleter): New struct.
9223         (command_line_up): New typedef.
9224         * compile/compile.c (compile_code_command)
9225         (compile_print_command): Update.
9226         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9227         command_line_up.
9228         (make_cleanup_free_command_lines): Remove.
9229         * cli/cli-script.c (get_command_line, read_command_lines_1)
9230         (copy_command_lines): Return command_line_up.
9231         (while_command, if_command, read_command_lines, define_command)
9232         (document_command): Update.
9233         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9234         Remove.
9235         * breakpoint.h (breakpoint_set_commands): Change type of
9236         "commands".
9237         * breakpoint.c (breakpoint_set_commands): Change type of
9238         "commands".  Update.
9239         (do_map_commands_command, update_dprintf_command_list)
9240         (create_tracepoint_from_upload): Update.
9241
9242 2017-04-12  Tom Tromey  <tom@tromey.com>
9243
9244         * tracepoint.c (scope_info): Update.
9245         * spu-tdep.c (spu_catch_start): Update.
9246         * python/python.c (gdbpy_decode_line): Update.
9247         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9248         * python/py-breakpoint.c (bppy_init): Update.
9249         * probe.c (parse_probes): Update.
9250         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9251         * location.h (event_location_deleter): New struct.
9252         (event_location_up): New typedef.
9253         (new_linespec_location, new_address_location, new_probe_location)
9254         (new_explicit_location, copy_event_location)
9255         (string_to_event_location, string_to_event_location_basic)
9256         (string_to_explicit_location): Update return type.
9257         (make_cleanup_delete_event_location): Remove.
9258         * location.c (new_linespec_location, new_address_location)
9259         (new_probe_location, new_explicit_location, copy_event_location):
9260         Return event_location_up.
9261         (delete_event_location_cleanup)
9262         (make_cleanup_delete_event_location): Remove.
9263         (string_to_explicit_location, string_to_event_location_basic)
9264         (string_to_event_location): Return event_location_up.
9265         * linespec.c (canonicalize_linespec, event_location_to_sals)
9266         (decode_line_with_current_source)
9267         (decode_line_with_last_displayed, decode_objc): Update.
9268         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9269         * completer.c (location_completer): Update.
9270         * cli/cli-cmds.c (edit_command, list_command): Update.
9271         * breakpoint.c (create_overlay_event_breakpoint)
9272         (create_longjmp_master_breakpoint)
9273         (create_std_terminate_master_breakpoint)
9274         (create_exception_master_breakpoint)
9275         (create_thread_event_breakpoint): Update.
9276         (init_breakpoint_sal): Update.  Remove some dead code.
9277         (create_breakpoint_sal): Change type of "location".  Update.
9278         (create_breakpoints_sal, create_breakpoint, break_command_1)
9279         (dprintf_command, break_range_command, until_break_command)
9280         (init_ada_exception_breakpoint)
9281         (strace_marker_create_sals_from_location)
9282         (update_static_tracepoint, trace_command, ftrace_command)
9283         (strace_command, create_tracepoint_from_upload): Update.
9284         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9285         * ax-gdb.c (agent_command_1): Update.
9286
9287 2017-04-12  Pedro Alves  <palves@redhat.com>
9288
9289         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9290         * configure.tgt: Handle i[34567]86-*-go32* and
9291         i[34567]86-*-msdosdjgpp*.
9292         * i386-tdep.c (i386_svr4_reg_to_regnum):
9293         Make extern.
9294         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9295         i386-go32-tdep.c.
9296         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9297         * i386-go32-tdep.c: New file.
9298         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9299         declarations.
9300
9301 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9302
9303         * aix-thread.c (pd_status2str): Change return type to const char *.
9304
9305 2017-04-12  Pedro Alves  <palves@redhat.com>
9306
9307         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9308         calls to set_gdbarch_gnu_triplet_regexp.
9309
9310 2017-04-12  Pedro Alves  <palves@redhat.com>
9311
9312         PR gdb/21323
9313         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9314         New enum value.
9315         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9316         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9317         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9318         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9319         * gdbarch.h, gdbarch.c: Regenerate.
9320         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9321         gdbarch_wchar_bit and gdbarch_wchar_signed.
9322         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9323         * arm-tdep.c (arm_gdbarch_init): Likewise.
9324         * avr-tdep.c (avr_gdbarch_init): Likewise.
9325         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9326         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9327         * i386-tdep.c (i386_go32_init_abi): Likewise.
9328         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9329         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9330         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9331         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9332         * sh-tdep.c (sh_gdbarch_init): Likewise.
9333         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9334         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9335         * windows-tdep.c (windows_init_abi): Likewise.
9336         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9337
9338 2017-04-12  Pedro Alves  <palves@redhat.com>
9339
9340         PR c++/21323
9341         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9342         cplus_primitive_type_char32_t>: New enum values.
9343         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9344         and cplus_primitive_type_char32_t.
9345         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9346         32, use the archtecture's built-in type for char16_t and char32_t,
9347         respectively.  Otherwise, fallback to init_integer_type as before,
9348         but make the type unsigned, and issue a complaint.
9349         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9350
9351 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9352
9353         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9354         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9355
9356 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9357
9358         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9359         'const char *'.
9360
9361 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9362
9363         * common/common-utils.c (free_vector_argv): New function.
9364         * common/common-utils.h: Include <vector>.
9365         (free_vector_argv): New prototype.
9366         * darwin-nat.c (darwin_create_inferior): Rewrite function
9367         prototype in order to constify "exec_file" and accept a
9368         "std::string" for "allargs".
9369         * fork-child.c: Include <vector>.
9370         (breakup_args): Rewrite function, using C++.
9371         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9372         and accept "std::string" for "allargs".  Update the code to
9373         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9374         and "execvp".
9375         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9376         order to constify "exec_file" and accept a "std::string" for
9377         "allargs".
9378         * go32-nat.c (go32_create_inferior): Likewise.
9379         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9380         * infcmd.c (run_command_1): Constify "exec_file".  Use
9381         "std::string" for inferior arguments.
9382         * inferior.h (fork_inferior): Update prototype.
9383         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9384         prototype in order to constify "exec_file" and accept a
9385         "std::string" for "allargs".
9386         * nto-procfs.c (procfs_create_inferior): Likewise.
9387         * procfs.c (procfs_create_inferior): Likewise.
9388         * remote-sim.c (gdbsim_create_inferior): Likewise.
9389         * remote.c (extended_remote_run): Update code to accept
9390         "std::string" as argument.
9391         (extended_remote_create_inferior): Rewrite function prototype in
9392         order to constify "exec_file" and accept a "std::string" for
9393         "allargs".
9394         * rs6000-nat.c (super_create_inferior): Likewise.
9395         (rs6000_create_inferior): Likewise.
9396         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9397         * windows-nat.c (windows_create_inferior): Likewise.
9398
9399 2017-04-11  Pedro Alves  <palves@redhat.com>
9400
9401         * thread.c: Fix whitespace throughout.
9402
9403 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9404
9405         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9406
9407 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9408
9409         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9410
9411 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9412
9413         PR gdb/21364
9414         * osdata.c (info_osdata): Check if 'type' is an empty string
9415         instead of NULL.
9416
9417 2017-04-10  Pedro Alves  <palves@redhat.com>
9418
9419         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9420         (ptid_to_global_thread_id, in_thread_list)
9421         (do_captured_list_thread_ids, set_resumed, set_running)
9422         (set_executing, set_stop_requested, finish_thread_state)
9423         (validate_registers_access, can_access_registers_ptid)
9424         (print_thread_info_1, switch_to_thread)
9425         (do_restore_current_thread_cleanup)
9426         (make_cleanup_restore_current_thread, thread_command)
9427         (thread_name_command): Use operator== instead of ptid_equal.
9428
9429 2017-04-10  Pedro Alves  <palves@redhat.com>
9430
9431         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9432         (current_thread_cleanup_chain): Delete.
9433         (restore_current_thread_cleanup_dtor)
9434         (make_cleanup_restore_current_thread): Remove references to
9435         current_thread_cleanup_chain.
9436
9437 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9438
9439         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9440         REG_UNKNOWN.
9441
9442 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9443
9444         PR gdb/19942
9445         * gdbthread.h (thread_info::deletable): New method.
9446         (thread_info::incref): New method.
9447         (thread_info::decref): New method.
9448         (thread_info::refcount): Move it to private.
9449         * infrun.c (save_stop_context): Call inc_refcount.
9450         (release_stop_context_cleanup): Likewise.
9451         * thread.c (set_thread_exited): New function.
9452         (init_thread_list): Delete "tp" only it is deletable, otherwise
9453         call set_thread_exited.
9454         (delete_thread_1): Call set_thread_exited.
9455         (current_thread_cleanup) <inferior_pid>: Remove.
9456         <thread>: New field.
9457         (restore_current_thread_ptid_changed): Removed.
9458         (do_restore_current_thread_cleanup): Adjust.
9459         (restore_current_thread_cleanup_dtor): Don't call
9460         find_thread_ptid.
9461         (set_thread_refcount): Use dec_refcount.
9462         (make_cleanup_restore_current_thread): Adjust.
9463         (thread_apply_all_command): Call inc_refcount.
9464         (_initialize_thread): Don't call
9465         observer_attach_thread_ptid_changed.
9466
9467 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9468
9469         * thread.c (delete_thread_1): Hoist code on marking thread as
9470         exited.
9471
9472 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9473
9474         * windows-nat.c (windows_detach): Initialize ptid with
9475         minus_one_ptid.
9476
9477 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9478
9479         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9480
9481 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9482
9483         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9484         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9485         (bfin_pseudo_register_write): Likewise
9486
9487 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9488
9489         * common/ptid.h (struct ptid): Change to...
9490         (class ptid_t): ... this.
9491         <ptid_t>: New constructors.
9492         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9493         matches>: New methods.
9494         <make_null, make_minus_one>: New static methods.
9495         <pid>: Rename to...
9496         <m_pid>: ...this.
9497         <lwp>: Rename to...
9498         <m_lwp>: ...this.
9499         <tid>: Rename to...
9500         <m_tid>: ...this.
9501         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9502         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9503         as references, move comment to class ptid_t.
9504         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9505         ptid_t static methods.
9506         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9507         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9508         Take ptid arguments as references, implement using ptid_t methods.
9509         * unittests/ptid-selftests.c: New file.
9510         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9511         unittests/ptid-selftests.c.
9512         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9513
9514 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9515
9516         * python/python.c (python_run_simple_file): Cast mode literal to
9517         non-const char pointer as expected by PyFile_FromString.
9518
9519 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9520
9521         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9522         minus_one_ptid and null_ptid.
9523
9524 2017-04-05  Pedro Alves  <palves@redhat.com>
9525
9526         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9527         * configure: Regenerate.
9528
9529 2017-04-05  Pedro Alves  <palves@redhat.com>
9530
9531         * ada-exp.y (yyerror): Constify.
9532         * ada-lang.c (bound_name, get_selections)
9533         (ada_variant_discrim_type)
9534         (ada_variant_discrim_name, ada_value_struct_elt)
9535         (ada_lookup_struct_elt_type, is_unchecked_variant)
9536         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9537         (catch_ada_exception_command_split)
9538         (catch_ada_assert_command_split, catch_assert_command)
9539         (ada_op_name): Constify.
9540         * ada-lang.h (ada_yyerror, get_selections)
9541         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9542         * arc-tdep.c (arc_print_frame_cache): Constify.
9543         * arm-tdep.c (arm_skip_stub): Constify.
9544         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9545         (gen_aggregate_elt_ref): Constify.
9546         * bcache.c (print_bcache_statistics): Constify.
9547         * bcache.h (print_bcache_statistics): Constify.
9548         * break-catch-throw.c (catch_exception_command_1):
9549         * breakpoint.c (struct ep_type_description::description):
9550         Constify.
9551         (add_solib_catchpoint): Constify.
9552         (catch_fork_command_1): Add cast.
9553         (add_catch_command): Constify.
9554         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9555         Constify.
9556         * bsd-uthread.c (bsd_uthread_state): Constify.
9557         * buildsym.c (patch_subfile_names): Constify.
9558         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9559         Constify.
9560         * c-exp.y (yyerror): Constify.
9561         (token::oper): Constify.
9562         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9563         * c-varobj.c (cplus_describe_child): Constify.
9564         * charset.c (find_charset_names): Add cast.
9565         (find_charset_names): Constify array and add const_cast.
9566         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9567         (edit_command): Constify.
9568         * cli/cli-decode.c (lookup_cmd): Constify.
9569         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9570         Constify.
9571         (struct dump_context): Constify.
9572         (add_dump_command, restore_command): Constify.
9573         * cli/cli-script.c (get_command_line): Constify.
9574         * cli/cli-script.h (get_command_line): Constify.
9575         * cli/cli-utils.c (check_for_argument): Constify.
9576         * cli/cli-utils.h (check_for_argument): Constify.
9577         * coff-pe-read.c (struct read_pe_section_data): Constify.
9578         * command.h (lookup_cmd): Constify.
9579         * common/print-utils.c (decimal2str): Constify.
9580         * completer.c (gdb_print_filename): Constify.
9581         * corefile.c (set_gnutarget): Constify.
9582         * cp-name-parser.y (yyerror): Constify.
9583         * cp-valprint.c (cp_print_class_member): Constify.
9584         * cris-tdep.c (cris_register_name, crisv32_register_name):
9585         Constify.
9586         * d-exp.y (yyerror): Constify.
9587         (struct token::oper): Constify.
9588         * d-lang.h (d_yyerror): Constify.
9589         * dbxread.c (struct header_file_location::name): Constify.
9590         (add_old_header_file, add_new_header_file, last_function_name)
9591         (dbx_next_symbol_text, add_bincl_to_list)
9592         (find_corresponding_bincl_psymtab, set_namestring)
9593         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9594         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9595         * defs.h (command_line_input, print_address_symbolic)
9596         (deprecated_readline_begin_hook): Constify.
9597         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9598         Constify.
9599         * event-top.c (handle_line_of_input): Constify and add cast.
9600         * exceptions.c (catch_errors): Constify.
9601         * exceptions.h (catch_errors): Constify.
9602         * expprint.c (print_subexp_standard, op_string, op_name)
9603         (op_name_standard, dump_raw_expression, dump_raw_expression):
9604         * expression.h (op_name, op_string, dump_raw_expression):
9605         Constify.
9606         * f-exp.y (yyerror): Constify.
9607         (struct token::oper): Constify.
9608         (struct f77_boolean_val::name): Constify.
9609         * f-lang.c (f_word_break_characters): Constify.
9610         * f-lang.h (f_yyerror): Constify.
9611         * fork-child.c (fork_inferior): Add cast.
9612         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9613         (new_variant): Constify.
9614         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9615         * gdbarch.c: Regenerate.
9616         * gdbcore.h (set_gnutarget): Constify.
9617         * go-exp.y (yyerror): Constify.
9618         (token::oper): Constify.
9619         * go-lang.h (go_yyerror): Constify.
9620         * go32-nat.c (go32_sysinfo): Constify.
9621         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9622         * guile/scm-cmd.c (cmdscm_function): Constify.
9623         * guile/scm-param.c (pascm_param_value): Constify.
9624         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9625         (h8300sx_register_name): Constify.
9626         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9627         Constify.
9628         * ia64-tdep.c (ia64_register_names): Constify.
9629         * infcmd.c (construct_inferior_arguments): Constify.
9630         (path_command, attach_post_wait): Constify.
9631         * language.c (show_range_command, show_case_command)
9632         (unk_lang_error): Constify.
9633         * language.h (language_defn::la_error)
9634         (language_defn::la_name_of_this): Constify.
9635         * linespec.c (decode_line_2): Constify.
9636         * linux-thread-db.c (thread_db_err_str): Constify.
9637         * lm32-tdep.c (lm32_register_name): Constify.
9638         * m2-exp.y (yyerror): Constify.
9639         * m2-lang.h (m2_yyerror): Constify.
9640         * m32r-tdep.c (m32r_register_names): Constify and make static.
9641         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9642         * m88k-tdep.c (m88k_register_name): Constify.
9643         * macroexp.c (appendmem): Constify.
9644         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9645         (upgrade_type, parse_external, parse_partial_symbols)
9646         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9647         (new_symbol): Constify.
9648         * memattr.c (mem_info_command): Constify.
9649         * mep-tdep.c (register_name_from_keyword): Constify.
9650         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9651         Constify.
9652         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9653         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9654         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9655         cast.
9656         (mi_execute_async_cli_command): Constify.
9657         * mips-tdep.c (mips_register_name): Constify.
9658         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9659         (am33_register_name, am33_2_register_name)
9660         * moxie-tdep.c (moxie_register_names): Constify.
9661         * nat/linux-osdata.c (osdata_type): Constify fields.
9662         * nto-tdep.c (nto_parse_redirection): Constify.
9663         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9664         (lookup_child_selector): Constify.
9665         (objc_methcall::name): Constify.
9666         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9667         (lookup_struct_typedef): Constify.
9668         * objfiles.c (pc_in_section): Constify.
9669         * objfiles.h (pc_in_section): Constify.
9670         * p-exp.y (struct token::oper): Constify.
9671         (yyerror): Constify.
9672         * p-lang.h (pascal_yyerror): Constify.
9673         * parser-defs.h (op_name_standard): Constify.
9674         (op_print::string): Constify.
9675         (exp_descriptor::op_name): Constify.
9676         * printcmd.c (print_address_symbolic): Constify.
9677         * psymtab.c (print_partial_symbols): Constify.
9678         * python/py-breakpoint.c (stop_func): Constify.
9679         (bppy_get_expression): Constify.
9680         * python/py-cmd.c (cmdpy_completer::name): Constify.
9681         (cmdpy_function): Constify.
9682         * python/py-event.c (evpy_add_attribute)
9683         (gdbpy_initialize_event_generic): Constify.
9684         * python/py-event.h (evpy_add_attribute)
9685         (gdbpy_initialize_event_generic): Constify.
9686         * python/py-evts.c (add_new_registry): Constify.
9687         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9688         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9689         * python/py-inferior.c (get_buffer): Add cast.
9690         * python/py-param.c (parm_constant::name): Constify.
9691         * python/py-unwind.c (fprint_frame_id): Constify.
9692         * python/python.c (gdbpy_parameter_value): Constify.
9693         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9694         * remote.c (memory_packet_config::name): Constify.
9695         (show_packet_config_cmd, remote_write_bytes)
9696         (remote_buffer_add_string):
9697         * reverse.c (exec_reverse_once): Constify.
9698         * rs6000-tdep.c (variant::name, variant::description): Constify.
9699         * rust-exp.y (rustyyerror): Constify.
9700         * rust-lang.c (rust_op_name): Constify.
9701         * rust-lang.h (rustyyerror): Constify.
9702         * serial.h (serial_ops::name): Constify.
9703         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9704         (sh_sh3e_register_name, sh_sh2e_register_name)
9705         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9706         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9707         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9708         (sh_sh4al_dsp_register_name): Constify.
9709         * sh64-tdep.c (sh64_register_name): Constify.
9710         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9711         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9712         * stabsread.c (patch_block_stabs, read_type_number)
9713         (ref_map::stabs, ref_add, process_reference)
9714         (symbol_reference_defined, define_symbol, define_symbol)
9715         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9716         (read_one_struct_field, read_struct_fields, read_baseclasses)
9717         (read_tilde_fields, read_struct_type, read_array_type)
9718         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9719         (read_huge_number, read_range_type, read_args, common_block_start)
9720         (find_name_end): Constify.
9721         * stabsread.h (common_block_start, define_symbol)
9722         (process_one_symbol, symbol_reference_defined, ref_add):
9723         * symfile.c (get_section_index, add_symbol_file_command):
9724         * symfile.h (get_section_index): Constify.
9725         * target-descriptions.c (tdesc_type::name): Constify.
9726         (tdesc_free_type): Add cast.
9727         * target.c (find_default_run_target):
9728         (add_deprecated_target_alias, find_default_run_target)
9729         (target_announce_detach): Constify.
9730         (do_option): Constify.
9731         * target.h (add_deprecated_target_alias): Constify.
9732         * thread.c (print_thread_info_1): Constify.
9733         * top.c (deprecated_readline_begin_hook, command_line_input):
9734         Constify.
9735         (init_main): Add casts.
9736         * top.h (handle_line_of_input): Constify.
9737         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9738         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9739         (tfind_command): Rename to ...
9740         (tfind_command_1): ... this and constify.
9741         (tfind_command): New function.
9742         (tfind_end_command, tfind_start_command): Adjust.
9743         (encode_source_string): Constify.
9744         * tracepoint.h (encode_source_string): Constify.
9745         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9746         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9747         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9748         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9749         * tui/tui-win.c (parse_scrolling_args): Constify.
9750         * tui/tui-windata.c (tui_erase_data_content): Constify.
9751         * tui/tui-windata.h (tui_erase_data_content): Constify.
9752         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9753         * tui/tui.c (tui_enable): Add cast.
9754         * utils.c (defaulted_query): Constify.
9755         (init_page_info): Add cast.
9756         (puts_debug, subset_compare): Constify.
9757         * utils.h (subset_compare): Constify.
9758         * varobj.c (varobj_format_string): Constify.
9759         * varobj.h (varobj_format_string): Constify.
9760         * vax-tdep.c (vax_register_name): Constify.
9761         * windows-nat.c (windows_detach): Constify.
9762         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9763         * xml-support.c (gdb_xml_end_element): Constify.
9764         * xml-tdesc.c (tdesc_start_reg): Constify.
9765         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9766         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9767         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9768
9769 2017-04-05  Pedro Alves  <palves@redhat.com>
9770
9771         * proc-api.c (struct trans): Constify.
9772         (procfs_note): Constify.
9773         * proc-events.c (struct trans, syscall_table):
9774         * proc-flags.c (struct trans): Constify.
9775         * proc-utils.h (procfs_note): Constify.
9776         * proc-why.c (struct trans): Constify.
9777         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9778         (procfs_detach): Constify.
9779         * sol-thread.c (struct string_map): Constify.
9780         (td_err_string, td_state_string): Constify.
9781
9782 2017-04-05  Pedro Alves  <palves@redhat.com>
9783
9784         * proc-api.c (procfs_filename): Don't initialize
9785         procfs_filename.
9786         (prepare_to_trace): Assume procfs_filename is non-NULL.
9787         (_initialize_proc_api): Give procfs_filename a default value here.
9788
9789 2017-04-05  Pedro Alves  <palves@redhat.com>
9790
9791         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9792         'cond_string' parameter.
9793         (extract_exception_regexp): Constify 'string' parameter.
9794         (catch_exception_command_1): Constify.
9795         * breakpoint.c (init_catchpoint)
9796         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9797         parameter.
9798         (ep_parse_optional_if_clause, catch_fork_command_1)
9799         (catch_exec_command_1): Constify.
9800         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9801         parameter.
9802         (ep_parse_optional_if_clause): Constify.
9803         * cli/cli-utils.c (remove_trailing_whitespace)
9804         (check_for_argument): Constify.
9805         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9806         non-const overload.
9807         (check_for_argument): Likewise.
9808
9809 2017-04-05  Pedro Alves  <palves@redhat.com>
9810
9811         * event-top.c (command_line_handler): Add cast to execute_command
9812         call.
9813         * record-btrace.c (cmd_record_btrace_bts_start)
9814         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9815         (cmd_record_btrace_start): Add cast to execute_command call.
9816         * record-full.c (record_full_goto_insn):
9817         * record.c (record_start, record_stop): Add cast to
9818         execute_command_to_string calls.
9819         (cmd_record_start): Add cast to execute_command calls.
9820
9821 2017-04-05  Pedro Alves  <palves@redhat.com>
9822
9823         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9824         static inline function.
9825         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9826         array and use gdb_PyArg_ParseTupleAndKeywords.
9827         * python/py-cmd.c (cmdpy_init): Likewise.
9828         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9829         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9830         (infpy_search_memory): Likewise.
9831         * python/py-objfile.c (objfpy_add_separate_debug_file)
9832         (gdbpy_lookup_objfile): Likewise.
9833         * python/py-symbol.c (gdbpy_lookup_symbol)
9834         (gdbpy_lookup_global_symbol): Likewise.
9835         * python/py-type.c (gdbpy_lookup_type): Likewise.
9836         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9837         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9838         Likewise.
9839
9840 2017-04-05  Pedro Alves  <palves@redhat.com>
9841
9842         * python/python-internal.h (gdb_PyGetSetDef): New type.
9843         * python/py-block.c (block_object_getset)
9844         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9845         * python/py-event.c (event_object_getset)
9846         (finish_breakpoint_object_getset): Likewise.
9847         * python/py-inferior.c (inferior_object_getset): Likewise.
9848         * python/py-infthread.c (thread_object_getset): Likewise.
9849         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9850         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9851         * python/py-objfile.c (objfile_getset): Likewise.
9852         * python/py-progspace.c (pspace_getset): Likewise.
9853         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9854         Likewise.
9855         * python/py-record.c (recpy_record_getset): Likewise.
9856         * python/py-symbol.c (symbol_object_getset): Likewise.
9857         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9858         Likewise.
9859         * python/py-type.c (type_object_getset, field_object_getset):
9860         Likewise.
9861         * python/py-value.c (value_object_getset): Likewise.
9862
9863 2017-04-05  Pedro Alves  <palves@redhat.com>
9864
9865         * python/python-internal.h (gdb_PyObject_CallMethod)
9866         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9867         New functions.
9868         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9869         (PySys_GetObject, PySys_SetPath): New macros.
9870
9871 2017-04-05  Pedro Alves  <palves@redhat.com>
9872
9873         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9874         info_osdata_command.
9875         * osdata.c (info_osdata_command): Rename to ...
9876         (info_osdata): ... this.  Constify 'type' parameter, and remove
9877         the 'from_tty' parameter.  Accept NULL TYPE.
9878         (info_osdata_command): New function.
9879         * osdata.h (info_osdata_command): Remove declaration.
9880         (info_osdata): New declaration.
9881
9882 2017-04-05  Pedro Alves  <palves@redhat.com>
9883
9884         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9885         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9886         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9887         parameter.
9888         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9889         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9890         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9891         parameter.
9892         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9893         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9894         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9895         (mi_cmd_file_list_exec_source_files)
9896         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9897         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9898         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9899         parameter.
9900         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9901         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9902         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9903         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9904         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9905         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9906         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9907         'command' parameter.
9908         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9909         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9910         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9911         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9912         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9913         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9914         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9915         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9916         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9917         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9918         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9919         parameter.
9920         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9921         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9922         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9923         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9924         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9925         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9926         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9927         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9928         (mi_cmd_data_list_changed_registers)
9929         (mi_cmd_data_write_register_values)
9930         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9931         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9932         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9933         (mi_cmd_list_features, mi_cmd_list_target_features)
9934         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9935         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9936         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9937         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9938         (mi_cmd_trace_frame_collected): Constify 'command'
9939         parameter.
9940         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9941         'command' parameter.
9942
9943 2017-04-05  Pedro Alves  <palves@redhat.com>
9944
9945         * ada-lang.c (ada_completer_word_break_characters): Now a const
9946         array.
9947         (ada_get_gdb_completer_word_break_characters): Constify.
9948         * completer.c (gdb_completer_command_word_break_characters)
9949         (gdb_completer_file_name_break_characters)
9950         (gdb_completer_quote_characters): Now const arrays.
9951         (get_gdb_completer_quote_characters): Constify.
9952         (set_rl_completer_word_break_characters): New function.
9953         (set_gdb_completion_word_break_characters)
9954         (complete_line_internal): Use it.
9955         * completer.h (get_gdb_completer_quote_characters): Constify.
9956         (set_rl_completer_word_break_characters): Declare.
9957         * f-lang.c (f_word_break_characters): Constify.
9958         * language.c (default_word_break_characters): Constify.
9959         * language.h (language_defn::la_word_break_characters): Constify.
9960         (default_word_break_characters): Constify.
9961         * top.c (init_main): Use set_rl_completer_word_break_characters.
9962
9963 2017-04-05  Pedro Alves  <palves@redhat.com>
9964
9965         * aix-thread.c (aix_thread_pid_to_str)
9966         (aix_thread_extra_thread_info): Constify.
9967         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9968         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9969         (bsd_uthread_pid_to_str): Constify.
9970         * corelow.c (core_pid_to_str): Constify.
9971         * darwin-nat.c (darwin_pid_to_str): Constify.
9972         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9973         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9974         Constify.
9975         * gnu-nat.c (gnu_pid_to_str): Constify.
9976         * go32-nat.c (go32_pid_to_str): Constify.
9977         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9978         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9979         * inferior.c (inferior_pid_to_str): Constify.
9980         * linux-nat.c (linux_nat_pid_to_str): Constify.
9981         * linux-tdep.c (linux_core_pid_to_str): Constify.
9982         * linux-thread-db.c (thread_db_pid_to_str)
9983         (thread_db_extra_thread_info): Constify.
9984         * nto-tdep.c (nto_extra_thread_info): Constify.
9985         * nto-tdep.h (nto_extra_thread_info): Constify.
9986         * obsd-nat.c (obsd_pid_to_str): Constify.
9987         * procfs.c (procfs_pid_to_str): Constify.
9988         * ravenscar-thread.c (ravenscar_extra_thread_info)
9989         (ravenscar_pid_to_str): Constify.
9990         * remote-sim.c (gdbsim_pid_to_str): Constify.
9991         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9992         Constify.
9993         * sol-thread.c (solaris_pid_to_str): Constify.
9994         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9995         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9996         * target.c (default_pid_to_str, target_pid_to_str)
9997         (normal_pid_to_str, default_pid_to_str): Constify.
9998         * target.h (target_ops::to_pid_to_str)
9999         (target_ops::to_extra_thread_info): Constify.
10000         (target_pid_to_str, normal_pid_to_str): Constify.
10001         * windows-nat.c (windows_pid_to_str): Constify.
10002         * gdbarch.sh (core_pid_to_str): Constify.
10003         * target-delegates.c: Regenerate.
10004         * gdbarch.h, gdbarch.c: Regenerate.
10005
10006 2017-04-05  Pedro Alves  <palves@redhat.com>
10007
10008         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10009         the memory of the temporary warning_pre_print override.
10010         * utils.c (warning_pre_print): Constify.
10011         * utils.h (warning_pre_print): Constify.
10012
10013 2017-04-05  Pedro Alves  <palves@redhat.com>
10014
10015         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10016         (shell_command): New function.
10017         (make_command): Use std::string.
10018         (init_cli_cmds): Register shell_command instead of shell_escape.
10019
10020 2017-04-05  Pedro Alves  <palves@redhat.com>
10021
10022         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10023         * tracepoint.c (default_collect): Don't initialize.
10024
10025 2017-04-05  Pedro Alves  <palves@redhat.com>
10026
10027         * macroexp.c (macro_buffer::shared): Now a bool.
10028         (init_buffer): Update.
10029         (init_shared_buffer): Constify 'addr' parameter.
10030         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10031         casts.
10032
10033 2017-04-05  Pedro Alves  <palves@redhat.com>
10034
10035         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10036         * disasm.c (set_disassembler_options): Constify local.
10037         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10038
10039 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10040
10041         PR gdb/21352
10042         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10043         option.
10044
10045 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10046
10047         * frame.c (frame_unwind_register_unsigned): Call
10048         frame_unwind_register_value.
10049
10050 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10051
10052         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10053         Use gdb_test_multiple, and don't match anchor.
10054
10055 2017-04-05  Pedro Alves  <palves@redhat.com>
10056
10057         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10058         (Write After Approval): Remove Simon Marchi.
10059
10060 2017-04-05  Pedro Alves  <palves@redhat.com>
10061
10062         * common/gdb_optional.h (optional::optional): Make constexpr and
10063         initialize m_dummy.
10064
10065 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10066
10067         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10068         (amd64fbsd_jmp_buf_reg_offset): Remove.
10069         (amd64fbsd_supply_uthread): Remove function.
10070         (amd64fbsd_collect_uthread): Remove function.
10071         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10072         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10073         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10074         (fbsd-nat.c): Update comment.
10075         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10076         (i386fbsd_jmp_buf_reg_offset): Remove.
10077         (i386fbsd_supply_uthread): Remove function.
10078         (i386fbsd_collect_uthread): Remove function.
10079         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10080
10081 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10082
10083         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10084         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10085         * NEWS: Mention that support for FreeBSD/alpha was removed.
10086         * alpha-fbsd-tdep.c: Delete file.
10087         * config/alpha/fbsd.mh: Delete file.
10088         * configure.host: Delete alpha*-*-freebsd* and
10089         alpha*-*-kfreebsd*-gnu.
10090         * configure.tgt: Delete alpha*-*-freebsd* and
10091         alpha*-*-kfreebsd*-gnu.
10092
10093 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10094
10095         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10096         amd64bsd_store_inferior_registers): Use ptid from regcache.
10097
10098 2017-04-04  Pedro Alves  <palves@redhat.com>
10099
10100         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10101         data fields, make them private and add "m_" prefixes.
10102         (lnp_state_machine::lnp_state_machine): New ctor.
10103         (record_line, check_line_address, handle_set_discriminator)
10104         (handle_set_address, handle_advance_pc, handle_special_opcode)
10105         (handle_advance_line, handle_set_file, handle_negate_stmt)
10106         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10107         (end_sequence, advance_line): New methods.
10108         (m_gdbarch, m_record_lines_p): New fields.
10109         (lnp_reader_state): Delete.
10110         (dwarf_record_line): Rename to ...
10111         (lnp_state_machine::record_line): ... adjust.
10112         (init_lnp_state_machine): Delete.
10113         (lnp_state_machine::lnp_state_machine): New.
10114         (check_line_address): Rename to ...
10115         (lnp_state_machine::check_line_address): This.
10116         (dwarf_decode_lines_1): Remove reference to "reader_state".
10117         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10118         State machine internal state manipulation moved to
10119         lnp_state_machine methods.
10120
10121 2017-04-04  Pedro Alves  <palves@redhat.com>
10122
10123         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10124         unittests/offset-type-selftests.c.
10125         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10126         * common/offset-type.h: New file.
10127         * common/preprocessor.h: New file.
10128         * common/traits.h: New file.
10129         * common/valid-expr.h: New file.
10130         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10131         sect_offset and cu_offset strong typedefs throughout.
10132         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10133         typedefs throughout.
10134         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10135         sect_offset and cu_offset strong typedefs throughout.
10136         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10137         typedefs throughout.
10138         * gdbtypes.h: Include "common/offset-type.h".
10139         (cu_offset): Now an offset type (strong typedef) instead of a
10140         struct.
10141         (sect_offset): Likewise.
10142         (union call_site_parameter_u): Rename "param_offset" field to
10143         "param_cu_off".
10144         * unittests/offset-type-selftests.c: New file.
10145
10146 2017-04-04  Pedro Alves  <palves@redhat.com>
10147
10148         * common/underlying.h: New file.
10149         * dwarf2read.c: Include "common/gdb_optional.h" and
10150         "common/underlying.h".
10151         (dir_index, file_name_index): New types.
10152         (file_entry): Use them.
10153         (file_entry::include): Use to_underlying.
10154         (line_header::add_file_name): Use dir_index.
10155         (read_formatted_entries): Use gdb::optional.  Read form before
10156         writting to file_entry.
10157         (dwarf_decode_line_header): Use dir_index.
10158         (lnp_state_machine::current_file): Use to_underlying.
10159         (lnp_state_machine::file): Change type to file_name_index.
10160         (dwarf_record_line): Use to_underlying.
10161         (init_lnp_state_machine): Use file_name_index.
10162         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10163
10164 2017-04-04  Pedro Alves  <palves@redhat.com>
10165
10166         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10167         operator bool, has_value and get methods.
10168
10169 2017-04-04  Pedro Alves  <palves@redhat.com>
10170
10171         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10172         fields.
10173         (line_header): Initialize all data fields.  Change type of
10174         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10175         Change type of include_dirs to std::vector<const char *>.  Remove
10176         num_include_dirs, include_dirs_size.  Change type of file_names to
10177         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10178         (line_header::line_header): New.
10179         (line_header::add_include_dir, line_header::add_file_name): New
10180         methods.
10181         (line_header::include_dir_at): Remove NULL check.
10182         (line_header::file_name_at): Add const overload.
10183         (line_header_up): New unique_ptr typedef.
10184         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10185         std::vector.  Remove free_line_header call.
10186         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10187         free_line_header call.
10188         (free_cu_line_header): Delete.
10189         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10190         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10191         Adjust to use std::vector.
10192         (free_line_header): Delete.
10193         (free_line_header_voidp): Use delete.
10194         (add_include_dir): Replace with ...
10195         (line_header::add_include_dir): ... this method.  Use std::vector.
10196         (add_file_name): Replace with ...
10197         (line_header::add_file_name): ... this method.  Use std::vector.
10198         (add_include_dir_stub): Delete.
10199         (read_formatted_entries): Remove memset.
10200         (dwarf_decode_line_header): Return a line_header_up instead of a
10201         raw pointer.  Remove cleanup handling.  Pass lambdas to
10202         read_formatted_entries.  Adjust to use line_header methods.
10203         (dwarf_decode_lines_1): Adjust to use line_header methods.
10204         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10205         use std::vector.
10206
10207 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10208
10209         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10210         instead of struct ptid.
10211
10212 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10213
10214         * frame.c (get_frame_register_bytes): Unwind using value.
10215         (put_frame_register_bytes): Likewise.
10216
10217 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10218
10219         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10220         aggregate-like.
10221
10222 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10223
10224         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10225
10226 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10227
10228         * gdbthread.h (struct thread_info): Declare constructor and
10229         destructor.  Add some in-class member initializers.
10230         * thread.c (free_thread): Remove.
10231         (init_thread_list): Call delete instead of free_thread.
10232         (new_thread): Call thread_info constructor.
10233         (thread_info::thread_info): New function.
10234         (thread_info::~thread_info): New function.
10235         (delete_thread_1): Call delete instead of free_thread.
10236         (make_cleanup_restore_current_thread): Move tp and frame to
10237         inner block.
10238
10239 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10240
10241         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10242         (arc_skip_prologue): Likewise.
10243         (arc_make_frame_cache): Likewise.
10244         (arc_pv_get_operand): New function.
10245         (arc_is_in_prologue): Likewise.
10246         (arc_analyze_prologue): Likewise.
10247         (arc_print_frame_cache): Likewise.
10248         (MAX_PROLOGUE_LENGTH): New constant.
10249
10250 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10251
10252         * configure.tgt: Add arc-insn.o.
10253         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10254         (dump_arc_instruction_command): New function.
10255         (arc_fprintf_disasm): Likewise.
10256         (arc_disassemble_info): Likewise.
10257         (arc_insn_get_operand_value): Likewise.
10258         (arc_insn_get_operand_value_signed): Likewise.
10259         (arc_insn_get_memory_base_reg): Likewise.
10260         (arc_insn_get_memory_offset): Likewise.
10261         (arc_insn_get_branch_target): Likewise.
10262         (arc_insn_dump): Likewise.
10263         (arc_insn_get_linear_next_pc): Likewise.
10264         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10265         (arc_disassemble_info): Likewise.
10266         (arc_insn_get_branch_target): Likewise.
10267         (arc_insn_get_linear_next_pc): Likewise.
10268         * NEWS: Mention new "maint print arc arc-instruction".
10269
10270 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10271
10272         * arc-tdep (maintenance_print_arc_list): New variable.
10273         (maintenance_print_arc_command): New function.
10274
10275 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10276
10277         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10278         Add "limm" and "reserved".
10279         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10280         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10281         * arc-tdep.h (arc_regnum): Likewise.
10282
10283 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10284
10285         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10286         for THREADPTR register.
10287         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10288         register.
10289         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10290         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10291         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10292
10293 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10294
10295         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10296         registers above gdbarch_num_regs (gdbarch) as privileged in
10297         call0 ABI.
10298
10299 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10300
10301         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10302         for a single specified register or for all registers in
10303         a0_base..a0_base + C0_NREGS range.
10304         (supply_gregset_reg): Call regcache_raw_supply for a single
10305         specified register or for all registers in a0_base..a0_base +
10306         C0_NREGS range.
10307
10308 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10309
10310         * arch/xtensa.h (C0_NREGS): Add definition.
10311         * xtensa-tdep.c (C0_NREGS): Remove definition.
10312
10313 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10314
10315         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10316         Drop xtensa_default_isa initialization.
10317         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10318
10319 2017-03-27  Pedro Alves  <palves@redhat.com>
10320
10321         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10322         (file_entry::include_dir): New method.
10323         (line_header::include_dir_at, line_header::file_name_at): New
10324         methods.
10325         (setup_type_unit_groups, setup_type_unit_groups)
10326         (psymtab_include_file_name): Simplify using the new methods.
10327         (lnp_state_machine) <the_line_header>: New field.
10328         <file>: Add comment.
10329         (lnp_state_machine::current_file): New method.
10330         (dwarf_record_line): Simplify using the new methods.
10331         (init_lnp_state_machine): Initialize the "the_line_header" field.
10332         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10333         Simplify using the new methods.
10334
10335 2017-03-27  Pedro Alves  <palves@redhat.com>
10336
10337         * cp-name-parser.y (make_empty): Delete.
10338         (demangler_special, nested_name, ptr_operator, array_indicator)
10339         (direct_declarator, declarator_1): Use fill_comp instead of
10340         make_empty.
10341
10342 2017-03-27  Pedro Alves  <palves@redhat.com>
10343
10344         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10345         to ATTRIBUTE_PRINTF.
10346         * solib-target.c (library_list_start_list): Print "string" not
10347         "version".
10348         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10349         gdb_xml_error call.
10350
10351 2017-03-27  Pedro Alves  <palves@redhat.com>
10352
10353         * dwarf2read.c (struct file_and_directory): New.
10354         (dwarf2_get_dwz_file): Adjust to use std::string.
10355         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10356         (find_file_and_directory): Adjust to return a file_and_directory
10357         object.
10358         (read_file_scope): Adjust to use file_and_directory.  Remove
10359         make_cleanup/do_cleanups calls.
10360         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10361         make_cleanup/do_cleanups calls.
10362         * python/python.c (do_start_initialization): Adjust to ldirname
10363         returning a std::string.
10364         * utils.c (ldirname): Now returns a std::string.
10365         * utils.h (ldirname): Change return type to std::string.
10366         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10367         returning a std::string.
10368         * xml-tdesc.c (file_read_description_xml): Likewise.
10369
10370 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10371
10372         * regcache.c (regcache_debug_print_register): New function.
10373         * regcache.h (regcache_debug_print_register): New declaration.
10374         * target.c (debug_print_register): Remove.
10375         (target_fetch_registers): Call regcache_debug_print_register.
10376         (target_store_registers): Likewise.
10377
10378 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10379
10380         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10381         reference beyond the 'lh->include_dirs' array before accessing to
10382         it.
10383         (psymtab_include_file_name): Likewise.
10384         (dwarf_decode_lines_1): Likewise.
10385         (dwarf_decode_lines): Likewise.
10386         (file_file_name): Likewise.
10387
10388 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10389
10390         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10391         inferior_ptid.
10392         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10393         ps_lsetfpregs): Likewise.
10394         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10395         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10396         ps_lsetfpregs): Likewise.
10397         * target.c (target_fetch_registers, target_store_registers):
10398         Remove asserts.
10399
10400 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10401
10402         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10403
10404 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10405
10406         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10407         (_initialize_aarch64_tdep): Register it.
10408         (aarch64_record_load_store): Handle PRFM instruction.
10409         (aarch64_process_record_test): New function.
10410
10411 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10412
10413         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10414         indentation.
10415
10416 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10417
10418         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10419
10420 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10421
10422         python/python.c (do_start_initialization): Fix memory leak.
10423
10424 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10425
10426         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10427         using get_ptrace_pid.
10428         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10429         inferior_ptid.
10430         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10431         inferior_ptid instead of pid.
10432
10433 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10434
10435         * aarch64-tdep.c: Wrap locally used classes in anonymous
10436         namespace.
10437         * arm-tdep.c: Likewise.
10438         * linespec.c: Likewise.
10439         * ui-out.c: Likewise.
10440
10441 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10442
10443         PR gdb/19637
10444         * python/lib/gdb/printer/bound_registers.py: Import sys.
10445
10446 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10447
10448         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10449         windows_thread_info parameter and use it instead of
10450         current_thread.
10451         (windows_fetch_inferior_registers): Don't set current_thread,
10452         pass the thread to do_windows_fetch_inferior_registers.  Use
10453         ptid from regcache instead of inferior_ptid.
10454         (do_windows_store_inferior_registers): Add windows_thread_info
10455         parameter and use it instead of current_thread.
10456         (windows_store_inferior_registers): Don't set current_thread,
10457         pass the thread to do_windows_store_inferior_registers.  Use
10458         ptid from regcache instead of inferior_ptid.
10459
10460 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10461
10462         * ser-mingw.c (ser_windows_raw): Remove reference to
10463         struct serial::current_timeout.
10464
10465 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10466
10467         PR tdep/20928
10468         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10469         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10470         (sparc64_fsr_type): Fix %fsr decoding.
10471
10472 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10473
10474         * python/py-record-btrace.c (btpy_insn_data): Change return type
10475         for Python 2.
10476
10477 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10478
10479         * spu-linux-nat.c (spu_fetch_inferior_registers,
10480         spu_store_inferior_registers): Use ptid from regcache, set and
10481         restore inferior_ptid.
10482         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10483         Likewise.
10484
10485 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10486
10487         * i386-linux-nat.c (fetch_register, store_register,
10488         i386_linux_fetch_inferior_registers,
10489         i386_linux_store_inferior_registers): Use ptid from regcache.
10490         * ia64-linux-nat.c (ia64_linux_fetch_register,
10491         ia64_linux_store_register): Likewise.
10492         * inf-ptrace.c (inf_ptrace_fetch_register,
10493         inf_ptrace_store_register): Likewise.
10494         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10495         m32r_linux_store_inferior_registers): Likewise.
10496         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10497         m68kbsd_store_inferior_registers): Likewise.
10498         * m68k-linux-nat.c (fetch_register, store_register,
10499         m68k_linux_fetch_inferior_registers,
10500         m68k_linux_store_inferior_registers): Likewise.
10501         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10502         m88kbsd_store_inferior_registers): Likewise.
10503         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10504         mips_fbsd_store_inferior_registers): Likewise.
10505         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10506         mips64_linux_regsets_store_registers): Likewise.
10507         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10508         mipsnbsd_store_inferior_registers): Likewise.
10509         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10510         mips64obsd_store_inferior_registers): Likewise.
10511         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10512         Likewise.
10513         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10514         ppcfbsd_store_inferior_registers): Likewise.
10515         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10516         ppc_linux_store_inferior_registers): Likewise.
10517         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10518         ppcnbsd_store_inferior_registers): Likewise.
10519         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10520         ppcobsd_store_registers): Likewise.
10521         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10522         Likewise.
10523         * ravenscar-thread.c (ravenscar_fetch_registers,
10524         ravenscar_store_registers, ravenscar_prepare_to_store):
10525         Likewise.
10526         * record-btrace.c (record_btrace_fetch_registers,
10527         record_btrace_store_registers, record_btrace_prepare_to_store):
10528         Likewise.
10529         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10530         Lookup inferior using ptid from regcache, instead of
10531         current_inferior.
10532         * remote.c (remote_fetch_registers, remote_store_registers): Use
10533         ptid from regcache.
10534         * rs6000-nat.c (fetch_register, store_register): Likewise.
10535         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10536         s390_linux_store_inferior_registers): Likewise.
10537         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10538         shnbsd_store_inferior_registers): Likewise.
10539         * sol-thread.c (sol_thread_fetch_registers,
10540         sol_thread_store_registers): Likewise.
10541         * sparc-nat.c (sparc_fetch_inferior_registers,
10542         sparc_store_inferior_registers): Likewise.
10543         * tilegx-linux-nat.c (fetch_inferior_registers,
10544         store_inferior_registers): Likewise.
10545         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10546         vaxbsd_store_inferior_registers): Likewise.
10547         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10548         store_xtregs): Likewise.
10549
10550 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10551
10552         PR gdb/14441
10553         * NEWS: Mention support for rvalue references in GDB and python.
10554         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10555         supports both lvalue and rvalue references.
10556
10557 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10558
10559         PR gdb/14441
10560         * gdbtypes.c (rank_one_type): Implement overloading
10561         resolution rules regarding rvalue references.
10562
10563 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10564
10565         PR gdb/14441
10566         * aarch64-tdep.c (aarch64_type_align)
10567         (aarch64_extract_return_value, aarch64_store_return_value): Change
10568         lvalue reference type checks to general reference type checks.
10569         * amd64-tdep.c (amd64_classify): Likewise.
10570         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10571         Likewise.
10572         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10573         (arm_store_return_value): Likewise.
10574         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10575         * c-typeprint.c (c_print_type): Likewise.
10576         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10577         (cplus_number_of_children, cplus_describe_child): Likewise.
10578         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10579         * completer.c (expression_completer): Likewise.
10580         * cp-support.c (make_symbol_overload_list_adl_namespace):
10581         Likewise.
10582         * darwin-nat-info.c (info_mach_region_command): Likewise.
10583         * dwarf2loc.c (entry_data_value_coerce_ref)
10584         (value_of_dwarf_reg_entry): Likewise.
10585         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10586         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10587         Likewise.
10588         * findvar.c (extract_typed_address, store_typed_address):
10589         Likewise.
10590         * gdbtypes.c (rank_one_type): Likewise.
10591         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10592         * infcall.c (value_arg_coerce): Likewise.
10593         * language.c (pointer_type): Likewise.
10594         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10595         Likewise.
10596         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10597         * mn10300-tdep.c (mn10300_type_align): Likewise.
10598         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10599         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10600         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10601         Likewise.
10602         * printcmd.c (print_formatted, x_command): Likewise.
10603         * python/py-type.c (typy_get_composite, typy_template_argument):
10604         Likewise.
10605         * python/py-value.c (valpy_referenced_value)
10606         (valpy_get_dynamic_type, value_has_field): Likewise.
10607         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10608         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10609         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10610         * spu-tdep.c (spu_scalar_value_p): Likewise.
10611         * symtab.c (lookup_symbol_aux): Likewise.
10612         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10613         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10614         Likewise.
10615         * valops.c (value_cast_pointers, value_cast)
10616         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10617         (value_struct_elt, value_struct_elt_bitpos)
10618         (value_find_oload_method_list, find_overload_match)
10619         (value_rtti_indirect_type): Likewise.
10620         * valprint.c (val_print_scalar_type_p, generic_val_print):
10621         Likewise.
10622         * value.c (value_actual_type, value_as_address, unpack_long)
10623         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10624         (coerce_ref): Likewise.
10625         * varobj.c (varobj_get_value_type): Likewise.
10626
10627 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10628
10629         PR gdb/14441
10630         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10631         table of constants.
10632         * python/lib/gdb/command/explore.py: Support exploring values
10633         of rvalue reference types.
10634         * python/lib/gdb/types.py: Implement get_basic_type() for
10635         rvalue reference types.
10636         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10637         constant.
10638         * python/py-value.c (valpy_getitem): Add an rvalue reference
10639         check.
10640         (valpy_reference_value): Add new parameter "refcode".
10641         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10642         New wrappers for valpy_reference_value().
10643         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10644         (gdbpy_invoke_xmethod): Likewise.
10645
10646 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10647
10648         PR gdb/14441
10649         * dwarf2read.c (process_die, read_type_die_1): Handle the
10650         DW_TAG_rvalue_reference_type DIE.
10651         (read_tag_reference_type): Add new parameter "refcode".
10652
10653 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10654
10655         PR gdb/14441
10656         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10657         (c_type_print_modifier, c_type_print_varspec_suffix)
10658         (c_type_print_base): Support printing rvalue reference types.
10659         * c-valprint.c (c_val_print, c_value_print): Support printing
10660         rvalue reference values.
10661
10662 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10663
10664         PR gdb/14441
10665         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10666         typename.
10667         * cp-support.c (replace_typedefs): Handle
10668         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10669         * python/py-type.c (typy_lookup_type): Likewise.
10670
10671 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10672
10673         PR gdb/14441
10674         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10675         * parse.c (insert_type): Change assert statement.
10676         (follow_types): Handle rvalue reference types.
10677         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10678         constant.
10679
10680 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10681
10682         PR gdb/14441
10683         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10684         value_ref() interface.
10685         * c-valprint.c (c_value_print): Likewise.
10686         * infcall.c (value_arg_coerce): Likewise.
10687         * python/py-value.c (valpy_reference_value): Likewise.
10688         * valops.c (value_cast, value_reinterpret_cast)
10689         (value_dynamic_cast, typecmp): Likewise.
10690         (value_ref): Parameterize by kind of return value reference type.
10691         * value.h (value_ref): Add new parameter "refcode".
10692
10693 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10694
10695         PR gdb/14441
10696         * dwarf2read.c (read_tag_reference_type): Use
10697         lookup_lvalue_reference_type() instead of lookup_reference_type().
10698         * eval.c (evaluate_subexp_standard): Likewise.
10699         * f-exp.y: Likewise.
10700         * gdbtypes.c (make_reference_type, lookup_reference_type):
10701         Generalize with rvalue reference types.
10702         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10703         convenience wrappers for lookup_reference_type().
10704         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10705         reference kind parameter.
10706         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10707         wrappers for lookup_reference_type().
10708         * guile/scm-type.c (gdbscm_type_reference): Use
10709         lookup_lvalue_reference_type() instead of lookup_reference_type().
10710         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10711         * parse.c (follow_types): Likewise.
10712         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10713         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10714         Likewise.
10715         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10716         (gdbpy_invoke_xmethod): Likewise.
10717         * stabsread.c: Provide extra argument to make_reference_type()
10718         call.
10719         * valops.c (value_ref, value_rtti_indirect_type): Use
10720         lookup_lvalue_reference_type() instead of lookup_reference_type().
10721
10722 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10723
10724         PR gdb/14441
10725         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10726         (TYPE_IS_REFERENCE): New macro.
10727         (struct type): Add rvalue_reference_type field.
10728         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10729
10730 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10731
10732         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10733         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10734         New function definition.
10735         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10736         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10737         New function declaration.
10738         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10739         * mi/mi-interp.h: New file.
10740         * solib.c (info_sharedlibrary_command): Replace for loop with
10741         ALL_SO_LIBS macro
10742         * solib.h (update_solib_list): New function declaration.
10743         (so_list_head): Move macro.
10744         * solist.h (ALL_SO_LIBS): New macro.
10745
10746 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10747
10748         * infcmd.c (post_create_inferior): Remove unused argument in
10749         call to solib_add.
10750         * remote.c (remote_start_remote): Likewise.
10751         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10752         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10753         (enable_break): Likewise.
10754         * solib.c (update_solib_list): Remove unused target argument
10755         and its documentation.
10756         (solib_add): Remove unused target argument.  Remove unused
10757         argument in call to update_solib_list.
10758         (info_sharedlibrary_command): Remove unused argument in call
10759         to update_solib_list.
10760         (sharedlibrary_command): Remove unused argument in call to
10761         solib_add.
10762         (handle_solib_event): Likewise.
10763         (reload_shared_libraries): Likewise.
10764         * solib.h (solib_add): Remove unused target argument.
10765
10766 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10767
10768         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10769         (s390_displaced_step_fixup): Cover relative branches with the
10770         default fixup handling.  This fixes lack of support for some
10771         relative branch instructions.
10772
10773 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10774
10775         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10776         ptid from regcache.
10777
10778 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10779
10780         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10781         i386_darwin_store_inferior_registers): Use ptid from regcache.
10782
10783 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10784
10785         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10786         i386bsd_store_inferior_registers): Use ptid from regcache.
10787
10788 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10789
10790         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10791         hppaobsd_store_registers): Use ptid from regcache.
10792
10793 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10794
10795         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10796         hppanbsd_store_registers): Use ptid from regcache.
10797
10798 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10799
10800         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10801         from regcache.  Use get_ptrace_pid.
10802
10803 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10804
10805         * corelow.c (get_core_register_section): Use ptid from regcache,
10806         update doc.
10807
10808 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10809
10810         * bsd-uthread.c (bsd_uthread_fetch_registers,
10811         bsd_uthread_store_registers): Use ptid from regcache, set and
10812         restore inferior_ptid.
10813
10814 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10815
10816         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10817         fetch_fp_regs, store_register, store_regs, store_fp_register,
10818         store_fp_regs): Use ptid from regcache.
10819
10820 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10821
10822         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10823         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10824         store_vfp_regs): Use ptid from regcache.
10825
10826 2017-03-17  Pedro Alves  <palves@redhat.com>
10827
10828         PR remote/21188
10829         * ser-base.c (ser_base_wait_for): Add comment.
10830         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10831         version.
10832         * ser-unix.c (hardwire_raw): Remove reference to
10833         scb->current_timeout.
10834         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10835         (hardwire_ops): Install ser_base_readchar instead of
10836         hardwire_readchar.
10837         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10838         Remove fields.
10839
10840 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10841
10842         PR gdb/19637
10843         * python/lib/gdb/printer/bound_registers.py: Add support for
10844         Python 3.
10845
10846 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10847
10848         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10849         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10850         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10851         byte_offset to subobj_byte_offset.  Fix the handling of
10852         DWARF_VALUE_STACK on big-endian targets when coming via an
10853         implicit pointer.
10854         (dwarf2_evaluate_loc_desc): Adjust call to
10855         dwarf2_evaluate_loc_desc_full.
10856         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10857         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10858
10859 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10860
10861         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10862         and REVSH instructions.
10863
10864 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10865
10866         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10867         (arm_record_test): Declare.
10868         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10869         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10870         align with the manual.
10871         (thumb_record_misc): Adjust the code order to align with the
10872         manual.
10873         (thumb2_record_decode_insn_handler): Fix instruction matching.
10874         (instruction_reader_thumb): New class.
10875         (arm_record_test): New function.
10876
10877 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10878
10879         * arm-tdep.c (abstract_memory_reader): New class.
10880         (instruction_reader): New class.
10881         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10882         (decode_insn): Likewise.
10883
10884 2017-03-16  Doug Evans  <dje@google.com>
10885
10886         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10887         member.  Change type of TYPE member to SCM.  All uses updated.
10888         (lsscm_make_lazy_string_smob): Add assert.
10889         (lsscm_make_lazy_string): Flag bad length values.
10890         (lsscm_elt_type): New function.
10891         (gdbscm_lazy_string_to_value): Rewrite to use
10892         lsscm_safe_lazy_string_to_value.
10893         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10894         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10895         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10896         in incoming type.
10897         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10898         * guile/scm-type.c (tyscm_scm_to_type): New function.
10899
10900 2017-03-15  Doug Evans  <dje@google.com>
10901
10902         PR python/17728, python/18439, python/18779
10903         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10904         member.  Change type of TYPE member to PyObject *.  All uses updated.
10905         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10906         (gdbpy_create_lazy_string_object): Flag bad length values.
10907         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10908         Handle typedefs in incoming type.
10909         (stpy_lazy_string_elt_type): New function.
10910         (gdbpy_extract_lazy_string): Call it.
10911         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10912         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10913         typedefs in incoming type.
10914
10915 2017-03-16  Doug Evans  <dje@google.com>
10916
10917         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10918         * guile/scm-type.c (tyscm_scm_to_type): New function.
10919
10920 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10921
10922         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10923         "ULONGEST" for "skip".
10924
10925 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10926
10927         PR gdb/21220
10928         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10929         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10930         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10931         over ptrace peek/poke until end of buffer or error.
10932
10933 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10934
10935         * parse.c (length_of_subexp): Make static.
10936         * parser-defs.h (length_of_subexp): Remove.
10937
10938 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10939
10940         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10941         as well.
10942
10943 2017-03-14  Pedro Alves  <palves@redhat.com>
10944
10945         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10946         (main): Use std::unique_ptr.  Remove calls to
10947         cp_demangled_name_parse_free.
10948
10949 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10950
10951         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10952         alphabsd_store_inferior_registers): Use regcache->ptid instead
10953         of inferior_ptid.
10954
10955 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10956
10957         * aix-thread.c (aix_thread_fetch_registers,
10958         aix_thread_store_registers): Use regcache->ptid instead of
10959         inferior_ptid.
10960
10961 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10962
10963         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10964         store_gregs_to_thread, fetch_fpregs_from_thread,
10965         store_fpregs_to_thread): Use regcache->ptid instead of
10966         inferior_ptid.
10967
10968 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10969
10970         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10971         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10972         instead of inferior_ptid.
10973
10974 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10975
10976         * target.c (target_fetch_registers, target_store_registers): Add
10977         assert.
10978
10979 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10980
10981         * regcache.h (regcache_get_ptid): New function.
10982         * regcache.c (regcache_get_ptid): New function.
10983
10984 2017-03-13  Mark Wielaard  <mark@klomp.org>
10985
10986         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10987
10988 2017-03-10  Keith Seitz  <keiths@redhat.com>
10989
10990         PR c++/8218
10991         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10992
10993 2017-03-08  Pedro Alves  <palves@redhat.com>
10994
10995         PR gdb/18360
10996         * infrun.c (start_step_over, do_target_resume, resume)
10997         (restart_threads): Assert we're not resuming a thread that is
10998         meant to be stopped.
10999         (infrun_thread_stop_requested_callback): Delete.
11000         (infrun_thread_stop_requested): If the thread is internally
11001         stopped, queue a pending stop event and clear the thread's
11002         inline-frame state.
11003         (handle_stop_requested): New function.
11004         (handle_syscall_event, handle_inferior_event_1): Use
11005         handle_stop_requested.
11006         (handle_stop_requested): New function.
11007         (handle_signal_stop): Set the thread's stop_signal here instead of
11008         at caller.
11009         (finish_step_over): Clear step over info unconditionally.
11010         (handle_signal_stop): If the user had interrupted the event
11011         thread, consider the stop a random signal.
11012         (handle_signal_stop) <signal arrived while stepping over
11013         breakpoint>: Don't restart threads here.
11014         (stop_waiting): Don't clear step-over info here.
11015
11016 2017-03-08  Pedro Alves  <palves@redhat.com>
11017
11018         PR 21206
11019         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11020         goes to argument 2, not 1.
11021
11022 2017-03-08  Pedro Alves  <palves@redhat.com>
11023
11024         PR cli/21218
11025         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11026         display_gdb_prompt.
11027         (command_line_input): Add comment.
11028
11029 2017-03-08  Pedro Alves  <palves@redhat.com>
11030
11031         PR tui/21216
11032         * tui/tui-file.c (tui_file::write): New.
11033         * tui/tui-file.h (tui_file): Override "write".
11034         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11035         factored out from ...
11036         (tui_puts): ... here.
11037         (tui_putc): Use them.
11038         (tui_write): New function.
11039         * tui/tui-io.h (tui_write): Declare.
11040
11041 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11042
11043         * Makefile.in (SFILES): Replace "environ.c" with
11044         "common/environ.c".
11045         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11046         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11047         to...
11048         * common/environ.c: ... here.
11049         * environ.h: Moved to...
11050         * common/environ.h: ... here.
11051
11052 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11053
11054         * gdbarch.sh (pstring_ptr): New static function.
11055         (gdbarch_disassembler_options): Use it.
11056         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11057         not valid_disassembler_option->name.
11058         * gdbarch.c: Regenerate.
11059
11060 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11061
11062         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11063
11064 2017-03-07  Pedro Alves  <palves@redhat.com>
11065
11066         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11067
11068 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11069
11070         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11071         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11072         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11073         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11074
11075 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11076
11077         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11078
11079 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11080
11081         * remote.c (remote_add_target_side_commands): Use range-based
11082         for loop.
11083
11084 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11085
11086         PR gdb/21165
11087         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11088         value is lazy.
11089         * valprint.c (common_val_print): Likewise.
11090
11091 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11092
11093         * NEWS: Mention new set/show disassembler-options commands.
11094         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11095         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11096         (prospective_options): New static variable.
11097         (gdb_disassembler::gdb_disassembler): Initialize
11098         m_di.disassembler_options.
11099         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11100         (get_disassembler_options): New function.
11101         (set_disassembler_options): Likewise.
11102         (set_disassembler_options_sfunc): Likewise.
11103         (show_disassembler_options_sfunc): Likewise.
11104         (disassembler_options_completer): Likewise.
11105         (_initialize_disasm): Likewise.
11106         * disasm.h (get_disassembler_options): New prototype.
11107         (set_disassembler_options): Likewise.
11108         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11109         (gdbarch_verify_disassembler_options): Likewise.
11110         * gdbarch.c: Regenerate.
11111         * gdbarch.h: Likewise.
11112         * arm-tdep.c (num_disassembly_options): Delete.
11113         (set_disassembly_style): Likewise.
11114         (arm_disassembler_options): New static variable.
11115         (set_disassembly_style_sfunc): Convert short style name into long
11116         option name.  Call set_disassembler_options.
11117         (show_disassembly_style_sfunc): New function.
11118         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11119         set_gdbarch_verify_disassembler_options.
11120         (_initialize_arm_tdep): Delete regnames variable and update callers.
11121         (arm_disassembler_options): Initialize.
11122         (disasm_options): New variable.
11123         (num_disassembly_options): Rename from this...
11124         (num_disassembly_styles): ...to this.  Compute by scanning through
11125         disasm_options.
11126         (valid_disassembly_styles): Initialize using disasm_options.
11127         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11128         set_arm_regname_option.
11129         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11130         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11131         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11132         set_gdbarch_verify_disassembler_options.
11133         * s390-tdep.c (s390_disassembler_options): New static variable.
11134         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11135         set_gdbarch_verify_disassembler_options.
11136
11137 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11138
11139         * remote.c (remote_add_target_side_condition): Remove "struct"
11140         keyword from range-based for loop.
11141
11142 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11143
11144         * remote.c (remote_add_target_side_condition): Use range-based
11145         for loop.  Update comment.
11146
11147 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11148
11149         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11150
11151 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11152
11153         * regcache.c (regcache_raw_update): New function.
11154         (regcache_raw_read): Move code to regcache_raw_update.
11155         * regcache.h (regcache_raw_update): New declaration.
11156         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11157
11158 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11159
11160         * dwarf2read.c (create_debug_type_hash_table): Initialize
11161         header.signature and header.type_offset_in_tu.
11162
11163 2017-02-24  Pedro Alves  <palves@redhat.com>
11164
11165         * symtab.c (make_file_symbol_completion_list_1): Use
11166         add_symtab_completions.
11167
11168 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11169
11170         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11171
11172 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11173
11174         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11175         I386_MAX_REGISTER_SIZE.
11176         (i386_pseudo_register_write): Likewise.
11177         (i386_process_record): Likewise.
11178         * i387-tdep.c (i387_supply_xsave): Likewise.
11179         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11180         (store_register): Likewise.
11181
11182 2017-02-23  Pedro Alves  <palves@redhat.com>
11183
11184         * ada-lang.c: Include "common/function-view.h".
11185         (ada_iterate_over_symbols): Adjust to use function_view as
11186         callback type.
11187         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11188         (ada_make_symbol_completion_list): Use a lambda.
11189         (ada_exc_search_name_matches): Delete.
11190         (name_matches_regex): New.
11191         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11192         * compile/compile-c-support.c: Include "common/function-view.h".
11193         (print_one_macro): Change prototype to accept a ui_file pointer.
11194         (write_macro_definitions): Use a lambda.
11195         * dwarf2read.c: Include "common/function-view.h".
11196         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11197         (dw2_expand_symtabs_matching): Adjust to use function_view as
11198         callback type.
11199         * language.h: Include "common/function-view.h".
11200         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11201         function_view as callback type.
11202         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11203         * linespec.c: Include "common/function-view.h".
11204         (collect_info::add_symbol): New method.
11205         (struct symbol_and_data_callback, iterate_inline_only, struct
11206         symbol_matcher_data, iterate_name_matcher): Delete.
11207         (iterate_over_all_matching_symtabs): Adjust to use function_view
11208         as callback type and lambdas.
11209         (iterate_over_file_blocks): Adjust to use function_view as
11210         callback type.
11211         (decode_compound_collector): Now a class with private fields.
11212         (decode_compound_collector::release_symbols): New method.
11213         (collect_one_symbol): Rename to...
11214         (decode_compound_collector::operator()): ... this and adjust.
11215         (lookup_prefix_sym): decode_compound_collector construction bits
11216         move to decode_compound_collector ctor.  Pass the
11217         decode_compound_collector object directly as callback.  Remove
11218         cleanups and use decode_compound_collector::release_symbols
11219         instead.
11220         (symtab_collector): Now a class with private fields.
11221         (symtab_collector::release_symtabs): New method.
11222         (add_symtabs_to_list): Rename to...
11223         (symtab_collector::operator()): ... this and adjust.
11224         (collect_symtabs_from_filename): symtab_collector construction
11225         bits move to symtab_collector ctor.  Pass the symtab_collector
11226         object directly as callback.  Remove cleanups and use
11227         symtab_collector::release_symtabs instead.
11228         (collect_symbols): Delete.
11229         (add_matching_symbols_to_info): Use lambdas.
11230         * macrocmd.c (print_macro_callback): Delete.
11231         (info_macro_command): Use a lambda.
11232         (info_macros_command): Pass print_macro_definition as callable
11233         directly.
11234         (print_one_macro): Remove 'ignore' parameter.
11235         (macro_list_command): Adjust.
11236         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11237         (macro_for_each_data::user_data): Delete field.
11238         (foreach_macro): Adjust to call the function_view.
11239         (macro_for_each): Adjust to use function_view as callback type.
11240         (foreach_macro_in_scope): Adjust to call the function_view.
11241         (macro_for_each_in_scope): Adjust to use function_view as callback
11242         type.
11243         * macrotab.h: Include "common/function-view.h".
11244         (macro_callback_fn): Declare a prototype instead of a pointer.
11245         Remove "user_data" parameter.
11246         (macro_for_each, macro_for_each_in_scope): Adjust to use
11247         function_view as callback type.
11248         * psymtab.c (partial_map_expand_apply)
11249         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11250         Adjust to use function_view as callback type and to return bool.
11251         (psym_expand_symtabs_matching): Adjust to use function_view as
11252         callback types.
11253         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11254         to use function_view as callback type and to return bool.
11255         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11256         callback types.
11257         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11258         as callback types.
11259         * symfile.h: Include "common/function-view.h".
11260         (expand_symtabs_file_matcher_ftype)
11261         (expand_symtabs_symbol_matcher_ftype)
11262         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11263         return bool.
11264         (quick_symbol_functions::map_symtabs_matching_filename)
11265         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11266         function_view as callback type and return bool.
11267         (expand_symtabs_matching): Adjust to use function_view as callback
11268         type.
11269         (maintenance_expand_name_matcher)
11270         (maintenance_expand_file_matcher): Delete.
11271         (maintenance_expand_symtabs): Use lambdas.
11272         * symtab.c (iterate_over_some_symtabs): Adjust to use
11273         function_view as callback types and return bool.
11274         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11275         of a cleanup.
11276         (lookup_symtab_callback): Delete.
11277         (lookup_symtab): Use a lambda.
11278         (iterate_over_symbols): Adjust to use function_view as callback
11279         type.
11280         (struct search_symbols_data, search_symbols_file_matches)
11281         (search_symbols_name_matches): Delete.
11282         (search_symbols): Use a pair of lambdas.
11283         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11284         (symtab_expansion_callback): Delete.
11285         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11286         * symtab.h: Include "common/function-view.h".
11287         (iterate_over_some_symtabs): Adjust to use function_view as
11288         callback type and return bool.
11289         (iterate_over_symtabs): Adjust to use function_view as callback
11290         type.
11291         (symbol_found_callback_ftype): Remove 'data' parameter and return
11292         bool.
11293         (iterate_over_symbols): Adjust to use function_view as callback
11294         type.
11295
11296 2017-02-23  Pedro Alves  <palves@redhat.com>
11297
11298         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11299         (%.o) <unittests/%.c>: New pattern.
11300         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11301         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11302         * common/function-view.h: New file.
11303         * unittests/function-view-selftests.c: New file.
11304         * configure: Regenerate.
11305
11306 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11307
11308         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11309         inferior_ptid.
11310         * go32-nat.c (go32_thread_alive): Likewise.
11311
11312 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11313
11314         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11315         delete.
11316
11317 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11318
11319         * varobj.c (varobj_clear_saved_item): Use delete instead of
11320         xfree.
11321         (update_dynamic_varobj_children): Likewise.
11322
11323 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11324
11325         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11326
11327 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11328
11329         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11330         m_enum_value to 0 in default constructor.
11331
11332 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11333
11334         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11335         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11336         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11337         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11338         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11339         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11340         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11341         IS_STORE_CONDITIONAL_INSN.
11342
11343 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11344
11345         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11346
11347 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11348
11349         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11350
11351 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11352
11353         * dwarf2read.c (skip_one_die, read_attribute_value)
11354         (dwarf2_const_value_attr, dump_die_shallow)
11355         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11356         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11357
11358 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11359
11360         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11361         (dwarf_parse_macro_header): Accept DWARF version 5.
11362         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11363
11364 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11365
11366         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11367         DW_AT_GNU_*.
11368         * common/common-exceptions.h (enum errors): Likewise.
11369         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11370         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11371         (dwarf_expr_context::execute_stack_op): Likewise.
11372         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11373         Likewise.
11374         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11375         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11376         (show_entry_values_debug, call_site_to_target_addr)
11377         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11378         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11379         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11380         (value_of_dwarf_block_entry, indirect_pieced_value)
11381         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11382         (disassemble_dwarf_expression): Likewise.
11383         * dwarf2read.c (process_die, inherit_abstract_dies)
11384         (read_call_site_scope): Likewise.
11385         * gdbtypes.h (struct func_type, struct call_site_parameter)
11386         (struct call_site): Likewise.
11387         * stack.c (read_frame_arg): Likewise.
11388         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11389
11390 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11391
11392         * defs.h (read_unsigned_leb128): New declaration.
11393         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11394         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11395         (dwarf2_find_location_expression): Call also
11396         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11397         * dwarf2loc.h (dwarf2_version): New declaration.
11398         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11399         rnglists.
11400         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11401         .debug_rnglists.
11402         (struct dwop_section_names): Add loclists_dwo.
11403         (dwop_section_names): Add .debug_loclists.dwo.
11404         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11405         (struct dwarf2_per_cu_data): Add dwarf_version.
11406         (struct dwo_sections): Add loclists.
11407         (struct attr_abbrev): Add implicit_const.
11408         (read_indirect_line_string): New declaration.
11409         (read_unsigned_leb128): Delete declaration.
11410         (rcuh_kind): New definition.
11411         (read_and_check_comp_unit_head): Change parameter
11412         is_debug_types_section to section_kind.
11413         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11414         (read_comp_unit_head): Change parameter abfd to section, add parameter
11415         section_kind.  Handle DWARF-5.
11416         (error_check_comp_unit_head): Accept also DWARF version 5.
11417         (read_and_check_comp_unit_head): Change parameter
11418         is_debug_types_section to section_kind.
11419         (read_and_check_type_unit_head): Delete function.
11420         (read_abbrev_offset): Handle DWARF-5.
11421         (create_debug_type_hash_table): Add parameter section_kind.  Process
11422         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11423         comp_unit_head.
11424         (create_debug_types_hash_table): Update create_debug_type_hash_table
11425         caller.
11426         (create_all_type_units): Call create_debug_type_hash_table.
11427         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11428         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11429         caller.
11430         (skip_one_die): Handle DW_FORM_implicit_const.
11431         (dwarf2_rnglists_process): New function.
11432         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11433         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11434         (read_attribute_value): Handle DW_FORM_implicit_const,
11435         DW_FORM_line_strp.
11436         (read_attribute): Handle DW_FORM_implicit_const.
11437         (read_indirect_string_at_offset_from): New function from
11438         read_indirect_string_at_offset.
11439         (read_indirect_string_at_offset): Call
11440         read_indirect_string_at_offset_from.
11441         (read_indirect_line_string_at_offset): New function.
11442         (read_indirect_string): New function comment.
11443         (read_indirect_line_string): New function.
11444         (read_unsigned_leb128): Make it global.
11445         (dwarf2_string_attr): Handle DWARF-5.
11446         (add_include_dir_stub, read_formatted_entries): New functions.
11447         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11448         Handle DWARF-5.
11449         (per_cu_header_read_in): Update read_comp_unit_head caller.
11450         (dwarf2_version): New function.
11451         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11452         rnglists.
11453         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11454         fields.
11455
11456 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11457
11458         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11459
11460 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11461
11462         * dwarf2read.c (dwarf2_ranges_process): New function from
11463         dwarf2_ranges_read.
11464         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11465         dwarf2_ranges_process.
11466
11467 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11468
11469         * dwarf2read.c (create_debug_type_hash_table): New function from
11470         create_debug_types_hash_table.
11471         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11472         (create_all_type_units, open_and_init_dwo_file): Update
11473         create_debug_types_hash_table callers.
11474
11475 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11476
11477         PR gdb/16188
11478         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11479         refer to 'ap', not 'args'.
11480
11481 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11482             Pedro Alves  <palves@redhat.com>
11483
11484         PR gdb/16188
11485         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11486         calls succeeded.
11487         * fork-child.c (trace_start_error): New function.
11488         (trace_start_error_with_name): Likewise.
11489         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11490         * inf-ptrace.c (inf_ptrace_me): Likewise.
11491         * inferior.h (trace_start_error): New prototype.
11492         (trace_start_error_with_name): Likewise.
11493
11494 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11495
11496         PR gdb/21164
11497         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11498         NULL before using it.
11499         * symmisc.c (maintenance_print_symbols): Likewise.
11500         (maintenance_print_msymbols): Likewise.
11501
11502 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11503
11504         * NEWS: Add record Python bindings entry.
11505
11506 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11507
11508         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11509         py-record-full.o.
11510         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11511         * python/py-record-btrace.c, python/py-record-btrace.h,
11512         python/py-record-full.c, python/py-record-full.h: New file.
11513         * python/py-record.c: Add include for py-record-btrace.h and
11514         py-record-full.h.
11515         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11516         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11517         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11518         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11519         New definition.
11520         (gdbpy_initialize_btrace): New export.
11521         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11522
11523 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11524
11525         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11526         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11527         * python/py-record.c: New file.
11528         * python/python-internal.h (gdbpy_start_recording,
11529         gdbpy_current_recording, gdpy_stop_recording,
11530         gdbpy_initialize_record): New export.
11531         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11532         (python_GdbMethods): Add gdbpy_start_recording,
11533         gdbpy_current_recording and gdbpy_stop_recording.
11534
11535 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11536
11537         * record-btrace.c (record_btrace_record_method): New function.
11538         (init_record_btrace_ops): Initialize to_record_method.
11539         * record-full.c (record_full_record_method): New function.
11540         (init_record_full_ops, init_record_full_core_ops): Add
11541         record_full_record_method.
11542         * record.h (enum record_method): New enum.
11543         * target-debug.h (target_debug_print_enum_record_method: New define.
11544         * target-delegates.c: Regenerate.
11545         * target.c (target_record_method): New function.
11546         * target.h: Include record.h.
11547         (struct target_ops) <to_record_method>: New field.
11548         (target_record_method): New export.
11549
11550 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11551
11552         * record.h (record_start, record_stop): New export.
11553         * record.c (record_start, record_stop): New function.
11554
11555 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11556
11557         * btrace.c (btrace_fetch): Copy function call segments pointer
11558         into a vector.
11559         (btrace_clear): Clear the vector.
11560         (btrace_find_insn_by_number): Use binary search to find the correct
11561         function call segment.
11562         * btrace.h (brace_fun_p): New typedef.
11563         (struct btrace_thread_info) <functions>: New field.
11564
11565 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11566
11567         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11568         * btrace.c (btrace_decode_error): ... here.  New function.
11569         * btrace.h (btrace_decode_error): New export.
11570
11571 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11572
11573         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11574         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11575         btrace_find_insn_by_number): Remove special case for gaps.
11576         * btrace.h (btrace_insn_get_error): New export.
11577         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11578         * record-btrace.c (btrace_insn_history): Print number for gaps.
11579         (record_btrace_info, record_btrace_goto): Handle gaps.
11580
11581 2017-02-14  Tom Tromey  <tom@tromey.com>
11582
11583         PR python/13598:
11584         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11585         event.
11586         * python/py-evts.c (gdbpy_initialize_py_events): Add
11587         before_prompt registry.
11588         * python/py-events.h (events_object) <before_prompt>: New field.
11589
11590 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11591
11592         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11593
11594 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11595
11596         * symfile (_initialize_symfile): Add usage text to the load command's
11597         help text.
11598
11599 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11600
11601         * utils.c (defaulted_query): Don't query on secondary UIs.
11602
11603 2017-02-10  Tom Tromey  <tom@tromey.com>
11604
11605         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11606
11607 2017-02-10  Tom Tromey  <tom@tromey.com>
11608
11609         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11610         "cleanup" local.
11611         * python/py-type.c (typy_legacy_template_argument): Remove
11612         unnecessary "cleanup" local.
11613
11614 2017-02-10  Tom Tromey  <tom@tromey.com>
11615
11616         * python/python.c (do_start_initialization): New function, from
11617         _initialize_python.
11618         (_initialize_python): Call do_start_initialization.
11619         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11620         goto.
11621
11622 2017-02-10  Tom Tromey  <tom@tromey.com>
11623
11624         * python/py-prettyprint.c (pretty_print_one_value): Use
11625         gdbpy_ref.
11626
11627 2017-02-10  Tom Tromey  <tom@tromey.com>
11628
11629         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11630         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11631         gdbpy_ref.
11632         * python/py-type.c (field_new): Use gdbpy_ref.
11633         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11634         gdbpy_ref.
11635         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11636         (py_free_pspace): Likewise.
11637         (pspace_to_pspace_object): Likewise.
11638         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11639         (py_free_objfile): Likewise.
11640         (objfile_to_objfile_object): Likewise.
11641         * python/py-inferior.c (delete_thread_object): Use
11642         gdbpy_ref.
11643         (infpy_read_memory): Likewise.
11644         (py_free_inferior): Likewise.
11645         * python/py-evtregistry.c (create_eventregistry_object): Use
11646         gdbpy_ref.
11647         * python/py-event.c (create_event_object): Use gdbpy_ref.
11648
11649 2017-02-10  Tom Tromey  <tom@tromey.com>
11650
11651         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11652         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11653         used.
11654         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11655         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11656         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11657         python/py-framefilter.c, python/py-function.c,
11658         python/py-inferior.c, python/py-infevents.c,
11659         python/py-linetable.c, python/py-newobjfileevent.c,
11660         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11661         python/py-signalevent.c, python/py-stopevent.c,
11662         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11663         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11664         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11665         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11666
11667 2017-02-10  Tom Tromey  <tom@tromey.com>
11668
11669         * ui-out.h (ui_out_emit_type): New class.
11670         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11671         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11672         and ui_out_emit_tuple.
11673         (enumerate_locals): Likewise.
11674         (py_mi_print_variables, py_print_locals, py_print_args): Use
11675         ui_out_emit_list.
11676         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11677         ui_out_emit_list.
11678         * common/gdb_optional.h: New file.
11679
11680 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11681
11682         * MAINTAINERS (Write After Approval): Update my e-mail address.
11683
11684 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11685
11686         PR gdb/21122
11687         * breakpoint.c (_initialize_breakpoint): Update the help description
11688         of the 'commands' command to indicate that it takes a list argument.
11689
11690 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11691
11692         * interps.c (current_interp_set_logging): Remove "return".
11693
11694 2017-02-09  Gary Benson  <gbenson@redhat.com>
11695
11696         * symtab.c (add_symtab_completions): Prevent NULL pointer
11697         dereference.
11698
11699 2017-02-08  Pedro Alves  <palves@redhat.com>
11700
11701         * interps.c (interp::interp): Remove reference to quiet_p.
11702         (interp_set): Make static.  Remove dead "Switching to" output
11703         code.
11704         (interp_quiet_p, interp_set_quiet): Delete.
11705         (interpreter_exec_cmd): Don't set the interpreter quiet.
11706         * interps.h (interp_quiet_p): Make static.
11707         (class interp) <quiet_p>: Remove field
11708
11709 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11710
11711         * cli/cli-decode.c (find_command_name_length): Make it extern.
11712         * cli/cli-decode.h (find_command_name_length): Declare.
11713         * cli/cli-script.c (command_name_equals, line_first_arg):
11714         New functions.
11715         (process_next_line): Use cli-decode to parse command names.
11716         (build_command_line): Make args a constant pointer.
11717
11718 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11719
11720         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11721         Remove case-insensitive search.
11722
11723 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11724
11725         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11726         at the end of the line.  Avoids an ARI warning.
11727
11728 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11729
11730         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11731         rdseed instructions.
11732         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11733
11734 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11735
11736         PR tdep/20936
11737         Provide and use sparc32 and sparc64 target description XML files.
11738         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11739         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11740         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11741         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11742         * features/sparc/sparc32-solaris.xml: New file.
11743         * features/sparc/sparc64-solaris.xml: New file.
11744         * features/sparc/sparc32-solaris.c: Generated.
11745         * features/sparc/sparc64-solaris.c: Generated.
11746         * sparc-tdep.h: Account for differences in target descriptions.
11747         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11748         (sparc32_register_type): Use target provided registers.
11749         (validate_tdesc_registers): New function.
11750         (sparc32_gdbarch_init): Use tdesc_has_registers.
11751         Set pseudoregister functions.
11752         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11753         (sparc64_register_type): Use target provided registers.
11754         (sparc64_init_abi): Set pseudoregister functions.
11755
11756 2017-02-03  Tom Tromey  <tom@tromey.com>
11757
11758         PR rust/21097:
11759         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11760         with a single member.
11761
11762 2017-02-03  Pedro Alves  <palves@redhat.com>
11763
11764         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11765         (cli_interp_base::~cli_interp_base): New.
11766         (cli_interp): New struct.
11767         (as_cli_interp): Cast the interp itself to cli_interp.
11768         (cli_interpreter_pre_command_loop): Rename to ...
11769         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11770         parameter.
11771         (cli_interpreter_init): Rename to ...
11772         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11773         boolean.  Make extern.
11774         (cli_interpreter_resume): Rename to ...
11775         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11776         extern.
11777         (cli_interpreter_suspend): Rename to ...
11778         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11779         extern.
11780         (cli_interpreter_exec): Rename to ...
11781         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11782         extern.
11783         (cli_interpreter_supports_command_editing): Rename to ...
11784         (cli_interp_base::supports_command_editing): ... this.  Remove
11785         'interp' parameter.  Make extern.
11786         (cli_ui_out): Rename to ...
11787         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11788         Make extern.
11789         (cli_set_logging): Rename to ...
11790         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11791         parameter.  Make extern.
11792         (cli_interp_procs): Delete.
11793         (cli_interp_factory): Adjust to use "new".
11794         * cli/cli-interp.h: Include "interps.h".
11795         (struct cli_interp_base): New struct.
11796         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11797         (interp_new): Delete.
11798         (interp::interp, interp::~interp): New.
11799         (interp_set): Use bool, and return void.  Assume the interpreter
11800         has suspend, init and resume methods, and that the all return
11801         void.
11802         (set_top_level_interpreter): interp_set returns void.
11803         (interp_ui_out): Adapt.
11804         (current_interp_set_logging): Adapt.
11805         (interp_data): Delete.
11806         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11807         (interp_exec): Adapt.
11808         (top_level_interpreter_data): Delete.
11809         * interps.h (interp_init_ftype, interp_resume_ftype)
11810         (interp_suspend_ftype, interp_exec_ftype)
11811         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11812         (class interp): New.
11813         (interp_new): Delete.
11814         (interp_set): Now returns void.  Use bool.
11815         (interp_data, top_level_interpreter_data): Delete.
11816         * mi/mi-common.h: Include interps.h.
11817         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11818         init, resume, suspect, exec, interp_ui_out, set_logging and
11819         pre_command_loop methods.
11820         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11821         (mi_interpreter_init): Rename to ...
11822         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11823         bool, return void and make extern.  Adjust.
11824         (mi_interpreter_resume): ... Rename to ...
11825         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11826         return void and make extern.  Adjust.
11827         (mi_interpreter_suspend): ... Rename to ...
11828         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11829         return void and make extern.  Adjust.
11830         (mi_interpreter_exec): ... Rename to ...
11831         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11832         extern.  Adjust.
11833         (mi_interpreter_pre_command_loop): ... Rename to ...
11834         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11835         parameter and make extern.
11836         (mi_on_normal_stop_1): Adjust.
11837         (mi_ui_out): Rename to ...
11838         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11839         parameter and make extern.  Adjust.
11840         (mi_set_logging): Rename to ...
11841         (mi_interp::set_logging): ... this.  Remove the 'interp'
11842         parameter and make extern.  Adjust.
11843         (mi_interp_procs): Delete.
11844         (mi_interp_factory): Adjust to use 'new'.
11845         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11846         (mi_print_exception, mi_execute_command, mi_load_progress):
11847         Adjust.
11848         * tui/tui-interp.c (tui_interp): New class.
11849         (as_tui_interp): Return a tui_interp pointer.
11850         (tui_on_normal_stop, tui_on_signal_received)
11851         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11852         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11853         to use interp::interp_ui_out.
11854         (tui_init): Rename to ...
11855         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11856         bool, return void and make extern.  Adjust.
11857         (tui_resume): Rename to ...
11858         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11859         return void and make extern.  Adjust.
11860         (tui_suspend): Rename to ...
11861         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11862         return void and make extern.  Adjust.
11863         (tui_ui_out): Rename to ...
11864         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11865         parameter, and make extern.  Adjust.
11866         (tui_exec): Rename to ...
11867         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11868         make extern.
11869         (tui_interp_procs): Delete.
11870         (tui_interp_factory): Use "new".
11871
11872 2017-02-02  Tom Tromey  <tom@tromey.com>
11873
11874         * rust-exp.y (ends_raw_string, space_then_number)
11875         (rust_identifier_start_p): Return bool.
11876         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11877         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11878         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11879         (rust_chartype_p): Return bool.
11880         (val_print_struct, rust_print_struct_def, rust_print_type):
11881         Update.
11882         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11883         Return bool.
11884
11885 2017-02-02  Tom Tromey  <tom@tromey.com>
11886
11887         * rust-lang.c: Reindent.
11888
11889 2017-02-02  Tom Tromey  <tom@tromey.com>
11890
11891         * rust-lang.h (rust_crate_for_block): Update.
11892         * rust-lang.c (rust_crate_for_block): Return std::string.
11893         (rust_get_disr_info): Use std:;string, not
11894         gdb::unique_xmalloc_ptr.
11895         * rust-exp.y (crate_name): Update.
11896
11897 2017-02-02  Pedro Alves  <palves@redhat.com>
11898
11899         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11900         field out of gdb_disassembler_test and make it static.
11901
11902 2017-02-02  Pedro Alves  <palves@redhat.com>
11903
11904         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11905         mi1_interp and mi_interp fields.
11906
11907 2017-02-02  Pedro Alves  <palves@redhat.com>
11908
11909         * cli/cli-interp.c (struct saved_output_files, saved_output):
11910         Moved from cli/cli-logging.c.
11911         (cli_set_logging): New function.
11912         (cli_interp_procs): Install cli_set_logging.
11913         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11914         Declare.
11915         * cli/cli-logging.c (struct saved_output_files, saved_output):
11916         Moved to cli/cli-interp.c.
11917         (pop_output_files): Don't save outputs here.
11918         (make_logging_output): New function.
11919         (handle_redirections): Don't build tee nor save previous outputs
11920         here.
11921         * interps.c (current_interp_set_logging): Change prototype.
11922         Assume there's always a set_logging_proc method installed.
11923         * interps.h (interp_set_logging_ftype): Change prototype.
11924         (current_interp_set_logging): Change prototype and adjust comment.
11925         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11926         use make_logging_output.
11927         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11928 2017-02-02  Pedro Alves  <palves@redhat.com>
11929
11930         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11931         from ...
11932         (set_logging_overwrite): ... here.
11933         (logging_no_redirect_file): Delete.
11934         (set_logging_redirect): Don't handle redirection on the fly.
11935         Instead warn that "logging off" / "logging on" is necessary.
11936         (pop_output_files): Delete references to logging_no_redirect_file.
11937         (show_logging_command): Always speak in terms of what will happen
11938         once logging is reenabled.
11939
11940 2017-02-02  Pedro Alves  <palves@redhat.com>
11941
11942         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11943
11944 2017-02-02  Pedro Alves  <palves@redhat.com>
11945
11946         * disasm.c (gdb_pretty_print_insn): Rename to ...
11947         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11948         Remove gdbarch parameter.  Adapt to clear the object's buffers
11949         instead of allocating new buffers, and to print using the object's
11950         gdb_disassembler instead of calling gdb_print_insn.
11951         (dump_insns): Use gdb_pretty_print_disassembler.
11952         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11953         (gdb_pretty_print_disassembler): New class.
11954         * record-btrace.c (btrace_insn_history): Use
11955         gdb_pretty_print_disassembler.
11956
11957 2017-02-02  Pedro Alves  <palves@redhat.com>
11958
11959         * ada-lang.c (type_as_string): Use string_file.
11960         * ada-valprint.c (ada_print_floating): Use string_file.
11961         * ada-varobj.c (ada_varobj_scalar_image)
11962         (ada_varobj_get_value_image): Use string_file.
11963         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11964         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11965         * breakpoint.c (update_inserted_breakpoint_locations)
11966         (insert_breakpoint_locations, reattach_breakpoints)
11967         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11968         (print_it_watchpoint): Use string_file.
11969         (save_breakpoints): Use stdio_file.
11970         * c-exp.y (oper): Use string_file.
11971         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11972         tee_file.
11973         (pop_output_files): Use delete.
11974         (handle_redirections): Use stdio_file and tee_file.
11975         * cli/cli-setshow.c (do_show_command): Use string_file.
11976         * compile/compile-c-support.c (c_compute_program): Use
11977         string_file.
11978         * compile/compile-c-symbols.c (generate_vla_size): Take a
11979         'string_file &' instead of a 'ui_file *'.
11980         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11981         of a 'ui_file *'.  Use string_file.
11982         (generate_c_for_variable_locations): Take a 'string_file &'
11983         instead of a 'ui_file *'.
11984         * compile/compile-internal.h (generate_c_for_for_one_variable):
11985         Take a 'string_file &' instead of a 'ui_file *'.
11986         * compile/compile-loc2c.c (push, pushf, unary, binary)
11987         (print_label, pushf_register_address, pushf_register)
11988         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11989         'ui_file *'.  Adjust.
11990         * compile/compile.c (compile_to_object): Use string_file.
11991         * compile/compile.h (compile_dwarf_expr_to_c)
11992         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11993         'ui_file *'.
11994         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11995         (replace_typedefs_qualified_name): Use string_file and
11996         obstack_copy0.
11997         * disasm.c (gdb_pretty_print_insn): Use string_file.
11998         (gdb_disassembly): Adjust reference the null_stream global.
11999         (do_ui_file_delete): Delete.
12000         (gdb_insn_length): Use null_stream.
12001         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12002         * dwarf2loc.c (dwarf2_compile_property_to_c)
12003         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12004         'string_file &' instead of a 'ui_file *'.
12005         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12006         * dwarf2read.c (do_ui_file_peek_last): Delete.
12007         (dwarf2_compute_name): Use string_file.
12008         * event-top.c (gdb_setup_readline): Use stdio_file.
12009         * gdbarch.sh (verify_gdbarch): Use string_file.
12010         * gdbtypes.c (safe_parse_type): Use null_stream.
12011         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12012         string_file.
12013         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12014         'string_file *' instead of a 'ui_file *'.
12015         (gdbscm_arch_disassemble): Use string_file.
12016         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12017         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12018         inherits from ui_file.
12019         (ioscm_file_port_delete, ioscm_file_port_rewind)
12020         (ioscm_file_port_put): Delete.
12021         (ioscm_file_port_write): Rename to ...
12022         (ioscm_file_port::write): ... this.  Remove file_port_magic
12023         checks.
12024         (ioscm_file_port_new): Delete.
12025         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12026         ui_file_up.
12027         * guile/scm-type.c (tyscm_type_name): Use string_file.
12028         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12029         Use string_file.
12030         * infcmd.c (print_return_value_1): Use string_file.
12031         * infrun.c (print_target_wait_results): Use string_file.
12032         * language.c (add_language): Use string_file.
12033         * location.c (explicit_to_string_internal): Use string_file.
12034         * main.c (captured_main_1): Use null_file.
12035         * maint.c (maintenance_print_architecture): Use stdio_file.
12036         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12037         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12038         event_channel>: Change type to mi_console_file pointer.
12039         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12040         (mi_console_file_delete): Delete.
12041         (struct mi_console_file): Delete.
12042         (mi_console_file_magic): Delete.
12043         (mi_console_file_new): Delete.
12044         (mi_console_file::mi_console_file): New.
12045         (mi_console_file_delete): Delete.
12046         (mi_console_file_fputs): Delete.
12047         (mi_console_file::write): New.
12048         (mi_console_raw_packet): Delete.
12049         (mi_console_file::flush): New.
12050         (mi_console_file_flush): Delete.
12051         (mi_console_set_raw): Rename to ...
12052         (mi_console_file::set_raw): ... this.
12053         * mi/mi-console.h (class mi_console_file): New class.
12054         (mi_console_file_new, mi_console_set_raw): Delete.
12055         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12056         (mi_set_logging): Use delete and tee_file.  Adjust.
12057         * mi/mi-main.c (output_register): Use string_file.
12058         (mi_cmd_data_evaluate_expression): Use string_file.
12059         (mi_cmd_data_read_memory): Use string_file.
12060         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12061         * mi/mi-out.c (mi_ui_out::main_stream): New.
12062         (mi_ui_out::rewind): Use main_stream and
12063         string_file.
12064         (mi_ui_out::put): Use main_stream and string_file.
12065         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12066         Allocate a 'string_file' instead.
12067         (mi_out_new): Don't allocate a mem_fileopen stream here.
12068         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12069         (mi_ui_out::main_stream): Declare method.
12070         * printcmd.c (eval_command): Use string_file.
12071         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12072         * python/py-arch.c (archpy_disassemble): Use string_file.
12073         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12074         * python/py-frame.c (frapy_str): Use string_file.
12075         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12076         Use string_file.
12077         * python/py-type.c (typy_str): Use string_file.
12078         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12079         * python/py-value.c (valpy_str): Use string_file.
12080         * record-btrace.c (btrace_insn_history): Use string_file.
12081         * regcache.c (regcache_print): Use stdio_file.
12082         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12083         * remote.c (escape_buffer): Use string_file.
12084         * rust-lang.c (rust_get_disr_info): Use string_file.
12085         * serial.c (serial_open_ops_1): Use stdio_file.
12086         (do_serial_close): Use delete.
12087         * stack.c (print_frame_arg): Use string_file.
12088         (print_frame_args): Remove local mem_fileopen stream, not used.
12089         (print_frame): Use string_file.
12090         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12091         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12092         Take a 'string_file *' instead of a 'ui_file *'.
12093         * top.c (new_ui): Use stdio_file and stderr_file.
12094         (free_ui): Use delete.
12095         (execute_command_to_string): Use string_file.
12096         (quit_confirm): Use string_file.
12097         * tracepoint.c (collection_list::append_exp): Use string_file.
12098         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12099         * tui/tui-file.c: Don't include "ui-file.h".
12100         (enum streamtype, struct tui_stream): Delete.
12101         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12102         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12103         (tui_file::tui_file): New method.
12104         (tui_file_fputs): Delete.
12105         (tui_file_get_strbuf): Delete.
12106         (tui_file::puts): New method.
12107         (tui_file_adjust_strbuf): Delete.
12108         (tui_file_flush): Delete.
12109         (tui_file::flush): New method.
12110         * tui/tui-file.h: Tweak intro comment.
12111         Include ui-file.h.
12112         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12113         (tui_file_adjust_strbuf): Delete declarations.
12114         (class tui_file): New class.
12115         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12116         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12117         (tui_register_format): Use string_stream.
12118         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12119         (tui_get_function_from_frame): Use string_file.
12120         * typeprint.c (type_to_string): Use string_file.
12121         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12122         (null_stream): New global.
12123         (ui_file_delete): Delete.
12124         (ui_file::ui_file): New.
12125         (null_file_isatty): Delete.
12126         (ui_file::~ui_file): New.
12127         (null_file_rewind): Delete.
12128         (ui_file::printf): New.
12129         (null_file_put): Delete.
12130         (null_file_flush): Delete.
12131         (ui_file::putstr): New.
12132         (null_file_write): Delete.
12133         (ui_file::putstrn): New.
12134         (null_file_read): Delete.
12135         (ui_file::putc): New.
12136         (null_file_fputs): Delete.
12137         (null_file_write_async_safe): Delete.
12138         (ui_file::vprintf): New.
12139         (null_file_delete): Delete.
12140         (null_file::write): New.
12141         (null_file_fseek): Delete.
12142         (null_file::puts): New.
12143         (ui_file_data): Delete.
12144         (null_file::write_async_safe): New.
12145         (gdb_flush, ui_file_isatty): Adjust.
12146         (ui_file_put, ui_file_rewind): Delete.
12147         (ui_file_write): Adjust.
12148         (ui_file_write_for_put): Delete.
12149         (ui_file_write_async_safe, ui_file_read): Adjust.
12150         (ui_file_fseek): Delete.
12151         (fputs_unfiltered): Adjust.
12152         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12153         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12154         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12155         (set_ui_file_data): Delete.
12156         (string_file::~string_file, string_file::write)
12157         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12158         (do_ui_file_as_string, ui_file_as_string): Delete.
12159         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12160         (struct mem_file): Delete.
12161         (mem_file_new): Delete.
12162         (stdio_file::stdio_file): New.
12163         (mem_file_delete): Delete.
12164         (stdio_file::stdio_file): New.
12165         (mem_fileopen): Delete.
12166         (stdio_file::~stdio_file): New.
12167         (mem_file_rewind): Delete.
12168         (stdio_file::set_stream): New.
12169         (mem_file_put): Delete.
12170         (stdio_file::open): New.
12171         (mem_file_write): Delete.
12172         (stdio_file_magic, struct stdio_file): Delete.
12173         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12174         (stdio_file::flush): New.
12175         (stdio_file_read): Rename to ...
12176         (stdio_file::read): ... this.  Adjust.
12177         (stdio_file_write): Rename to ...
12178         (stdio_file::write): ... this.  Adjust.
12179         (stdio_file_write_async_safe): Rename to ...
12180         (stdio_file::write_async_safe) ... this.  Adjust.
12181         (stdio_file_fputs): Rename to ...
12182         (stdio_file::puts) ... this.  Adjust.
12183         (stdio_file_isatty): Delete.
12184         (stdio_file_fseek): Delete.
12185         (stdio_file::isatty): New.
12186         (stderr_file_write): Rename to ...
12187         (stderr_file::write) ... this.  Adjust.
12188         (stderr_file_fputs): Rename to ...
12189         (stderr_file::puts) ... this.  Adjust.
12190         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12191         (stderr_file::stderr_file): New.
12192         (tee_file_magic): Delete.
12193         (struct tee_file): Delete.
12194         (tee_file::tee_file): New.
12195         (tee_file_new): Delete.
12196         (tee_file::~tee_file): New.
12197         (tee_file_delete): Delete.
12198         (tee_file_flush): Rename to ...
12199         (tee_file::flush): ... this.  Adjust.
12200         (tee_file_write): Rename to ...
12201         (tee_file::write): ... this.  Adjust.
12202         (tee_file::write_async_safe): New.
12203         (tee_file_fputs): Rename to ...
12204         (tee_file::puts): ... this.  Adjust.
12205         (tee_file_isatty): Rename to ...
12206         (tee_file::isatty): ... this.  Adjust.
12207         * ui-file.h (struct obstack, struct ui_file): Don't
12208         forward-declare.
12209         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12210         (ui_file_write_ftype)
12211         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12212         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12213         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12214         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12215         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12216         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12217         (set_ui_file_fseek): Delete.
12218         (ui_file_data, ui_file_delete, ui_file_rewind)
12219         (struct ui_file): New.
12220         (ui_file_up): New.
12221         (class null_file): New.
12222         (null_stream): Declare.
12223         (ui_file_write_for_put, ui_file_put): Delete.
12224         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12225         Delete.
12226         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12227         (gdb_fopen, tee_file_new): Delete.
12228         (struct string_file): New.
12229         (struct stdio_file): New.
12230         (stdio_file_up): New.
12231         (struct stderr_file): New.
12232         (class tee_file): New.
12233         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12234         of a 'ui_file *'.  Adjust.
12235         * ui-out.h (class ui_out) <field_stream>: Likewise.
12236         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12237         (null_stream): Delete.
12238         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12239         Adjust.
12240         * utils.h (struct ui_file): Delete forward declaration..
12241         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12242         (error_stream): Take a 'string_file &' instead of a
12243         'ui_file *'.
12244         * varobj.c (varobj_value_get_print_value): Use string_file.
12245         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12246         * gdbarch.c: Regenerate.
12247
12248 2017-02-02  Pedro Alves  <palves@redhat.com>
12249
12250         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12251         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12252         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12253         Adjust to call gdb_print_insn instead of
12254         gdb_disassembler::print_insn.
12255         (dump_insns, do_mixed_source_and_assembly_deprecated)
12256         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12257         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12258         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12259         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12260         declaration.
12261         (gdb_pretty_print_insn): Re-add declaration.
12262         * record-btrace.c (btrace_insn_history): Don't allocate a
12263         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12264
12265 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12266
12267         * disasm.h (gdb_disassembly): Remove file_string parameter.
12268         * disasm.c (gdb_disassembly): Likewise.
12269         * cli/cli-cmds.c (print_disassembly): Adapt.
12270         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12271         * stack.c (do_gdb_disassembly): Likewise.
12272
12273 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12274
12275         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12276         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12277         targets.  And if the implicit value is longer than needed, extract
12278         the first bytes instead of the "least significant" ones.
12279
12280 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12281
12282         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12283         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12284         (btrace_fetch): Assert can_access_registers_ptid.
12285         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12286         validate_registers_access.
12287
12288 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12289
12290         * gdbthread.h (can_access_registers_ptid): New.
12291         * thread.c (can_access_registers_ptid): New.
12292
12293 2017-02-01  Pedro Alves  <palves@redhat.com>
12294
12295         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12296
12297 2017-01-31  Pedro Alves  <palves@redhat.com>
12298
12299         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12300         Fix typos.
12301
12302 2017-01-31  Pedro Alves  <palves@redhat.com>
12303
12304         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12305         not used.
12306
12307 2017-01-31  Pedro Alves  <palves@redhat.com>
12308
12309         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12310
12311 2017-01-31  Pedro Alves  <palves@redhat.com>
12312
12313         * common/scoped_restore.h
12314         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12315         change the value's parameter type to T2.
12316         (make_scoped_restore): Likewise.
12317
12318 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12319             Richard Henderson  <rth@redhat.com>
12320
12321         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12322         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12323         GS_BASE for older kernels.
12324         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12325         GS_BASE for older kernels.
12326         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12327         and GS_BASE to the offset table.
12328         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12329         system register group.
12330         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12331         for older kernels.
12332         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12333         amd64 ABI.
12334         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12335         AMD64_GSBASE_REGNUM.
12336         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12337         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12338         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12339         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12340         i386/64bit-segments.xml in those rules.
12341         * features/i386/64bit-segments.xml: New file.
12342         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12343         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12344         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12345         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12346         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12347         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12348         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12349         * features/i386/amd64-avx-linux.c: Regenerated.
12350         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12351         * features/i386/amd64-avx-mpx.c: Regenerated.
12352         * features/i386/amd64-avx512-linux.c: Regenerated.
12353         * features/i386/amd64-linux.c: Regenerated.
12354         * features/i386/amd64-mpx-linux.c: Regenerated.
12355         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12356         * features/i386/i386-avx-mpx.c: Regenerated.
12357         * features/i386/x32-avx-linux.c: Regenerated.
12358         * features/i386/x32-avx512-linux.c: Regenerated.
12359         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12360         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12361         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12362         * regformats/i386/amd64-linux.dat: Regenerated.
12363         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12364         * regformats/i386/x32-avx-linux.dat: Regenerated.
12365         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12366         * regformats/i386/x32-linux.dat: Regenerated.
12367
12368 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12369
12370         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12371         Set to AMD64_NUM_REGS.
12372
12373 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12374
12375         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12376         that checks validity of a register number.
12377
12378 2017-01-27  Kees Cook  <keescook@google.com>
12379
12380         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12381         fetch_fpregs if target has fpa registers.
12382         (arm_linux_store_inferior_registers): Call store_fpregs if target
12383         has fpa registers.
12384
12385 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12386
12387         * cris-tdep.c (cris_gdbarch_init): Remove check for
12388         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12389
12390 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12391
12392         * corelow.c (get_core_register_section): Check for regset
12393         existence before checking for REGSET_VARIABLE_SIZE.
12394
12395 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12396             Pedro Alves  <palves@redhat.com>
12397
12398         PR gdb/20939
12399         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12400         call memory_error, save memaddr instead.
12401         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12402         negative, cal memory_error.
12403         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12404
12405 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12406
12407         * disasm-selftests.c (memory_error_test): New function.
12408         (_initialize_disasm_selftests): Register memory_error_test.
12409
12410 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12411
12412         * Makefile.in (SFILES): Add disasm-selftests.c and
12413         selftest-arch.c.
12414         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12415         * disasm-selftests.c: New file.
12416         * selftest-arch.c: New file.
12417         * selftest-arch.h: New file.
12418
12419 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12420
12421         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12422         to bfd_arch_mep.  Don't return 0 if section is not
12423         found.  Call print_insn_mep.
12424
12425 2017-01-26  Pedro Alves  <palves@redhat.com>
12426             Yao Qi  <yao.qi@linaro.org>
12427
12428         * arm-tdep.c: Include "disasm.h".
12429         (gdb_print_insn_arm): Update code to get gdbarch.
12430         * disasm.c (dis_asm_read_memory): Change it to
12431         gdb_disassembler::dis_asm_read_memory.
12432         (dis_asm_memory_error): Likewise.
12433         (dis_asm_print_address): Likewise.
12434         (gdb_pretty_print_insn): Change it to
12435         gdb_disassembler::pretty_print_insn.
12436         (dump_insns): Add one argument gdb_disassemlber.  All
12437         callers updated.
12438         (do_mixed_source_and_assembly_deprecated): Likewise.
12439         (do_mixed_source_and_assembly): Likewise.
12440         (do_assembly_only): Likewise.
12441         (gdb_disassembler::gdb_disassembler): New.
12442         (gdb_disassembler::print_insn): New.
12443         * disasm.h (class gdb_disassembler): New.
12444         (gdb_pretty_print_insn): Remove declaration.
12445         (gdb_disassemble_info): Likewise.
12446         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12447         (gdbscm_disasm_read_memory_worker): Update.
12448         (gdbscm_disasm_read_memory): Update.
12449         (gdbscm_disasm_memory_error): Remove.
12450         (gdbscm_disasm_print_address): Remove.
12451         (gdbscm_disassembler::gdbscm_disassembler): New.
12452         (gdbscm_print_insn_from_port): Update.
12453         * mips-tdep.c: Include disasm.h.
12454         (gdb_print_insn_mips): Update code to get gdbarch.
12455         * record-btrace.c (btrace_insn_history): Update.
12456         * spu-tdep.c: Include disasm.h.
12457         (struct spu_dis_asm_data): Remove.
12458         (struct spu_dis_asm_info): New.
12459         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12460         SPU id.
12461         (gdb_print_insn_spu): Cast disassemble_info to
12462         spu_dis_asm_info.
12463
12464 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12465
12466         * disasm.c (do_ui_file_delete): Delete.
12467         (gdb_insn_length): Move code creating stream to ...
12468         * utils.c (null_stream): ... here.  New function.
12469         * utils.h (null_stream): Declare.
12470
12471 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12472
12473         * python/py-inferior.c (find_thread_object): Return directly
12474         from the loop.  Remove "found" variable.
12475
12476 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12477
12478         GDB 7.12.1 released.
12479
12480 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12481
12482         * python/py-function.c (fnpy_call): Reorder declarations to have
12483         the gdbpy_enter object declared first.
12484         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12485
12486 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12487
12488         PR python/21068
12489         * python/python-internal.h (PyMem_RawMalloc): Define for
12490         Python < 3.4.
12491         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12492         PyMem_RawMalloc instead of PyMem_Malloc.
12493
12494 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12495             Luis Machado  <lgustavo@codesourcery.com>
12496
12497         * NEWS (New commands): Mention flash-erase.
12498         (New MI commands): Mention target-flash-erase.
12499         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12500         command.
12501         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12502         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12503         * target.c (flash_erase_command): New function.
12504         (initialize_targets): Add new flash-erase command.
12505         * target.h (flash_erase_command): New declaration.
12506
12507 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12508
12509         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12510         HAVE_SYS_PROCFS_H is defined.
12511
12512 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12513
12514         * remote.c (struct cached_reg): Change data into a pointer.
12515         * (stop_reply_dtr): Free data pointers before deleting vector.
12516         (process_stop_reply): Likewise.
12517         (remote_parse_stop_reply): Allocate space for data
12518
12519 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12520
12521         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12522         MAX_REGISTER_SIZE.
12523         (amd64_pseudo_register_read_value): Likewise.
12524         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12525         (store_register_using_P): Likewise.
12526         * regcache.c (regcache_xfer_part): Likewise.
12527
12528 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12529
12530         Split real and pseudo registers.
12531         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12532         (sparc32_pseudo_regnum): New enum.
12533         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12534         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12535         (SPARC32_CP0_REGISTERS): New macro.
12536         (sparc32_pseudo_register_name): New function.
12537         (sparc32_register_name): Use sparc32_pseudo_register_name.
12538         (sparc32_pseudo_register_type): New function.
12539         (sparc32_register_type): Use sparc32_pseudo_register_type.
12540         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12541         pseudo register numbers.
12542         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12543         (SPARC64_CP0_REGISTERS): New macro.
12544         (sparc64_pseudo_register_name): New function.
12545         (sparc64_register_name): Use sparc64_pseudo_register_name.
12546         (sparc64_pseudo_register_type): New function.
12547         (sparc64_register_type): Use sparc64_pseudo_register_type.
12548         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12549         pseudo register numbers.
12550         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12551         sparc64_store_arguments): Handle pseudo register numbers.
12552
12553 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12554
12555         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12556         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12557         output.
12558         (getpkt_or_notif_sane_1): Likewise.
12559
12560 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12561
12562         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12563         of CC.  Pass "-x c++-header" instead of "-x c".
12564
12565 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12566
12567         * remote.c (remote_can_async_p): Update comment.
12568
12569 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12570
12571         * linux-nat.c (linux_nat_can_async_p): Update comment.
12572
12573 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12574
12575         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12576
12577 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12578
12579         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12580
12581 2017-01-10  Tom Tromey  <tom@tromey.com>
12582
12583         * python/py-type.c (typy_legacy_template_argument): Update.
12584         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12585         ~demangle_parse_info): Declare new members.
12586         (cp_demangled_name_to_comp): Return unique_ptr.
12587         (cp_demangled_name_parse_free)
12588         (make_cleanup_cp_demangled_name_parse_free)
12589         (cp_new_demangle_parse_info): Remove.
12590         * cp-support.c (do_demangled_name_parse_free_cleanup)
12591         (make_cleanup_cp_demangled_name_parse_free): Remove.
12592         (inspect_type, cp_canonicalize_string_full)
12593         (cp_canonicalize_string): Update.
12594         (mangled_name_to_comp): Change return type.
12595         (cp_class_name_from_physname, method_name_from_physname)
12596         (cp_func_name, cp_remove_params): Update.
12597         * cp-name-parser.y (demangle_parse_info): New constructor, from
12598         cp_new_demangle_parse_info.
12599         (~demangle_parse_info): New destructor, from
12600         cp_demangled_name_parse_free.
12601         (cp_merge_demangle_parse_infos): Update.
12602         (cp_demangled_name_to_comp): Change return type.
12603
12604 2017-01-10  Tom Tromey  <tom@tromey.com>
12605
12606         * top.c (prevent_dont_repeat): Change return type.
12607         * python/python.c (execute_gdb_command): Use std::string.
12608         Update.
12609         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12610         * command.h (prevent_dont_repeat): Change return type.
12611         * breakpoint.c (bpstat_do_actions_1): Update.
12612
12613 2017-01-10  Tom Tromey  <tom@tromey.com>
12614
12615         * value.h (scoped_value_mark::~scoped_value_mark): Call
12616         free_to_mark.
12617         (scoped_value_mark::free_to_mark): New method.
12618         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12619         scoped_value_mark.
12620
12621 2017-01-10  Tom Tromey  <tom@tromey.com>
12622
12623         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12624         (valpy_reference_value, valpy_const_value, valpy_get_address)
12625         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12626         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12627         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12628         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12629         scoped_value_mark.
12630         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12631         * value.h (scoped_value_mark): New class.
12632
12633 2017-01-10  Tom Tromey  <tom@tromey.com>
12634
12635         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12636         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12637         * psymtab.c (discard_psymtabs_upto): Remove.
12638         (make_cleanup_discard_psymtabs): Remove.
12639         (struct psymtab_state): Remove.
12640
12641 2017-01-10  Tom Tromey  <tom@tromey.com>
12642
12643         * record-full.c (record_full_save_cleanups): Remove.
12644         (record_full_save): Use gdb::unlinker.
12645         * gcore.c (do_bfd_delete_cleanup): Remove.
12646         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12647         cleanups.
12648         * dwarf2read.c (unlink_if_set): Remove.
12649         (write_psymtabs_to_index): Use gdb::unlinker.
12650         * common/gdb_unlinker.h: New file.
12651
12652 2017-01-10  Tom Tromey  <tom@tromey.com>
12653
12654         * windows-tdep.c (windows_xfer_shared_library): Update.
12655         * windows-nat.c (windows_make_so): Update.
12656         * utils.h (make_cleanup_bfd_unref): Remove.
12657         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12658         * symfile.h (symfile_bfd_open)
12659         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12660         * symfile.c (read_symbols, symbol_file_add)
12661         (separate_debug_file_exists): Update.
12662         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12663         (generic_load, reread_symbols): Update.
12664         * symfile-mem.c (symbol_file_add_from_memory): Update.
12665         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12666         (spu_symbol_file_add_from_memory): Update.
12667         * solist.h (struct target_so_ops) <bfd_open>: Return
12668         gdb_bfd_ref_ptr.
12669         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12670         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12671         gdb_bfd_ref_ptr.
12672         (solib_map_sections, reload_shared_libraries_1): Update.
12673         * solib-svr4.c (enable_break): Update.
12674         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12675         * solib-frv.c (enable_break2): Update.
12676         * solib-dsbt.c (enable_break): Update.
12677         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12678         gdb_bfd_ref_ptr.
12679         (darwin_solib_get_all_image_info_addr_at_init): Update.
12680         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12681         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12682         * record-full.c (record_full_save): Update.
12683         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12684         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12685         * minidebug.c (find_separate_debug_file_in_section): Return
12686         gdb_bfd_ref_ptr.
12687         * machoread.c (macho_add_oso_symfile): Change abfd to
12688         gdb_bfd_ref_ptr.
12689         (macho_symfile_read_all_oso): Update.
12690         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12691         (macho_symfile_read): Update.
12692         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12693         (jit_bfd_try_read_symtab): Update.
12694         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12695         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12696         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12697         gdb_bfd_ref_ptr.
12698         (gdb_bfd_ref_policy): New struct.
12699         (gdb_bfd_ref_ptr): New typedef.
12700         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12701         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12702         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12703         gdb_bfd_ref_ptr.
12704         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12705         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12706         (gcore_command): Update.
12707         * exec.c (exec_file_attach): Update.
12708         * elfread.c (elf_symfile_read): Update.
12709         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12710         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12711         (open_and_init_dwo_file): Update.
12712         (open_dwp_file): Return gdb_bfd_ref_ptr.
12713         (open_and_init_dwp_file): Update.
12714         * corelow.c (core_open): Update.
12715         * compile/compile-object-load.c (compile_object_load): Update.
12716         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12717         * coffread.c (coff_symfile_read): Update.
12718         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12719         gdb_bfd_ref_ptr.  Rename.
12720         (dump_bfd_file, restore_command): Update.
12721         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12722         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12723         (find_separate_debug_file_by_buildid): Update.
12724
12725 2017-01-10  Tom Tromey  <tom@tromey.com>
12726
12727         * common/gdb_ref_ptr.h: New file.
12728         * python/py-ref.h (struct gdbpy_ref_policy): New.
12729         (gdbpy_ref): Now a typedef.
12730
12731 2017-01-10  Tom Tromey  <tom@tromey.com>
12732
12733         * utils.h (make_cleanup_htab_delete): Don't declare.
12734         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12735         Remove.
12736         * linespec.c (decode_compound_collector): Add constructor,
12737         destructor.
12738         (lookup_prefix_sym): Remove cleanup.
12739         (symtab_collector): Add constructor, destructor.
12740         (collect_symtabs_from_filename): Remove cleanup.
12741         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12742         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12743         Use htab_up.
12744         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12745         * dwarf2read.c (dw2_expand_symtabs_matching)
12746         (dw2_map_symbol_filenames, dwarf_decode_macros)
12747         (write_psymtabs_to_index): Use htab_up.
12748         * dwarf2loc.c (func_verify_no_selftailcall)
12749         (call_site_find_chain_1, func_verify_no_selftailcall)
12750         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12751         std::vector, gdb::unique_xmalloc_ptr.
12752         (call_sitep): Remove typedef.
12753         (dwarf2_locexpr_baton_eval): Remove unused variable.
12754
12755 2017-01-10  Tom Tromey  <tom@tromey.com>
12756
12757         * python/python-internal.h (make_cleanup_py_decref)
12758         (make_cleanup_py_xdecref): Don't declare.
12759         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12760         (py_xdecref, make_cleanup_py_xdecref): Remove.
12761
12762 2017-01-10  Tom Tromey  <tom@tromey.com>
12763
12764         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12765         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12766
12767 2017-01-10  Tom Tromey  <tom@tromey.com>
12768
12769         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12770
12771 2017-01-10  Tom Tromey  <tom@tromey.com>
12772
12773         * python/py-utils.c (unicode_to_encoded_string)
12774         (python_string_to_target_string)
12775         (python_string_to_target_python_string)
12776         (python_string_to_host_string, gdbpy_obj_to_string)
12777         (get_addr_from_python): Use gdbpy_ref.
12778
12779 2017-01-10  Tom Tromey  <tom@tromey.com>
12780
12781         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12782         gdbpy_ref.
12783
12784 2017-01-10  Tom Tromey  <tom@tromey.com>
12785
12786         * python/python.c (eval_python_command, gdbpy_decode_line)
12787         (gdbpy_run_events, gdbpy_start_type_printers)
12788         (gdbpy_apply_type_printers): Use gdbpy_ref.
12789
12790 2017-01-10  Tom Tromey  <tom@tromey.com>
12791
12792         * python/py-param.c (get_doc_string, compute_enum_values): Use
12793         gdbpy_ref.
12794
12795 2017-01-10  Tom Tromey  <tom@tromey.com>
12796
12797         * python/py-inferior.c (find_thread_object, build_inferior_list):
12798         Use gdbpy_ref.
12799
12800 2017-01-10  Tom Tromey  <tom@tromey.com>
12801
12802         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12803
12804 2017-01-10  Tom Tromey  <tom@tromey.com>
12805
12806         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12807         gdbpy_ref.
12808
12809 2017-01-10  Tom Tromey  <tom@tromey.com>
12810
12811         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12812         extra incref.
12813         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12814         Use gdbpy_ref.
12815
12816 2017-01-10  Tom Tromey  <tom@tromey.com>
12817
12818         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12819         gdbpy_ref.
12820
12821 2017-01-10  Tom Tromey  <tom@tromey.com>
12822
12823         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12824         decref results of PyArg_ParseTupleAndKeywords.
12825
12826 2017-01-10  Tom Tromey  <tom@tromey.com>
12827
12828         * python/python.c (python_run_simple_file): Use
12829         unique_xmalloc_ptr, gdbpy_ref.
12830
12831 2017-01-10  Tom Tromey  <tom@tromey.com>
12832
12833         * python/py-prettyprint.c (print_stack_unless_memory_error)
12834         (print_string_repr, print_children): Use gdbpy_ref.
12835         (dummy_python_frame): New class.
12836         (dummy_python_frame::dummy_python_frame): Rename from
12837         push_dummy_python_frame.
12838         (py_restore_tstate): Remove.
12839
12840 2017-01-10  Tom Tromey  <tom@tromey.com>
12841
12842         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12843
12844 2017-01-10  Tom Tromey  <tom@tromey.com>
12845
12846         * python/python.c (ensure_python_env, restore_python_env):
12847         Remove.
12848         * python/python-internal.h (ensure_python_env): Don't declare.
12849         * varobj.h (varobj_ensure_python_env): Don't declare.
12850         * varobj.c (varobj_ensure_python_env): Remove.
12851
12852 2017-01-10  Tom Tromey  <tom@tromey.com>
12853
12854         * varobj.c (varobj_value_get_print_value): Use
12855         gdbpy_enter_varobj.
12856
12857 2017-01-10  Tom Tromey  <tom@tromey.com>
12858
12859         * python/py-prettyprint.c (print_string_repr, print_children):
12860         Update.
12861         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12862         of "encoding".
12863         * varobj.c (varobj_value_get_print_value): Update.
12864         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12865
12866 2017-01-10  Tom Tromey  <tom@tromey.com>
12867
12868         * varobj.c (varobj_get_display_hint)
12869         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12870         (varobj_set_visualizer, free_variable): Use
12871         gdbpy_enter_varobj.
12872
12873 2017-01-10  Tom Tromey  <tom@tromey.com>
12874
12875         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12876         (do_finish_initialization): New function.  Use gdbpy_ref.
12877         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12878         do_finish_initialization.
12879
12880 2017-01-10  Tom Tromey  <tom@tromey.com>
12881
12882         * python/py-param.c (get_set_value, get_show_value): Use
12883         gdbpy_enter, gdbpy_ref.
12884
12885 2017-01-10  Tom Tromey  <tom@tromey.com>
12886
12887         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12888
12889 2017-01-10  Tom Tromey  <tom@tromey.com>
12890
12891         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12892
12893 2017-01-10  Tom Tromey  <tom@tromey.com>
12894
12895         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12896         Use gdbpy_enter_varobj.
12897
12898 2017-01-10  Tom Tromey  <tom@tromey.com>
12899
12900         * varobj.c (gdbpy_enter_varobj): New constructor.
12901         * python/python-internal.h (gdbpy_enter_varobj): New class.
12902         * python/py-varobj.c (py_varobj_get_iterator): Use
12903         gdbpy_enter_varobj.
12904
12905 2017-01-10  Tom Tromey  <tom@tromey.com>
12906
12907         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12908         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12909         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12910         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12911         unique_xmalloc_ptr.
12912         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12913
12914 2017-01-10  Tom Tromey  <tom@tromey.com>
12915
12916         * python/py-xmethods.c (invoke_match_method): Use
12917         gdbpy_ref.
12918
12919 2017-01-10  Tom Tromey  <tom@tromey.com>
12920
12921         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12922         gdbpy_enter, gdbpy_ref.
12923
12924 2017-01-10  Tom Tromey  <tom@tromey.com>
12925
12926         * python/python.c (python_interactive_command): Use gdbpy_enter.
12927
12928 2017-01-10  Tom Tromey  <tom@tromey.com>
12929
12930         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12931         gdbpy_ref.
12932
12933 2017-01-10  Tom Tromey  <tom@tromey.com>
12934
12935         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12936         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12937
12938 2017-01-10  Tom Tromey  <tom@tromey.com>
12939
12940         * utils.h (htab_deleter): New struct.
12941         (htab_up): New typedef.
12942         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12943         gdbpy_enter, gdbpy_ref, htab_up.
12944
12945 2017-01-10  Tom Tromey  <tom@tromey.com>
12946
12947         * python/py-unwind.c (pending_frame_invalidate): Remove.
12948         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12949
12950 2017-01-10  Tom Tromey  <tom@tromey.com>
12951
12952         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12953         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12954
12955 2017-01-10  Tom Tromey  <tom@tromey.com>
12956
12957         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12958
12959 2017-01-10  Tom Tromey  <tom@tromey.com>
12960
12961         * python/python.c (gdbpy_eval_from_control_command)
12962         (gdbpy_source_script, gdbpy_run_events)
12963         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12964         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12965         gdbpy_enter.
12966
12967 2017-01-10  Tom Tromey  <tom@tromey.com>
12968
12969         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12970
12971 2017-01-10  Tom Tromey  <tom@tromey.com>
12972
12973         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12974
12975 2017-01-10  Tom Tromey  <tom@tromey.com>
12976
12977         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12978         (python_on_inferior_call_pre, python_on_inferior_call_post)
12979         (python_on_memory_change, python_on_register_change)
12980         (python_inferior_exit, python_new_objfile, add_thread_object)
12981         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12982
12983 2017-01-10  Tom Tromey  <tom@tromey.com>
12984
12985         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12986         (bpfinishpy_handle_exit): Use gdbpy_enter.
12987
12988 2017-01-10  Tom Tromey  <tom@tromey.com>
12989
12990         * python/py-cmd.c (cmdpy_destroyer)
12991         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12992         gdbpy_enter.
12993
12994 2017-01-10  Tom Tromey  <tom@tromey.com>
12995
12996         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12997         gdbpy_enter.
12998         (gdbpy_breakpoint_has_cond): Likewise.
12999
13000 2017-01-10  Tom Tromey  <tom@tromey.com>
13001
13002         * python/python.c (gdbpy_enter): New constructor.
13003         (~gdbpy_enter): New destructor.
13004         (restore_python_env, ensure_python_env): Rewrite.
13005         * python/python-internal.h (gdbpy_enter): New class.
13006
13007 2017-01-10  Tom Tromey  <tom@tromey.com>
13008
13009         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13010
13011 2017-01-10  Tom Tromey  <tom@tromey.com>
13012
13013         * python/py-value.c (value_has_field, get_field_flag)
13014         (get_field_type, valpy_getitem, convert_value_from_python): Use
13015         gdbpy_ref.
13016
13017 2017-01-10  Tom Tromey  <tom@tromey.com>
13018
13019         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13020         gdbpy_ref.
13021
13022 2017-01-10  Tom Tromey  <tom@tromey.com>
13023
13024         * python/py-prettyprint.c (search_pp_list)
13025         (find_pretty_printer_from_objfiles)
13026         (find_pretty_printer_from_progspace)
13027         (find_pretty_printer_from_gdb, find_pretty_printer)
13028         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13029         gdbpy_ref.
13030
13031 2017-01-10  Tom Tromey  <tom@tromey.com>
13032
13033         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13034
13035 2017-01-10  Tom Tromey  <tom@tromey.com>
13036
13037         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13038         (ltpy_get_all_source_lines): Use gdbpy_ref.
13039
13040 2017-01-10  Tom Tromey  <tom@tromey.com>
13041
13042         * python/py-framefilter.c (extract_sym, extract_value)
13043         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13044         gdbpy_ref.
13045
13046 2017-01-10  Tom Tromey  <tom@tromey.com>
13047
13048         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13049
13050 2017-01-10  Tom Tromey  <tom@tromey.com>
13051
13052         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13053
13054 2017-01-10  Tom Tromey  <tom@tromey.com>
13055
13056         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13057         gdbpy_ref.
13058
13059 2017-01-10  Tom Tromey  <tom@tromey.com>
13060
13061         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13062
13063 2017-01-10  Tom Tromey  <tom@tromey.com>
13064
13065         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13066         (typy_range): Use gdbpy_ref.
13067
13068 2017-01-10  Tom Tromey  <tom@tromey.com>
13069
13070         * python/py-threadevent.c (create_thread_event_object): Use
13071         gdbpy_ref.
13072         * python/py-stopevent.c (create_stop_event_object): Simplify.
13073         (emit_stop_event): Use gdbpy_ref.
13074         * python/py-signalevent.c (create_signal_event_object): Use
13075         gdbpy_ref.
13076         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13077         (emit_new_objfile_event, create_clear_objfiles_event_object)
13078         (emit_clear_objfiles_event): Use gdbpy_ref.
13079         * python/py-infevents.c (create_inferior_call_event_object)
13080         (create_register_changed_event_object)
13081         (create_memory_changed_event_object, emit_inferior_call_event)
13082         (emit_memory_changed_event, emit_register_changed_event): Use
13083         gdbpy_ref.
13084         * python/py-exitedevent.c (create_exited_event_object)
13085         (emit_exited_event): Use gdbpy_ref.
13086         * python/py-event.h (evpy_emit_event): Remove
13087         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13088         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13089         * python/py-continueevent.c (emit_continue_event): Use
13090         gdbpy_ref.
13091         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13092         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13093         gdbpy_ref.
13094         * python/py-bpevent.c (create_breakpoint_event_object): Use
13095         gdbpy_ref.
13096
13097 2017-01-10  Tom Tromey  <tom@tromey.com>
13098
13099         * python/py-ref.h: New file.
13100
13101 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13102
13103         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13104         void.
13105         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13106         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13107         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13108         * ui-out.c (ui_out::redirect): Likewise.
13109         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13110         * cli/cli-logging.c (set_logging_redirect): Update call site of
13111         ui_out::redirect.
13112         (handle_redirections): Likewise.
13113         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13114         * top.c (execute_command_to_string): Likewise.
13115         * utils.c (do_ui_out_redirect_pop): Likewise.
13116
13117 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13118
13119         * stack.c (_initialize_stack): Update "frame" command help message.
13120
13121 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13122
13123         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13124
13125 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13126
13127         * x86-linux-nat.h: Include gdb_proc_service.h.
13128
13129 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13130
13131         * ser-base.h: Include serial.h.
13132
13133 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13134
13135         * ppc-linux-tdep.h: Include ppc-tdep.h.
13136
13137 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13138
13139         * nat/amd64-linux-siginfo.h: Include signal.h.
13140
13141 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13142
13143         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13144
13145 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13146
13147         * mi/mi-parse.h: Include mi-cmds.h.
13148
13149 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13150
13151         * inf-loop.c: Don't include "target.h".
13152         * inf-loop.h: Include it here.
13153
13154 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13155
13156         * dfp.h: Include "dboulest.h" and "expression.h".
13157
13158 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13159
13160         * ax-gdb.h: Include "ax.h".
13161
13162 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13163
13164         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13165         with nat/gdb_ptrace.h.
13166
13167 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13168
13169         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13170         new line.
13171         (mips64_fbsd_sigframe_init): Likewise.
13172
13173 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13174
13175         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13176         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13177
13178 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13179
13180         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13181         * NEWS: Mention new FreeBSD/mips native configuration.
13182         * config/mips/fbsd.mh: New file.
13183         * configure.host: Add mips*-*-freebsd*.
13184         * mips-fbsd-nat.c: New file.
13185
13186 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13187
13188         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13189         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13190         * NEWS: Mention new FreeBSD/mips target.
13191         * configure.tgt: Add mips*-*-freebsd*.
13192         * mips-fbsd-tdep.c: New file.
13193         * mips-fbsd-tdep.h: New file.
13194
13195 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13196
13197         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13198         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13199
13200 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13201
13202         Update copyright year range in all GDB files.
13203
13204 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13205
13206         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13207
13208 For older changes see ChangeLog-2016.
13209 \f
13210 Local Variables:
13211 mode: change-log
13212 left-margin: 8
13213 fill-column: 74
13214 version-control: never
13215 coding: utf-8
13216 End: