Use std::vector in gdb_bfd_data
[external/binutils.git] / gdb / ChangeLog
1 2017-10-20  Tom Tromey  <tom@tromey.com>
2
3         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4         std::vector.
5         (gdb_bfd_record_inclusion): Update.
6         (bfdp): Remove typedef.
7
8 2017-10-20  Tom Tromey  <tom@tromey.com>
9
10         * gdb_bfd.c (gdb_bfd_ref): Use new.
11         (struct gdb_bfd_data): Add constructor, destructor, and member
12         initializers.
13         (gdb_bfd_unref): Use delete.
14
15 2017-10-20  Tom Tromey  <tom@tromey.com>
16
17         * exec.c (exec_file_attach): Use new_bfd_ref.
18         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
19         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
20         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
21         new_bfd_ref.
22         * gdb_bfd.h (new_bfd_ref): New function.
23
24 2017-10-20  Pedro Alves  <palves@redhat.com>
25
26         * main.c (captured_command_loop): Add attribute noinline.
27
28 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
29
30         * interps.c (struct interp_factory): Add constructor.
31         (interp_factory_p): Remove typedef.
32         (DEF_VEC_P(interp_factory_p)): Remove.
33         (interpreter_factories): Change type to std::vector.
34         (interp_factory_register): Adjust.
35         (interp_lookup): Adjust.
36         (interpreter_completer): Adjust.
37
38 2017-10-19  Tom Tromey  <tom@tromey.com>
39
40         * break-catch-syscall.c (catch_syscall_completer): Use
41         std::string, gdb::unique_xmalloc_ptr.
42
43 2017-10-19  Tom Tromey  <tom@tromey.com>
44
45         * infcall.c (call_function_by_hand_dummy): Use std::string.
46
47 2017-10-19  Tom Tromey  <tom@tromey.com>
48
49         * mi/mi-main.c (mi_cmd_execute): Update.
50         * top.h (prepare_execute_command): Return scoped_value_mark.
51         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
52         Add move constructor.
53         * top.c (prepare_execute_command): Return scoped_value_mark.
54         (execute_command): Update.
55
56 2017-10-19  Pedro Alves  <palves@redhat.com>
57
58         * xml-support.c (xml_fetch_content_from_file): Check fread's
59         return.
60
61 2017-10-19  Pedro Alves  <palves@redhat.com>
62
63         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
64         async.
65         (handle_error_fd): New function.
66         (ser_base_async): Add/delete an event loop file handler for
67         error_fd.
68
69 2017-10-19  Pedro Alves  <palves@redhat.com>
70
71         * xml-support.c (xml_fetch_content_from_file): Don't read in
72         chunks.  Instead use fseek to determine the file's size, and read
73         it in one go.
74
75 2017-11-18  Keith Seitz  <keiths@redhat.com>
76
77         * c-exp.y (oper): Canonicalize conversion operators of user-defined
78         types.
79         Add whitespace to front of type name.
80
81 2017-10-18  Keith Seitz  <keiths@redhat.com>
82
83         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
84         DW_AT_accessibility.
85
86 2017-10-18  Yao Qi  <yao.qi@linaro.org>
87
88         * features/tic6x-c62x-linux.c: Remove.
89
90 2017-10-17  Tom Tromey  <tom@tromey.com>
91
92         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
93         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
94         (do_mixed_source_and_assembly): Likewise.
95
96 2017-10-17  Tom Tromey  <tom@tromey.com>
97
98         * regcache.c (regcache::xfer_part): Remove assertion.
99
100 2017-10-17  Pedro Alves  <palves@redhat.com>
101
102         * xml-support.c (xml_fetch_content_from_file): Call
103         unique_ptr::release() instead unique_ptr::get() when passing
104         through xrealloc.
105
106 2017-10-17  Yao Qi  <yao.qi@linaro.org>
107
108         * regcache.c (regcache::xfer_part): Remove parameters read and
109         write, add parameter is_raw.  All callers are updated.
110
111 2017-10-16  Keith Seitz  <keiths@redhat.com>
112
113         * c-typeprint.c (enum access_specifier): Moved here from
114         c_type_print_base.
115         (output_access_specifier): New function.
116         (c_type_print_base): Consider typedefs when assessing
117         whether access labels are needed.
118         Use output_access_specifier as needed.
119         Output access specifier for typedefs, if needed.
120         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
121         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
122         fields.
123         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
124         accessor macros.
125
126 2017-10-16  Tom Tromey  <tom@tromey.com>
127
128         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
129         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
130         * target.c (target_fileio_read_stralloc): Update.
131         * sparc64-tdep.c (adi_is_addr_mapped): Update.
132         * target.h (target_fileio_read_stralloc): Return
133         unique_xmalloc_ptr.
134
135 2017-10-16  Tom Tromey  <tom@tromey.com>
136
137         * xml-syscall.c (xml_init_syscalls_info): Update.
138         * xml-support.c (xinclude_start_include): Update.
139         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
140         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
141         (xml_fetch_content_from_file): Likewise.
142         * osdata.c (get_osdata): Update.
143         * target.h (target_read_stralloc, target_get_osdata): Return
144         unique_xmalloc_ptr.
145         * solib-aix.c (solib_aix_get_library_list): Update.
146         * solib-target.c (solib_target_current_sos): Update.
147         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
148         * xml-tdesc.c (fetch_available_features_from_target): Update.
149         (target_fetch_description_xml): Update.
150         (file_read_description_xml): Update.
151         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
152         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
153         (remote_pid_to_exec_file): Update.
154         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
155         (target_get_osdata): Likewise.
156
157 2017-10-16  Tom Tromey  <tom@tromey.com>
158
159         * remote.c (remote_register_number_and_offset): Use std::vector.
160         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
161         (putpkt_binary): Use gdb::def_vector.
162         (compare_sections_command): Use gdb::byte_vector.
163
164 2017-10-16  Tom Tromey  <tom@tromey.com>
165
166         * ppc-linux-nat.c (hwdebug_insert_point): Use
167         gdb::unique_xmalloc_ptr, XDUP.
168
169 2017-10-16  Tom Tromey  <tom@tromey.com>
170
171         * probe.c (parse_probes): Use std::string.
172         (info_probes_for_ops, enable_probes_command)
173         (disable_probes_command): Remove cleanups.
174
175 2017-10-16  Tom Tromey  <tom@tromey.com>
176
177         * buildsym.c (block_compar): Remove.
178         (end_symtab_get_static_block): Use std::vector.
179
180 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
181
182         * memrange.h (struct mem_range): Define operator< and operator==.
183         (mem_range_s): Remove.
184         (DEF_VEC_O (mem_range_s)): Remove.
185         (normalize_mem_ranges): Change parameter type to std::vector.
186         * memrange.c (compare_mem_ranges): Remove.
187         (normalize_mem_ranges): Change parameter type to std::vector,
188         adjust to vector change.
189         * exec.c (section_table_available_memory): Return vector, remove
190         parameter.
191         (section_table_read_available_memory): Adjust to std::vector
192         change.
193         * remote.c (remote_read_bytes): Adjust to std::vector
194         change.
195         * tracepoint.h (traceframe_available_memory): Change parameter
196         type to std::vector.
197         * tracepoint.c (traceframe_available_memory): Change parameter
198         type to std::vector, adjust.
199         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
200         std::vector change.
201         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
202         unittests/memrange-selftests.c.
203         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
204         * gdb/unittests/memrange-selftests.c: New file.
205
206 2017-10-16  Pedro Alves  <palves@redhat.com>
207
208         * elfread.c (probe_key_free): Rename range-for variable.
209         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
210         (find_probe_by_pc, collect_probes): Rename range-for variable.
211
212 2017-10-16  Yao Qi  <yao.qi@linaro.org>
213
214         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
215         * features/tic6x-c62x.c: Remove.
216         * features/tic6x-c64x-linux.c: Remove.
217         * features/tic6x-c64x.c: Remove.
218         * features/tic6x-c64xp-linux.c: Remove.
219         * features/tic6x-c64xp.c: Remove.
220         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
221         initialize_tdesc_tic6x_*_linux functions.
222         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
223         initialize_tdesc_tic6x_* functions.
224
225 2017-10-16  Yao Qi  <yao.qi@linaro.org>
226
227         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
228         tic6x-c62x.
229         * regformats/tic6x-c62x.dat: Remove.
230         * regformats/tic6x-c64x.dat: Remove.
231         * regformats/tic6x-c64xp.dat: Remove.
232
233 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
234
235         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
236         (the !HAVE_LIBEXPAT version).
237
238 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
239
240         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
241         const.
242
243 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
244
245         * target.h: Include tracepoint.h.
246         (enum trace_find_type): Move to tracepoint.h.
247         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
248         * tracepoint.h: Don't include target.h
249         (enum trace_find_type): Move from target.h.
250         (parse_traceframe_info): Return a unique ptr.
251         * tracepoint.c (current_traceframe_info): Change type to unique
252         ptr.
253         (free_traceframe_info): Remove.
254         (clear_traceframe_info): Don't manually free
255         current_traceframe_info.
256         (free_result): Remove.
257         (parse_traceframe_info): Return a unique ptr.
258         (get_traceframe_info): Adjust to unique ptr.
259         * ctf.c (ctf_traceframe_info): Return a unique ptr.
260         * remote.c (remote_traceframe_info): Return a unique ptr.
261         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
262         ptr.
263         * target-debug.h (target_debug_print_traceframe_info_up): New
264         macro.
265         * target-delegates.c: Regenerate.
266
267 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
268
269         * memrange.h (struct mem_range): Add constructors.
270         * tracepoint.h (struct traceframe_info) <memory>: Change type to
271         std::vector<mem_range>.
272         * tracepoint.c (free_traceframe_info): Don't manually free
273         vector.
274         (traceframe_info_start_memory): Adjust to vector change.
275         (traceframe_available_memory): Likewise.
276         * tracefile-tfile.c (build_traceframe_info): Likewise.
277         * ctf.c (ctf_traceframe_info): Likewise.
278
279 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
280
281         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
282         std::vector<int>.
283         * tracepoint.c (free_traceframe_info): Deallocate with delete.
284         (traceframe_info_start_tvar): Adjust to vector change.
285         (parse_traceframe_info): Allocate with new.
286         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
287         vector change.
288         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
289         change.
290         tfile_traceframe_info): Allocate with new.
291         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
292         change.
293
294 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
295
296         * tracepoint.c (traceframe_info): Rename to...
297         (current_traceframe_info): ...this.
298         (clear_traceframe_info): Adjust.
299         (get_traceframe_info): Adjust.
300
301 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
302
303         * nat/linux-osdata.c: Include algorithm.
304         (compare_processes): Remove.
305         (struct pid_pgid_entry): New struct.
306         (linux_xfer_osdata_processgroups): Use std::vector instead of
307         XNEWVEC.
308
309 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
310
311         * objfiles.h: Don't include symfile.h.
312         (struct partial_symbol): Remove forward-declaration.
313         (struct objfile) <global_psymbols, static_psymbols>: Change type
314         to std::vector<partial_symbol *>.
315         * objfiles.c (objfile::objfile): Don't memset those fields.
316         (objfile::~objfile): Don't free those fields.
317         * psympriv.h (struct psymbol_allocation_list): Remove
318         forward-declaration.
319         (add_psymbol_to_list): Change psymbol_allocation_list parameter
320         to std::vector.
321         (start_psymtab_common): Change parameters to std::vector.
322         * psymtab.c: Include algorithm.
323         (require_partial_symbols): Call shrink_to_fit.
324         (find_pc_sect_psymbol): Adjust to vector change.
325         (match_partial_symbol): Likewise.
326         (lookup_partial_symbol): Likewise.
327         (psym_relocate): Likewise.
328         (dump_psymtab): Likewise.
329         (recursively_search_psymtabs): Likewise.
330         (compare_psymbols): Remove.
331         (sort_pst_symbols): Adjust to vector change.
332         (start_psymtab_common): Likewise.
333         (end_psymtab_common): Likewise.
334         (psymbol_bcache_full): De-constify return value.
335         (add_psymbol_to_bcache): Likewise.
336         (extend_psymbol_list): Remove.
337         (append_psymbol_to_list): Adjust to vector change.
338         (add_psymbol_to_list): Likewise.
339         (init_psymbol_list): Likewise.
340         (maintenance_info_psymtabs): Likewise.
341         (maintenance_check_psymtabs): Likewise.
342         * symfile.h (struct psymbol_allocation_list): Remove.
343         * symfile.c (reread_symbols): Adjust to vector change.
344         * dbxread.c (start_psymtab): Change type of parameters.
345         (dbx_symfile_read): Adjust to vector change.
346         (read_dbx_symtab): Likewise.
347         (start_psymtab): Change type of parameters.
348         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
349         (create_partial_symtab): Likewise.
350         (add_partial_symbol): Likewise.
351         (write_one_signatured_type): Likewise.
352         (recursively_write_psymbols): Likewise.
353         * mdebugread.c (parse_partial_symbols): Likewise.
354         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
355         (scan_xcoff_symtab): Adjust to vector change.
356         (xcoff_initial_scan): Likewise.
357
358 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
359
360         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
361
362 2017-10-13  Yao Qi  <yao.qi@linaro.org>
363
364         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
365         Remove s390x-*-expedite, add s390x-expedite.
366
367 2017-10-13  Yao Qi  <yao.qi@linaro.org>
368
369         * features/s390-gs-linux64.c: Regenerated.
370         * features/s390x-gs-linux64.c: Regenerated.
371
372 2017-10-13  Tom Tromey  <tom@tromey.com>
373
374         * compile/compile-object-run.c (do_module_cleanup): Use delete.
375         * solib.c (update_solib_list, reload_shared_libraries_1): Use
376         delete.
377         * symfile.c (symbol_file_add_with_addrs): Use new.
378         (symbol_file_add_separate): Update comment.
379         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
380         * jit.c (jit_object_close_impl): Use new.
381         (jit_unregister_code): Use delete.
382         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
383         (~objfile): Rename from free_objfile.
384         (free_objfile_separate_debug, do_free_objfile_cleanup)
385         (free_all_objfiles, objfile_purge_solibs): Use delete.
386         * objfiles.h (struct objfile): Add constructor and destructor.
387         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
388         (allocate_objfile, free_objfile): Don't declare.
389         (struct objstats): Add initializers.
390
391 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
392
393         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
394         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
395         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
396         * gdbarch.h: Regenerate.
397         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
398         Adjust comment.
399         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
400         (i386_displaced_step_fixup): Adjust comment.
401         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
402
403 2017-10-12  Tom Tromey  <tom@tromey.com>
404
405         * prologue-value.h (pv_area::store_would_trash): Return bool.
406         (pv_area::find_reg): Likewise.
407         * prologue-value.c (pv_area::store_would_trash): Return bool.
408         (pv_area::find_reg): Likewise.
409
410 2017-10-12  Tom Tromey  <tom@tromey.com>
411
412         * s390-linux-tdep.c (s390_store, s390_load)
413         (s390_check_for_saved, s390_analyze_prologue): Update.
414         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
415         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
416         * prologue-value.h (class pv_area): Move from prologue-value.c.
417         Change names of members.  Add constructor, destructor, member
418         functions.
419         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
420         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
421         (pv_area_fetch, pv_area_scan): Don't declare.
422         * prologue-value.c (struct pv_area::area_entry): Now member of
423         pv_area.
424         (struct pv_area): Move to prologue-value.h.
425         (pv_area::pv_area): Rename from make_pv_area.
426         (pv_area::~pv_area): Rename from free_pv_area.
427         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
428         (clear_entries, find_entry, overlaps, store_would_trash, store)
429         (fetch, find_reg, scan): Now member of pv_area.
430         Remove "area" argument.  Update.
431         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
432         Update.
433         * mn10300-tdep.c (push_reg, check_for_saved)
434         (mn10300_analyze_prologue): Update.
435         * mep-tdep.c (is_arg_spill, check_for_saved)
436         (mep_analyze_prologue): Update.
437         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
438         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
439         (m32c_is_struct_return, m32c_analyze_prologue): Update.
440         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
441         Update.
442         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
443         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
444
445 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
446
447         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
448         * linux-nat.c (linux_nat_delete_thread): New variable.
449         (lwp_free): Invoke linux_nat_delete_thread if set.
450         (linux_nat_set_delete_thread): New function.
451         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
452         thread delete callback.
453         * arm-linux-nat.c (arm_linux_delete_thread): New function.
454         (_initialize_arm_linux_nat): Assign thread delete callback.
455         * s390-linux-nat.c (s390_delete_thread): New function.
456         (_initialize_s390_nat): Assign thread delete callback.
457         * x86-linux-nat.c (x86_linux_add_target): Likewise.
458         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
459         function.
460         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
461         declaration.
462         * nat/x86-linux.c (x86_linux_delete_thread): New function.
463         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
464
465 2017-10-09  Tom Tromey  <tom@tromey.com>
466
467         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
468         std::string.
469         * tui/tui-layout.c (enum tui_status): Use std::string.
470
471 2017-10-11  Tom Tromey  <tom@tromey.com>
472
473         * gdbthread.h (thread_command): Constify.
474         * inferior.h (detach_command): Constify.
475         * top.h (set_history, show_history): Constify.
476         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
477         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
478         * bsd-kvm.c (bsd_kvm_cmd): Constify.
479         * printcmd.c (set_command): Constify.
480         (non_const_set_command): New function.
481         * dcache.c (set_dcache_command, show_dcache_command): Constify.
482         * breakpoint.c (enable_command, disable_command, delete_command)
483         (catch_command, tcatch_command, set_breakpoint_cmd)
484         (show_breakpoint_cmd): Constify.
485         * macrocmd.c (macro_command): Constify.
486         * infcmd.c (unset_command, kill_command, detach_command)
487         (info_proc_cmd): Constify.
488         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
489         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
490         (info_auto_load_cmd): Constify.
491         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
492         (unset_tdesc_cmd): Constify.
493         * ada-lang.c (set_ada_command, show_ada_command)
494         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
495         * guile/guile.c (set_guile_command, show_guile_command)
496         (info_guile_command): Constify.
497         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
498         Constify.
499         * skip.c (skip_command): Constify.
500         * compile/compile.c (_initialize_compile): Constify.
501         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
502         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
503         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
504         (maint_btrace_pt_show_cmd): Constify.
505         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
506         Constify.
507         * python/python.c (user_show_python, user_set_python): Constify.
508         * mips-tdep.c (set_mips_command, show_mips_command)
509         (set_mipsfpu_command): Constify.
510         * record-btrace.c (cmd_record_btrace_start)
511         (cmd_set_record_btrace, cmd_show_record_btrace)
512         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
513         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
514         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
515         Constify.
516         * symfile.c (overlay_command): Constify.
517         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
518         * cli/cli-logging.c (set_logging_command, show_logging_command):
519         Constify.
520         * cli/cli-dump.c (dump_command, append_command)
521         (srec_dump_command, ihex_dump_command, verilog_dump_command)
522         (tekhex_dump_command, binary_dump_command)
523         (binary_append_command): Constify.
524         * cli/cli-decode.c (struct cmd_list_element): Change type of
525         "fun".
526         * cli/cli-cmds.c (info_command, show_command, set_debug)
527         (show_debug): Constify.
528         (show_command): Add non-const overload.
529         * top.c (set_history, show_history): Constify.
530         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
531         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
532         * target.c (target_command): Constify.
533         * sparc64-tdep.c (info_adi_command): Constify.
534         * record-full.c (cmd_record_full_start): Constify.
535         (set_record_full_command): Constify.  Fix typo.
536         (show_record_full_command): Constify.
537         * thread.c (thread_command, thread_apply_command): Constify.
538         * memattr.c (dummy_cmd): Constify.
539         * value.c (function_command): Constify.
540         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
541         * probe.c (info_probes_command): Constify.
542         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
543         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
544         (show_thread_cmd, set_thread_default_cmd)
545         (show_thread_default_cmd): Constify.
546         (check_empty): Constify.
547         * tracepoint.c (tfind_command): Constify.
548         * cp-support.c (maint_cplus_command): Constify.
549         * windows-tdep.c (info_w32_command): Constify.
550         * record.c (cmd_record_start, set_record_command)
551         (show_record_command, info_record_command, cmd_record_goto):
552         Constify.
553         * ravenscar-thread.c (set_ravenscar_command)
554         (show_ravenscar_command): Constify.
555         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
556         Constify.
557         (add_internal_problem_command): Remove casts.
558         * arc-tdep.c (maintenance_print_arc_command): Constify.
559         * valprint.c (set_print, show_print, set_print_raw)
560         (show_print_raw): Constify.
561         * maint.c (maintenance_command, maintenance_info_command)
562         (maintenance_print_command, maintenance_set_cmd)
563         (maintenance_show_cmd, set_per_command_cmd)
564         (show_per_command_cmd, maintenance_check_command): Constify.
565         * language.c (set_check, show_check): Constify.
566         * typeprint.c (show_print_type, set_print_type): Constify.
567         * go32-nat.c (go32_info_dos_command): Constify.
568
569 2017-10-11  Tom Tromey  <tom@tromey.com>
570
571         * breakpoint.c (prepare_re_set_context): Remove.
572         (breakpoint_re_set_one): Update.  Don't use cleanups.
573         (breakpoint_re_set): Use scoped_restore, std::string, and
574         scoped_restore_current_language.
575
576 2017-10-11  Tom Tromey  <tom@tromey.com>
577
578         * breakpoint.c (commands_command_1): Use std::string.
579         (cleanup_executing_breakpoints): Remove.
580         (bpstat_do_actions_1): Use scoped_restore.
581         (bpstat_check_watchpoint): Use std::string.
582         (decode_static_tracepoint_spec): Likewise.
583         (break_range_command): Likewise.
584         (watch_command_1): Likewise.
585         (compare_breakpoints): Change argument types.
586         (clear_command): Use std::vector.
587         (cleanup_executing_breakpoints): Remove.
588         (update_global_location_list): Use unique_xmalloc_ptr.
589         (strace_command): Remove unused declaration.
590
591 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
592
593         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
594         * NEWS: Mention new FreeBSD/arm native configuration.
595         * configure.host: Add arm*-*-freebsd*.
596         * configure.nat: Likewise.
597         * arm-fbsd-nat.c: New file.
598
599 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
600
601         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
602         (ALLDEPFILES): Add arm-fbsd-tdep.c.
603         * NEWS: Mention new FreeBSD/arm target.
604         * configure.tgt: Add arm*-*-freebsd*.
605         * arm-fbsd-tdep.c: New file.
606         * arm-fbsd-tdep.h: New file.
607
608 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
609
610         * linux-tdep.c (linux_make_corefile_notes): Remove call to
611         `gdbarch_elfcore_write_linux_prpsinfo'.
612         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
613         method.
614         (elf_internal_linux_prpsinfo): Remove declaration.
615         * gdbarch.h: Regenerate.
616         * gdbarch.c: Regenerate.
617
618 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
619
620         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
621         `set_gdbarch_elfcore_write_linux_prpsinfo'.
622
623 2017-10-11  Pedro Alves  <palves@redhat.com>
624
625         * breakpoint.c (reattach_breakpoints): Delete.
626         * breakpoint.h (reattach_breakpoints): Delete.
627
628 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
629
630         * symfile.c (registered_sym_fns): Make struct, not typedef.
631         (DEF_VEC_O (registered_sym_fns)): Remove.
632         (symtab_fns): Change type to std::vector.
633         (add_symtab_fns): Adjust.
634         (find_sym_fns): Adjust.
635
636 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
637
638         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
639         * arc-tdep.h (arc_arch_is_em): New function.
640         (arc_arch_is_hs): Likewise.
641
642 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
643
644         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
645         parentheses in the declaration.
646         (macro_lookup_inclusion): Likewise.
647         (macro_lookup_definition): Likewise.
648         * p-lang.h (pascal_builtin_types): Likewise.
649         * tui/tui-data.c (tui_win_list): Likewise.
650         * tui/tui-data.h (tui_win_list): Likewise.
651         * utils.h (make_cleanup_free_section_addr_info): Likewise.
652
653 2017-10-11  Mark Rages  <markrages@gmail.com>
654
655         * target-memory.c (block_boundaries): Fix for block address not
656         aligned on block size.
657
658 2017-10-10  Pedro Alves <palves@redhat.com>
659             Tom Tromey  <tom@tromey.com>
660
661         * breakpoint.c (struct captured_breakpoint_query_args)
662         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
663         (print_breakpoint): New.
664         * breakpoint.h (print_breakpoint): Declare.
665         * common/common-exceptions.h (enum return_reason): Remove
666         references to catch_exceptions.
667         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
668         Delete.
669         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
670         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
671         * gdb.h: Delete.
672         * gdbthread.h (thread_select): Declare.
673         * mi/mi-cmd-break.c: Don't include gdb.h.
674         (breakpoint_notify): Use print_breakpoint.
675         * mi/mi-cmd-catch.c: Don't include gdb.h.
676         * mi/mi-interp.c: Don't include gdb.h.
677         (mi_print_breakpoint_for_event): New.
678         (mi_breakpoint_created, mi_breakpoint_modified): Use
679         mi_print_breakpoint_for_event.
680         * mi/mi-main.c: Don't include gdb.h.
681         (mi_cmd_thread_select): Parse the global thread ID here.  Use
682         thread_select instead of gdb_thread_select.
683         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
684         of using gdb_list_thread_ids.
685         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
686         FILEIO_ENOSYS here.
687         (remote_fileio_request): Use TRY/CATCH instead of
688         catch_exceptions.
689         * symfile-mem.c (struct symbol_file_add_from_memory_args)
690         (symbol_file_add_from_memory_wrapper): Delete.
691         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
692         * thread.c: Don't include gdb.h.
693         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
694         (thread_alive): Use thread_select.
695         (do_captured_thread_select): Delete, parts salvaged as ...
696         (thread_select): ... this new function.
697         (gdb_thread_select): Delete.
698
699 2017-10-10  Pedro Alves  <palves@redhat.com>
700             Tom Tromey  <tom@tromey.com>
701
702         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
703         and reverse logic.
704         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
705         No longer macros.  Instead ...
706         (enum wp_check_result): They're now values of this new
707         enumeration.
708         (watchpoint_check): Change return type to wp_check_result and
709         parameter type to bpstat.
710         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
711         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
712         catch_errors.  Reverse logic of watchpoint_check call.
713         (breakpoint_re_set_one): Now returns void and takes a breakpoint
714         pointer as parameter.
715         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
716         * common/common-exceptions.c (throw_exception_sjlj): Update
717         comments to avoid mentioning catch_errors.
718         * exceptions.c (catch_errors): Delete.
719         * exceptions.h: Update comments to avoid mentioning catch_errors.
720         (catch_errors_ftype, catch_errors): Delete.
721         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
722         (hook_stop_stub): Delete.
723         (restore_selected_frame): Change return type to void, and
724         parameter type to const frame_id &.
725         (restore_infcall_control_state): Use TRY/CATCH instead of
726         catch_errors.
727         * main.c (captured_command_loop): Return void and remove
728         parameter.  Remove references to catch_errors.
729         (captured_main): Use TRY/CATCH instead of catch_errors.
730         * objc-lang.c (objc_submethod_helper_data)
731         (find_objc_msgcall_submethod_helper): Delete.
732         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
733         catch_errors.
734         * record-full.c (record_full_message): Return void.
735         (record_full_message_args, record_full_message_wrapper): Delete.
736         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
737         instead of catch_errors.
738         * solib-aix.c (solib_aix_open_symbol_file_object): Change
739         parameter type to int.
740         * solib-darwin.c (open_symbol_file_object): Ditto.
741         * solib-dsbt.c (open_symbol_file_object): Ditto.
742         * solib-frv.c (open_symbol_file_object): Ditto.
743         * solib-svr4.c (open_symbol_file_object): Ditto.
744         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
745         * solib.c (update_solib_list): Use TRY/CATCH instead of
746         catch_errors.
747         * solist.h (struct target_so_ops) <open_symbol_file_object>:
748         Change type.
749         * symmisc.c (struct print_symbol_args): Remove.
750         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
751         (print_symbol): Change type.
752         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
753         and remove parameters.
754         (catch_errors): New.
755         (get_windows_debug_event): Adjust.
756
757 2017-10-09  Tom Tromey  <tom@tromey.com>
758
759         * mi/mi-main.c (free_splay_tree): Remove.
760         (list_available_thread_groups): Use splay_tree_up.
761         * common/gdb_splay_tree.h: New file.
762
763 2017-10-09  Tom Tromey  <tom@tromey.com>
764
765         * mi/mi-main.c (do_nothing): Remove.
766         (list_available_thread_groups): Update.
767
768 2017-10-09  Pedro Alves  <palves@redhat.com>
769
770         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
771         reading registers when switching context.
772
773 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
774
775         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
776         (fbsd_convert_siginfo): Likewise.
777         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
778
779 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
780
781         * configure.ac (try_guile_versions): Remove guile-2.2.
782         * configure: Regenerate.
783
784 2017-10-09  Tom Tromey  <tom@tromey.com>
785
786         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
787         (COMPILE.pre): Use $(CXX).
788
789 2017-10-09  Pedro Alves  <palves@redhat.com>
790
791         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
792         Use bool.
793         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
794         * cp-support.h (cp_remove_params): Now returns a
795         gdb::unique_xmalloc_ptr.
796         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
797         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
798         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
799         returning a gdb::unique_xmalloc_ptr.
800         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
801         * stack.c (find_frame_funname): Adjust to cp_remove_params
802         returning a gdb::unique_xmalloc_ptr.
803
804 2017-10-08  Tom Tromey  <tom@tromey.com>
805
806         * dwarf2read.c (dwarf2_get_dwz_file): Use
807         gdb::unique_xmalloc_ptr.
808         (find_slot_in_mapped_hash): Likewise.
809         (dwarf2_physname): Likewise.
810         (create_dwo_unit_in_dwp_v1): Use std::string.
811         (create_dwo_unit_in_dwp_v2): Likewise.
812         (lookup_dwo_cutu): Likewise.
813         (inherit_abstract_dies): Use std::vector.
814         (read_array_type): Likewise.
815         (dwarf_decode_macros): Remove unused declaration.
816         (unsigned_int_compar): Remove.
817         (dwarf2_build_psymtabs_hard): Use scoped_restore.
818         (psymtabs_addrmap_cleanup): Remove.
819
820 2017-10-08  Tom Tromey  <tom@tromey.com>
821
822         * frame-unwind.c (frame_unwind_try_unwinder): Update.
823         * frame.h (frame_cleanup_after_sniffer): Declare.
824         (frame_prepare_for_sniffer): Return void.
825         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
826         type of argument.
827         (frame_prepare_for_sniffer): Return void.
828
829 2017-10-08  Tom Tromey  <tom@tromey.com>
830
831         * utils.h (make_cleanup_value_free): Remove.
832         * utils.c (do_value_free, struct cleanup): Remove.
833         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
834         Use gdb_value_up.
835         * value.h (struct value_deleter): New.
836         (gdb_value_up): New typedef.
837
838 2017-10-08  Tom Tromey  <tom@tromey.com>
839
840         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
841         (make_cleanup_free_search_symbols): Remove.
842         (search_symbols): Return std::vector.
843         (symbol_search::compare_search_syms): Now member of
844         symbol_search.  Change arguments.
845         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
846         (symtab_symbol_info, rbreak_command): Update.
847         * symtab.h (struct symbol_search) <next>: Remove.
848         Add constructors.
849         (symbol_search::operator<): New function.
850         (symbol_search::operator==): New function.
851         (search_symbols): Remove std::vector.
852         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
853         (symbol_search::compare_search_syms): Declare.
854
855 2017-10-06  Yao Qi  <yao.qi@linaro.org>
856
857         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
858         arch/aarch64-insn.o.
859         Remove one rule.
860         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
861
862 2017-10-06  Yao Qi  <yao.qi@linaro.org>
863
864         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
865         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
866         arch/arm-linux.o respectively.
867         * configure.tgt: Likewise.
868
869 2017-10-06  Yao Qi  <yao.qi@linaro.org>
870
871         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
872         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
873
874 2017-10-06  Pedro Alves  <palves@redhat.com>
875
876         * windows-nat.c: Include <algorithm>.
877
878 2017-10-06  Yao Qi  <yao.qi@linaro.org>
879
880         * configure.tgt (i386_tobjs): New variable.
881         (amd64_tobjs): New variable.
882         Set $cpu_obs and $os_obs.
883
884 2017-10-06  Yao Qi  <yao.qi@linaro.org>
885
886         * Makefile.in (CONFIG_SRC_SUBDIR): New.
887         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
888         (clean): Remove object files and dependency files.
889         (distclean): Remove the directory.
890         * configure.ac: Invoke AC_CONFIG_COMMANDS.
891         * configure: Re-generated.
892         * configure.tgt: Replace amd64.o with arch/amd64.o.
893
894 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
895
896         PR build/22188
897         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
898         and SETEND.
899
900 2017-10-05  Pedro Alves  <palves@redhat.com>
901
902         * linux-nat.c (linux_child_follow_fork): When following the parent
903         and detaching the child, consult the parent thread's architecture
904         instead of the child's.
905
906 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
907
908         * ax.h: Do not include "doublest.h".
909         (union agent_val): Remove.
910
911 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
912
913         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
914         (decimal_to_string): Return std::string object.
915         (decimal_from_string): Accept std::string object.  Return bool.
916         (decimal_from_integral, decimal_from_doublest): Remove.
917         (decimal_from_longest): Add prototype.
918         (decimal_from_ulongest): Likewise.
919         (decimal_to_longest): Likewise.
920         (decimal_from_doublest): Likewise.
921         * dfp.c: Do not include "gdbtypes.h" or "value.h".
922         (MAX_DECIMAL_STRING): Move here.
923         (decimal_to_string): Return std::string object.
924         (decimal_from_string): Accept std::string object.  Return bool.
925         (decimal_from_integral): Remove, replace by ...
926         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
927         (decimal_to_longest): New function.
928         (decimal_from_floating): Remove, replace by ...
929         (decimal_from_doublest): ... this new function.
930         (decimal_to_doublest): Update to new decimal_to_string interface.
931
932         * value.c (unpack_long): Use decimal_to_longest.
933         * valops.c (value_cast): Use decimal_from_doublest instead of
934         decimal_from_floating.  Use decimal_from_[u]longest isntead of
935         decimal_from_integral.
936         * valarith.c (value_args_as_decimal): Likewise.
937         * valprint.c (print_decimal_floating): Update to new
938         decimal_to_string interface.
939         * printcmd.c (printf_decfloat): Likewise.
940         * c-exp.y (parse_number): Update to new decimal_from_string interface.
941
942 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
943
944         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
945         * gdbtypes.c: Include "floatformat.h".
946         * value.c: Likewise.
947         * m68k-tdep.c: Likewise.
948
949         * findvar.c: Do not include "floatformat.h".
950         * amd64-darwin-tdep.c: Likewise.
951         * arm-linux-tdep.c: Likewise.
952         * i386-darwin-tdep.c: Likewise.
953         * i387-tdep.c: Likewise.
954         * m68k-linux-tdep.c: Likewise.
955         * mep-tdep.c: Likewise.
956         * mips-tdep.c: Likewise.
957         * nios2-tdep.c: Likewise.
958         * s390-linux-tdep.c: Likewise.
959         * sparc-obsd-tdep.c: Likewise.
960         * sparc-tdep.c: Likewise.
961         * sparc64-tdep.c: Likewise.
962         * spu-tdep.c: Likewise.
963         * tic6x-tdep.c: Likewise.
964         * tilegx-tdep.c: Likewise.
965         * vax-tdep.c: Likewise.
966         * xstormy16-tdep.c: Likewise.
967         * xtensa-tdep.c: Likewise.
968
969         * top.c: Do not include "doublest.h".
970         * aarch64-tdep.c: Likewise.
971         * alpha-tdep.c: Likewise.
972         * arm-linux-tdep.c: Likewise.
973         * m68k-linux-tdep.c: Likewise.
974         * tilegx-tdep.c: Likewise.
975         * xstormy16-tdep.c: Likewise.
976
977 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
978
979         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
980         (mipsn32_fbsd_sigframe): Define.
981         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
982         for FreeBSD/mipsn32.
983
984 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
985
986         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
987         AT_HWCAP.
988
989 2017-10-05  Tristan Gingold  <tgingold@free.fr>
990
991         * MAINTAINERS (Misc): Update my email address.
992
993 2017-10-04  Pedro Alves  <palves@redhat.com>
994
995         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
996         it instead of target_gdbarch.
997         (get_remote_state, get_remote_packet_size): Adjust
998         get_remote_arch_state calls, passing down target_gdbarch
999         explicitly.
1000         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1001         'gdbarch' and use it instead of target_gdbarch.
1002         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1003         passing down target_gdbarch explicitly.
1004         (struct stop_reply) <arch>: New field.
1005         (remote_parse_stop_reply): Use the stopped thread's architecture,
1006         not the current inferior's.  Save the architecture in the
1007         stop_reply.
1008         (process_stop_reply): Use the stop reply's architecture.
1009         (process_g_packet, remote_fetch_registers)
1010         (remote_prepare_to_store, store_registers_using_G)
1011         (remote_store_registers): Adjust get_remote_arch_state calls,
1012         using the regcache's architecture.
1013         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1014         passing down target_gdbarch explicitly.
1015         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1016         beneath instead of calling target_gdbarch.
1017         * target.c (default_thread_architecture): Use the specified
1018         inferior's architecture, instead of the current inferior's
1019         architecture (via target_gdbarch).
1020
1021 2017-10-04  Pedro Alves  <palves@redhat.com>
1022
1023         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1024         case.
1025         (regcache_print): Handle !target_has_registers here instead.
1026
1027 2017-10-04  Pedro Alves  <palves@redhat.com>
1028
1029         * frame.c (create_test_frame): Delete.
1030         * frame.h (create_test_frame): Delete.
1031         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1032         (class regcache_test): Delete.
1033         (test_target_has_registers, test_target_has_stack)
1034         (test_target_has_memory, test_target_prepare_to_store)
1035         (test_target_store_registers): New functions.
1036         (test_target_ops): New class.
1037         (register_to_value_test): Error out if there's already a
1038         process_stratum (or higher) target pushed.  Create a fuller mock
1039         environment, with mock target_ops, inferior, address space, thread
1040         and inferior_ptid.
1041         * progspace.c (struct address_space): Move to ...
1042         * progspace.h (struct address_space): ... here.
1043         * regcache.h (regcache::~regcache, regcache::raw_write)
1044         [GDB_SELF_TEST]: No longer virtual.
1045
1046 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1047
1048         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1049
1050 2017-10-04  Pedro Alves  <palves@redhat.com>
1051
1052         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1053         out of 'between TRY and CATCH'.
1054
1055 2017-10-04  Pedro Alves  <palves@redhat.com>
1056
1057         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1058         * common/common-exceptions.h (TRY): Open an outermost scope.
1059         Expand intro comment.
1060         (CATCH): Reindent.
1061         (END_CATCH): Close the outermost scope.
1062         * completer.c (complete_line_internal): Add missing END_CATCH.
1063
1064 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1065
1066         * NEWS (Changes since GDB 8.0): Add entry about new
1067         'set-cwd-on-gdbserver' feature.
1068         (New remote packets): Add entry for QSetWorkingDir.
1069         * common/common-inferior.h (set_inferior_cwd): New prototype.
1070         * infcmd.c (set_inferior_cwd): Remove "static".
1071         (show_cwd_command): Expand text to include remote debugging.
1072         * remote.c: Add PACKET_QSetWorkingDir.
1073         (remote_protocol_features) <QSetWorkingDir>: New entry for
1074         PACKET_QSetWorkingDir.
1075         (extended_remote_set_inferior_cwd): New function.
1076         (extended_remote_create_inferior): Call
1077         "extended_remote_set_inferior_cwd".
1078         (_initialize_remote): Call "add_packet_config_cmd" for
1079         QSetWorkingDir.
1080
1081 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1082
1083         * NEWS (New commands): Mention "set/show cwd".
1084         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1085         "cd" command's help text.
1086         * common/common-inferior.h (get_inferior_cwd): New prototype.
1087         * infcmd.c (inferior_cwd_scratch): New global variable.
1088         (set_inferior_cwd): New function.
1089         (get_inferior_cwd): Likewise.
1090         (set_cwd_command): Likewise.
1091         (show_cwd_command): Likewise.
1092         (_initialize_infcmd): Add "set/show cwd" commands.
1093         * inferior.h (class inferior) <cwd>: New field.
1094         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1095         (fork_inferior): Change inferior's cwd before its execution.
1096         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1097         to CreateProcess.
1098
1099 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1100
1101         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1102         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1103         (COMMON_OBS): Add gdb_tilde_expand.o.
1104         * common/gdb_tilde_expand.c: New file.
1105         * common/gdb_tilde_expand.h: Likewise.
1106
1107 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1108
1109         * gdbarch.sh (objfile): Remove duplicate declaration.
1110         * gdbarch.h: Regenerate.
1111
1112 2017-10-03  Tom Tromey  <tom@tromey.com>
1113
1114         * utils.c (internal_vproblem): Use string_vprintf.
1115
1116 2017-10-03  Tom Tromey  <tom@tromey.com>
1117
1118         * printcmd.c (info_symbol_command): Use std::string.
1119
1120 2017-10-03  Tom Tromey  <tom@tromey.com>
1121
1122         * top.c (gdb_safe_append_history): Use std::string.
1123
1124 2017-10-03  Tom Tromey  <tom@tromey.com>
1125
1126         * event-top.c (stdin_event_handler): Update.
1127         * main.c (captured_main_1): Update.
1128         * top.h (make_delete_ui_cleanup): Remove.
1129         (struct ui): Add constructor and destructor.
1130         (new_ui, delete_ui): Remove.
1131         * top.c (make_delete_ui_cleanup): Remove.
1132         (new_ui_command): Use std::unique_ptr.
1133         (delete_ui_cleanup): Remove.
1134         (ui::ui): Rename from new_ui.  Update.
1135         (free_ui): Remove.
1136         (ui::~ui): Rename from delete_ui.  Update.
1137
1138 2017-10-03  Tom Tromey  <tom@tromey.com>
1139
1140         * symfile.c (load_progress): Use gdb::byte_vector.
1141
1142 2017-10-03  Tom Tromey  <tom@tromey.com>
1143
1144         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1145         declaration.
1146         * printcmd.c (x_command): Remove unused declaration.
1147         * symfile.c (symbol_file_command): Remove unused declaration.
1148
1149 2017-10-03  Tom Tromey  <tom@tromey.com>
1150
1151         * utils.c (internal_vproblem): Use std::string.
1152         (defaulted_query): Likewise.
1153
1154 2017-10-03  Tom Tromey  <tom@tromey.com>
1155
1156         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1157         * top.c (execute_command_to_string): Update.
1158         * utils.c (make_cleanup_restore_page_info): Remove.
1159         (do_restore_page_info_cleanup): Remove.
1160         (set_batch_flag_and_restore_page_info):
1161         New.
1162         (make_cleanup_restore_page_info): Remove.
1163         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1164         (~set_batch_flag_and_restore_page_info): New
1165         (make_cleanup_restore_uinteger): Remove.
1166         (make_cleanup_restore_integer): Remove.
1167         (struct restore_integer_closure): Remove.
1168         (restore_integer): Remove.
1169         * utils.h (struct set_batch_flag_and_restore_page_info): New
1170         class.
1171         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1172         (make_cleanup_restore_page_info): Remove.
1173         (make_cleanup_restore_uinteger) Remove.
1174         (make_cleanup_restore_integer) Remove.
1175
1176 2017-10-03  Tom Tromey  <tom@tromey.com>
1177
1178         * record-full.h (record_full_gdb_operation_disable_set): Return
1179         scoped_restore_tmpl<int>.
1180         * infrun.c (adjust_pc_after_break): Update.
1181         (handle_signal_stop): Update.
1182         * record-full.c (record_full_gdb_operation_disable_set): Return
1183         scoped_restore_tmpl<int>.
1184         (record_full_wait_1, record_full_insert_breakpoint)
1185         (record_full_remove_breakpoint, record_full_save)
1186         (record_full_goto_insn): Update.
1187
1188 2017-10-02  Tom Tromey  <tom@tromey.com>
1189
1190         PR rust/22236:
1191         * rust-lang.c (rust_val_print_str): New function.
1192         (val_print_struct): Call it.
1193         (rust_subscript): Preserve name of slice type.
1194
1195 2017-10-02  Tom Tromey  <tom@tromey.com>
1196
1197         * rust-lang.c (rust_subscript): Handle slices in
1198         EVAL_AVOID_SIDE_EFFECTS case.
1199
1200 2017-10-02  Tom Tromey  <tom@tromey.com>
1201
1202         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1203
1204 2017-10-02  Tom Tromey  <tom@tromey.com>
1205
1206         * rust-lang.h (rust_slice_type): Add "extern".
1207
1208 2017-10-02  Tom Tromey  <tom@tromey.com>
1209             Pedro Alves  <palves@redhat.com>
1210
1211         * ada-lang.h (ada_exc_info::operator<): Make const.
1212         (ada_exc_info::operator==): Make const.
1213         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1214         Make const.
1215
1216 2017-09-29  Tom Tromey  <tom@tromey.com>
1217
1218         * target.c (read_whatever_is_readable): Change type of "result".
1219         Update.
1220         (free_memory_read_result_vector): Remove.
1221         (read_memory_robust): Change return type.  Update.
1222         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1223         bin2hex, std::string.
1224         * target.h (memory_read_result_s): Remove typedef.
1225         (free_memory_read_result_vector): Remove.
1226         (read_memory_robust): Return std::vector.
1227
1228 2017-09-29  Tom Tromey  <tom@tromey.com>
1229
1230         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1231
1232 2017-09-29  Tom Tromey  <tom@tromey.com>
1233
1234         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1235         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1236         operator< and operator==.
1237         (ada_exceptions_list): Return a std::vector.
1238         * ada-lang.c (ada_exc_info::operator<): Rename from
1239         compare_ada_exception_info.
1240         (ada_exc_info::operator==): New.
1241         (sort_remove_dups_ada_exceptions_list): Change type of
1242         "exceptions".
1243         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1244         (ada_add_global_exceptions): Likewise.
1245         (ada_exceptions_list_1): Return a std::vector.
1246         (ada_exceptions_list): Likewise.
1247
1248 2017-09-29  Tom Tromey  <tom@tromey.com>
1249
1250         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1251         'std::set *'.
1252         (print_one_inferior): Update.
1253         (free_vector_of_ints): Remove.
1254         (list_available_thread_groups): Change "ids" to std::set.
1255         (mi_cmd_list_thread_groups): Update.
1256         (struct collect_cores_data) <core>: Now a std::set.
1257         (collect_cores): Update.
1258         (unique): Remove.
1259         (print_one_inferior): Update.
1260
1261 2017-09-29  Tom Tromey  <tom@tromey.com>
1262
1263         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1264         (mi_execute_async_cli_command): Likewise.
1265         (mi_cmd_trace_frame_collected): Use field_fmt.
1266
1267 2017-09-29  Tom Tromey  <tom@tromey.com>
1268
1269         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1270         gdb::byte_vector.
1271
1272 2017-09-29  Tom Tromey  <tom@tromey.com>
1273
1274         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1275
1276 2017-09-29  Tom Tromey  <tom@tromey.com>
1277
1278         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1279
1280 2017-09-29  Tom Tromey  <tom@tromey.com>
1281
1282         * varobj.h (varobj_gen_name): Return std::string.
1283         * varobj.c (varobj_gen_name): Return std::string.
1284         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1285         (mi_cmd_var_delete): Don't copy "name".
1286
1287 2017-09-29  Tom Tromey  <tom@tromey.com>
1288
1289         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1290         (mi_cmd_break_insert_1): Update.
1291
1292 2017-09-29  Tom Tromey  <tom@tromey.com>
1293
1294         * target.h (make_scoped_defer_target_commit_resume): Update.
1295         * target.c (make_scoped_defer_target_commit_resume): Rename from
1296         make_cleanup_defer_target_commit_resume.  Return a
1297         scoped_restore.
1298         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1299
1300 2017-09-29  Tom Tromey  <tom@tromey.com>
1301
1302         * main.c (captured_main_1): Remove unused declaration.
1303         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1304
1305 2017-09-29  Tom Tromey  <tom@tromey.com>
1306
1307         * symtab.c (search_symbols): Remove unused outer cleanup.
1308         (make_source_files_completion_list): Remove unused declaration.
1309
1310 2017-09-29  Tom Tromey  <tom@tromey.com>
1311
1312         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1313
1314 2017-09-29  Tom Tromey  <tom@tromey.com>
1315
1316         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1317         gdb::byte_vector.
1318
1319 2017-09-29  Tom Tromey  <tom@tromey.com>
1320
1321         * complaints.c (vcomplaint): Use std::string.
1322
1323 2017-09-29  Tom Tromey  <tom@tromey.com>
1324
1325         * tracepoint.c (trace_variable_command): Use std::string.
1326         (encode_actions_1): Remove unused declarations.
1327         (create_tsv_from_upload): Use std::string.
1328
1329 2017-09-29  Tom Tromey  <tom@tromey.com>
1330
1331         * cp-support.c (gdb_demangle): Use std::string.
1332
1333 2017-09-29  Tom Tromey  <tom@tromey.com>
1334
1335         * stack.c (parse_frame_specification): Use std::string
1336         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1337
1338 2017-09-29  Tom Tromey  <tom@tromey.com>
1339
1340         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1341
1342 2017-09-29  Tom Tromey  <tom@tromey.com>
1343
1344         * utils.c (vfprintf_maybe_filtered): Use std::string.
1345         (vfprintf_unfiltered): Likewise.
1346
1347 2017-09-29  Tom Tromey  <tom@tromey.com>
1348
1349         * event-top.c (top_level_prompt): Return std::string.
1350         (display_gdb_prompt): Update.
1351
1352 2017-09-29  Tom Tromey  <tom@tromey.com>
1353
1354         * unittests/common-utils-selftests.c (format): New function.
1355         (string_vprintf_tests): New function.
1356         (_initialize_common_utils_selftests): Register new tests.
1357         * common/common-utils.c (string_vprintf): New function.
1358         * common/common-utils.h (string_vprintf): Declare.
1359
1360 2017-09-29  Pedro Alves  <palves@redhat.com>
1361
1362         * common/rsp-low.c (unpack_varlen_hex): Constify.
1363         * common/rsp-low.h (unpack_varlen_hex): Constify.
1364         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1365         Constify.
1366         * remote.c (remote_set_permissions, read_ptid)
1367         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1368         (remote_static_tracepoint_marker_at)
1369         (remote_static_tracepoint_markers_by_strid)
1370         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1371         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1372         (parse_tracepoint_definition, parse_tsv_definition)
1373         (parse_static_tracepoint_marker_definition): Constify.
1374         * tracepoint.h (parse_static_tracepoint_marker_definition)
1375         (parse_trace_status, parse_tracepoint_status)
1376         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1377
1378 2017-09-29  Pedro Alves  <palves@redhat.com>
1379
1380         * remote.c (target_buf, target_buf_size): Delete.
1381         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1382         Use the connection's packet buffer instead.
1383         All callers adjusted.
1384         (_initialize_remote): Remove references to target_buf and
1385         target_buf_size.
1386
1387 2017-09-28  Pedro Alves  <palves@redhat.com>
1388
1389         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1390         unittests/common-utils-selftests.c.
1391         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1392         (COMMON_OBS): Remove utils-selftests.o.
1393         * utils-selftests.c: Move to ...
1394         * unittests/common-utils-selftests.c: ... here and rename self
1395         test to "string_printf".
1396
1397 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1398
1399         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1400         having NULL cus or tus.
1401
1402 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1403
1404         * arm-tdep.c: (convert_from_extended): Remove.
1405         (convert_to_extended): Likewise.
1406         (arm_extract_return_value): Use convert_typed_floating.
1407         (arm_store_return_value): Likewise.
1408
1409         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1410         * sh-tdep.c: Do not include "floatformat.h".
1411         (sh_littlebyte_bigword_type): New function.
1412         (sh_register_convert_to_virtual): Use convert_typed_floating.
1413         (sh_register_convert_to_raw): Likewise.
1414         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1415         (sh64_littlebyte_bigword_type): New function.
1416         (sh64_extract_return_value): Use convert_typed_floating.
1417         (sh64_register_convert_to_virtual): Likewise.
1418         (sh64_register_convert_to_raw): Likewise.
1419
1420 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1421
1422         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1423         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1424
1425         * gdbtypes.h (union type_specific): Make field floatformat hold
1426         just a single struct floatformat, not an array.
1427         (floatformat_from_type): Move here.
1428         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1429         changed TYPE_FLOATFORMAT definition.
1430         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1431         (recursive_dump_type): Likewise.
1432         (init_float_type): Install correct floatformat for byte order.
1433         (arch_float_type): Likewise.
1434
1435 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1436
1437         * gdbtypes.c (init_type): Change incoming argument from
1438         length-in-bytes to length-in-bits.  Assert length is a
1439         multiple of TARGET_CHAR_BITS.
1440         (arch_type, arch_flags_type): Likewise.
1441         (init_integer_type): Update call to init_type.
1442         (init_character_type): Likewise.
1443         (init_boolean_type): Likewise.
1444         (init_float_type): Likewise.
1445         (init_decfloat_type): Likewise.
1446         (init_complex_type): Likewise.
1447         (init_pointer_type): Likewise.
1448         (objfile_type): Likewise.
1449         (arch_integer_type): Update call to arch_type.
1450         (arch_character_type): Likewise.
1451         (arch_boolean_type): Likewise.
1452         (arch_float_type): Likewise.
1453         (arch_decfloat_type): Likewise.
1454         (arch_complex_type): Likewise.
1455         (arch_pointer_type): Likewise.
1456         (gdbtypes_post_init): Likewise.
1457
1458         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1459         (read_base_type): Likewise.
1460         * mdebugread.c (basic_type): Likewise.
1461         * stabsread.c (dbx_init_float_type): Likewise.
1462         (rs6000_builtin_type): Likewise.
1463         (read_range_type): Likewise.  Also, fix call to init_integer_type
1464         with erroneous length argument.
1465
1466         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1467         * d-lang.c (build_d_types): Likewise.
1468         * f-lang.c (build_fortran_types): Likewise.
1469         * go-lang.c (build_go_types): Likewise.
1470         * opencl-lang.c (build_opencl_types): Likewise.
1471         * jit.c (finalize_symtab): Likewise.
1472         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1473         (build_std_type_info_type): Likewise.
1474         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1475         update call to arch_flags_type.
1476
1477         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1478         arch_type.
1479         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1480         * windows-tdep.c (windows_get_tlb_type): Likewise.
1481
1482         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1483         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1484         * m32c-tdep.c (make_types): Likewise.
1485         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1486         (rl78_psw_type): Update call to arch_flags_type.
1487         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1488         * rx-tdep.c (rx_psw_type): Likewise.
1489         (rx_fpsw_type): Likewise.
1490         * sparc-tdep.c (sparc_psr_type): Likewise.
1491         (sparc_fsr_type): Likewise.
1492         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1493         (sparc64_ccr_type): Likewise.
1494         (sparc64_fsr_type): Likewise.
1495         (sparc64_fprs_type): Likewise.
1496
1497 2017-09-27  Tom Tromey  <tom@tromey.com>
1498
1499         * findcmd.c (find_command): Constify.
1500
1501 2017-09-27  Tom Tromey  <tom@tromey.com>
1502
1503         * ada-tasks.c (task_command_1, task_command): Constify.
1504
1505 2017-09-27  Tom Tromey  <tom@tromey.com>
1506
1507         * symtab.c (maintenance_print_symbol_cache)
1508         (maintenance_flush_symbol_cache)
1509         (maintenance_print_symbol_cache_statistics): Constify.
1510
1511 2017-09-27  Tom Tromey  <tom@tromey.com>
1512
1513         * inferior.c (detach_inferior_command, kill_inferior_command)
1514         (inferior_command): Constify.
1515
1516 2017-09-27  Tom Tromey  <tom@tromey.com>
1517
1518         * regcache.c (regcache_print, maintenance_print_registers)
1519         (maintenance_print_raw_registers)
1520         (maintenance_print_cooked_registers)
1521         (maintenance_print_register_groups)
1522         (maintenance_print_remote_registers): Constify.
1523
1524 2017-09-27  Tom Tromey  <tom@tromey.com>
1525
1526         * printcmd.c (map_display_numbers, undisplay_command)
1527         (enable_disable_display_command, enable_display_command)
1528         (disable_display_command): Constify.
1529
1530 2017-09-27  Tom Tromey  <tom@tromey.com>
1531
1532         * breakpoint.h (delete_command): Don't declare.
1533         * breakpoint.c (delete_command, enable_once_command)
1534         (enable_count_command, enable_delete_command, breakpoint_1)
1535         (maintenance_info_breakpoints, stopin_command, stopat_command)
1536         (delete_command, delete_trace_command, save_breakpoints)
1537         (save_breakpoints_command, save_tracepoints_command): Constify.
1538
1539 2017-09-27  Tom Tromey  <tom@tromey.com>
1540
1541         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1542         (skip_ws, extract_identifier, macro_define_command)
1543         (macro_undef_command, macro_list_command): Constify.
1544
1545 2017-09-27  Tom Tromey  <tom@tromey.com>
1546
1547         * infcmd.c (environment_info, set_environment_command)
1548         (unset_environment_command, path_info, info_proc_cmd_1)
1549         (info_proc_cmd_mappings, info_proc_cmd_stat)
1550         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1551         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1552
1553 2017-09-27  Tom Tromey  <tom@tromey.com>
1554
1555         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1556         Constify.
1557
1558 2017-09-27  Tom Tromey  <tom@tromey.com>
1559
1560         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1561
1562 2017-09-27  Tom Tromey  <tom@tromey.com>
1563
1564         * demangle.c (demangle_command): Constify.
1565
1566 2017-09-27  Tom Tromey  <tom@tromey.com>
1567
1568         * progspace.c (maintenance_info_program_spaces_command):
1569         Constify.
1570
1571 2017-09-27  Tom Tromey  <tom@tromey.com>
1572
1573         * compile/compile.c (check_raw_argument, compile_file_command)
1574         (compile_code_command, compile_print_command): Constify.
1575
1576 2017-09-27  Tom Tromey  <tom@tromey.com>
1577
1578         * reggroups.c (maintenance_print_reggroups): Constify.
1579
1580 2017-09-27  Tom Tromey  <tom@tromey.com>
1581
1582         * dwarf2read.c (save_gdb_index_command): Constify.
1583
1584 2017-09-27  Tom Tromey  <tom@tromey.com>
1585
1586         * stap-probe.c (info_probes_stap_command): Constify.
1587
1588 2017-09-27  Tom Tromey  <tom@tromey.com>
1589
1590         * fork-child.c (unset_exec_wrapper_command): Constify.
1591
1592 2017-09-27  Tom Tromey  <tom@tromey.com>
1593
1594         * btrace.c (get_uint, get_context_size, no_chunk)
1595         (maint_btrace_packet_history_cmd)
1596         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1597         (maint_info_btrace_cmd): Constify.
1598
1599 2017-09-27  Tom Tromey  <tom@tromey.com>
1600
1601         * reverse.c (delete_bookmark_command): Constify.
1602
1603 2017-09-27  Tom Tromey  <tom@tromey.com>
1604
1605         * remote.c (set_memory_packet_size)
1606         (set_memory_write_packet_size, show_memory_write_packet_size)
1607         (set_memory_read_packet_size, show_memory_read_packet_size)
1608         (compare_sections_command, packet_command, remote_put_command)
1609         (remote_get_command, remote_delete_command): Constify.
1610
1611 2017-09-27  Tom Tromey  <tom@tromey.com>
1612
1613         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1614         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1615         (set_mipsfpu_auto_command): Constify.
1616
1617 2017-09-27  Tom Tromey  <tom@tromey.com>
1618
1619         * cli/cli-cmds.h (cd_command): Constify.
1620         * cli/cli-cmds.c (cd_command): Constify.
1621
1622 2017-09-27  Tom Tromey  <tom@tromey.com>
1623
1624         * thread.c (thread_name_command, thread_find_command): Constify.
1625
1626 2017-09-27  Tom Tromey  <tom@tromey.com>
1627
1628         * probe.c (enable_probes_command, disable_probes_command):
1629         Constify.
1630
1631 2017-09-27  Tom Tromey  <tom@tromey.com>
1632
1633         * symfile.c (symbol_file_command): Constify.
1634         * gdbcore.h (deprecated_file_changed_hook): Constify.
1635         * exec.c (deprecated_file_changed_hook, exec_file_command)
1636         (file_command): Constify.
1637         * defs.h (symbol_file_command): Constify.
1638
1639 2017-09-27  Tom Tromey  <tom@tromey.com>
1640
1641         * remote-fileio.c (set_system_call_allowed)
1642         (show_system_call_allowed): Constify.
1643
1644 2017-09-27  Tom Tromey  <tom@tromey.com>
1645
1646         * tracepoint.c (delete_trace_variable_command)
1647         (tfind_end_command, tfind_start_command, tfind_pc_command)
1648         (tfind_tracepoint_command, tfind_line_command)
1649         (tfind_range_command, tfind_outside_command): Constify.
1650
1651 2017-09-27  Tom Tromey  <tom@tromey.com>
1652
1653         * ax-gdb.c (maint_agent_printf_command, agent_command)
1654         (agent_eval_command): Constify.
1655
1656 2017-09-27  Tom Tromey  <tom@tromey.com>
1657
1658         * tracepoint.c (info_scope_command): Constify.
1659         * python/python.c (gdbpy_decode_line): Constify.
1660         * python/py-breakpoint.c (bppy_init): Constify.
1661         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1662         * location.h: (new_linespec_location)
1663         (string_to_event_location_basic, string_to_event_location):
1664         Constify.
1665         * location.c (new_linespec_location)
1666         (string_to_event_location_basic, string_to_event_location):
1667         Constify.
1668         * linespec.h (decode_line_with_current_source)
1669         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1670         * linespec.c (linespec_lex_to_end)
1671         (decode_line_with_current_source)
1672         (decode_line_with_last_displayed): Constify.
1673         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1674         Constify.
1675         * cli/cli-cmds.c (edit_command, list_command): Constify.
1676         * breakpoint.h (until_break_command, watch_command_wrapper)
1677         (awatch_command_wrapper, rwatch_command_wrapper)
1678         (init_ada_exception_breakpoint): Constify.
1679         * breakpoint.c (break_command_1, dprintf_command)
1680         (break_range_command, watch_command_wrapper)
1681         (rwatch_command_wrapper, awatch_command_wrapper)
1682         (until_break_command, init_ada_exception_breakpoint)
1683         (strace_marker_create_sals_from_location, trace_command)
1684         (ftrace_command, strace_command, struct tracepoint): Constify.
1685         * ax-gdb.c (agent_command_1): Constify.
1686         * ada-lang.c (ada_exception_sal): Constify.
1687
1688 2017-09-27  Tom Tromey  <tom@tromey.com>
1689
1690         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1691         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1692         (get_context_size, no_chunk, get_insn_history_modifiers)
1693         (cmd_record_insn_history, get_call_history_modifiers)
1694         (cmd_record_call_history): Constify.
1695
1696 2017-09-27  Tom Tromey  <tom@tromey.com>
1697
1698         * source.c (show_substitute_path_command)
1699         (unset_substitute_path_command, set_substitute_path_command):
1700         Constify.
1701
1702 2017-09-27  Tom Tromey  <tom@tromey.com>
1703
1704         * typeprint.c (maintenance_print_type): Constify.
1705         * maint.c (maintenance_dump_me, maintenance_demangle)
1706         (maintenance_time_display, maintenance_info_sections)
1707         (maintenance_print_statistics, maintenance_deprecate)
1708         (maintenance_undeprecate): Constify.
1709         (maintenance_do_deprecate): Constify.  Use std::string.
1710         (maintenance_selftest): Constify.
1711         * gdbtypes.h (maintenance_print_type): Constify.
1712
1713 2017-09-27  Tom Tromey  <tom@tromey.com>
1714
1715         * hppa-tdep.c (unwind_command): Constify.
1716
1717 2017-09-27  Tom Tromey  <tom@tromey.com>
1718
1719         * target-descriptions.c (unset_tdesc_filename_cmd)
1720         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1721         Constify.
1722
1723 2017-09-27  Tom Tromey  <tom@tromey.com>
1724
1725         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1726
1727 2017-09-27  Tom Tromey  <tom@tromey.com>
1728
1729         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1730
1731 2017-09-27  Tom Tromey  <tom@tromey.com>
1732
1733         * tui/tui-regs.c (tui_reg_command): Constify.
1734
1735 2017-09-27  Tom Tromey  <tom@tromey.com>
1736
1737         * skip.c (skip_file_command, skip_function_command)
1738         (skip_enable_command, skip_disable_command, skip_delete_command):
1739         Constify.
1740
1741 2017-09-27  Tom Tromey  <tom@tromey.com>
1742
1743         * record-btrace.c (cmd_record_btrace_bts_start)
1744         (cmd_record_btrace_pt_start): Constify.
1745
1746 2017-09-27  Tom Tromey  <tom@tromey.com>
1747
1748         * symmisc.c (maintenance_print_symbols)
1749         (maintenance_print_msymbols, maintenance_print_objfiles)
1750         (maintenance_info_symtabs, maintenance_check_symtabs)
1751         (maintenance_expand_symtabs, maintenance_info_line_tables):
1752         Constify.
1753
1754 2017-09-27  Tom Tromey  <tom@tromey.com>
1755
1756         * top.c (new_ui_command): Constify.
1757
1758 2017-09-27  Tom Tromey  <tom@tromey.com>
1759
1760         * symfile.c (add_symbol_file_command)
1761         (remove_symbol_file_command, list_overlays_command)
1762         (map_overlay_command, unmap_overlay_command)
1763         (overlay_auto_command, overlay_manual_command)
1764         (overlay_off_command, overlay_load_command): Constify.
1765
1766 2017-09-27  Tom Tromey  <tom@tromey.com>
1767
1768         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1769         (info_spu_mailbox_command, info_spu_dma_command)
1770         (info_spu_proxydma_command): Constify.
1771
1772 2017-09-27  Tom Tromey  <tom@tromey.com>
1773
1774         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1775
1776 2017-09-27  Tom Tromey  <tom@tromey.com>
1777
1778         * cli/cli-script.c (user_defined_command): Constify.
1779
1780 2017-09-27  Tom Tromey  <tom@tromey.com>
1781
1782         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1783         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1784         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1785         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1786         (dump_binary_value, append_binary_memory, append_binary_value):
1787         Constify.
1788         (struct dump_context) <func>: Constify.
1789         (add_dump_command): Update.
1790
1791 2017-09-27  Tom Tromey  <tom@tromey.com>
1792
1793         * cli/cli-cmds.c (show_version, show_configuration)
1794         (source_command, show_user): Constify.
1795
1796 2017-09-27  Tom Tromey  <tom@tromey.com>
1797
1798         * target.c (maintenance_print_target_stack): Constify.
1799
1800 2017-09-27  Tom Tromey  <tom@tromey.com>
1801
1802         * interps.c (interpreter_exec_cmd): Constify.
1803
1804 2017-09-27  Tom Tromey  <tom@tromey.com>
1805
1806         * record-full.c (cmd_record_full_restore): Constify.
1807
1808 2017-09-27  Tom Tromey  <tom@tromey.com>
1809
1810         * memattr.c (enable_mem_command, disable_mem_command)
1811         (delete_mem_command): Constify.
1812
1813 2017-09-27  Tom Tromey  <tom@tromey.com>
1814
1815         * value.c (show_convenience): Constify.
1816
1817 2017-09-27  Tom Tromey  <tom@tromey.com>
1818
1819         * gdbcore.h (core_file_command): Update.
1820         * corefile.c (core_file_command): Constify.
1821
1822 2017-09-27  Tom Tromey  <tom@tromey.com>
1823
1824         * user-regs.c (maintenance_print_user_registers): Constify.
1825
1826 2017-09-27  Tom Tromey  <tom@tromey.com>
1827
1828         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1829
1830 2017-09-27  Tom Tromey  <tom@tromey.com>
1831
1832         * cp-support.c (first_component_command): Constify.
1833
1834 2017-09-27  Tom Tromey  <tom@tromey.com>
1835
1836         * psymtab.c (maintenance_print_psymbols)
1837         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1838         Constify.
1839
1840 2017-09-27  Tom Tromey  <tom@tromey.com>
1841
1842         * windows-tdep.c (display_tib): Constify.
1843
1844 2017-09-27  Tom Tromey  <tom@tromey.com>
1845
1846         * linux-fork.c (delete_checkpoint_command)
1847         (detach_checkpoint_command): Constify.
1848
1849 2017-09-27  Tom Tromey  <tom@tromey.com>
1850
1851         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1852
1853 2017-09-27  Tom Tromey  <tom@tromey.com>
1854
1855         * arc-tdep.c (dump_arc_instruction_command): Constify.
1856
1857 2017-09-27  Tom Tromey  <tom@tromey.com>
1858
1859         * valprint.c (set_radix, show_radix): Constify.
1860
1861 2017-09-27  Tom Tromey  <tom@tromey.com>
1862
1863         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1864
1865 2017-09-27  Tom Tromey  <tom@tromey.com>
1866
1867         * command.h (not_just_help_class_command): Update.
1868         * cli/cli-decode.h (not_just_help_class_command): Update.
1869         * cli/cli-decode.c (not_just_help_class_command): Constify.
1870
1871 2017-09-27  Tom Tromey  <tom@tromey.com>
1872
1873         * gdb_bfd.c (maintenance_info_bfds): Constify.
1874
1875 2017-09-27  Tom Tromey  <tom@tromey.com>
1876
1877         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1878         overloads.
1879         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1880         (do_const_cfunc): New function.
1881         (cmd_cfunc_eq): New overload.
1882         (cli_user_command_p): Check do_const_cfunc.
1883         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1884         const_cfunc.
1885         * command.h (add_cmd): Add const overload and no-function
1886         overload.
1887         (set_cmd_cfunc): Add const overload.
1888         (cmd_const_cfunc_ftype): Declare.
1889         (cmd_cfunc_eq): Add const overload.
1890         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1891         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1892         overload.
1893
1894 2017-09-27  Tom Tromey  <tom@tromey.com>
1895
1896         * macroexp.c (get_next_token_for_substitution): New function.
1897         (substitute_args): Call it.  Check for __VA_OPT__.
1898
1899 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1900             Pedro Alves <palves@redhat.com>
1901
1902         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1903         producer_is_icc_lt_14.
1904         (producer_is_icc_lt_14): New function.
1905         (check_producer): Add code for checking version of ICC.
1906         (producer_is_icc): Move to producer.c.
1907         (read_structure_type): Restrict ICC workaround to ICC<14.
1908         * producer.c: Include selftest.h.
1909         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1910         New functions.
1911         * producer.h (producer_is_icc): New declaration.
1912
1913 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1914
1915         * Makefile.in (SFILES): Add producer.c.
1916         (COMMON_OBS): Add producer.o
1917         * amd64-tdep.c (producer.h): Add new include.
1918         * dwarf2read.c (producer.h): Add new include.
1919         * producer.c: New file.
1920         * producer.h: New file.
1921         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1922         producer.c.
1923         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1924         producer.h.
1925
1926 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1927
1928         * configure.ac: Search ncursesw before ncurses.
1929         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1930         * gdb_curses.h: Include <ncursesw/ncurses.h>
1931         * config.in, configure: Regenerate.
1932
1933 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1934
1935         PR gdb/22185
1936         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1937         obsolete.
1938         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1939         Remove i386sol2 support.
1940         * configure.nat <i386sol2>: Remove.
1941         <sol2-64>: Fold into ...
1942         <sol2>: ... this.
1943         Move common settings to default section.
1944         Add sol-thread.o.
1945         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1946         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1947         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1948         <i[34567]86-*-solaris*>: Remove.
1949         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1950
1951         * configure.ac: Remove wctype in libw check.
1952         (_MSE_INT_H): Don't define on Solaris 7-9.
1953         <solaris*>: Remove libthread_db.so.1 check.
1954         * configure: Regenerate.
1955         * config.in: Regenerate.
1956
1957         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1958         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1959         (gdb_ps_size_t): Remove.
1960         Use base types in users.
1961         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1962
1963         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1964
1965 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1966
1967         PR build/22206
1968         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1969         (adi_is_addr_mapped): Likewise.
1970         (PSR_ICC): Don't redefine.
1971         (PSR_IMPL): Likewise.
1972
1973 2017-09-25  Tom Tromey  <tom@tromey.com>
1974
1975         * regcache.c (regcache::dump): Use string_printf.
1976
1977 2017-09-25  Tom Tromey  <tom@tromey.com>
1978
1979         * regcache.c (class regcache_invalidator): New.
1980         (struct register_to_invalidate): Remove.
1981         (make_cleanup_regcache_invalidate): Remove.
1982         (regcache::raw_write): Use regcache_invalidator.
1983
1984 2017-09-25  Tom Tromey  <tom@tromey.com>
1985
1986         * spu-tdep.c (spu2ppu_sniffer): Update.
1987         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1988         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1989         Remove.
1990         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1991         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1992         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1993         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1994         (frame_pop): Update.
1995
1996 2017-09-25  Tom Tromey  <tom@tromey.com>
1997
1998         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1999         * regcache.h (regcache_xfree): Don't declare.
2000         * regcache.c (regcache_xfree): Remove.
2001         (do_regcache_xfree): Use delete.
2002         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2003         * linux-fork.c (free_fork): Use delete.
2004         (fork_save_infrun_state): Likewise.
2005         * jit.c (jit_dealloc_cache): Use delete.
2006         * infrun.c (discard_infcall_suspend_state): Use delete.
2007
2008 2017-09-25  Tom Tromey  <tom@tromey.com>
2009
2010         * regcache.h (regcache_xmalloc): Don't declare.
2011         (regcache_raw_set_cached_value): Update comment.
2012         * regcache.c (regcache_xmalloc): Remove.
2013         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2014         * jit.c (jit_frame_sniffer): Use new.
2015         * frame.c (frame_save_as_regcache): Use new.
2016
2017 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2018
2019         * NEWS: Advertise support for guarded-storage registers on IBM z.
2020
2021 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2022
2023         * s390-linux-nat.c (have_regset_gs): New static variable.
2024         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2025         control block and guarded-storage broadcast control regsets.
2026         (s390_read_description): Detect whether the target has
2027         guarded-storage support, return appropriate tdesc.
2028         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2029         (features/s390x-gs-linux64.c): Likewise.
2030         (struct gdbarch_tdep) <have_gs>: New field.
2031         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2032         (s390_gsbc_regset): New variables.
2033         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2034         and s390_gsbc_regset, if applicable.
2035         (s390_core_read_description): Check whether core file was from a
2036         target with guarded-storage support; include appropriate regsets.
2037         (s390_gdbarch_init): Add registers for guarded-storage support.
2038         (_initialize_s390_tdep): Initialize new target descriptions that
2039         include registers for guarded-storage support.
2040         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2041         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2042         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2043         (S390_NUM_REGS): Adjust macro definition.
2044         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2045         (tdesc_s390x_gs_linux64): New declarations.
2046
2047 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2048
2049         * features/s390-gs-linux64.xml: New file.
2050         * features/s390-gs.xml: New file.
2051         * features/s390-gsbc.xml: New file.
2052         * features/s390x-gs-linux64.xml: New file.
2053         * features/Makefile (WHICH): Add s390-gs-linux64 and
2054         s390x-gs-linux64.
2055         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2056         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2057         * features/s390-gs-linux64.c: New generated file.
2058         * features/s390x-gs-linux64.c: New file.
2059         * regformats/s390-gs-linux64.dat: New file.
2060         * regformats/s390x-gs-linux64.dat: New file.
2061
2062 2017-09-23  Tom Tromey  <tom@tromey.com>
2063
2064         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2065
2066 2017-09-22  Tom Tromey  <tom@tromey.com>
2067
2068         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2069         type to scoped_restore_tmpl.
2070         <scoped_input_handler>: Initialize m_quit_handler directly.
2071
2072 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2073
2074         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2075         (cd_command): Likewise.  Free "current_directory" before
2076         assigning to it.
2077         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2078         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2079         * top.c (gdb_dirbuf): Remove global declaration.
2080         * top.h (gdb_dirbuf): Likewise.
2081
2082 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2083
2084         * gnulib/aclocal.m4: Regenerate.
2085         * gnulib/config.in: Regenerate.
2086         * gnulib/configure: Regenerate.
2087         * gnulib/import/Makefile.am: Regenerate.
2088         * gnulib/import/Makefile.in: Regenerate.
2089         * gnulib/import/assure.h: New file.
2090         * gnulib/import/at-func.c: Likewise
2091         * gnulib/import/chdir-long.c: New file.
2092         * gnulib/import/chdir-long.h: New file.
2093         * gnulib/import/cloexec.c: New file.
2094         * gnulib/import/cloexec.h: New file.
2095         * gnulib/import/close.c: New file.
2096         * gnulib/import/closedir.c: New file.
2097         * gnulib/import/dirent-private.h: New file.
2098         * gnulib/import/dup-safer.c: New file.
2099         * gnulib/import/dup.c: New file.
2100         * gnulib/import/dup2.c: New file.
2101         * gnulib/import/error.c: New file.
2102         * gnulib/import/error.h: New file.
2103         * gnulib/import/exitfail.c: New file.
2104         * gnulib/import/exitfail.h: New file.
2105         * gnulib/import/fchdir.c: New file.
2106         * gnulib/import/fcntl.c: New file.
2107         * gnulib/import/fcntl.in.h: New file.
2108         * gnulib/import/fd-hook.c: New file.
2109         * gnulib/import/fd-hook.h: New file.
2110         * gnulib/import/fd-safer.c: New file.
2111         * gnulib/import/fdopendir.c: New file.
2112         * gnulib/import/filename.h: New file.
2113         * gnulib/import/filenamecat-lgpl.c: New file.
2114         * gnulib/import/filenamecat.h: New file.
2115         * gnulib/import/fstat.c: New file.
2116         * gnulib/import/fstatat.c: New file.
2117         * gnulib/import/getcwd-lgpl.c: New file.
2118         * gnulib/import/getcwd.c: New file.
2119         * gnulib/import/getdtablesize.c: New file.
2120         * gnulib/import/getlogin_r.c: New file.
2121         * gnulib/import/getprogname.c: New file.
2122         * gnulib/import/getprogname.h: New file.
2123         * gnulib/import/gettext.h: New file.
2124         * gnulib/import/glob-libc.h: New file.
2125         * gnulib/import/glob.c: New file.
2126         * gnulib/import/glob.in.h: New file.
2127         * gnulib/import/intprops.h: New file.
2128         * gnulib/import/m4/chdir-long.m4: New file.
2129         * gnulib/import/m4/close.m4: New file.
2130         * gnulib/import/m4/closedir.m4: New file.
2131         * gnulib/import/m4/d-ino.m4: New file.
2132         * gnulib/import/m4/d-type.m4: New file.
2133         * gnulib/import/m4/dup.m4: New file.
2134         * gnulib/import/m4/dup2.m4: New file.
2135         * gnulib/import/m4/error.m4: New file.
2136         * gnulib/import/m4/fchdir.m4: New file.
2137         * gnulib/import/m4/fcntl.m4: New file.
2138         * gnulib/import/m4/fcntl_h.m4: New file.
2139         * gnulib/import/m4/fdopendir.m4: New file.
2140         * gnulib/import/m4/filenamecat.m4: New file.
2141         * gnulib/import/m4/fstat.m4: New file.
2142         * gnulib/import/m4/fstatat.m4: New file.
2143         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2144         * gnulib/import/m4/getcwd-path-max.m4: New file.
2145         * gnulib/import/m4/getcwd.m4: New file.
2146         * gnulib/import/m4/getdtablesize.m4: New file.
2147         * gnulib/import/m4/getlogin_r.m4: New file.
2148         * gnulib/import/m4/getprogname.m4: New file.
2149         * gnulib/import/m4/glob.m4: New file.
2150         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2151         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2152         * gnulib/import/m4/mempcpy.m4: New file.
2153         * gnulib/import/m4/memrchr.m4: New file.
2154         * gnulib/import/m4/mode_t.m4: New file.
2155         * gnulib/import/m4/msvc-inval.m4: New file.
2156         * gnulib/import/m4/msvc-nothrow.m4: New file.
2157         * gnulib/import/m4/open.m4: New file.
2158         * gnulib/import/m4/openat.m4: New file.
2159         * gnulib/import/m4/opendir.m4: New file.
2160         * gnulib/import/m4/readdir.m4: New file.
2161         * gnulib/import/m4/realloc.m4: New file.
2162         * gnulib/import/m4/rewinddir.m4: New file.
2163         * gnulib/import/m4/save-cwd.m4: New file.
2164         * gnulib/import/m4/strdup.m4: New file.
2165         * gnulib/import/m4/strerror.m4: New file.
2166         * gnulib/import/m4/unistd-safer.m4: New file.
2167         * gnulib/import/mempcpy.c: New file.
2168         * gnulib/import/memrchr.c: New file.
2169         * gnulib/import/msvc-inval.c: New file.
2170         * gnulib/import/msvc-inval.h: New file.
2171         * gnulib/import/msvc-nothrow.c: New file.
2172         * gnulib/import/msvc-nothrow.h: New file.
2173         * gnulib/import/open.c: New file.
2174         * gnulib/import/openat-die.c: New file.
2175         * gnulib/import/openat-priv.h: New file.
2176         * gnulib/import/openat-proc.c: New file.
2177         * gnulib/import/openat.c: New file.
2178         * gnulib/import/openat.h: New file.
2179         * gnulib/import/opendir.c: New file.
2180         * gnulib/import/pipe-safer.c: New file.
2181         * gnulib/import/readdir.c: New file.
2182         * gnulib/import/realloc.c: New file.
2183         * gnulib/import/rewinddir.c: New file.
2184         * gnulib/import/save-cwd.c: New file.
2185         * gnulib/import/save-cwd.h: New file.
2186         * gnulib/import/strdup.c: New file.
2187         * gnulib/import/strerror-override.c: New file.
2188         * gnulib/import/strerror-override.h: New file.
2189         * gnulib/import/strerror.c: New file.
2190         * gnulib/import/unistd--.h: New file.
2191         * gnulib/import/unistd-safer.h: New file.
2192         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2193         "getcwd" and "glob".
2194         * ser-tcp.c: Undefine "close" before redefining it.
2195
2196 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2197
2198         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2199         get rid of res_val.
2200
2201 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2202
2203         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2204         <sol2,sparc>: Likewise.
2205         <sol2-64,i386>: Likewise.
2206
2207         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2208         -Wdeprecated-declarations on *-*-solaris*.
2209         * configure: Regenerate.
2210
2211         * procfs.c: Include "nat/inferior.h".
2212         (procfs_info_proc): Fix typo.
2213
2214 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2215
2216         * remote.c (vector): Include.
2217         (struct private_thread_info): Add field, thread_handle.
2218         (free_private_thread_info): Deallocate storage associated with
2219         thread handle.
2220         (get_private_info_thread): Initialize `thread_handle' field.
2221         (struct thread_item): Add field, thread_handle.
2222         (clear_threads_listing_context): Deallocate storage associated
2223         with thread handle.
2224         (start_thread): Add support for "handle" attribute.
2225         (thread_attributes): Add "handle".
2226         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2227         field.
2228         (remote_update_thread_list): Update thread_handle.
2229         (remote_thread_handle_to_thread_info): New function.
2230         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2231
2232 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2233
2234         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2235         function.
2236         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2237         * python/python-internal.h (thread_object_type): Declare.
2238
2239 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2240
2241         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2242         (target_thread_handle_to_thread_info): Declare.
2243         * target.c (target_thread_handle_to_thread_info): New function.
2244         * target-delegates.c: Regenerate.
2245         * gdbthread.h (find_thread_by_handle): Declare.
2246         * thread.c (find_thread_by_handle): New function.
2247         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2248         function.
2249         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2250
2251 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2254
2255 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2256
2257         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2258
2259 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2260
2261         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2262         to gdb_target_obs.
2263
2264 2017-09-20  Tom Tromey  <tom@tromey.com>
2265
2266         * breakpoint.c (struct counted_command_line): Remove.
2267         (breakpoint_commands): Update.
2268         (alloc_counted_command_line, incref_counted_command_line)
2269         (decref_counted_command_line, do_cleanup_counted_command_line)
2270         (make_cleanup_decref_counted_command_line): Remove.
2271         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2272         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2273         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2274         (save_breakpoints): Update.
2275         * breakpoint.h (counted_command_line): Now a typedef to
2276         shared_ptr.
2277         (struct breakpoint) <commands>: Now a counted_command_line.
2278         (struct bpstats) <command>: Likewise.
2279
2280 2017-09-20  Tom Tromey  <tom@tromey.com>
2281
2282         * breakpoint.c (struct commands_info, do_map_commands_command):
2283         Remove.
2284         (commands_command_1): Update.
2285         (iterate_over_related_breakpoints): Take a function_view.
2286         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2287         (delete_command): Update.
2288         (map_breakpoint_numbers): Take a function_view.
2289         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2290         (disable_command): Update.
2291         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2292         (enable_command): Update.
2293         (struct disp_data, do_enable_breakpoint_disp)
2294         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2295         (do_map_enable_delete_breakpoint): Remove.
2296         (enable_once_command, enable_count_command, enable_delete_command)
2297         (delete_trace_variable_command): Update.
2298
2299 2017-09-20  Tom Tromey  <tom@tromey.com>
2300
2301         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2302         (bpstat_clear): Use delete.
2303         (bpstats): New constructors.
2304         (bpstat_copy, bpstat_stop_status): Use new.
2305         (dprintf_after_condition_true): Update.
2306         * breakpoint.h (bpstats::bpstats): Add constructors.
2307         (bpstats::~bpstats): Add destructor.
2308
2309 2017-09-20  Pedro Alves  <palves@redhat.com>
2310
2311         * eval.c (make_params): Delete, refactored as ...
2312         (class fake_method): ... this new type's ctor.
2313         (fake_method::~fake_method): New.
2314         (evaluate_subexp_standard): Use 'fake_method'.
2315
2316 2017-09-20  Tom Tromey  <tom@tromey.com>
2317
2318         * windows-nat.c (get_windows_debug_event, windows_wait)
2319         (do_initial_windows_stuff, windows_attach): Update.
2320         * utils.c (vwarning, internal_vproblem): Update.
2321         (ui_unregister_input_event_handler_cleanup)
2322         (prepare_to_handle_input): Remove.
2323         (class scoped_input_handler): New.
2324         (defaulted_query, prompt_for_continue): Update.
2325         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2326         Update.
2327         * top.c (undo_terminal_modifications_before_exit): Update.
2328         * target/target.h (target_terminal_init, target_terminal_inferior)
2329         (target_terminal_ours): Don't declare.
2330         (class target_terminal): New.
2331         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2332         (target_terminal_ours_for_output)
2333         (make_cleanup_restore_target_terminal): Don't declare.
2334         (target_terminal_info): Remove.
2335         * target.c (enum terminal_state, terminal_state): Remove.
2336         (target_terminal::terminal_state): Define.
2337         (target_terminal::init): Rename from target_terminal_init.
2338         (target_terminal::inferior): Rename from
2339         target_terminal_inferior.
2340         (target_terminal::ours): Rename from target_terminal_ours.
2341         (target_terminal::ours_for_output): Rename from
2342         target_terminal_ours_for_output.
2343         (target_terminal::info): New method.
2344         (cleanup_restore_target_terminal)
2345         (make_cleanup_restore_target_terminal): Remove.
2346         * solib.c (handle_solib_event): Update.
2347         * remote.c (remote_serial_quit_handler): Update.
2348         (remote_terminal_inferior, remote_wait_as): Update.
2349         * record-full.c (record_full_wait_1): Update.
2350         * nto-procfs.c (procfs_create_inferior): Update.
2351         * nat/fork-inferior.c (startup_inferior): Update.
2352         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2353         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2354         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2355         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2356         (mi_breakpoint_created, mi_breakpoint_deleted)
2357         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2358         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2359         (mi_user_selected_context_changed, report_initial_inferior):
2360         Update.
2361         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2362         (linux_nat_terminal_inferior): Update.
2363         * infrun.c (follow_fork_inferior)
2364         (handle_vfork_child_exec_or_exit, do_target_resume)
2365         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2366         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2367         Update.
2368         * inflow.c (child_terminal_init, info_terminal_command): Update.
2369         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2370         (attach_command): Update.
2371         * infcall.c (call_thread_fsm_should_stop): Update.
2372         * gnu-nat.c (gnu_attach): Update.
2373         * extension.c (struct active_ext_lang_state)
2374         (restore_active_ext_lang): Update.
2375         * exceptions.c (print_flush): Update.
2376         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2377         (struct quit_handler_cleanup_data, restore_quit_handler)
2378         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2379         Remove.
2380         * cp-support.c (gdb_demangle): Update.
2381         * breakpoint.c (update_inserted_breakpoint_locations)
2382         (insert_breakpoint_locations, handle_jit_event)
2383         (disable_breakpoints_in_unloaded_shlib): Update.
2384         * annotate.c (annotate_breakpoints_invalid)
2385         (annotate_frames_invalid): Update.
2386
2387 2017-09-20  Tom Tromey  <tom@tromey.com>
2388
2389         * main.c (catch_command_errors): Rename from
2390         catch_command_errors_const.
2391         (captured_main_1): Update.
2392
2393 2017-09-20  Pedro Alves  <palves@redhat.com>
2394
2395         * cli/cli-cmds.c (list_command): Use print_sal_location.
2396         (print_sal_location): New function.
2397         (ambiguous_line_spec): Use print_sal_location.
2398         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2399         * symtab.c (find_function_start_sal): Likewise.
2400         * symtab.h (symtab_and_line::symbol): New field.
2401
2402 2017-09-20  Pedro Alves  <palves@redhat.com>
2403
2404         * linespec.c (minsym_found): Handle non-text minsyms.
2405         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2406
2407 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2408
2409         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2410         backslash.
2411
2412 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2413
2414         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2415         vmovups instead vmovaps.
2416         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2417
2418 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2419
2420         * NEWS (Changes since GDB 8.0): Add starti.
2421         * infcmd.c (enum run_break): New.
2422         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2423         case.
2424         (run_command): Use enum run_how.
2425         (start_command): Likewise.
2426         (starti_command): New function.
2427         (RUN_ARGS_HELP): New macro.
2428         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2429         commands.  Add starti command.
2430
2431 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2432
2433         * Makefile.in (monitor.o): Remove the rule.
2434
2435 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2436
2437         * annotate.h (struct annotate_arg_emitter): Use
2438         DISABLE_COPY_AND_ASSIGN.
2439         * common/refcounted-object.h (refcounted_object): Likewise.
2440         * completer.h (struct completion_result): Likewise.
2441         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2442         * filename-seen-cache.h (filename_seen_cache): Likewise.
2443         * gdbcore.h (thread_section_name): Likewise.
2444         * gdb_regex.h (compiled_regex): Likewise.
2445         * gdbthread.h (scoped_restore_current_thread): Likewise.
2446         * inferior.h (scoped_restore_current_inferior): Likewise.
2447         * jit.c (jit_reader): Likewise.
2448         * linespec.h (struct linespec_result): Likewise.
2449         * mi/mi-parse.h (struct mi_parse): Likewise.
2450         * nat/fork-inferior.c (execv_argv): Likewise.
2451         * progspace.h (scoped_restore_current_program_space): Likewise.
2452         * python/python-internal.h (class gdbpy_enter): Likewise.
2453         * regcache.h (regcache): Likewise.
2454         * target-descriptions.c (struct tdesc_reg): Likewise.
2455         (struct tdesc_type): Likewise.
2456         (struct tdesc_feature): Likewise.
2457         * ui-out.h (ui_out_emit_type): Likewise.
2458
2459 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2460
2461         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2462         label abort_expression.
2463
2464 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2465
2466         * common/buffer.c (buffer_xml_printf): Adjust.
2467         * common/xml-utils.c (xml_escape_text): Change return type to
2468         std::string, update code accordingly.
2469         * common/xml-utils.h (xml_escape_text): Change return type to
2470         std::string.
2471         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2472         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2473         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2474         Adjust.
2475
2476 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2477
2478         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2479         (SUBDIR_UNITTESTS_OBS): Add new object file.
2480         * unittests/xml-utils-selftests.c: New file.
2481
2482 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2483
2484         * common/selftest.h (selftest): New struct/interface.
2485         (register_test): Add name parameter, add new overload.
2486         (run_tests): Add filter parameter.
2487         (for_each_selftest_ftype): New typedef.
2488         (for_each_selftest): New declaration.
2489         * common/selftest.c (tests): Change type to
2490         map<string, unique_ptr<selftest>>.
2491         (simple_selftest): New struct.
2492         (register_test): New function.
2493         (register_test): Add name parameter and use it.
2494         (run_tests): Add filter parameter and use it.  Add prints.
2495         Adjust to vector -> map change.
2496         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2497         registering selftests.
2498         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2499         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2500         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2501         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2502         * findvar.c (_initialize_findvar): Likewise.
2503         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2504         * maint.c (maintenance_selftest): Update call to run_tests.
2505         (maintenance_info_selftests): New function.
2506         (_initialize_maint_cmds): Register "maintenance info selftests"
2507         command.  Update "maintenance selftest" doc.
2508         * regcache.c (_initialize_regcache): Add names when registering
2509         selftests.
2510         * rust-exp.y (_initialize_rust_exp): Likewise.
2511         * selftest-arch.c (gdbarch_selftest): New struct.
2512         (gdbarch_tests): Remove.
2513         (register_test_foreach_arch): Add name parameter.  Call
2514         register_test.
2515         (tests_with_arch): Remove, move most content to
2516         gdbarch_selftest::operator().
2517         (_initialize_selftests_foreach_arch): Remove.
2518         * selftest-arch.h (register_test_foreach_arch): Add name
2519         parameter.
2520         (run_tests_with_arch): New declaration.
2521         * utils-selftests.c (_initialize_utils_selftests): Add names
2522         when registering selftests.
2523         * utils.c (_initialize_utils): Likewise.
2524         * unittests/array-view-selftests.c
2525         (_initialize_array_view_selftests): Likewise.
2526         * unittests/environ-selftests.c (_initialize_environ_selftests):
2527         Likewise.
2528         * unittests/function-view-selftests.c
2529         (_initialize_function_view_selftests): Likewise.
2530         * unittests/offset-type-selftests.c
2531         (_initialize_offset_type_selftests): Likewise.
2532         * unittests/optional-selftests.c
2533         (_initialize_optional_selftests): Likewise.
2534         * unittests/scoped_restore-selftests.c
2535         (_initialize_scoped_restore_selftests): Likewise.
2536         * NEWS: Document "maintenance selftest" and "maint info
2537         selftests".
2538
2539 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2540
2541         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2542         scoped_restore.
2543
2544 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2545
2546         * mi/mi-main.c (mi_load_progress): Make uiout variable
2547         a unique_ptr.
2548
2549 2017-09-15  Pedro Alves  <palves@redhat.com>
2550
2551         * compile/compile-c-types.c (convert_enum, convert_int)
2552         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2553
2554 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2555
2556         * dwarf2read.c (copy_string): Remove.
2557         (parse_macro_definition): Replace copy_string with savestring.
2558
2559 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2560
2561         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2562         gdb_target_obs.
2563         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2564         Likewise.
2565         (i[34567]86-*-linux*): Likewise.
2566
2567 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2568
2569         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2570         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2571         <stack>: Change type to std::vector.
2572         <stack_len, stack_allocated>: Remove.
2573         <grow_stack>: Remove.
2574         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2575         (dwarf_expr_context::~dwarf_expr_context): Remove.
2576         (dwarf_expr_context::grow_stack): Remove.
2577         (dwarf_expr_context::push): Adjust.
2578         (dwarf_expr_context::pop): Adjust.
2579         (dwarf_expr_context::fetch): Adjust.
2580         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2581         (dwarf_expr_context::stack_empty_p): Adjust.
2582         (dwarf_expr_context::execute_stack_op): Adjust.
2583
2584 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2585
2586         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2587         return type to bool.
2588         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2589
2590 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2591
2592         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2593         Change type to bool.
2594         (dwarf_stack_value) <in_stack_memory>: Likewise.
2595         (dwarf_expr_context) <push_address>: Change parameter type to
2596         bool.
2597         <fetch_in_stack_memory>: Change return type to bool.
2598         <push>: Change parameter type to bool.
2599         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2600         to bool.
2601         (dwarf_expr_context::push_address): Likewise.
2602         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2603         to bool.
2604         (dwarf_expr_context::execute_stack_op): Adjust.
2605         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2606
2607 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2608
2609         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2610         (struct dwarf_expr_context) <n_pieces>: Remove.
2611         <pieces>: Change type to std::vector.
2612         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2613         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2614         pieces.
2615         (dwarf_expr_context::add_piece): Adjust.
2616         * dwarf2loc.c (struct piece_closure): Initialize fields.
2617         <n_pieces>: Remove.
2618         <pieces>: Change type to std::vector.
2619         (allocate_piece_closure): Adjust, change parameter to
2620         std::vector rvalue and std::move it to piece_closure.
2621         (rw_pieced_value): Adjust.
2622         (check_pieced_synthetic_pointer): Adjust.
2623         (indirect_synthetic_pointer): Adjust.
2624         (coerce_pieced_ref): Adjust.
2625         (free_pieced_value_closure):  Adjust.  Use delete to free
2626         piece_closure.
2627         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2628         to allocate_piece_closure.
2629         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2630
2631 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2632
2633         * probe.h (probe_ops_cp): Remove typedef.
2634         (DEF_VEC_P (probe_ops_cp)): Remove.
2635         (all_probe_ops): Change type to std::vector.
2636         * probe.c (info_probes_for_ops): Adjust to vector change.
2637         (probe_linespec_to_ops): Likewise.
2638         (all_probe_ops): Change type to std::vector.
2639         (_initialize_probe): Adjust to vector change.
2640         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2641         * elfread.c (elf_get_probes): Likewise.
2642         * stap-probe.c (_initialize_stap_probe): Likewise.
2643
2644 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2645
2646         * probe.h (struct bound_probe): Define constructors.
2647         * probe.c (bound_probe_s): Remove typedef.
2648         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2649         (collect_probes): Change return type to std::vector, remove
2650         cleanup.
2651         (compare_probes): Return bool, change parameter type.  Change
2652         semantic to "less than".
2653         (gen_ui_out_table_header_info): Change parameter to std::vector
2654         and update.
2655         (exists_probe_with_pops): Likewise.
2656         (info_probes_for_ops): Update to std::vector change.
2657         (enable_probes_command): Likewise.
2658         (disable_probes_command): Likewise.
2659
2660 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2661
2662         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2663         vec to std::vector.
2664         * probe.c (parse_probes_in_pspace): Update.
2665         (find_probes_in_objfile): Update.
2666         (find_probe_by_pc): Update.
2667         (collect_probes): Update.
2668         (probe_any_get_probes): Update.
2669         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2670         return type to reference to std::vector.
2671         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2672         std::vector and update.
2673         (dtrace_process_dof): Likewise.
2674         (dtrace_get_probes): Likewise.
2675         * elfread.c (elf_get_probes): Change return type to std::vector,
2676         store an std::vector in bfd_data.
2677         (probe_key_free): Update to std::vector.
2678         * stap-probe.c (handle_stap_probe): Change parameter to
2679         std::vector and update.
2680         (stap_get_probes): Likewise.
2681         * symfile-debug.c (debug_sym_get_probes): Change return type to
2682         std::vector and update.
2683
2684 2017-09-11  Tom Tromey  <tom@tromey.com>
2685
2686         * breakpoint.c (program_breakpoint_here_p): Update.
2687         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2688         from make_show_memory_breakpoints_cleanup.  Return a
2689         scoped_restore_tmpl<int>.
2690         (restore_show_memory_breakpoints): Remove.
2691         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2692         * mem-break.c (memory_validate_breakpoint): Update.
2693         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2694         (ia64_memory_remove_breakpoint): Update.
2695         (ia64_breakpoint_from_pc): Update.
2696         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2697         from make_show_memory_breakpoints_cleanup.
2698
2699 2017-09-11  Tom Tromey  <tom@tromey.com>
2700
2701         * d-namespace.c (d_lookup_symbol): Use std::string.
2702         (find_symbol_in_baseclass): Likewise.
2703
2704 2017-09-11  Tom Tromey  <tom@tromey.com>
2705
2706         * ctf.c (ctf_start): Use std::string.
2707
2708 2017-09-11  Tom Tromey  <tom@tromey.com>
2709
2710         * ada-lang.c (is_known_support_routine): Update.
2711         (ada_unhandled_exception_name_addr_from_raise): Update.
2712         * guile/scm-frame.c (gdbscm_frame_name): Update.
2713         * python/py-frame.c (frapy_name): Update.
2714         (frapy_function): Update.
2715         * stack.h (find_frame_funname): Update.
2716         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2717         (print_frame): Update.
2718
2719 2017-09-11  Tom Tromey  <tom@tromey.com>
2720
2721         * findcmd.c (put_bits): Take a gdb::byte_vector.
2722         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2723         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2724         cleanups.
2725         (find_command): Update.
2726
2727 2017-09-11  Tom Tromey  <tom@tromey.com>
2728
2729         * cli/cli-script.c (class scoped_restore_hook_in): New.
2730         (clear_hook_in_cleanup): Remove.
2731         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2732         scoped_restore_hook_in.
2733
2734 2017-09-11  Tom Tromey  <tom@tromey.com>
2735
2736         * cli/cli-script.c (restore_interp): Remove.
2737         (read_command_lines): Use scoped_restore_interp.
2738         * interps.c (scoped_restore_interp::set_temp): Rename from
2739         interp_set_temp.
2740         * interps.h (class scoped_restore_interp): New.
2741         (interp_set_temp): Remove.
2742
2743 2017-09-11  Tom Tromey  <tom@tromey.com>
2744
2745         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2746         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2747         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2748         scoped_restore.
2749         (mi_cmd_break_insert_1): Update.
2750         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2751         scoped_restore.
2752
2753 2017-09-11  Tom Tromey  <tom@tromey.com>
2754
2755         * demangle.c (demangle_command): Update.
2756         * breakpoint.c (disable_command): Update.
2757         (enable_command): Update.
2758         (find_location_by_number): Make "number" const.  Use
2759         get_number_trailer.
2760         * cli/cli-utils.c (extract_arg): Return std::string.
2761         * probe.c (parse_probe_linespec): Update.  Change types.
2762         (collect_probes): Take string arguments.
2763         (parse_probe_linespec): Likewise.
2764         (info_probes_for_ops): Update.
2765         (enable_probes_command): Update.
2766         (disable_probes_command): Update.
2767         * break-catch-sig.c (catch_signal_split_args): Update.
2768         * mi/mi-parse.c (mi_parse): Update.
2769
2770 2017-09-11  Tom Tromey  <tom@tromey.com>
2771
2772         * language.h (language_enum): Make argument const.
2773         * language.c (language_enum): Make argument const.
2774
2775 2017-09-11  Tom Tromey  <tom@tromey.com>
2776
2777         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2778         as function.
2779         (skip_to_space): Rename from skip_to_space_const.
2780         * common/common-utils.c (skip_to_space): New function.
2781         (skip_to_space): Rename from skip_to_space_const.
2782         * cli/cli-utils.h (get_number): Rename from get_number_const.
2783         (extract_arg): Rename from extract_arg_const.
2784         * cli/cli-utils.c (get_number): Rename from get_number_const.
2785         (extract_arg): Rename from extract_arg_const.
2786         (number_or_range_parser::get_number): Use ::get_number.
2787         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2788         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2789         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2790         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2791         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2792         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2793         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2794         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2795
2796 2017-09-11  Tom Tromey  <tom@tromey.com>
2797
2798         * python/python.c (do_start_initialization): Use
2799         py-event-types.def to initialize types.
2800         Define all object type structures.
2801         * python/python-internal.h: Don't declare event initialization
2802         functions.
2803         * python/py-threadevent.c (thread_event_object_type): Don't
2804         define.
2805         * python/py-stopevent.c (stop_event_object_type): Don't define.
2806         * python/py-signalevent.c (signal_event_object_type): Don't
2807         declare or define.
2808         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2809         (clear_objfiles_event_object_type): Don't declare or define.
2810         * python/py-infevents.c (inferior_call_pre_event_object_type)
2811         (inferior_call_post_event_object_type)
2812         (register_changed_event_object_type)
2813         (memory_changed_event_object_type): Don't declare or define.
2814         * python/py-inferior.c (new_thread_event_object_type)
2815         (new_inferior_event_object_type)
2816         (inferior_deleted_event_object_type): Don't declare or define.
2817         * python/py-exitedevent.c (exited_event_object_type): Don't
2818         declare or define.
2819         * python/py-evts.c (gdbpy_initialize_py_events): Use
2820         py-all-events.def.
2821         * python/py-events.h (thread_event_object_type): Don't declare.
2822         (events_object): Use py-all-events.def.
2823         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2824         py-event-types.def.
2825         * python/py-event-types.def: New file.
2826         * python/py-continueevent.c (create_continue_event_object): Don't
2827         declare or define.
2828         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2829         declare or define.
2830         * python/py-all-events.def: New file.
2831
2832 2017-09-11  Tom Tromey  <tom@tromey.com>
2833
2834         * python/py-threadevent.c (create_thread_event_object): Return
2835         gdbpy_ref.
2836         * python/py-stopevent.h (create_stop_event_object)
2837         (create_breakpoint_event_object, create_signal_event_object):
2838         Update.
2839         * python/py-stopevent.c (create_stop_event_object): Return
2840         gdbpy_ref.
2841         (emit_stop_event): Update.
2842         * python/py-signalevent.c (create_signal_event_object): Return
2843         gdbpy_ref.
2844         * python/py-infevents.c (create_inferior_call_event_object):
2845         Update.
2846         * python/py-event.h (create_event_object)
2847         (create_thread_event_object): Update.
2848         * python/py-event.c (create_event_object): Return gdbpy_ref.
2849         * python/py-continueevent.c: Return gdbpy_ref.
2850         * python/py-bpevent.c (create_breakpoint_event_object): Return
2851         gdbpy_ref.
2852
2853 2017-09-11  Tom Tromey  <tom@tromey.com>
2854
2855         PR python/15622:
2856         * NEWS: Add entry.
2857         * python/python.c (do_start_initialization): Initialize new event
2858         types.
2859         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2860         (gdbpy_initialize_inferior_deleted_event)
2861         (gdbpy_initialize_new_thread_event): Declare.
2862         * python/py-threadevent.c (create_thread_event_object): Add option
2863         "thread" parameter.
2864         * python/py-inferior.c (new_thread_event_object_type)
2865         (new_inferior_event_object_type)
2866         (inferior_deleted_event_object_type): Declare.
2867         (python_new_inferior, python_inferior_deleted): New functions.
2868         (add_thread_object): Emit new_thread event.
2869         (gdbpy_initialize_inferior): Attach new functions to corresponding
2870         observers.
2871         (new_thread, new_inferior, inferior_deleted): Define new event
2872         types.
2873         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2874         registries.
2875         * python/py-events.h (events_object) <new_inferior,
2876         inferior_deleted, new_thread>: New fields.
2877         * python/py-event.h (create_thread_event_breakpoint): Add optional
2878         "thread" parameter.
2879
2880 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2881
2882         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2883         check current_ui instead.
2884         (internal_vproblem): Likewise.
2885
2886 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2887
2888         * thread.c (print_thread_info_1): Remove unnecessary calls to
2889         uiout->is_mi_like_p.
2890
2891 2017-09-09  Tom Tromey  <tom@tromey.com>
2892
2893         * namespace.h (add_using_directive): Update.
2894         * namespace.c (add_using_directive): Change type of excludes to
2895         std::vector.
2896         * dwarf2read.c (read_import_statement): Use std::vector.
2897         (read_namespace): Update.
2898         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2899
2900 2017-09-09  Tom Tromey  <tom@tromey.com>
2901
2902         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2903
2904 2017-09-09  Tom Tromey  <tom@tromey.com>
2905
2906         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2907
2908 2017-09-09  Tom Tromey  <tom@tromey.com>
2909
2910         * stack.c (func_command): Use gdb::def_vector.
2911
2912 2017-09-09  Tom Tromey  <tom@tromey.com>
2913
2914         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2915         ui_out_emit_list, ui_out_emit_tuple.
2916         (mi_cmd_var_update): Likewise.
2917
2918 2017-09-09  Tom Tromey  <tom@tromey.com>
2919
2920         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2921         ui_out_redirect_pop.
2922         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2923         ui_out_redirect_pop.
2924         * utils.c (do_ui_out_redirect_pop)
2925         (make_cleanup_ui_out_redirect_pop): Remove.
2926         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2927         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2928         * ui-out.h (ui_out_redirect_pop): New class.
2929
2930 2017-09-09  Tom Tromey  <tom@tromey.com>
2931
2932         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2933         (list_available_thread_groups, mi_cmd_list_thread_groups)
2934         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2935         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2936         Likewise.
2937
2938 2017-09-09  Tom Tromey  <tom@tromey.com>
2939
2940         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2941         ui_out_emit_tuple.
2942
2943 2017-09-09  Tom Tromey  <tom@tromey.com>
2944
2945         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2946         * stack.c (print_frame): Use ui_out_emit_tuple.
2947         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2948         (info_spu_mailbox_command, info_spu_dma_command)
2949         (info_spu_proxydma_command): Likewise.
2950         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2951         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2952         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2953         ui_out_emit_tuple.
2954         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2955
2956 2017-09-09  Tom Tromey  <tom@tromey.com>
2957
2958         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2959         (class ui_out_emit_table): Update comment.
2960         * ui-out.c (do_cleanup_table_end)
2961         (make_cleanup_ui_out_table_begin_end): Remove.
2962         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2963         (info_spu_dma_cmdlist): Likewise.
2964         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2965         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2966         ui_out_emit_table.
2967
2968 2017-09-09  Tom Tromey  <tom@tromey.com>
2969
2970         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2971         ui_out_emit_list, gdb::optional.
2972
2973 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2974
2975         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2976         prototype.
2977         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2978         prototype.
2979         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2980         prototype.
2981         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2982         * ada-exp.y: Remove _initialize_ada_exp prototype.
2983         * ada-lang.c: Remove _initialize_ada_language prototype.
2984         * ada-tasks.c: Remove _initialize_tasks prototype.
2985         * addrmap.c: Remove _initialize_addrmap prototype.
2986         * agent.c: Remove _initialize_agent prototype.
2987         * aix-thread.c: Remove _initialize_aix_thread prototype.
2988         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2989         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2990         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2991         prototype.
2992         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2993         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2994         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2995         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2996         prototype.
2997         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2998         prototype.
2999         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3000         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3001         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3002         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3003         prototype.
3004         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3005         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3006         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3007         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3008         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3009         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3010         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3011         prototype.
3012         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3013         prototype.
3014         * annotate.c: Remove _initialize_annotate prototype.
3015         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3016         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3017         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3018         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3019         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3020         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3021         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3022         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3023         prototype.
3024         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3025         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3026         * auto-load.c: Remove _initialize_auto_load prototype.
3027         * auxv.c: Remove _initialize_auxv prototype.
3028         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3029         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3030         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3031         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3032         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3033         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3034         prototype.
3035         * break-catch-throw.c: Remove _initialize_break_catch_throw
3036         prototype.
3037         * breakpoint.c: Remove _initialize_breakpoint prototype.
3038         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3039         * btrace.c: Remove _initialize_btrace prototype.
3040         * charset.c: Remove _initialize_charset prototype.
3041         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3042         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3043         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3044         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3045         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3046         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3047         * coffread.c: Remove _initialize_coffread prototype.
3048         * compile/compile.c: Remove _initialize_compile prototype.
3049         * complaints.c: Remove _initialize_complaints prototype.
3050         * completer.c: Remove _initialize_completer prototype.
3051         * copying.awk: Remove _initialize_copying prototype.
3052         * copying.c: Regenerate.
3053         * core-regset.c: Remove _initialize_core_regset prototype.
3054         * corefile.c: Remove _initialize_core prototype.
3055         * corelow.c: Remove _initialize_corelow prototype.
3056         * cp-abi.c: Remove _initialize_cp_abi prototype.
3057         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3058         * cp-support.c: Remove _initialize_cp_support prototype.
3059         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3060         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3061         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3062         * ctf.c: Remove _initialize_ctf prototype.
3063         * d-lang.c: Remove _initialize_d_language prototype.
3064         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3065         prototype.
3066         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3067         * dbxread.c: Remove _initialize_dbxread prototype.
3068         * dcache.c: Remove _initialize_dcache prototype.
3069         * demangle.c: Remove _initialize_demangler prototype.
3070         * disasm-selftests.c: Remove _initialize_disasm_selftests
3071         prototype.
3072         * disasm.c: Remove _initialize_disasm prototype.
3073         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3074         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3075         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3076         prototype.
3077         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3078         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3079         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3080         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3081         * elfread.c: Remove _initialize_elfread prototype.
3082         * exec.c: Remove _initialize_exec prototype.
3083         * extension.c: Remove _initialize_extension prototype.
3084         * f-lang.c: Remove _initialize_f_language prototype.
3085         * f-valprint.c: Remove _initialize_f_valprint prototype.
3086         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3087         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3088         * filesystem.c: Remove _initialize_filesystem prototype.
3089         * findcmd.c: Remove _initialize_mem_search prototype.
3090         * fork-child.c: Remove _initialize_fork_child prototype.
3091         * frame-base.c: Remove _initialize_frame_base prototype.
3092         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3093         * frame.c: Remove _initialize_frame prototype.
3094         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3095         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3096         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3097         * gcore.c: Remove _initialize_gcore prototype.
3098         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3099         * gdbarch.c: Regenerate.
3100         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3101         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3102         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3103         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3104         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3105         * go-lang.c: Remove _initialize_go_language prototype.
3106         * go32-nat.c: Remove _initialize_go32_nat prototype.
3107         * guile/guile.c: Remove _initialize_guile prototype.
3108         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3109         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3110         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3111         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3112         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3113         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3114         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3115         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3116         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3117         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3118         prototype.
3119         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3120         prototype.
3121         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3122         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3123         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3124         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3125         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3126         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3127         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3128         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3129         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3130         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3131         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3132         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3133         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3134         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3135         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3136         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3137         prototype.
3138         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3139         prototype.
3140         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3141         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3142         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3143         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3144         * infcall.c: Remove _initialize_infcall prototype.
3145         * infcmd.c: Remove _initialize_infcmd prototype.
3146         * inferior.c: Remove _initialize_inferiors prototype.
3147         * inflow.c: Remove _initialize_inflow prototype.
3148         * infrun.c: Remove _initialize_infrun prototype.
3149         * interps.c: Remove _initialize_interpreter prototype.
3150         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3151         * jit.c: Remove _initialize_jit prototype.
3152         * language.c: Remove _initialize_language prototype.
3153         * linux-fork.c: Remove _initialize_linux_fork prototype.
3154         * linux-nat.c: Remove _initialize_linux_nat prototype.
3155         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3156         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3157         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3158         * m2-lang.c: Remove _initialize_m2_language prototype.
3159         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3160         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3161         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3162         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3163         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3164         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3165         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3166         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3167         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3168         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3169         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3170         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3171         * machoread.c: Remove _initialize_machoread prototype.
3172         * macrocmd.c: Remove _initialize_macrocmd prototype.
3173         * macroscope.c: Remove _initialize_macroscope prototype.
3174         * maint.c: Remove _initialize_maint_cmds prototype.
3175         * mdebugread.c: Remove _initialize_mdebugread prototype.
3176         * memattr.c: Remove _initialize_mem prototype.
3177         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3178         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3179         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3180         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3181         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3182         * microblaze-linux-tdep.c: Remove
3183         _initialize_microblaze_linux_tdep prototype.
3184         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3185         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3186         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3187         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3188         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3189         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3190         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3191         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3192         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3193         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3194         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3195         prototype.
3196         * mipsread.c: Remove _initialize_mipsread prototype.
3197         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3198         prototype.
3199         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3200         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3201         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3202         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3203         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3204         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3205         prototype.
3206         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3207         * nto-procfs.c: Remove _initialize_procfs prototype.
3208         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3209         * objc-lang.c: Remove _initialize_objc_language prototype.
3210         * objfiles.c: Remove _initialize_objfiles prototype.
3211         * observer.c: Remove observer_test_first_notification_function,
3212         observer_test_second_notification_function,
3213         observer_test_third_notification_function, and
3214         _initialize_observer prototypes.
3215         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3216         * osabi.c: Remove _initialize_gdb_osabi prototype.
3217         * osdata.c: Remove _initialize_osdata prototype.
3218         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3219         * parse.c: Remove _initialize_parse prototype.
3220         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3221         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3222         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3223         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3224         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3225         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3226         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3227         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3228         * printcmd.c: Remove _initialize_printcmd prototype.
3229         * probe.c: Remove _initialize_probe prototype.
3230         * proc-api.c: Remove _initialize_proc_api prototype.
3231         * proc-events.c: Remove _initialize_proc_events prototype.
3232         * proc-service.c: Remove _initialize_proc_service prototype.
3233         * procfs.c: Remove _initialize_procfs prototype.
3234         * psymtab.c: Remove _initialize_psymtab prototype.
3235         * python/python.c: Remove _initialize_python prototype.
3236         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3237         * record-btrace.c: Remove _initialize_record_btrace prototype.
3238         * record-full.c: Remove _initialize_record_full prototype.
3239         * record.c: Remove _initialize_record prototype.
3240         * regcache.c: Remove _initialize_regcache prototype.
3241         * reggroups.c: Remove _initialize_reggroup prototype.
3242         * remote-notif.c: Remove _initialize_notif prototype.
3243         * remote-sim.c: Remove _initialize_remote_sim prototype.
3244         * remote.c: Remove _initialize_remote prototype.
3245         * reverse.c: Remove _initialize_reverse prototype.
3246         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3247         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3248         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3249         prototype.
3250         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3251         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3252         * rust-exp.y: Remove _initialize_rust_exp prototype.
3253         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3254         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3255         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3256         * score-tdep.c: Remove _initialize_score_tdep prototype.
3257         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3258         prototype.
3259         * ser-go32.c: Remove _initialize_ser_dos prototype.
3260         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3261         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3262         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3263         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3264         * serial.c: Remove _initialize_serial prototype.
3265         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3266         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3267         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3268         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3269         * skip.c: Remove _initialize_step_skip prototype.
3270         * sol-thread.c: Remove _initialize_sol_thread prototype.
3271         * solib-aix.c: Remove _initialize_solib_aix prototype.
3272         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3273         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3274         * solib-frv.c: Remove _initialize_frv_solib prototype.
3275         * solib-spu.c: Remove _initialize_spu_solib prototype.
3276         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3277         * solib-target.c: Remove _initialize_solib_target prototype.
3278         * solib.c: Remove _initialize_solib prototype.
3279         * source.c: Remove _initialize_source prototype.
3280         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3281         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3282         prototype.
3283         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3284         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3285         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3286         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3287         prototype.
3288         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3289         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3290         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3291         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3292         prototype.
3293         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3294         prototype.
3295         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3296         prototype.
3297         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3298         prototype.
3299         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3300         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3301         prototype.
3302         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3303         prototype.
3304         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3305         prototype.
3306         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3307         prototype.
3308         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3309         prototype.
3310         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3311         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3312         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3313         * stabsread.c: Remove _initialize_stabsread prototype.
3314         * stack.c: Remove _initialize_stack prototype.
3315         * stap-probe.c: Remove _initialize_stap_probe prototype.
3316         * std-regs.c: Remove _initialize_frame_reg prototype.
3317         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3318         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3319         * symfile.c: Remove _initialize_symfile prototype.
3320         * symmisc.c: Remove _initialize_symmisc prototype.
3321         * symtab.c: Remove _initialize_symtab prototype.
3322         * target-dcache.c: Remove _initialize_target_dcache prototype.
3323         * target-descriptions.c: Remove _initialize_target_descriptions
3324         prototype.
3325         * thread.c: Remove _initialize_thread prototype.
3326         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3327         prototype.
3328         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3329         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3330         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3331         prototype.
3332         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3333         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3334         * tracefile.c: Remove _initialize_tracefile prototype.
3335         * tracepoint.c: Remove _initialize_tracepoint prototype.
3336         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3337         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3338         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3339         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3340         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3341         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3342         * tui/tui.c: Remove _initialize_tui prototype.
3343         * typeprint.c: Remove _initialize_typeprint prototype.
3344         * user-regs.c: Remove _initialize_user_regs prototype.
3345         * utils.c: Remove _initialize_utils prototype.
3346         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3347         * valarith.c: Remove _initialize_valarith prototype.
3348         * valops.c: Remove _initialize_valops prototype.
3349         * valprint.c: Remove _initialize_valprint prototype.
3350         * value.c: Remove _initialize_values prototype.
3351         * varobj.c: Remove _initialize_varobj prototype.
3352         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3353         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3354         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3355         * windows-nat.c: Remove _initialize_windows_nat,
3356         _initialize_check_for_gdb_ini, and _initialize_loadable
3357         prototypes.
3358         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3359         * xcoffread.c: Remove _initialize_xcoffread prototype.
3360         * xml-support.c: Remove _initialize_xml_support prototype.
3361         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3362         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3363         prototype.
3364         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3365         prototype.
3366         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3367
3368 2017-09-08  Keith Seitz  <keiths@redhat.com>
3369
3370         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3371         field.
3372
3373 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3374
3375         * f-valprint.c (f_val_print): Remove check for one byte
3376         sized integers. Remove printing of character type.
3377
3378 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3379             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3380             Bernhard Heckel  <bernhard.heckel@intel.com>
3381
3382         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3383         to maintain proper indentation when printing pointers/refs.
3384
3385 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3386
3387         GDB 8.0.1 released.
3388
3389 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3390
3391         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3392
3393 2017-09-05  Tom Tromey  <tom@tromey.com>
3394
3395         * parse.c (funcall_chain): Now a std::vector.
3396         (start_arglist, end_arglist): Simplify.
3397         (free_funcalls): Remove.
3398         (parse_exp_in_context_1): Remove cleanup.
3399
3400 2017-09-05  Tom Tromey  <tom@tromey.com>
3401
3402         * go-exp.y (go_parse): Don't create a cleanup.
3403
3404 2017-09-05  Tom Tromey  <tom@tromey.com>
3405
3406         * d-exp.y (PrimaryExpression): Use std::string.
3407         (d_parse): Don't create a cleanup.
3408
3409 2017-09-05  Tom Tromey  <tom@tromey.com>
3410
3411         * utils.c (do_clear_parser_state): Remove.
3412         (make_cleanup_clear_parser_state): Remove.
3413         * p-exp.y (pascal_parse): Use scoped_restore.
3414         * m2-exp.y (m2_parse): Use scoped_restore.
3415         * f-exp.y (f_parse): Use scoped_restore.
3416         * d-exp.y (d_parse): Use scoped_restore.
3417         * c-exp.y (c_parse): Use scoped_restore.
3418         * ada-exp.y (ada_parse): Use scoped_restore.
3419         * utils.h (make_cleanup_clear_parser_state): Remove.
3420
3421 2017-09-06  Keith Seitz  <keiths@redhat.com>
3422
3423         * dwarf2read.c (dw2_linkage_name_attr): New function.
3424         (dw2_linkage_name): New function.
3425         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3426         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3427         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3428
3429 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3430
3431         * config/djgpp/djconfig.sh: Correct shell portability issue.
3432
3433 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3434
3435         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3436
3437 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3438
3439         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3440         * NEWS: Mention new FreeBSD/mips native configuration.
3441         * configure.host: Add aarch64*-*-freebsd*.
3442         * configure.nat: Likewise.
3443         * aarch64-fbsd-nat.c: New file.
3444
3445 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3446
3447         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3448         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3449         * NEWS: Mention new FreeBSD/aarch64 target.
3450         * configure.tgt: Add aarch64*-*-freebsd*.
3451         * aarch64-fbsd-tdep.c: New file.
3452         * aarch64-fbsd-tdep.h: New file.
3453
3454 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3455
3456         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3457
3458 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3459
3460         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3461         of TLS symbols.
3462
3463 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3464
3465         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3466         call.
3467
3468 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3469
3470         * infrun.c (follow_exec): Call add_thread after
3471         target_find_description.
3472
3473 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3474
3475         * infrun.c (handle_inferior_event_1): When exec'ing, read
3476         stop_pc after follow_exec.
3477
3478 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3479
3480         * remote.c (process_g_packet): Update error message.
3481
3482 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3483
3484         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3485         targets.
3486
3487 2017-09-05  Pedro Alves  <palves@redhat.com>
3488
3489         * eval.c (eval_call, evaluate_funcall): New functions, factored
3490         out from ...
3491         (evaluate_subexp_standard): ... this.
3492
3493 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3494
3495         * amd64-tdep.c (amd64_target_description): Create target
3496         descriptions.
3497         (_initialize_amd64_tdep): Don't call functions
3498         initialize_tdesc_amd64_*.  Add self tests.
3499         * arch/amd64.c (amd64_create_target_description): Add parameter
3500         is_linux.  Call set_tdesc_osabi if is_linux is true.
3501         * arch/amd64.h (amd64_create_target_description): Update the
3502         declaration.
3503         * arch/i386.c (i386_create_target_description): Add parameter
3504         is_linux.  Call set_tdesc_osabi if is_linux is true.
3505         * arch/i386.h (i386_create_target_description): Update
3506         declaration.
3507         * configure.tgt: Add i386.o to gdb_target_obs.
3508         * features/Makefile (XMLTOC): Remove i386/*.xml.
3509         * features/i386/amd64-avx-avx512.c: Remove.
3510         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3511         * features/i386/amd64-avx-mpx.c: Remove.
3512         * features/i386/amd64-avx.c: Remove.
3513         * features/i386/amd64-mpx.c: Remove.
3514         * features/i386/amd64.c: Remove.
3515         * features/i386/i386-avx-avx512.c: Remove.
3516         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3517         * features/i386/i386-avx-mpx.c: Remove.
3518         * features/i386/i386-avx.c: Remove.
3519         * features/i386/i386-mmx.c: Remove.
3520         * features/i386/i386-mpx.c: Remove.
3521         * features/i386/i386.c: Remove.
3522         * i386-tdep.c: Don't include features/i386/i386*.c., include
3523         target-descriptions.h and arch/i386.h.
3524         (i386_target_description): Create target descriptions.
3525         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3526         functions.  Do self tests.
3527
3528 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3529
3530         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3531         * features/i386/amd64-avx-avx512-linux.c: Removed.
3532         * features/i386/amd64-avx-linux.c: Removed.
3533         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3534         * features/i386/amd64-avx-mpx-linux.c: Removed.
3535         * features/i386/amd64-linux.c: Removed.
3536         * features/i386/amd64-mpx-linux.c: Removed.
3537         * features/i386/x32-avx-avx512-linux.c: Removed.
3538         * features/i386/x32-avx-linux.c: Removed.
3539         * features/i386/x32-linux.c: Removed.
3540
3541 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3542
3543         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3544         features/i386/*.c.
3545         (amd64_linux_read_description): Call
3546         amd64_create_target_description.
3547         * arch/amd64.c: New file.
3548         * arch/amd64.h: New file.
3549         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3550         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3551
3552 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3553
3554         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3555         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3556         (amd64_linux_read_description): Create target descriptions.
3557         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3558         functions.  Add unit tests.
3559         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3560         x32-core.xml.
3561         * features/i386/64bit-avx.c: Generated.
3562         * features/i386/64bit-avx512.c: Generated.
3563         * features/i386/64bit-core.c: Generated.
3564         * features/i386/64bit-linux.c: Generated.
3565         * features/i386/64bit-mpx.c: Generated.
3566         * features/i386/64bit-pkeys.c: Generated.
3567         * features/i386/64bit-segments.c: Generated.
3568         * features/i386/64bit-sse.c: Generated.
3569         * features/i386/x32-core.c: Generated.
3570         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3571         c files for amd64-linux and x32-linux.
3572
3573 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3574
3575         * amd64-linux-tdep.c (amd64_linux_read_description): New
3576         function.
3577         (amd64_linux_core_read_description): Call
3578         amd64_linux_read_description.
3579         (amd64_linux_init_abi): Likewise.
3580         (amd64_x32_linux_init_abi): Likewise.
3581         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3582         * x86-linux-nat.c (x86_linux_read_description): Call
3583         amd64_linux_read_description.
3584
3585 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3586
3587         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3588         comments.
3589
3590 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3591
3592         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3593         * features/i386/i386-avx-avx512-linux.c: Remove.
3594         * features/i386/i386-avx-linux.c: Remove.
3595         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3596         * features/i386/i386-avx-mpx-linux.c: Remove.
3597         * features/i386/i386-linux.c: Remove.
3598         * features/i386/i386-mmx-linux.c: Remove.
3599         * features/i386/i386-mpx-linux.c: Remove.
3600
3601 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3602
3603         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3604         (SFILES): Add arch/i386.c.
3605         (HFILES_NO_SRCDIR): Add arch/i386.h.
3606         * arch/i386.c: New file.
3607         * arch/i386.h: New file.
3608         * arch/tdesc.h (allocate_target_description): Declare.
3609         (set_tdesc_architecture): Declare.
3610         (set_tdesc_osabi): Declare.
3611         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3612         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3613         include arch/i386.h.
3614         (i386_linux_read_description): Remove code and call
3615         i386_create_target_description.
3616         (set_tdesc_architecture): New function.
3617         (set_tdesc_osabi): New function.
3618         * target-descriptions.h (allocate_target_description): Remove.
3619
3620 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3621
3622         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3623         * target-descriptions.c (tdesc_create_feature): Likewise, and
3624         adjust code.
3625         * features/i386/32bit-avx.c: Re-generated.
3626         * features/i386/32bit-avx512.c: Re-generated.
3627         * features/i386/32bit-core.c: Re-generated.
3628         * features/i386/32bit-linux.c: Re-generated.
3629         * features/i386/32bit-mpx.c: Re-generated.
3630         * features/i386/32bit-pkeys.c: Re-generated.
3631         * features/i386/32bit-sse.c: Re-generated.
3632
3633 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3634
3635         * regformats/regdef.h (struct reg): Override operator == and !=.
3636
3637 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3638
3639         * arch/tdesc.h: New file.
3640         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3641         * target-descriptions.c: Update comments.
3642         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3643         declarations.
3644         * features/i386/32bit-avx.c: Re-generated.
3645         * features/i386/32bit-avx512.c: Re-generated.
3646         * features/i386/32bit-core.c: Re-generated.
3647         * features/i386/32bit-linux.c: Re-generated.
3648         * features/i386/32bit-mpx.c: Re-generated.
3649         * features/i386/32bit-pkeys.c: Re-generated.
3650         * features/i386/32bit-sse.c: Re-generated.
3651
3652 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3653
3654         * regformats/regdat.sh: Update generated code.
3655
3656 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3657
3658         * regformats/regdat.sh: Adjust code order.
3659
3660 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3661
3662         * expprint.c (dump_subexp_body_standard): Use constant format
3663         string in fprintf_filtered call.
3664
3665 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3666
3667         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3668         NetBSD/i386.
3669         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3670
3671 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3672
3673         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3674
3675 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3676
3677         * bsd-kvm.o: Define _KMEMUSER.
3678         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3679         * configure: Regenerate.
3680
3681 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3682
3683         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3684         * i386-fbsd-nat.c: Likewise.
3685
3686 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3687
3688         * unittests/array-view-selftests.c: Add include of <array>.
3689
3690 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3691
3692         * spu-tdep.c (flush_ea_cache): Add missing argument to
3693         call_function_by_hand.
3694
3695 2017-09-04  Pedro Alves  <palves@redhat.com>
3696
3697         * NEWS (Safer support for debugging with no debug info): New.
3698
3699 2017-09-04  Pedro Alves  <palves@redhat.com>
3700
3701         * c-exp.y (function_method, function_method_void): Add current
3702         instance flags to TYPE_INSTANCE.
3703         * dwarf2read.c (check_modifier): New.
3704         (compute_delayed_physnames): Assert that only C++ adds delayed
3705         physnames.  Mark fn_fields as const/volatile depending on
3706         physname.
3707         * eval.c (make_params): New type_instance_flags parameter.  Use
3708         it as the new type's instance flags.
3709         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3710         flags element and pass it to make_params.
3711         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3712         instance flags element.
3713         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3714         * gdbtypes.h: Include "enum-flags.h".
3715         (type_instance_flags): New enum-flags type.
3716         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3717         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3718         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3719         (follow_type_instance_flags): New function.
3720         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3721         * parser-defs.h (follow_type_instance_flags): Declare.
3722         * valops.c (value_struct_elt_for_reference): const/volatile must
3723         match too.
3724
3725 2017-09-04  Pedro Alves  <palves@redhat.com>
3726
3727         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3728         function/method scopes; lookup the nested name as a function local
3729         static variable.
3730
3731 2017-09-04  Pedro Alves  <palves@redhat.com>
3732
3733         (%type <voidval>): Add function_method.
3734         * c-exp.y (exp): New production for calls with no arguments.
3735         (function_method, function_method_void_or_typelist): New
3736         productions.
3737         (exp): New production for "method()::static_var".
3738         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3739         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3740         Handle OP_FUNC_STATIC_VAR.
3741         * parse.c (operator_length_standard):
3742         Handle OP_FUNC_STATIC_VAR.
3743
3744 2017-09-04  Pedro Alves  <palves@redhat.com>
3745
3746         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3747         handling.
3748         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3749         Ditto.
3750         * parse.c (operator_length_standard, operator_check_standard):
3751         Ditto.
3752         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3753
3754 2017-09-04  Pedro Alves  <palves@redhat.com>
3755
3756         * ax-gdb.c: Include "typeprint.h".
3757         (gen_expr_for_cast): New function.
3758         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3759         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3760         type is unknown.
3761         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3762         nodebug_data_symbol.
3763         * eval.c: Include "typeprint.h".
3764         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3765         Error out if symbol has unknown type.
3766         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3767         evaluate_subexp_for_cast.
3768         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3769         OP_VAR_MSYM_VALUE.
3770         (evaluate_subexp_for_cast): New function.
3771         * gdbtypes.c (init_nodebug_var_type): New function.
3772         (objfile_type): Use it to initialize types of variables with no
3773         debug info.
3774         * typeprint.c (error_unknown_type): New.
3775         * typeprint.h (error_unknown_type): New declaration.
3776         * compile/compile-c-types.c (convert_type_basic): Handle
3777         TYPE_CODE_ERROR; warn and fallback to int for variables with
3778         unknown type.
3779
3780 2017-09-04  Pedro Alves  <palves@redhat.com>
3781
3782         * eval.c (evaluate_var_value): New function, factored out from ...
3783         (evaluate_subexp_standard): ... here.
3784
3785 2017-09-04  Pedro Alves  <palves@redhat.com>
3786
3787         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3788         Remove useless assignments to 'op'.
3789
3790 2017-09-04  Pedro Alves  <palves@redhat.com>
3791
3792         * eval.c (eval_skip_value): New function.
3793         (evaluate_subexp_standard): Use it.
3794
3795 2017-09-04  Pedro Alves  <palves@redhat.com>
3796
3797         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3798         function name from symbol/minsym and pass it to
3799         error_call_unknown_return_type.
3800
3801 2017-09-04  Pedro Alves  <palves@redhat.com>
3802
3803         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3804         * ax-gdb.c (gen_msym_var_ref): New function.
3805         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3806         * eval.c (evaluate_var_msym_value): New function.
3807         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3808         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3809         to call_function_by_hand.
3810         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3811         Handle OP_VAR_MSYM_VALUE.
3812         (union exp_element) <msymbol>: New field.
3813         * minsyms.h (struct type): Forward declare.
3814         (find_minsym_type_and_address): Declare.
3815         * parse.c (write_exp_elt_msym): New function.
3816         (write_exp_msymbol): Delete, refactored as ...
3817         (find_minsym_type_and_address): ... this new function.
3818         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3819         (operator_length_standard, operator_check_standard): Handle
3820         OP_VAR_MSYM_VALUE.
3821         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3822
3823 2017-09-04  Pedro Alves  <palves@redhat.com>
3824
3825         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3826         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3827         unknown.
3828         * ada-typeprint.c (print_func_type): Handle functions with unknown
3829         return type.
3830         * c-typeprint.c (c_type_print_base): Handle functions and methods
3831         with unknown return type.
3832         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3833         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3834         * compile/compile-c-types.c: Include "objfiles.h".
3835         (convert_func): For functions with unknown return type, warn and
3836         default to int.
3837         * compile/compile-object-run.c (compile_object_run): Adjust call
3838         to call_function_by_hand_dummy.
3839         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3840         call_function_by_hand.
3841         * eval.c (evaluate_subexp_standard): Adjust calls to
3842         call_function_by_hand.  Handle functions and methods with unknown
3843         return type.  Pass expect_type to call_function_by_hand.
3844         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3845         return type.
3846         * gcore.c (call_target_sbrk): Adjust call to
3847         call_function_by_hand.
3848         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3849         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3850         an integer address type instead of nodebug.
3851         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3852         call_function_by_hand.
3853         * infcall.c (error_call_unknown_return_type): New function.
3854         (call_function_by_hand): New "default_return_type" parameter.
3855         Pass it down.
3856         (call_function_by_hand_dummy): New "default_return_type"
3857         parameter.  Use it instead of defaulting to int.  If there's no
3858         default and the return type is unknown, throw an error.  If
3859         there's a default return type, and the called function has no
3860         debug info, then assume the function is prototyped.
3861         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3862         New "default_return_type" parameter.
3863         (error_call_unknown_return_type): New declaration.
3864         * linux-fork.c (call_lseek): Cast return type of lseek.
3865         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3866         call_function_by_hand.
3867         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3868         calls to call_function_by_hand.
3869         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3870         return type.
3871         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3872         (value_nsstring, print_object_command): Adjust calls to
3873         call_function_by_hand.
3874         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3875         functions with unknown return type.
3876         (pascal_type_print_func_varspec_suffix): New function.
3877         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3878         TYPE_CODE_METHOD>: Use it.
3879         * python/py-value.c (valpy_call): Adjust call to
3880         call_function_by_hand.
3881         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3882         call_function_by_hand.
3883         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3884         call_function_by_hand.
3885         * valops.c (value_allocate_space_in_inferior): Adjust call to
3886         call_function_by_hand.
3887         * typeprint.c (type_print_unknown_return_type): New function.
3888         * typeprint.h (type_print_unknown_return_type): New declaration.
3889
3890 2017-09-04  Pedro Alves  <palves@redhat.com>
3891
3892         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3893         types with more than one parameter as prototyped.
3894
3895 2017-09-04  Pedro Alves  <palves@redhat.com>
3896
3897         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3898         (disassemble_command): Use gdb_disassembly_flags instead of bare
3899         int.
3900         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3901         (dump_insns, do_mixed_source_and_assembly_deprecated)
3902         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3903         Use gdb_disassembly_flags instead of bare int.
3904         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3905         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3906         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3907         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3908         (enum gdb_disassembly_flag): ... values of this new enumeration.
3909         (gdb_disassembly_flags): Define.
3910         (gdb_disassembly)
3911         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3912         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3913         gdb_disassembly_flags instead of bare int.
3914         * record-btrace.c (btrace_insn_history)
3915         (record_btrace_insn_history, record_btrace_insn_history_range)
3916         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3917         instead of bare int.
3918         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3919         Use gdb_disassembly_flags instead of bare int.
3920         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3921         Define.
3922         * target-delegates.c: Regenerate.
3923         * target.c (target_insn_history, target_insn_history_from)
3924         (target_insn_history_range): Use gdb_disassembly_flags instead of
3925         bare int.
3926         * target.h: Include "disasm.h".
3927         (struct target_ops) <to_insn_history, to_insn_history_from,
3928         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3929         int.
3930         (target_insn_history, target_insn_history_from)
3931         (target_insn_history_range): Use gdb_disassembly_flags instead of
3932         bare int.
3933
3934 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3935
3936         * cli/cli-script.c (build_command_line): For if/while commands,
3937         check whether args is empty.
3938
3939 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3940
3941         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3942         (enum command_control_type): Likewise.
3943         (struct command_line): Likewise.
3944         (free_command_lines): Likewise.
3945         (struct command_lines_deleter): Likewise.
3946         (command_line_up): Likewise.
3947         (read_command_lines): Likewise.
3948         (read_command_lines_1): Likewise.
3949         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3950         (enum command_control_type): Likewise.
3951         (struct command_line): Likewise.
3952         (free_command_lines): Likewise.
3953         (struct command_lines_deleter): Likewise.
3954         (command_line_up): Likewise.
3955         (read_command_lines): Likewise.
3956         (read_command_lines_1): Likewise.
3957         * breakpoint.h: Include cli/cli-script.h.
3958         * extension-priv.h: Likewise.
3959         * gdbcmd.h: Likewise.
3960
3961 2017-09-04  Pedro Alves  <palves@redhat.com>
3962
3963         * ada-lang.c (is_known_support_routine): Move sal declaration to
3964         where it is initialized.
3965         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3966         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3967         (clear_command, update_static_tracepoint): Remove init_sal
3968         references.  Move declarations closer to initializations.
3969         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3970         initializations.
3971         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3972         references.  Move sal declarations closer to initializations.
3973         * frame.c (find_frame_sal): Return a symtab_and_line via function
3974         return instead of output parameter.  Remove init_sal references.
3975         * frame.h (find_frame_sal): Return a symtab_and_line via function
3976         return instead of output parameter.
3977         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3978         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3979         instead of memset.
3980         (gdbscm_find_pc_line): Remove init_sal reference.
3981         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3982         references.  Move declarations closer to initializations.
3983         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3984         initializations.
3985         (finish_backward): Remove init_sal references.  Move declarations
3986         closer to initializations.
3987         * infrun.c (process_event_stop_test, handle_step_into_function)
3988         (insert_hp_step_resume_breakpoint_at_frame)
3989         (insert_step_resume_breakpoint_at_caller): Likewise.
3990         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3991         (symbol_to_sal): Likewise.
3992         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3993         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3994         to its initialization.
3995         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3996         init_sal references.  Move declarations closer to initializations.
3997         * source.c (get_current_source_symtab_and_line): Remove brace
3998         initialization.
3999         (set_current_source_symtab_and_line): Now takes the sal by const
4000         reference.  Remove brace initialization.
4001         (line_info): Remove init_sal reference.
4002         * source.h (set_current_source_symtab_and_line): Now takes a
4003         symtab_and_line via const reference.
4004         * stack.c (set_current_sal_from_frame): Adjust.
4005         (print_frame_info): Adjust.
4006         (get_last_displayed_sal): Return the sal via function return
4007         instead of via output parameter.  Simplify.
4008         (frame_info): Adjust.
4009         * stack.h (get_last_displayed_sal): Return the sal via function
4010         return instead of via output parameter.
4011         * symtab.c (init_sal): Delete.
4012         (find_pc_sect_line): Remove init_sal references.  Move
4013         declarations closer to initializations.
4014         (find_function_start_sal): Remove init_sal references.  Move
4015         declarations closer to initializations.
4016         * symtab.h (struct symtab_and_line): In-class initialize all
4017         fields.
4018         * tracepoint.c (set_traceframe_context)
4019         (print_one_static_tracepoint_marker): Remove init_sal references.
4020         Move declarations closer to initializations.
4021         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4022         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4023         declarations closer to initializations.
4024         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4025         init_sal references.  Adjust.
4026
4027 2017-09-04  Pedro Alves  <palves@redhat.com>
4028
4029         * ax-gdb.c (agent_command_1): Use range-for.
4030         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4031         * breakpoint.c: Include "common/array-view.h".
4032         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4033         parameter from struct symtabs_and_lines to
4034         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4035         (breakpoint_sals_to_pc): Change sals parameter from struct
4036         symtabs_and_lines to std::vector reference.
4037         (check_fast_tracepoint_sals): Change sals parameter from struct
4038         symtabs_and_lines to std::array_view.  Use range-for.
4039         (decode_static_tracepoint_spec): Return a std::vector instead of
4040         symtabs_and_lines.  Update.
4041         (create_breakpoint): Update.
4042         (break_range_command, until_break_command, clear_command): Update.
4043         (base_breakpoint_decode_location, bkpt_decode_location)
4044         (bkpt_probe_create_sals_from_location)
4045         (bkpt_probe_decode_location, tracepoint_decode_location)
4046         (tracepoint_probe_decode_location)
4047         (strace_marker_create_sals_from_location): Return a std::vector
4048         instead of symtabs_and_lines.
4049         (strace_marker_create_breakpoints_sal): Update.
4050         (strace_marker_decode_location): Return a std::vector instead of
4051         symtabs_and_lines.  Update.
4052         (update_breakpoint_locations): Change struct symtabs_and_lines
4053         parameters to gdb::array_view.  Adjust.
4054         (location_to_sals): Return a std::vector instead of
4055         symtabs_and_lines.  Update.
4056         (breakpoint_re_set_default): Use std::vector instead of struct
4057         symtabs_and_lines.
4058         (decode_location_default): Return a std::vector instead of
4059         symtabs_and_lines.  Update.
4060         * breakpoint.h: Include "common/array-view.h".
4061         (struct breakpoint_ops) <decode_location>: Now returns a
4062         std::vector instead of returning a symtabs_and_lines via output
4063         parameter.
4064         (update_breakpoint_locations): Change sals parameters to use
4065         gdb::array_view.
4066         * cli/cli-cmds.c (edit_command, list_command): Update to use
4067         std::vector and gdb::array_view.
4068         (ambiguous_line_spec): Adjust to use gdb::array_view and
4069         range-for.
4070         (compare_symtabs): Rename to ...
4071         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4072         const reference and adjust.
4073         (filter_sals): Rewrite using std::vector and standard algorithms.
4074         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4075         (jump_command): Update to use std::vector.
4076         * linespec.c (struct linespec_state) <canonical_names>: Update
4077         comment.
4078         (add_sal_to_sals_basic): Delete.
4079         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4080         (decode_line_2, create_sals_line_offset)
4081         (convert_address_location_to_sals, convert_linespec_to_sals)
4082         (convert_explicit_location_to_sals, parse_linespec)
4083         (event_location_to_sals, decode_line_full, decode_line_1)
4084         (decode_line_with_current_source)
4085         (decode_line_with_last_displayed, decode_objc)
4086         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4087         (linespec_result::~linespec_result): Adjust to use std::vector
4088         instead of symtabs_and_lines.
4089         * linespec.h (linespec_sals::sals): Now a std::vector.
4090         (struct linespec_result): Use std::vector, bool, and in-class
4091         initialization.
4092         (decode_line_1, decode_line_with_current_source)
4093         (decode_line_with_last_displayed): Return std::vector.
4094         * macrocmd.c (info_macros_command): Use std::vector.
4095         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4096         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4097         std::vector.
4098         * probe.h (parse_probes): Return a std::vector.
4099         * python/python.c (gdbpy_decode_line): Use std::vector and
4100         gdb::array_view.
4101         * source.c (select_source_symtab, line_info): Use std::vector.
4102         * stack.c (func_command): Use std::vector.
4103         * symtab.h (struct symtabs_and_lines): Delete.
4104         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4105
4106 2017-09-04  Pedro Alves  <palves@redhat.com>
4107
4108         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4109         unittests/array-view-selftests.c.
4110         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4111         * common/array-view.h: New file.
4112         * unittests/array-view-selftests.c: New file.
4113
4114 2017-09-04  Pedro Alves  <palves@redhat.com>
4115
4116         * cli/cli-cmds.c (edit_command): Pass message to
4117         ambiguous_line_spec.
4118         (list_command): Pass message to ambiguous_line_spec.  Say
4119         "first"/"last" instead of "start" and "end" to be consistent with
4120         the manual.
4121         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4122         them to print formatted message.
4123
4124 2017-09-04  Pedro Alves  <palves@redhat.com>
4125
4126         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4127         ftrace_update_insns by reference instead of pointer.
4128
4129 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4130
4131         * i386-go32-tdep.c: Include x86-xstate.h.
4132         (i386_go32_init_abi): Call i386_target_description.
4133         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4134         if xcr0 is X86_XSTATE_X87_MASK.
4135         * i386-tdep.h (tdesc_i386): Remove the declaration.
4136         (tdesc_i386_mmx): Likewise.
4137
4138 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4139
4140         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4141         X86_XSTATE_SSE_MASK instead of 0.
4142
4143 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4144
4145         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4146         i386_target_description.
4147         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4148         i386_target_description.
4149         * i386-tdep.c (i386_gdbarch_init): Likewise.
4150
4151 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4152
4153         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4154         (x86_darwin_init_abi_64): Call amd64_target_description.
4155         * amd64-dicos-tdep.c: Likewise.
4156         * amd64-fbsd-nat.c: Likewise.
4157         * amd64-fbsd-tdep.c: Likewise.
4158         * amd64-nbsd-tdep.c: Likewise.
4159         * amd64-obsd-tdep.c: Likewise.
4160         * amd64-sol2-tdep.c: Likewise.
4161         * amd64-windows-tdep.c: Likewise.
4162         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4163
4164 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4165
4166         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4167         (btrace_function) <insn>: Change type to use std::vector.
4168         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4169         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4170         ftrace_update_insns, ftrace_compute_global_level_offset,
4171         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4172         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4173         change to std::vector.
4174         (ftrace_update_insns): Adjust to change to std::vector, change
4175         type of INSN parameter.
4176         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4177         * record-btrace.c (btrace_call_history_insn_range,
4178         btrace_compute_src_line_range,
4179         record_btrace_frame_prev_register): Adjust to change to
4180         std::vector.
4181         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4182         to change to std::vector.
4183
4184 2017-09-03  Tom Tromey  <tom@tromey.com>
4185
4186         * corefile.c (reopen_exec_file): Use std::string.
4187
4188 2017-09-03  Tom Tromey  <tom@tromey.com>
4189
4190         * compile/compile.c (compile_register_name_mangled): Return
4191         std::string.
4192         * compile/compile-loc2c.c (pushf_register_address): Update.
4193         (pushf_register): Update.
4194         * compile/compile-c-types.c (convert_array): Update.
4195         * compile/compile-c-symbols.c (generate_vla_size): Update.
4196         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4197         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4198         (convert_one_symbol): Update.
4199         (generate_c_for_for_one_variable): Update.
4200         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4201         std::string.
4202         (generate_register_struct): Update.
4203         * compile/compile-internal.h (c_get_range_decl_name): Return a
4204         std::string.
4205         (compile_register_name_mangled): Return std::string.
4206
4207 2017-09-03  Tom Tromey  <tom@tromey.com>
4208
4209         * utils.c (perror_string): Return a std::string.
4210         (throw_perror_with_name, perror_warning_with_name): Update.
4211
4212 2017-09-03  Tom Tromey  <tom@tromey.com>
4213
4214         * demangle.c (demangle_command): Use std::string,
4215         unique_xmalloc_ptr.
4216
4217 2017-09-03  Tom Tromey  <tom@tromey.com>
4218
4219         * cli/cli-setshow.c (do_set_command): Use std::string.
4220
4221 2017-09-03  Tom Tromey  <tom@tromey.com>
4222
4223         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4224
4225 2017-09-03  Tom Tromey  <tom@tromey.com>
4226
4227         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4228
4229 2017-09-03  Tom Tromey  <tom@tromey.com>
4230
4231         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4232         gdb::unique_xmalloc_ptr.
4233
4234 2017-09-03  Tom Tromey  <tom@tromey.com>
4235
4236         * thread.c (print_thread_info_1): Use string_printf.
4237         (thread_apply_command, thread_apply_all_command): Use
4238         std::string.
4239
4240 2017-09-03  Tom Tromey  <tom@tromey.com>
4241
4242         * valprint.c (val_print_string): Update.
4243         * gdbcore.h (memory_error_message): Return std::string.
4244         * corefile.c (memory_error_message): Return std::string.
4245         (memory_error): Update.
4246         * breakpoint.c (insert_bp_location): Update.
4247
4248 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4249
4250         * target/waitstatus.h (target_waitstatus_to_string): Change
4251         return type to std::string.
4252         * target/waitstatus.c (target_waitstatus_to_string): Return
4253         std::string.
4254         * target.h (target_waitstatus_to_string): Remove declaration.
4255         * infrun.c (resume, clear_proceed_status_thread,
4256         print_target_wait_results, do_target_wait, save_waitstatus,
4257         stop_all_threads): Adjust.
4258         * record-btrace.c (record_btrace_wait): Adjust.
4259         * target-debug.h
4260         (target_debug_print_struct_target_waitstatus_p): Adjust.
4261
4262 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4263
4264         PR gdb/22046
4265         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4266         detection.
4267
4268 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4269
4270         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4271         for setting/unsetting environment variables on the remote target.
4272         (New remote packets): Add entries for QEnvironmentHexEncoded,
4273         QEnvironmentUnset and QEnvironmentReset.
4274         * common/environ.c (gdb_environ::operator=): Extend method to
4275         handle m_user_set_env_list and m_user_unset_env_list.
4276         (gdb_environ::clear): Likewise.
4277         (match_var_in_string): Change type of first parameter from 'char
4278         *' to 'const char *'.
4279         (gdb_environ::set): Extend method to handle
4280         m_user_set_env_list and m_user_unset_env_list.
4281         (gdb_environ::unset): Likewise.
4282         (gdb_environ::clear_user_set_env): New method.
4283         (gdb_environ::user_set_envp): Likewise.
4284         (gdb_environ::user_unset_envp): Likewise.
4285         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4286         m_user_unset_env_list on move constructor/assignment.
4287         (unset): Add new default parameter 'update_unset_list = true'.
4288         (clear_user_set_env): New method.
4289         (user_set_envp): Likewise.
4290         (user_unset_envp): Likewise.
4291         (m_user_set_env_list): New std::set.
4292         (m_user_unset_env_list): Likewise.
4293         * common/rsp-low.c (hex2str): New function.
4294         (bin2hex): New overload for bin2hex function.
4295         * common/rsp-low.c (hex2str): New prototype.
4296         (str2hex): New overload prototype.
4297         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4298         QEnvironmentUnset and QEnvironmentReset.
4299         (remote_protocol_features): Add QEnvironmentHexEncoded,
4300         QEnvironmentUnset and QEnvironmentReset packets.
4301         (send_environment_packet): New function.
4302         (extended_remote_environment_support): Likewise.
4303         (extended_remote_create_inferior): Call
4304         extended_remote_environment_support.
4305         (_initialize_remote): Add QEnvironmentHexEncoded,
4306         QEnvironmentUnset and QEnvironmentReset packet configs.
4307         * unittests/environ-selftests.c (gdb_selftest_env_var):
4308         New variable.
4309         (test_vector_initialization): New function.
4310         (test_init_from_host_environ): Likewise.
4311         (test_reinit_from_host_environ): Likewise.
4312         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4313         Likewise.
4314         (test_unset_set_empty_vector): Likewise.
4315         (test_vector_clear): Likewise.
4316         (test_std_move): Likewise.
4317         (test_move_constructor):
4318         (test_self_move): Likewise.
4319         (test_set_unset_reset): Likewise.
4320         (run_tests): Rewrite in terms of the functions above.
4321
4322 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4323
4324         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4325         (adi_available): Use a temp variable of type CORE_ADDR as argument
4326         3 when calling target_auxv_search.
4327         (adi_normalize_address): Use masks and xor operators to calculate
4328         normalized address.
4329         (adi_read_versions, adi_write_versions, adi_print_versions)
4330         (do_examine, do_assign): Use paddress.
4331
4332 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4333
4334         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4335         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4336         out of loop and add supply of FIR.
4337         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4338         add collect of FIR.
4339
4340 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4341
4342         PR gdb/21827
4343         * cli/cli-script.c (define_command): Don't convert command name
4344         to lower case.
4345
4346 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4347
4348         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4349         Update all callers accordingly. Remove all code blocks handling
4350         the case where DISPP is not NULL.
4351
4352 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4353
4354         PR symtab/22003
4355         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4356         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4357         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4358
4359 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4360
4361         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4362         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4363         (read_comp_units_from_section): New parameter abbrev_section, use
4364         read_and_check_comp_unit_head, allocate signatured_type if needed.
4365         (create_all_comp_units): Update read_comp_units_from_section caller.
4366
4367 2017-08-23  Pedro Alves  <palves@redhat.com>
4368
4369         PR remote/21852
4370         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4371         to null_ptid and switch to thread without reading the registers
4372         after adding the inferior.
4373
4374 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4375
4376         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4377         compile-gcc.
4378         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4379         (compile_to_object): Implement compile_gcc.
4380         (_initialize_compile): Install "set compile-gcc".  Initialize
4381         compile_gcc.
4382
4383 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4384
4385         * compile/compile.c (compile_to_object): Conditionally call
4386         set_verbose.  Conditionally call compile or compile_v0.
4387
4388 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4389
4390         * sparc64-tdep.h: (adi_normalize_address): New export.
4391         * sparc-nat.h: (open_adi_tag_fd): New export.
4392         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4393         * sparc64-linux-tdep.c:
4394         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4395         (sparc64_linux_handle_segmentation_fault): New function.
4396         (sparc64_linux_init_abi): Register
4397         sparc64_linux_handle_segmentation_fault
4398         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4399         (sparc64_addr_bits_remove): New function.
4400         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4401         (MAX_PROC_NAME_SIZE): New macro.
4402         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4403         (sparc64adilist): New variable.
4404         (adi_proc_list): New variable.
4405         (find_adi_info): New function.
4406         (add_adi_info): New function.
4407         (get_adi_info_proc): New function.
4408         (get_adi_info): New function.
4409         (info_adi_command): New function.
4410         (read_maps_entry): New function.
4411         (adi_available): New function.
4412         (adi_normalize_address): New function.
4413         (adi_align_address): New function.
4414         (adi_convert_byte_count): New function.
4415         (adi_tag_fd): New function.
4416         (adi_is_addr_mapped): New function.
4417         (adi_read_versions): New function.
4418         (adi_write_versions): New function.
4419         (adi_print_versions): New function.
4420         (do_examine): New function.
4421         (do_assign): New function.
4422         (adi_examine_command): New function.
4423         (adi_assign_command): New function.
4424         (_initialize_sparc64_adi_tdep): New function.
4425
4426 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4427
4428         * breakpoint.c (breakpoints_info): Rename to ...
4429         (info_breakpoints_command): ... this.
4430         (watchpoints_info): Rename to ...
4431         (info_watchpoints_command): ... this.
4432         (tracepoints_info): Rename to ...
4433         (info_tracepoints_command): ... this.
4434         (_initialize_breakpoint): Adjust.
4435         * dcache.c (dcache_info): Rename to ...
4436         (info_display_command): ... this.
4437         (_initialize_dcache): Adjust.
4438         * frame.h (args_info): Rename to ...
4439         (info_args_command): ... this.
4440         (locals_info): Rename to ...
4441         (info_locals_command): ... this.
4442         * infcmd.c (nofp_registers_info): Rename to ...
4443         (info_registers_command): ... this.
4444         (float_info): Rename to ...
4445         (info_float_command): ... this.
4446         (program_info): Rename to ...
4447         (info_program_command): ... this.
4448         (all_registers_info): Rename to ...
4449         (info_all_registers_command): ... this.
4450         (vector_info): Rename to ...
4451         (info_vector_command): ... this.
4452         (float_info): Rename to ...
4453         (info_float_command): ... this.
4454         (_initialize_infcmd): Adjust.
4455         * inferior.h (term_info): Rename to ...
4456         (info_terminal_command): ... this.
4457         * inflow.c (term_info): Rename to ...
4458         (info_terminal_command): ... this.
4459         (_initialize_inflow): Adjust.
4460         * infrun.c (signals_info): Rename to ...
4461         (info_signals_command): ... this.
4462         (_initialize_infrun): Adjust.
4463         * objc-lang.c (classes_info): Rename to ...
4464         (info_classes_command): ... this.
4465         (selectors_info): Rename to ...
4466         (info_selectors_command): ... this.
4467         (_initialize_objc_language): Adjust.
4468         * printcmd.c (sym_info): Rename to ...
4469         (info_symbol_command): ... this.
4470         (address_info): Rename to ...
4471         (info_address_command): ... this.
4472         (display_info): Rename to ...
4473         (info_display_command): ... this.
4474         (_initialize_printcmd): Adjust.
4475         * reverse.c (bookmarks_info): Rename to ...
4476         (info_breakpoints_command): ... this.
4477         (_initialize_reverse): Adjust.
4478         * ser-go32.c (dos_info): Rename to ...
4479         (info_serial_command): ... this.
4480         (_initialize_ser_dos): Adjust.
4481         * skip.c (skip_info): Rename to ...
4482         (info_skip_command): ... this.
4483         (_initialize_step_skip): Adjust.
4484         * source.c (line_info): Rename to ...
4485         (info_line_command): ... this.
4486         (source_info): Rename to ...
4487         (info_source_command)
4488         * stack.c (frame_info): Rename to ...
4489         (info_frame_command): ... this.
4490         (locals_info): Rename to ...
4491         (info_locals_command): ... this.
4492         (args_info): Rename to ...
4493         (info_args_command): ... this.
4494         (_initialize_stack): Adjust.
4495         * symtab.c (sources_info): Rename to ...
4496         (info_sources_command): ... this.
4497         (variables_info): Rename to ...
4498         (info_variables_command): ... this.
4499         (functions_info): Rename to ...
4500         (info_functions_command): ... this.
4501         (types_info): Rename to ...
4502         (info_types_command): ... this.
4503         (_initialize_symtab): Adjust.
4504         * target.c (target_info): Rename to ...
4505         (info_target_command): ... this.
4506         (initialize_targets): Adjust.
4507         * tracepoint.c (tvariables_info): Rename to ...
4508         (info_tvariables_command): ... this.
4509         (scope_info): Rename to ...
4510         (info_scope_command): ... this.
4511         (trace_dump_actions): Adjust.
4512         (_initialize_tracepoint): Adjust.
4513
4514 2017-08-22  Tom Tromey  <tom@tromey.com>
4515
4516         * breakpoint.h (install_breakpoint): Update.
4517         * breakpoint.c (add_solib_catchpoint): Update.
4518         (install_breakpoint): Change argument to a std::unique_ptr.
4519         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4520         (create_breakpoint_sal, create_breakpoint): Update.
4521         (watch_command_1, catch_exec_command_1)
4522         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4523         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4524         Return the breakpoint.
4525         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4526         (new_single_step_breakpoint): Update.
4527         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4528         std::unique_ptr.
4529         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4530         std::unique_ptr.
4531         * break-catch-sig.c (create_signal_catchpoint): Use
4532         std::unique_ptr.
4533         * ada-lang.c (create_ada_exception_catchpoint): Use
4534         std::unique_ptr.
4535
4536 2017-08-22  Tom Tromey  <tom@tromey.com>
4537
4538         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4539
4540 2017-08-22  Tom Tromey  <tom@tromey.com>
4541
4542         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4543         (lookup_partial_symbol): Update.
4544
4545 2017-08-22  Tom Tromey  <tom@tromey.com>
4546
4547         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4548         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4549         (find_and_open_source, symtab_to_fullname): Update.
4550         * psymtab.c (psymtab_to_fullname): Update.
4551
4552 2017-08-22  Tom Tromey  <tom@tromey.com>
4553
4554         * exec.c (exec_file_attach): Update.
4555         * linux-thread-db.c (try_thread_db_load): Update.
4556         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4557         * utils.c (gdb_realpath): Change return type.
4558         (gdb_realpath_keepfile): Update.
4559         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4560         (_initialize_utils): Register the new self test.
4561         * source.c (openp): Update.
4562         (find_and_open_source): Update.
4563         * nto-tdep.c (nto_find_and_open_solib): Update.
4564         * main.c (set_gdb_data_directory): Update.
4565         (captured_main_1): Update.
4566         * dwarf2read.c (dwarf2_get_dwz_file): Update
4567         (dw2_map_symbol_filenames): Update.
4568         * auto-load.c (auto_load_safe_path_vec_update): Update.
4569         (filename_is_in_auto_load_safe_path_vec): Change type of
4570         "filename_realp".
4571         (auto_load_objfile_script): Update.
4572         (file_is_auto_load_safe): Update.  Use std::string.
4573         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4574
4575 2017-08-22  Tom Tromey  <tom@tromey.com>
4576
4577         * utils.c (gdb_realpath_keepfile): Return a
4578         gdb::unique_xmalloc_ptr.
4579         * exec.c (exec_file_attach): Update.
4580         * utils.h (gdb_realpath_keepfile): Return a
4581         gdb::unique_xmalloc_ptr.
4582
4583 2017-08-22  Tom Tromey  <tom@tromey.com>
4584
4585         * compile/compile.c (compile_file_command): Use
4586         gdb::unique_xmalloc_ptr, std::string.
4587         * utils.c (gdb_abspath): Change return type.
4588         * source.c (openp): Update.
4589         * objfiles.c (allocate_objfile): Update.
4590         * main.c (set_gdb_data_directory): Update.
4591         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4592
4593 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4594
4595         * cli-cmds.c (list_commands): List actual code around more than
4596         one location.
4597
4598 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4599
4600         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4601
4602 2017-08-21  Pedro Alves  <palves@redhat.com>
4603
4604         PR gdb/19487
4605         * c-exp.y (variable production): Handle function aliases.
4606         * minsyms.c (msymbol_is_text): New function.
4607         * minsyms.h (msymbol_is_text): Declare.
4608         * symtab.c (find_function_alias_target): New function.
4609         * symtab.h (find_function_alias_target): Declare.
4610
4611 2017-08-21  Pedro Alves  <palves@redhat.com>
4612
4613         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4614         typedefs.
4615         * typeprint.c (whatis_exp): If handling "whatis", and expression
4616         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4617         typedefs here.
4618         * valops.c (value_cast): Save "to" type before resolving
4619         stubs/typedefs.  Use that type as resulting value's type.
4620
4621 2017-08-18  Tom Tromey  <tom@tromey.com>
4622             Pedro Alves  <palves@redhat.com>
4623
4624         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4625         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4626         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4627         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4628         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4629         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4630         (linux_get_siginfo_data): Add "thread" argument.  Use
4631         scoped_restore.
4632         * linux-nat.c (linux_child_follow_fork)
4633         (check_stopped_by_watchpoint): Use scoped_restore.
4634         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4635         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4636         (restore_inferior_ptid, save_inferior_ptid): Remove.
4637         * btrace.c (btrace_fetch): Use scoped_restore.
4638         * bsd-uthread.c (bsd_uthread_fetch_registers)
4639         (bsd_uthread_store_registers): Use scoped_restore.
4640         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4641         scoped_restore.
4642         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4643         (aix_thread_xfer_partial): Use scoped_restore.
4644         * inferior.h (save_inferior_ptid): Remove.
4645
4646 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4647
4648         PR tdep/21818
4649         * arm-tdep.c (gdb_print_insn_arm): Mark
4650         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4651
4652 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4653
4654         * NEWS: Mention GDBserver's new option "--selftest".
4655         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4656         * selftest.c: Move it to common/selftest.c.
4657         * selftest.h: Move it to common/selftest.h.
4658         * selftest-arch.c (reset): New function.
4659         (tests_with_arch): Call reset.
4660
4661 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4662
4663         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4664         instead of exception_fprintf and printf_filtered.
4665
4666 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4667
4668         * selftest.c (register_self_test): Rename it to
4669         selftests::register_test.
4670         (run_self_tests): selftest::run_tests.
4671         * selftest.h: Update declarations.
4672         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4673         selftests::register_test_foreach_arch.
4674         * selftest-arch.h: Update declaration.
4675         * aarch64-tdep.c: Update.
4676         * arm-tdep.c: Likewise.
4677         * disasm-selftests.c: Likewise.
4678         * dwarf2loc.c: Likewise.
4679         * dwarf2-frame.c: Likewise.
4680         * findvar.c: Likewise.
4681         * gdbarch-selftests.c: Likewise.
4682         * maint.c (maintenance_selftest): Likewise.
4683         * regcache.c: Likewise.
4684         * rust-exp.y: Likewise.
4685         * selftest-arch.c: Likewise.
4686         * unittests/environ-selftests.c: Likewise.
4687         * unittests/function-view-selftests.c: Likewise.
4688         * unittests/offset-type-selftests.c: Likewise.
4689         * unittests/optional-selftests.c: Likewise.
4690         * unittests/scoped_restore-selftests.c: Likewise.
4691         * utils-selftests.c: Likewise.
4692
4693 2017-08-17  Pedro Alves  <palves@redhat.com>
4694
4695         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4696         local.
4697
4698 2017-08-17  Pedro Alves  <palves@redhat.com>
4699
4700         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4701         field.
4702         (reset_die_in_process): Delete, replaced by ...
4703         (process_die_scope): ... this new class.  Make it responsible for
4704         freeing cu->line_header too.
4705         (process_die): Use process_die_scope.
4706         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4707         cu->line_header_die_owner.  Don't release the line header if it's
4708         owned by the CU.
4709         (setup_type_unit_groups): Make the CU/DIE own the line header.
4710         Don't release the line header here.
4711
4712 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4713
4714         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4715
4716 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4717
4718         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4719         Single-Key mode
4720
4721 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4722
4723         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4724         mode command list.
4725
4726 2017-08-15  Stafford Horne  <shorne@gmail.com>
4727
4728         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4729
4730 2017-08-15  Stafford Horne  <shorne@gmail.com>
4731
4732         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4733
4734 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4735
4736         PR gdb/21954
4737         * infcmd.c (unset_environment_command): Use the 'clear' method on
4738         the environment instead of resetting it.
4739
4740 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4741
4742         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4743         platforms.
4744
4745 2017-08-14  Tom Tromey  <tom@tromey.com>
4746
4747         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4748         (print_binary_chars): Likewise.
4749         (BITS_IN_BYTES): Remove.
4750
4751 2017-08-14  Tom Tromey  <tom@tromey.com>
4752
4753         PR gdb/21675
4754         * valprint.c (LOW_ZERO): Change value to 034.
4755         (print_octal_chars): Add static_asserts for octal constants.
4756         * printcmd.c (print_scalar_formatted): Add 'd' case.
4757
4758 2017-08-11  Tom Tromey  <tom@tromey.com>
4759
4760         * symfile.c (add_symbol_file_command): Use std::vector.
4761
4762 2017-08-14  Tom Tromey  <tom@tromey.com>
4763
4764         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4765         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4766         std::move.
4767         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4768
4769 2017-08-11  Pedro Alves  <palves@redhat.com>
4770
4771         * infrun.c (process_event_stop_test): Adjust
4772         function_name_is_marked_for_skip call.
4773         * skip.c: Include <list>.
4774         (skiplist_entry): Make it a class with private fields, and
4775         getters/setters.
4776         (skiplist_entry_chain): Delete.
4777         (skiplist_entries): New.
4778         (skiplist_entry_count): Delete.
4779         (highest_skiplist_entry_num): New.
4780         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4781         (add_skiplist_entry): Delete.
4782         (skiplist_entry::skiplist_entry): New.
4783         (skiplist_entry::add_entry): New.
4784         (skip_file_command, skip_function): Adjust.
4785         (compile_skip_regexp): Delete.
4786         (skip_command): Don't compile regexp here.  Adjust to use
4787         skiplist_entry::add_entry.
4788         (skip_info): Adjust to use range-for and getters.
4789         (skip_enable_command, skip_disable_command): Adjust to use
4790         range-for and setters.
4791         (skip_delete_command): Adjust to use std::list.
4792         (add_skiplist_entry): Delete.
4793         (skip_file_p): Delete, refactored as ...
4794         (skiplist_entry::do_skip_file_p): ... this new method.
4795         (skip_gfile_p): Delete, refactored as ...
4796         (skiplist_entry::do_gskip_file_p): ... this new method.
4797         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4798         (skiplist_entry::skip_function_p): ... this new method.
4799         (function_name_is_marked_for_skip): Now returns bool, and takes
4800         the function sal by const reference.  Adjust to use range-for and
4801         skiplist_entry methods.
4802         (_initialize_step_skip): Remove references to
4803         skiplist_entry_chain, skiplist_entry_count.
4804         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4805         takes the function sal by const reference.
4806
4807 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4808
4809         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4810         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4811         (dwarf2_frame_cache):
4812         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4813         RETURN_MASK_ALL and set *this_case to NULL.
4814         * frame-unwind.h: Update comments.
4815
4816 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4817
4818         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4819         (dwarf2_frame_state_copy_regs): Remove.
4820         (dwarf2_frame_state_free_regs): Remove.
4821         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4822         (dwarf2_restore_rule): Call method .alloc_regs instead of
4823         dwarf2_frame_state_alloc_regs.
4824         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4825         constructor.  Call std::move.
4826         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4827         (dwarf2_frame_cache): Likewise.
4828
4829         [GDB_SELF_TEST]: Include selftest.h and
4830         selftest-arch.h.
4831         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4832         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4833         execute_cfa_program_test.
4834
4835         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4836         copy ctor, assignment operator, move assignment.
4837         <alloc_regs>: New method.
4838         <swap>: New method.
4839         (struct dwarf2_frame_state): Delete dtor.
4840         (dwarf2_frame_state_alloc_regs): Remove declaration.
4841         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4842         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4843
4844 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4845
4846         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4847         (dwarf2_frame_state::dwarf2_frame_state): New.
4848         (dwarf2_frame_state::~dwarf2_frame_state): New.
4849         (dwarf2_fetch_cfa_info): Update.
4850         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4851         rather than a pointer.  Update code.
4852         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4853         dtor.
4854         <data_align, code_align, retaddr_column>: Change them to const.
4855         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4856         to bool.
4857
4858 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4859
4860         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4861         <loc.exp>: New field.
4862         * dwarf2-frame.c (execute_cfa_program): Update.
4863         (dwarf2_frame_prev_register): Update.
4864
4865 2017-08-10  Pedro Alves  <palves@redhat.com>
4866
4867         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4868
4869 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4870
4871         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4872         (fbsd_pending_children): Use std::list.
4873         (fbsd_remember_child): Likewise.
4874         (fbsd_is_child_pending): Likewise.
4875         (fbsd_pending_vfork_done): Use std::forward_list.
4876         (fbsd_add_vfork_done): Likewise.
4877         (fbsd_is_vfork_done_pending): Likewise.
4878         (fbsd_next_vfork_done): Likewise.
4879
4880 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4881
4882         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4883         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4884         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4885         for `mapfilename'.
4886         (fbsd_xfer_partial): Use gdb::byte_vector.
4887         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4888
4889 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4890
4891         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4892         "filestuff.h".
4893         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4894
4895 2017-08-09  Tom Tromey  <tom@tromey.com>
4896
4897         * skip.c (skiplist_entry): New constructor.
4898         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4899         (skiplist_entry::file_is_glob): Now bool.
4900         (skiplist_entry::file, skiplist_entry::function): Now
4901         std::string.
4902         (make_skip_entry): Return a unique_ptr.  Use new.
4903         (free_skiplist_entry, free_skiplist_entry_cleanup)
4904         (make_free_skiplist_entry_cleanup): Remove.
4905         (skip_command, skip_disable_command, add_skiplist_entry)
4906         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4907         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4908         (function_name_is_marked_for_skip): Update.
4909         (skip_delete_command): Update.  Use delete.
4910
4911 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4912
4913         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4914         (aarch64_linux_core_read_description): New function.
4915         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4916
4917 2017-08-09  Pedro Alves  <palves@redhat.com>
4918
4919         * cp-name-parser.y (cp_comp_to_string): Return a
4920         gdb::unique_xmalloc_ptr<char>.
4921         * cp-support.c (replace_typedefs_qualified_name)
4922         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4923         (cp_canonicalize_string_full): Use op= instead of explicit
4924         convertion.
4925         (cp_class_name_from_physname, method_name_from_physname)
4926         (cp_func_name, cp_remove_params): Adjust to use
4927         gdb::unique_xmalloc_ptr<char>.
4928         * cp-support.h (cp_comp_to_string): Return a
4929         gdb::unique_xmalloc_ptr<char>.
4930         * python/py-type.c (typy_lookup_type): Adjust to use
4931         gdb::unique_xmalloc_ptr<char>.
4932
4933 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4934
4935         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4936
4937 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4938             Yao Qi  <yao.qi@linaro.org>
4939
4940         * cp-support.c (cp_canonicalize_string_full): Use
4941         gdb::unique_xmalloc_ptr<char>.
4942         (cp_canonicalize_string): Likewise.
4943
4944 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4945
4946         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4947         * regformats/i386/amd64-avx-avx512.dat: Remove.
4948         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4949         * regformats/i386/amd64-avx-mpx.dat:Remove.
4950         * regformats/i386/amd64-avx.dat: Remove.
4951         * regformats/i386/amd64-mpx.dat: Remove.
4952         * regformats/i386/i386-avx-avx512.dat: Remove.
4953         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4954         * regformats/i386/i386-avx-mpx.dat: Remove.
4955         * regformats/i386/i386-mmx.dat: Remove.
4956         * regformats/i386/i386-mpx.dat: Remove.
4957
4958 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4959
4960         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4961         * amd64-tdep.c: Don't include features/i386/x32*.c.
4962         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4963         functions.
4964         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4965         and i386/x32-avx-avx512.
4966         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4967         and i386/x32.xml.
4968         * features/i386/x32-avx-avx512.c: Removed.
4969         * features/i386/x32-avx-avx512.xml: Removed.
4970         * features/i386/x32-avx.c: Removed.
4971         * features/i386/x32-avx.xml: Removed.
4972         * features/i386/x32.c: Removed.
4973         * features/i386/x32.xml: Removed.
4974         * regformats/i386/x32-avx-avx512.dat: Removed.
4975         * regformats/i386/x32-avx.dat: Removed.
4976         * regformats/i386/x32.dat: Removed.
4977
4978 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4979
4980         PR breakpoints/21886
4981         * mem-break.c (default_memory_insert_breakpoint): Use
4982         `->placed_address' rather than `->reqstd_address' for the
4983         breakpoint location.
4984
4985 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4986
4987         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4988         assertions.
4989
4990 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4991
4992         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4993         a union of `tdep_info', `tdesc_data' and `id'.
4994         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4995         rather than `info.tdep_info'.
4996         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4997         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4998         * i386-tdep.c (i386_gdbarch_init): Likewise.
4999         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5000         * mips-tdep.c (mips_gdbarch_init): Likewise.
5001         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5002         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5003         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5004         `info.tdep_info'.
5005         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5006         `info.tdep_info'.
5007         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5008         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5009         `info.tdep_info'.
5010         * spu-tdep.c (spu_gdbarch_init): Likewise.
5011         * gdbarch.h: Regenerate.
5012
5013 2017-08-07  Leszek Swirski  <leszeks@google.com>
5014
5015         PR symtab/20899
5016         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5017
5018 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5021         (gdbsim_open): Rename gdb_argv args object to argv.
5022
5023 2017-08-05  Tom Tromey  <tom@tromey.com>
5024
5025         * compile/compile-object-load.c (compile_object_load): Use
5026         gdb::unique_xmalloc_ptr.
5027         * cli/cli-dump.c (scan_filename): Rename from
5028         scan_filename_with_cleanup.  Change return type.
5029         (scan_expression): Rename from scan_expression_with_cleanup.
5030         Change return type.
5031         (dump_memory_to_file, dump_value_to_file, restore_command):
5032         Use gdb::unique_xmalloc_ptr.  Update.
5033         * cli/cli-cmds.c (find_and_open_script): Use
5034         gdb::unique_xmalloc_ptr.
5035         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5036         * symmisc.c (maintenance_print_symbols)
5037         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5038         * symfile.c (symfile_bfd_open, generic_load)
5039         (add_symbol_file_command, remove_symbol_file_command): Use
5040         gdb::unique_xmalloc_ptr.
5041         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5042         * psymtab.c (maintenance_print_psymbols): Use
5043         gdb::unique_xmalloc_ptr.
5044         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5045         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5046         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5047         (reload_shared_libraries_1): Likewise.
5048
5049 2017-08-05  Tom Tromey  <tom@tromey.com>
5050
5051         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5052         (rust_op_vector, rust_set_vector): New typedefs.
5053         (current_parser): New global.
5054         (work_obstack): Change to pointer type.  Update all users.
5055         (rust_ast, pstate): Remove globals.
5056         (struct rust_parser): New.
5057         (%union) <params, field_inits>: Change type.
5058         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5059         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5060         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5061         (convert_params_to_types, convert_params_to_expression): Change
5062         type of "params".
5063         (ast_string): Change type of "fields".
5064         (rust_parse): Make a rust_parser.  Remove cleanups.
5065         (rust_lex_tests): Make and install an auto_obstack.
5066
5067 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5068
5069         * configure.srv (ipa_x32_linux_regobj): New.
5070         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5071         instead of X86_TDESC_AVX512.
5072         (initialize_low_tracepoint): Call
5073         init_registers_x32_avx_avx512_linux.
5074
5075 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5076
5077         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5078
5079 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5080
5081         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5082
5083 2017-08-03  Tom Tromey  <tom@tromey.com>
5084
5085         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5086         Remove.
5087         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5088
5089 2017-08-03  Tom Tromey  <tom@tromey.com>
5090
5091         * python/py-param.c (compute_enum_values): Use gdb_argv.
5092
5093 2017-08-03  Tom Tromey  <tom@tromey.com>
5094
5095         * utils.h (struct gdb_argv_deleter): New.
5096         (gdb_argv): New class.
5097         * utils.c (gdb_argv::reset): New method.
5098         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5099         * tracefile.c (tsave_command): Use gdb_argv.
5100         * top.c (new_ui_command): Use gdb_argv.
5101         * symmisc.c (maintenance_print_symbols)
5102         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5103         * symfile.c (symbol_file_command, generic_load)
5104         (remove_symbol_file_command): Use gdb_argv.
5105         * stack.c (backtrace_command): Use gdb_argv.
5106         * source.c (add_path, show_substitute_path_command)
5107         (unset_substitute_path_command, set_substitute_path_command):
5108         Use gdb_argv.
5109         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5110         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5111         * remote.c (extended_remote_run, remote_put_command)
5112         (remote_get_command, remote_delete_command): Use gdb_argv.
5113         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5114         (gdbsim_open): Use gdb_argv.
5115         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5116         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5117         * procfs.c (procfs_info_proc): Use gdb_argv.
5118         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5119         * infrun.c (handle_command): Use gdb_argv.
5120         * inferior.c (add_inferior_command, clone_inferior_command):
5121         Use gdb_argv.
5122         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5123         * exec.c (exec_file_command): Use gdb_argv.
5124         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5125         * compile/compile.c (build_argc_argv): Use gdb_argv.
5126
5127 2017-08-03  Tom Tromey  <tom@tromey.com>
5128
5129         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5130
5131 2017-08-03  Tom Tromey  <tom@tromey.com>
5132
5133         * python/python.c (compute_python_string): Return std::string.
5134         (gdbpy_eval_from_control_command): Update.
5135         (do_start_initialization): Use std::string.
5136         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5137         xstrprintf.
5138         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5139         xstrprintf.
5140
5141 2017-08-03  Tom Tromey  <tom@tromey.com>
5142
5143         * top.h (do_restore_instream_cleanup): Remove.
5144         * top.c (do_restore_instream_cleanup): Remove.
5145         (read_command_file): Use scoped_restore.
5146         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5147
5148 2017-08-03  Tom Tromey  <tom@tromey.com>
5149
5150         * cli/cli-script.c (execute_user_command)
5151         (execute_control_command): Use scoped_restore.
5152
5153 2017-08-03  Tom Tromey  <tom@tromey.com>
5154
5155         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5156         (execute_user_command): Remove user_call_depth; use
5157         user_args_stack's size instead.
5158
5159 2017-08-03  Tom Tromey  <tom@tromey.com>
5160
5161         * top.h (in_user_command): Remove.
5162         * top.c (in_user_command): Remove.
5163         * cli/cli-script.c (do_restore_user_call_depth)
5164         (execute_user_command): Update.
5165
5166 2017-08-03  Tom Tromey  <tom@tromey.com>
5167
5168         * valops.c (search_struct_method): Use gdb::byte_vector.
5169         * valarith.c (value_concat): Use std::vector.
5170         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5171         (simple_search_memory): Likewise.
5172         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5173         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5174         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5175         * elfread.c (elf_rel_plt_read): Use std::string.
5176         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5177         * cli/cli-dump.c (restore_section_callback): Use
5178         gdb::byte_vector.
5179
5180 2017-08-03  Tom Tromey  <tom@tromey.com>
5181
5182         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5183
5184 2017-08-03  Tom Tromey  <tom@tromey.com>
5185
5186         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5187         (tui_register_format): Use scoped_restore.
5188
5189 2017-08-03  Tom Tromey  <tom@tromey.com>
5190
5191         * reverse.c (exec_direction_default): Remove.
5192         (exec_reverse_once): Use scoped_restore.
5193         * remote.c (restore_remote_timeout): Remove.
5194         (remote_flash_erase, remote_flash_write, remote_flash_done)
5195         (readchar, remote_serial_write): Use scoped_restore.
5196         * cli/cli-script.c (struct source_cleanup_lines_args)
5197         (source_cleanup_lines): Remove.
5198         (script_from_file): Use scoped_restore.
5199         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5200         (source_command): Use scoped_restore.
5201
5202 2017-08-03  Tom Tromey  <tom@tromey.com>
5203
5204         * utils.h (make_cleanup_free_so): Remove.
5205         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5206         * solist.h (struct so_deleter): New.
5207         (so_list_up): New typedef.
5208         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5209
5210 2017-08-03  Tom Tromey  <tom@tromey.com>
5211
5212         * utils.h (make_cleanup_restore_current_language): Remove.
5213         * utils.c (do_restore_current_language)
5214         (make_cleanup_restore_current_language): Remove.
5215         * parse.c (parse_exp_in_context_1)
5216         (parse_expression_with_language): Use
5217         scoped_restore_current_language.
5218         * mi/mi-main.c (mi_cmd_execute): Use
5219         scoped_restore_current_language.
5220         * language.h (scoped_restore_current_language): New class.
5221
5222 2017-08-03  Tom Tromey  <tom@tromey.com>
5223
5224         * compile/compile.c (cleanup_unlink_file): Remove.
5225         (compile_to_object): Use gdb::unlinker.
5226         (eval_compile_command): Likewise.
5227
5228 2017-08-03  Tom Tromey  <tom@tromey.com>
5229
5230         * utils.h (make_cleanup_fclose): Remove.
5231         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5232
5233 2017-08-03  Tom Tromey  <tom@tromey.com>
5234
5235         * top.c (open_terminal_stream): Return gdb_file_up.
5236         (new_ui_command): Update.
5237
5238 2017-08-03  Tom Tromey  <tom@tromey.com>
5239
5240         * source.c (print_source_lines_base, forward_search_command)
5241         (reverse_search_command): Use gdb_file_up.
5242
5243 2017-08-03  Tom Tromey  <tom@tromey.com>
5244
5245         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5246
5247 2017-08-03  Tom Tromey  <tom@tromey.com>
5248
5249         * cli/cli-cmds.c (find_and_open_script): Change return type.
5250         Remove "streamp" and "full_path" parameters.
5251         (source_script_with_search): Update.
5252         * auto-load.c (source_script_file): Update.
5253         * cli/cli-cmds.h (find_and_open_script): Change type.
5254         (open_script): New struct.
5255
5256 2017-08-03  Tom Tromey  <tom@tromey.com>
5257
5258         * xml-support.c (xml_fetch_content_from_file): Update.
5259         * ui-file.c (stdio_file::open): Update.
5260         * tracefile-tfile.c (tfile_start): Update.
5261         * remote.c (remote_file_put, remote_file_get): Update.
5262         * nat/linux-procfs.c (linux_proc_get_int)
5263         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5264         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5265         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5266         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5267         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5268         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5269         * linux-nat.c (linux_proc_pending_signals): Update.
5270         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5271         (file_closer): Remove.
5272         * compile/compile.c (compile_to_object): Update.
5273         * common/filestuff.h (struct gdb_file_deleter): New.
5274         (gdb_file_up): New typedef.
5275         (gdb_fopen_cloexec): Change return type.
5276         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5277         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5278         (dump_binary_file, restore_binary_file): Update.
5279         * auto-load.c (auto_load_objfile_script_1): Update.
5280
5281 2017-08-03  Tom Tromey  <tom@tromey.com>
5282
5283         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5284         (info_static_tracepoint_markers_command): Likewise.
5285         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5286         * skip.c (skip_info): Use ui_out_emit_table.
5287         * progspace.c (print_program_space): Use ui_out_emit_table.
5288         * osdata.c (info_osdata): Use ui_out_emit_table.
5289         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5290         ui_out_emit_table.
5291         * linux-thread-db.c (info_auto_load_libthread_db): Use
5292         ui_out_emit_table.
5293         * inferior.c (print_inferior): Use ui_out_emit_table.
5294         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5295         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5296         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5297         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5298         * ui-out.h (class ui_out_emit_table): New.
5299
5300 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5301
5302         * mips-tdep.c (mips_fpu_type_str): New function.
5303         (mips_dump_tdep): Call it.
5304
5305 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5306
5307         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5308         `->mips_fpu_type'.
5309
5310 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5311
5312         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5313
5314 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5315
5316         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5317
5318 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5319
5320         * cli/cli-cmds.c (maintenancechecklist): New variable.
5321         * gdbcmd.h (maintenancechecklist): Declare it.
5322         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5323         Call i386_linux_read_description with different masks.
5324         * maint.c (maintenance_check_command): New function.
5325         (_initialize_maint_cmds): Call add_prefix_cmd.
5326         * target-descriptions.c (tdesc_reg): override operator != and ==.
5327         (tdesc_type): Likewise.
5328         (tdesc_feature): Likewise.
5329         (target_desc): Likewise.
5330         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5331         (maintenance_check_xml_descriptions): New function.
5332         (_initialize_target_descriptions) Add command "xml-descriptions".
5333         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5334
5335 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5336
5337         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5338         Include features/i386/32bit-*.c.
5339         (i386_linux_read_description): Generate target description if it
5340         doesn't exist.
5341         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5342         functions.
5343         * features/i386/32bit-linux.c: Re-generated.
5344         * features/i386/32bit-sse.c: Likewise.
5345         * target-descriptions.c (print_c_feature::visit): Print code to
5346         set register number if needed.
5347         (print_c_feature) <m_next_regnum>: New field.
5348
5349 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5350
5351         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5352         (FEATURE_XMLFILES): New.
5353         (FEATURE_CFILES): New.
5354         New rules.
5355         (clean-cfiles): Remove generated c files.
5356         * features/i386/32bit-avx.c: Generated.
5357         * features/i386/32bit-avx512.c: Generated.
5358         * features/i386/32bit-core.c: Generated.
5359         * features/i386/32bit-linux.c: Generated.
5360         * features/i386/32bit-mpx.c: Generated.
5361         * features/i386/32bit-pkeys.c: Generated.
5362         * features/i386/32bit-sse.c: Generated.
5363         * target-descriptions.c: Include algorithm.
5364         (tdesc_element_visitor): Add method visit_end.
5365         (print_c_tdesc): Implement visit_end.
5366         (print_c_tdesc:: m_filename_after_features): Move it to
5367         protected.
5368         (print_c_feature): New class.
5369         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5370         name starts with "i386/32bit-".
5371
5372 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5373
5374         * target-descriptions.c (tdesc_element_visitor): New class.
5375         (tdesc_element): New class.
5376         (tdesc_reg): Inherit from tdesc_element.
5377         (tdesc_reg::accept): New function.
5378         (tdesc_type): Inherit from tdesc_element.
5379         (tdesc_type::accept): New function.
5380         (tdesc_feature): Inherit from tdesc_element.
5381         (tdesc_feature::accept): New function.
5382         (target_desc): Inherit from tdesc_element.
5383         (target_desc::target_desc): New.
5384         (target_desc::~target_desc): New.
5385         (target_desc::accept): New.
5386         (allocate_target_description): Use new.
5387         (free_target_description): Use delete.
5388         (print_c_tdesc): New class.
5389         (maint_print_c_tdesc_cmd): Adjust.
5390
5391         * features/aarch64.c: Re-generated.
5392         * features/arc-arcompact.c: Re-generated.
5393         * features/arc-v2.c: Re-generated.
5394         * features/arm/arm-with-iwmmxt.c: Re-generated.
5395         * features/arm/arm-with-m.c: Re-generated.
5396         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5397         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5398         * features/arm/arm-with-neon.c: Re-generated.
5399         * features/arm/arm-with-vfpv2.c: Re-generated.
5400         * features/arm/arm-with-vfpv3.c: Re-generated.
5401         * features/i386/amd64-avx-avx512.c: Re-generated.
5402         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5403         * features/i386/amd64-avx.c: Re-generated.
5404         * features/i386/amd64-avx-linux.c: Re-generated.
5405         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5406         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5407         * features/i386/amd64-avx-mpx.c: Re-generated.
5408         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5409         * features/i386/amd64.c: Re-generated.
5410         * features/i386/amd64-linux.c: Re-generated.
5411         * features/i386/amd64-mpx.c: Re-generated.
5412         * features/i386/amd64-mpx-linux.c: Re-generated.
5413         * features/i386/i386-avx-avx512.c: Re-generated.
5414         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5415         * features/i386/i386-avx.c: Re-generated.
5416         * features/i386/i386-avx-linux.c: Re-generated.
5417         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5418         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5419         * features/i386/i386-avx-mpx.c: Re-generated.
5420         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5421         * features/i386/i386.c: Re-generated.
5422         * features/i386/i386-linux.c: Re-generated.
5423         * features/i386/i386-mmx.c: Re-generated.
5424         * features/i386/i386-mmx-linux.c: Re-generated.
5425         * features/i386/i386-mpx.c: Re-generated.
5426         * features/i386/i386-mpx-linux.c: Re-generated.
5427         * features/i386/x32-avx-avx512.c: Re-generated.
5428         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5429         * features/i386/x32-avx.c: Re-generated.
5430         * features/i386/x32-avx-linux.c: Re-generated.
5431         * features/i386/x32.c: Re-generated.
5432         * features/i386/x32-linux.c: Re-generated.
5433         * features/microblaze.c: Re-generated.
5434         * features/microblaze-with-stack-protect.c: Re-generated.
5435         * features/mips64-dsp-linux.c: Re-generated.
5436         * features/mips64-linux.c: Re-generated.
5437         * features/mips-dsp-linux.c: Re-generated.
5438         * features/mips-linux.c: Re-generated.
5439         * features/nds32.c: Re-generated.
5440         * features/nios2.c: Re-generated.
5441         * features/nios2-linux.c: Re-generated.
5442         * features/rs6000/powerpc-32.c: Re-generated.
5443         * features/rs6000/powerpc-32l.c: Re-generated.
5444         * features/rs6000/powerpc-403.c: Re-generated.
5445         * features/rs6000/powerpc-403gc.c : Re-generated.
5446         * features/rs6000/powerpc-405.c: Re-generated.
5447         * features/rs6000/powerpc-505.c: Re-generated.
5448         * features/rs6000/powerpc-601.c: Re-generated.
5449         * features/rs6000/powerpc-602.c: Re-generated.
5450         * features/rs6000/powerpc-603.c: Re-generated.
5451         * features/rs6000/powerpc-604.c: Re-generated.
5452         * features/rs6000/powerpc-64.c: Re-generated.
5453         * features/rs6000/powerpc-64l.c: Re-generated.
5454         * features/rs6000/powerpc-7400.c: Re-generated.
5455         * features/rs6000/powerpc-750.c: Re-generated.
5456         * features/rs6000/powerpc-860.c: Re-generated.
5457         * features/rs6000/powerpc-altivec32.c: Re-generated.
5458         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5459         * features/rs6000/powerpc-altivec64.c: Re-generated.
5460         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5461         * features/rs6000/powerpc-cell32l.c: Re-generated.
5462         * features/rs6000/powerpc-cell64l.c: Re-generated.
5463         * features/rs6000/powerpc-e500.c: Re-generated.
5464         * features/rs6000/powerpc-e500l.c: Re-generated.
5465         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5466         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5467         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5468         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5469         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5470         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5471         * features/rs6000/powerpc-vsx32.c: Re-generated.
5472         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5473         * features/rs6000/powerpc-vsx64.c: Re-generated.
5474         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5475         * features/rs6000/rs6000.c: Re-generated.
5476         * features/s390-linux32.c: Re-generated.
5477         * features/s390-linux32v1.c: Re-generated.
5478         * features/s390-linux32v2.c: Re-generated.
5479         * features/s390-linux64.c: Re-generated.
5480         * features/s390-linux64v1.c: Re-generated.
5481         * features/s390-linux64v2.c: Re-generated.
5482         * features/s390-te-linux64.c: Re-generated.
5483         * features/s390-tevx-linux64.c: Re-generated.
5484         * features/s390-vx-linux64.c: Re-generated.
5485         * features/s390x-linux64.c: Re-generated.
5486         * features/s390x-linux64v1.c: Re-generated.
5487         * features/s390x-linux64v2.c: Re-generated.
5488         * features/s390x-te-linux64.c: Re-generated.
5489         * features/s390x-tevx-linux64.c: Re-generated.
5490         * features/s390x-vx-linux64.c: Re-generated.
5491         * features/sparc/sparc32-solaris.c: Re-generated.
5492         * features/sparc/sparc64-solaris.c: Re-generated.
5493         * features/tic6x-c62x.c: Re-generated.
5494         * features/tic6x-c62x-linux.c: Re-generated.
5495         * features/tic6x-c64x.c: Re-generated.
5496         * features/tic6x-c64x-linux.c: Re-generated.
5497         * features/tic6x-c64xp.c: Re-generated.
5498         * features/tic6x-c64xp-linux.c: Re-generated.
5499
5500 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5501
5502         * i386-linux-tdep.c (i386_linux_read_description): New function.
5503         (i386_linux_core_read_description): Call
5504         i386_linux_read_description.
5505         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5506         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5507         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5508         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5509         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5510         * x86-linux-nat.c (x86_linux_read_description): Call
5511         i386_linux_read_description.
5512
5513 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5514
5515         * NEWS: Mention it.
5516         * features/Makefile (%.c: %.xml): Pass the xml file name to
5517         command "maint print c-tdesc".
5518         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5519         name from 'arg'.
5520
5521 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5522
5523         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5524         in-class initialization.
5525         (tdesc_create_feature): Call new instead of XCNEW.
5526         (free_target_description): Ue delete.
5527
5528 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5529
5530         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5531
5532 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5533
5534         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5535         constant.
5536         (amd64_x32_init_abi): Likewise.
5537         * amd64-tdep.h (amd64_init_abi): Update declaration.
5538         (amd64_x32_init_abi): Likewise.
5539
5540 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5541
5542         PR tdep/21717
5543         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5544         condition for FPSCR.
5545         (arm_linux_store_inferior_registers): Likewise.
5546
5547 2017-07-22  Tom Tromey  <tom@tromey.com>
5548
5549         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5550         <syscalls_counts>: Now a std::vector.
5551         (get_catch_syscall_inferior_data): Use "new".
5552         (catch_syscall_inferior_data_cleanup): Use "delete".
5553         (insert_catch_syscall, remove_catch_syscall)
5554         (clear_syscall_counts): Update.
5555
5556 2017-07-22  Tom Tromey  <tom@tromey.com>
5557
5558         * break-catch-syscall.c (syscall_catchpoint)
5559         <syscalls_to_be_caught>: Now a std::vector<int>
5560         (~syscall_catchpoint): Remove.
5561         (insert_catch_syscall, remove_catch_syscall)
5562         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5563         (print_mention_catch_syscall, print_recreate_catch_syscall):
5564         Update.
5565         (create_syscall_event_catchpoint): Change type of "filter"
5566         parameter.
5567         (catch_syscall_split_args): Return a std::vector.
5568         (catch_syscall_command_1, catching_syscall_number_1): Update.
5569
5570 2017-07-22  Tom Tromey  <tom@tromey.com>
5571
5572         * break-catch-throw.c (struct exception_catchpoint)
5573         <exception_rx>: Now a std::string.
5574         (~exception_catchpoint): Remove.
5575         (print_one_detail_exception_catchpoint): Update.
5576         (handle_gnu_v3_exceptions): Change type of except_rx.
5577         (extract_exception_regexp): Return a std::string.
5578         (catch_exception_command_1): Update.
5579
5580 2017-07-22  Tom Tromey  <tom@tromey.com>
5581
5582         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5583         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5584         std::vector.
5585         <catch_all>: Now a bool.
5586         (~signal_catchpoint): Remove.
5587         (signal_catchpoint_insert_location)
5588         (signal_catchpoint_remove_location)
5589         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5590         (signal_catchpoint_print_mention)
5591         (signal_catchpoint_print_recreate)
5592         (signal_catchpoint_explains_signal): Update.
5593         (create_signal_catchpoint): Change type of "filter" and
5594         "catch_all".
5595         (catch_signal_split_args): Return a std::vector.  Change type of
5596         "catch_all".
5597         (catch_signal_command): Update.
5598
5599 2017-07-20  Pedro Alves  <palves@redhat.com>
5600
5601         * ada-lang.c (ada_language_defn): Make extern.
5602         (_initialize_ada_language): Remove add_language call.
5603         * c-lang.c (c_language_defn, cplus_language_defn)
5604         (asm_language_defn, minimal_language_defn): Make extern.
5605         (_initialize_c_language): Delete.
5606         * completer.c (compare_cstrings): Delete, moved to utils.h.
5607         * d-lang.c (d_language_defn): Make extern.
5608         (_initialize_d_language): Remove add_language calls.
5609         * defs.h (enum language): Add comment.
5610         * f-lang.c (f_language_defn): Make extern.
5611         (_initialize_f_language): Remove add_language call.
5612         * go-lang.c (go_language_defn): Make extern.
5613         (_initialize_go_language): Remove add_language call.
5614         * language.c: Include <algorithm>.
5615         (languages): Redefine as const array.
5616         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5617         (set_language_command): Handle "local".  Use for-range loop.
5618         (set_language): Remove loop.
5619         (language_enum): Rewrite.
5620         (language_def, language_str): Remove loops.
5621         (add_language): Delete.
5622         (add_set_language_command): New, based on add_languages.
5623         (skip_language_trampoline): Adjust.
5624         (local_language_defn): Delete.
5625         (language_gdbarch_post_init): Adjust.
5626         (_initialize_language): Remove add_language calls.  Call
5627         add_set_language_command.
5628         * language.h (add_language): Delete.
5629         (auto_language_defn)
5630         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5631         (asm_language_defn, c_language_defn, cplus_language_defn)
5632         (d_language_defn, f_language_defn, go_language_defn)
5633         (m2_language_defn, objc_language_defn, opencl_language_defn)
5634         (pascal_language_defn, rust_language_defn): Declare.
5635         * m2-lang.c (m2_language_defn): Make extern.
5636         (_initialize_m2_language): Remove add_language call.
5637         * objc-lang.c (objc_language_defn): Make extern.
5638         (_initialize_objc_language): Remove add_language call.
5639         * opencl-lang.c (opencl_language_defn): Make extern.
5640         (_initialize_opencl_language): Remove add_language call.
5641         * p-lang.c (pascal_language_defn): Make extern.
5642         (_initialize_pascal_language): Delete.
5643         * rust-lang.c (rust_language_defn): Make extern.
5644         (_initialize_rust_language): Delete.
5645         * utils.h (compare_cstrings): New static inline function.
5646
5647 2017-07-20  Pedro Alves  <palves@redhat.com>
5648
5649         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5650         (get_var_value): Constify parameters.
5651         (get_int_var_value): Change prototype.
5652         (to_fixed_range_type): Adjust.
5653         * ada-lang.h (get_int_var_value): Change prototype.
5654
5655 2017-07-20  Pedro Alves  <palves@redhat.com>
5656
5657         * dwarf2read.c (dw2_lookup_symbol): Use
5658         SYMBOL_MATCHES_SEARCH_NAME.
5659         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5660
5661 2017-07-20  Pedro Alves  <palves@redhat.com>
5662
5663         * block.c (block_iter_name_step, block_iter_name_first)
5664         (block_iter_name_next): Delete.
5665         (block_lookup_symbol_primary): Adjust to use
5666         dict_iter_match_first/dict_iter_match_next.
5667         * block.h (block_iter_name_first, block_iter_name_next): Delete
5668         declarations.
5669         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5670         dict_iter_match_first/dict_iter_match_next.
5671
5672 2017-07-20  Pedro Alves  <palves@redhat.com>
5673
5674         * cp-support.c (cp_find_first_component_aux): Add missing case for
5675         end of string.
5676
5677 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5678
5679         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5680         of dwo_cu's dwo_file.
5681
5682 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5683
5684         * remote.c (store_registers_using_G): Remove one line comment.
5685
5686 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5687
5688         * regcache.c (regcache_cpy): Simplify it.
5689         (regcache::cpy_no_passthrough): Remove it.
5690         * regcache.h (cpy_no_passthrough): Remove it.
5691         (regcache_dup, regcache_cpy): Update comments.
5692
5693 2017-07-18  Pedro Alves  <palves@redhat.com>
5694
5695         * remote-sim.c (sim_command_completer): Adjust to work with a
5696         completion_tracker instead of a VEC.
5697
5698 2017-07-17  Pedro Alves  <palves@redhat.com>
5699
5700         * completer.c (complete_source_filenames): New function.
5701         (complete_address_and_linespec_locations): New function.
5702         (location_completer): Use complete_address_and_linespec_locations.
5703         (completion_tracker::build_completion_result): Honor the tracker's
5704         request to suppress append.
5705         * completer.h (completion_tracker::suppress_append_ws)
5706         (completion_tracker::set_suppress_append_ws): New methods.
5707         (completion_tracker::m_suppress_append_ws): New field.
5708         (complete_source_filenames): New declaration.
5709         * linespec.c (linespec_complete_what): New.
5710         (struct ls_parser) <complete_what, completion_word,
5711         completion_quote_char, completion_quote_end, completion_tracker>:
5712         New fields.
5713         (string_find_incomplete_keyword_at_end): New.
5714         (linespec_lexer_lex_string): Record quote char.  If in completion
5715         mode, don't throw.
5716         (linespec_lexer_consume_token): Advance the completion word point.
5717         (linespec_lexer_peek_token): Save/restore completion info.
5718         (save_stream_and_consume_token): New.
5719         (set_completion_after_number): New.
5720         (linespec_parse_basic): Set what to complete next depending on
5721         token.  Handle function and label completions specially.
5722         (parse_linespec): Disable objc shortcut in completion mode.  Set
5723         what to complete next depending on token type.  Skip keyword if in
5724         completion mode.
5725         (complete_linespec_component, linespec_complete): New.
5726         * linespec.h (linespec_complete): Declare.
5727
5728 2017-07-17  Pedro Alves  <palves@redhat.com>
5729
5730         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5731         Handle 'operator<' / 'operator<<'.
5732
5733 2017-07-17  Pedro Alves  <palves@redhat.com>
5734
5735         * completer.c (collect_explicit_location_matches): Handle
5736         MATCH_LABEL.
5737         (convert_explicit_location_to_linespec): New, factored out from
5738         ...
5739         (convert_explicit_location_to_sals): ... this.
5740         (complete_label): New.
5741         (linespec_complete_label, find_label_symbols_in_block): New.
5742         (find_label_symbols): Add completion_mode parameter and adjust to
5743         call find_label_symbols_in_block.
5744         * linespec.h (linespec_complete_label): Declare.
5745
5746 2017-07-17  Pedro Alves  <palves@redhat.com>
5747
5748         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5749         complete_symbol_mode parameter.
5750         * cli/cli-cmds.c (complete_command): Get the completion result out
5751         of the handle_brkchars tracker if used a custom word point.
5752         * completer.c: Include "linespec.h".
5753         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5754         (advance_to_expression_complete_word_point): New.
5755         (completion_tracker::completes_to_completion_word): New.
5756         (complete_files_symbols): Pass down
5757         complete_symbol_mode::EXPRESSION.
5758         (explicit_options, probe_options): New.
5759         (collect_explicit_location_matches): Complete on the
5760         explictit_loc->foo instead of word.  Use
5761         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5762         keyword and options completions.
5763         (backup_text_ptr): Delete.
5764         (skip_keyword): New.
5765         (complete_explicit_location): Remove 'word' parameter.  Add
5766         language, quoted_arg_start and quoted_arg_end parameters.
5767         Rewrite, parsing left to right.
5768         (location_completer): Rewrite.
5769         (location_completer_handle_brkchars): New function.
5770         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5771         (enum complete_line_internal_reason): Adjust comments.
5772         (completion_tracker::discard_completions): New.
5773         (completer_handle_brkchars_func_for_completer): Handle
5774         location_completer.
5775         (gdb_custom_word_point_brkchars)
5776         (gdb_org_rl_basic_quote_characters): New.
5777         (gdb_completion_word_break_characters_throw)
5778         (completion_find_completion_word): Handle trackers that use a
5779         custom word point.
5780         (completion_tracker::advance_custom_word_point_by): New.
5781         (completion_tracker::build_completion_result): Don't rely on
5782         readline appending the quote char.
5783         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5784         use a custom word point.
5785         (gdb_rl_attempted_completion_function): Restore
5786         rl_basic_quote_characters.
5787         * completer.h (class completion_tracker): Extend intro comment.
5788         (completion_tracker::set_quote_char)
5789         (completion_tracker::quote_char)
5790         (completion_tracker::set_use_custom_word_point)
5791         (completion_tracker::use_custom_word_point)
5792         (completion_tracker::custom_word_point)
5793         (completion_tracker::set_custom_word_point)
5794         (completion_tracker::advance_custom_word_point_by)
5795         (completion_tracker::completes_to_completion_word)
5796         (completion_tracker::discard_completions): New methods.
5797         (completion_tracker::m_quote_char)
5798         (completion_tracker::m_use_custom_word_point)
5799         (completion_tracker::m_custom_word_point): New fields.
5800         (advance_to_expression_complete_word_point): Declare.
5801         * f-lang.c (f_collect_symbol_completion_matches): Add
5802         complete_symbol_mode parameter.
5803         * language.h (struct language_defn)
5804         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5805         parameter.
5806         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5807         (linespec_complete_function): New function.
5808         (linespec_lexer_lex_keyword): Adjust.
5809         * linespec.h (linespec_keywords, linespec_complete_function): New
5810         declarations.
5811         * location.c (find_end_quote): New function.
5812         (explicit_location_lex_one): Add explicit_completion_info
5813         parameter.  Save quoting info.  Don't throw if being called for
5814         completion.  Don't handle Ada operators here.
5815         (is_cp_operator, skip_op_false_positives, first_of)
5816         (explicit_location_lex_one_function): New function.
5817         (string_to_explicit_location): Replace 'dont_throw' parameter with
5818         an explicit_completion_info pointer parameter.  Handle it.  Don't
5819         use explicit_location_lex_one to lex function names.  Use
5820         explicit_location_lex_one_function instead.
5821         * location.h (struct explicit_completion_info): New.
5822         (string_to_explicit_location): Replace 'dont_throw' parameter with
5823         an explicit_completion_info pointer parameter.
5824         * symtab.c (default_collect_symbol_completion_matches_break_on):
5825         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5826         (default_collect_symbol_completion_matches)
5827         (collect_symbol_completion_matches): Add complete_symbol_mode
5828         parameter.
5829         (collect_symbol_completion_matches_type): Pass down
5830         complete_symbol_mode::EXPRESSION.
5831         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5832         parameter.  Handle LINESPEC mode.
5833         * symtab.h (complete_symbol_mode): New.
5834         (default_collect_symbol_completion_matches_break_on)
5835         (default_collect_symbol_completion_matches)
5836         (collect_symbol_completion_matches)
5837         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5838         parameter.
5839
5840 2017-07-17  Pedro Alves  <palves@redhat.com>
5841
5842         * utils.c (enum class strncmp_iw_mode): New.
5843         (strcmp_iw): Rename to ...
5844         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5845         parameters.  Handle them.
5846         (strncmp_iw): New.
5847         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5848         * utils.h (strncmp_iw): Declare.
5849         (strcmp_iw): Move describing comments here.
5850
5851 2017-07-17  Pedro Alves  <palves@redhat.com>
5852
5853         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5854         CP_OPERATOR_STR.
5855         * c-typeprint.c (is_type_conversion_operator): Use
5856         CP_OPERATOR_STR.
5857         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5858         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5859         CP_OPERATOR_LEN.
5860         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5861         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5862         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5863         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5864         CP_OPERATOR_STR.
5865         * location.c: Include "cp-support.h".
5866         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5867         CP_OPERATOR_STR.
5868         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5869         CP_OPERATOR_LEN.
5870
5871 2017-07-17  Pedro Alves  <palves@redhat.com>
5872
5873         * cli/cli-cmds.c (complete_command): Use a completion tracker
5874         along with completion_find_completion_word for handle_brkchars
5875         phase.
5876         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5877         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5878         (struct gdb_rl_completion_word_info): New.
5879         (gdb_rl_find_completion_word): New.
5880         (completion_find_completion_word): New.
5881         * completer.h (completion_find_completion_word): Declare.
5882
5883 2017-07-17  Pedro Alves  <palves@redhat.com>
5884
5885         * ada-lang.c (symbol_completion_match): Adjust comments.
5886         (symbol_completion_add): Replace vector parameter with
5887         completion_tracker parameter.  Use it.
5888         (ada_make_symbol_completion_list): Rename to...
5889         (ada_collect_symbol_completion_matches): ... this.  Add
5890         completion_tracker parameter and use it.
5891         (ada_language_defn): Adjust.
5892         * break-catch-syscall.c (catch_syscall_completer): Adjust
5893         prototype and work with completion_tracker instead of VEC.
5894         * breakpoint.c (condition_completer): Adjust prototype and work
5895         with completion_tracker instead of VEC.
5896         * c-lang.c (c_language_defn, cplus_language_defn)
5897         (asm_language_defn, minimal_language_defn): Adjust to renames.
5898         * cli/cli-cmds.c (complete_command): Rework using
5899         completion_tracker.  Catch exceptions when completing.
5900         * cli/cli-decode.c (integer_unlimited_completer)
5901         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5902         with completion_tracker instead of VEC.
5903         * command.h (struct completion_tracker): Forward declare.
5904         (completer_ftype, completer_handle_brkchars_ftype): Change
5905         types.
5906         (complete_on_cmdlist, complete_on_enum): Adjust.
5907         * completer.c: Include <algorithm>.
5908         (struct gdb_completer_state): New.
5909         (current_completion): New global.
5910         (readline_line_completion_function): Delete.
5911         (noop_completer, filename_completer)
5912         (filename_completer_handle_brkchars, complete_files_symbols)
5913         (linespec_location_completer): Adjust to work with a
5914         completion_tracker instead of a VEC.
5915         (string_or_empty): New.
5916         (collect_explicit_location_matches): Adjust to work with a
5917         completion_tracker instead of a VEC.
5918         (explicit_location_completer): Rename to ...
5919         (complete_explicit_location): ... this and adjust to work with a
5920         completion_tracker instead of a VEC.
5921         (location_completer): Adjust to work with a completion_tracker
5922         instead of a VEC.
5923         (add_struct_fields): Adjust to work with a completion_list instead
5924         of VEC.
5925         (expression_completer): Rename to ...
5926         (complete_expression): ... this and adjust to work with a
5927         completion_tracker instead of a VEC.  Use complete_files_symbols.
5928         (expression_completer): Reimplement on top of complete_expression.
5929         (symbol_completer): Adjust to work with a completion_tracker
5930         instead of a VEC.
5931         (enum complete_line_internal_reason): Add describing comments.
5932         (complete_line_internal_normal_command): Adjust to work with a
5933         completion_tracker instead of a VEC.
5934         (complete_line_internal): Rename to ...
5935         (complete_line_internal_1): ... this and adjust to work with a
5936         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5937         handle_brkchars phase.
5938         (new_completion_tracker): Delete.
5939         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5940         complete_line_internal_1.
5941         (free_completion_tracker): Delete.
5942         (INITIAL_COMPLETION_HTAB_SIZE): New.
5943         (completion_tracker::completion_tracker)
5944         (completion_tracker::~completion_tracker): New.
5945         (maybe_add_completion): Delete.
5946         (completion_tracker::maybe_add_completion)
5947         (completion_tracker::add_completion)
5948         (completion_tracker::add_completions): New.
5949         (throw_max_completions_reached_error): Delete.
5950         (complete_line): Adjust to work with a completion_tracker instead
5951         of a VEC.  Don't create a completion_tracker_t or check for max
5952         completions here.
5953         (command_completer, command_completer_handle_brkchars)
5954         (signal_completer, reg_or_group_completer_1)
5955         (reg_or_group_completer, default_completer_handle_brkchars):
5956         Adjust to work with a completion_tracker.
5957         (gdb_completion_word_break_characters_throw): New.
5958         (gdb_completion_word_break_characters): Reimplement.
5959         (line_completion_function): Delete.
5960         (completion_tracker::recompute_lowest_common_denominator)
5961         (expand_preserving_ws)
5962         (completion_tracker::build_completion_result)
5963         (completion_result::completion_result)
5964         (completion_result::completion_result)
5965         (completion_result::~completion_result)
5966         (completion_result::completion_result)
5967         (completion_result::release_match_list, compare_cstrings)
5968         (completion_result::sort_match_list)
5969         (completion_result::reset_match_list)
5970         (gdb_rl_attempted_completion_function_throw)
5971         (gdb_rl_attempted_completion_function): New.
5972         * completer.h (completion_list, struct completion_result)
5973         (class completion_tracker): New.
5974         (complete_line): Add completion_tracker parameter.
5975         (readline_line_completion_function): Delete.
5976         (gdb_rl_attempted_completion_function): New.
5977         (noop_completer, filename_completer, expression_completer)
5978         (location_completer, symbol_completer, command_completer)
5979         (signal_completer, reg_or_group_completer): Update prototypes.
5980         (completion_tracker_t, new_completion_tracker)
5981         (make_cleanup_free_completion_tracker): Delete.
5982         (enum maybe_add_completion_enum): Delete.
5983         (maybe_add_completion): Delete.
5984         (throw_max_completions_reached_error): Delete.
5985         * corefile.c (complete_set_gnutarget): Adjust to work with a
5986         completion_tracker instead of a VEC.
5987         * cp-abi.c (cp_abi_completer): Adjust to work with a
5988         completion_tracker instead of a VEC.
5989         * d-lang.c (d_language_defn): Adjust.
5990         * disasm.c (disassembler_options_completer): Adjust to work with a
5991         completion_tracker instead of a VEC.
5992         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5993         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5994         with a completion_tracker instead of a VEC.
5995         (f_language_defn): Adjust.
5996         * go-lang.c (go_language_defn): Adjust.
5997         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5998         Adjust to work with a completion_tracker instead of a VEC.
5999         * infrun.c (handle_completer): Likewise.
6000         * interps.c (interpreter_completer): Likewise.
6001         * interps.h (interpreter_completer): Likewise.
6002         * language.c (unknown_language_defn, auto_language_defn)
6003         (local_language_defn): Adjust.
6004         * language.h (language_defn::la_make_symbol_completion_list):
6005         Rename to ...
6006         (language_defn::la_collect_symbol_completion_matches): ... this
6007         and adjust to work with a completion_tracker instead of a VEC.
6008         * m2-lang.c (m2_language_defn): Adjust.
6009         * objc-lang.c (objc_language_defn): Adjust.
6010         * opencl-lang.c (opencl_language_defn): Adjust.
6011         * p-lang.c (pascal_language_defn): Adjust.
6012         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6013         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6014         with a completion_tracker.
6015         * rust-lang.c (rust_language_defn): Adjust.
6016         * symtab.c (free_completion_list, do_free_completion_list)
6017         (return_val, completion_tracker): Delete.
6018         (completion_list_add_name, completion_list_add_symbol)
6019         (completion_list_add_msymbol, completion_list_objc_symbol)
6020         (completion_list_add_fields, add_symtab_completions): Add
6021         completion_tracker parameter and use it.
6022         (default_make_symbol_completion_list_break_on_1): Rename to...
6023         (default_collect_symbol_completion_matches_break_on): ... this.
6024         Add completion_tracker parameter and use it instead of allocating
6025         a completion tracker here.
6026         (default_make_symbol_completion_list_break_on): Delete old
6027         implementation.
6028         (default_make_symbol_completion_list): Delete.
6029         (default_collect_symbol_completion_matches): New.
6030         (make_symbol_completion_list): Delete.
6031         (collect_symbol_completion_matches): New.
6032         (make_symbol_completion_type): Rename to ...
6033         (collect_symbol_completion_matches_type): ... this.  Add
6034         completion_tracker parameter and use it instead of VEC.
6035         (make_file_symbol_completion_list_1): Rename to...
6036         (collect_file_symbol_completion_matches): ... this.  Add
6037         completion_tracker parameter and use it instead of VEC.
6038         (make_file_symbol_completion_list): Delete.
6039         (add_filename_to_list): Use completion_list instead of a VEC.
6040         (add_partial_filename_data::list): Now a completion_list.
6041         (make_source_files_completion_list): Work with a completion_list
6042         instead of a VEC.
6043         * symtab.h: Include "completer.h".
6044         (default_make_symbol_completion_list_break_on)
6045         (default_make_symbol_completion_list, make_symbol_completion_list)
6046         (make_symbol_completion_type, make_file_symbol_completion_list)
6047         (make_source_files_completion_list): Delete.
6048         (default_collect_symbol_completion_matches_break_on)
6049         (default_collect_symbol_completion_matches)
6050         (collect_symbol_completion_matches)
6051         (collect_symbol_completion_matches_type)
6052         (collect_file_symbol_completion_matches)
6053         (make_source_files_completion_list): New.
6054         * top.c (init_main): Don't install a rl_completion_entry_function
6055         hook.  Install a rl_attempted_completion_function hook instead.
6056         * tui/tui-layout.c (layout_completer): Adjust to work with a
6057         completion_tracker.
6058         * tui/tui-regs.c (tui_reggroup_completer):
6059         * tui/tui-win.c (window_name_completer, focus_completer)
6060         (winheight_completer): Adjust to work with a completion_tracker.
6061         * value.c: Include "completer.h".
6062         (complete_internalvar): Adjust to work with a completion_tracker.
6063         * value.h (complete_internalvar): Likewise.
6064
6065 2017-07-17  Pedro Alves  <palves@redhat.com>
6066
6067         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6068         renames.
6069         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6070         comments to completer_ftype's declaration.
6071         <completer_handle_brkchars>: Change type to
6072         completer_handle_brkchars_ftype.
6073         * command.h (completer_ftype): Add describing comment and give
6074         names to parameters.
6075         (completer_ftype_void): Rename to ...
6076         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6077         (set_cmd_completer_handle_brkchars): Adjust.
6078         * completer.c (filename_completer_handle_brkchars): New function.
6079         (complete_line_internal_normal_command): New function, factored
6080         out from ...
6081         (complete_line_internal): ... here.
6082         (command_completer_handle_brkchars)
6083         (default_completer_handle_brkchars)
6084         (completer_handle_brkchars_func_for_completer): New functions.
6085         * completer.h (set_gdb_completion_word_break_characters): Delete
6086         declaration.
6087         (completer_handle_brkchars_func_for_completer): New declaration.
6088         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6089         completer_handle_brkchars_func_for_completer.
6090
6091 2017-07-17  Pedro Alves  <palves@redhat.com>
6092
6093         * completer.c (symbol_completer): New function, based on
6094         make_symbol_completion_list_fn.
6095         * completer.h (symbol_completer): New declaration.
6096         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6097         * python/py-cmd.c (completers): Adjust.
6098         * symtab.c (make_symbol_completion_list_fn): Delete.
6099         * symtab.h (make_symbol_completion_list_fn): Delete.
6100         * cli/cli-decode.c (add_cmd): Adjust.
6101
6102 2017-07-17  Pedro Alves  <palves@redhat.com>
6103
6104         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6105         * dwarf2read.c: Include "filename-seen-cache.h".
6106         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6107         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6108         * filename-seen-cache.c: New file.
6109         * filename-seen-cache.h: New file.
6110         * symtab.c: Include "filename-seen-cache.h".
6111         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6112         (create_filename_seen_cache, clear_filename_seen_cache)
6113         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6114         to filename-seen-cache.h/filename-seen-cache.c.
6115         (output_source_filename, sources_info)
6116         (maybe_add_partial_symtab_filename)
6117         (make_source_files_completion_list): Adjust to use
6118         filename_seen_cache.
6119
6120 2017-07-17  Pedro Alves  <palves@redhat.com>
6121
6122         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6123         fields.
6124         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6125         dwarf2_debug_sections*)): New.
6126         (dwarf2_per_objfile::dwarf2_per_objfile(const
6127         dwarf2_per_objfile&)): Declare as deleted.
6128         (dwarf2_per_objfile::operator=): Declare as deleted.
6129         (dwarf2_per_objfile::dwarf2_per_objfile)
6130         (dwarf2_per_objfile::~dwarf2_per_objfile)
6131         (dwarf2_per_objfile::free_cached_comp_units): New.
6132         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6133         ctor.  Call dwarf2_per_objfile's ctor manually.
6134         (dwarf2_locate_sections): Deleted/refactored as ...
6135         (dwarf2_per_objfile::locate_sections): ... this new method.
6136         (free_cached_comp_units): Defer to
6137         dwarf2_per_objfile::free_cached_comp_units.
6138         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6139
6140 2017-07-14  Tom Tromey  <tom@tromey.com>
6141
6142         PR rust/21764:
6143         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6144         parameter.
6145         <UNOP_SIZEOF>: Split into separate case.
6146         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6147
6148 2017-07-14  Tom Tromey  <tom@tromey.com>
6149
6150         PR rust/21763:
6151         * symtab.c (symbol_matches_domain): Add language_rust to special
6152         case.
6153         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6154         treat LOC_TYPEDEF symbols as variables.
6155
6156 2017-07-14  Pedro Alves  <palves@redhat.com>
6157
6158         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6159         symtabs matching all symtabs with SRCFILE as file name instead of
6160         only considering the first hit, with lookup_symtab.
6161
6162 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6163
6164         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6165         operator_name parameters.
6166         (gen_expr): Update function call.
6167
6168 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6169
6170         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6171         parameter.
6172         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6173         Likewise.
6174         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6175         parameter, use agent_expr::gdbarch instead, update function
6176         calls.
6177         (locexpr_tracepoint_var_ref): Likewise.
6178         (loclist_tracepoint_var_ref): Likewise.
6179         * ax-gdb.c (gen_trace_static_fields): Likewise.
6180         (gen_traced_pop): Likewise.
6181         (gen_frame_args_address): Likewise.
6182         (gen_frame_locals_address): Likewise.
6183         (gen_var_ref): Likewise.
6184         (gen_struct_ref_recursive): Likewise.
6185         (gen_static_field): Likewise.
6186         (gen_maybe_namespace_elt): Likewise.
6187         (gen_expr): Likewise.
6188         (gen_trace_for_var): Likewise.
6189         (gen_trace_for_expr): Likewise.
6190         (gen_trace_for_return_address): Likewise.
6191
6192 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6193
6194         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6195         parameter.
6196         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6197
6198 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6199
6200         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6201         from ax, update calls.
6202         (gen_usual_arithmetic): Likewise.
6203         (gen_integral_promotions): Likewise.
6204         (gen_bitfield_ref): Likewise.
6205         (gen_primitive_field): Likewise.
6206         (gen_struct_ref_recursive): Likewise.
6207         (gen_struct_ref): Likewise.
6208         (gen_maybe_namespace_elt): Likewise.
6209         (gen_struct_elt_for_reference): Likewise.
6210         (gen_namespace_elt): Likewise.
6211         (gen_aggregate_elt_ref): Likewise.
6212         (gen_expr): Get gdbarch from ax, update calls.
6213         (gen_expr_binop_rest): Likewise.
6214
6215 2017-07-13  Pedro Alves  <palves@redhat.com>
6216
6217         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6218         as default tdesc.
6219         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6220         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6221         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6222         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6223         tdep.
6224         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6225         Get final tdesc from the tdep.
6226         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6227         default tdesc.
6228         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6229         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6230         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6231         Use it as default tdesc.
6232         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6233         down to amd_init_abi.  No longer handle fallback tdesc here.
6234         * amd64-tdep.h (tdesc_x32): Declare.
6235         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6236         parameter.
6237         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6238         as default tdesc.
6239
6240 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6241
6242         * s390-linux-tdep.c (s390_process_record): Add support for
6243         instructions new in arch12.
6244
6245 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6246
6247         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6248         PT_GETFSBASE and PT_GETGSBASE.
6249         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6250         PT_SETGSBASE.
6251
6252 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6253
6254         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6255         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6256         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6257         those rules.
6258         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6259         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6260         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6261         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6262         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6263         * features/i386/amd64.xml: Add 64bit-segments.xml.
6264         * features/i386/amd64-avx-avx512.c: Regenerated.
6265         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6266         * features/i386/amd64-avx-mpx.c: Regenerated.
6267         * features/i386/amd64-avx.c: Regenerated.
6268         * features/i386/amd64-mpx.c: Regenerated.
6269         * features/i386/amd64.c: Regenerated.
6270         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6271         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6272         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6273         * regformats/i386/amd64-avx.dat: Regenerated.
6274         * regformats/i386/amd64-mpx.dat: Regenerated.
6275         * regformats/i386/amd64.dat: Regenerated.
6276
6277 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6278
6279         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6280         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6281
6282 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6283
6284         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6285         unsetenv.
6286         * gnulib/aclocal.m4: Regenerate.
6287         * gnulib/config.in: Regenerate.
6288         * gnulib/configure: Regenerate.
6289         * gnulib/import/Makefile.am: Regenerate.
6290         * gnulib/import/Makefile.in: Regenerate.
6291         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6292         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6293         * gnulib/import/m4/environ.m4: New file.
6294         * gnulib/import/m4/setenv.m4: New file.
6295         * gnulib/import/setenv.c: New file.
6296         * gnulib/import/unsetenv.c: New file.
6297
6298 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6299
6300         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6301         address when op is DW_OP_addr.
6302
6303 2017-07-09  Tom Tromey  <tom@tromey.com>
6304
6305         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6306         check and apply to outer type.
6307
6308 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6309
6310         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6311         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6312         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6313         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6314
6315 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6316
6317         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6318
6319 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6320
6321         * corelow.c (get_core_siginfo): Remove.
6322         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6323         instead of get_core_siginfo.
6324         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6325         * gdbarch.h: Re-generate.
6326         * gdbarch.c: Re-generate.
6327         * linux-tdep.c (linux_core_xfer_siginfo): New.
6328         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6329
6330 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6331
6332         * corelow.c (thread_section_name): Move to ...
6333         * gdbcore.h (thread_section_name): ... here.
6334
6335 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6336
6337         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6338         (struct siginfo32): New.
6339         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6340         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6341         via ptrace(PT_LWPINFO).
6342
6343 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6344
6345         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6346         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6347         (fbsd_get_siginfo_type): New.
6348         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6349         (_initialize_fbsd_tdep): New.
6350
6351 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6352
6353         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6354         a singular dwo_unit*) to support multiple CUs in the same way that
6355         multiple TUs are supported.
6356         (create_cus_hash_table): Replace create_dwo_cu with a function for
6357         parsing multiple CUs from a DWO file.
6358         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6359         create_dwo_cu.
6360         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6361         htab_find, rather than comparing the signature to a singleton CU in
6362         the dwo_file.
6363
6364 2017-07-06  Pedro Alves  <palves@redhat.com>
6365
6366         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6367
6368 2017-07-04  Pedro Alves  <palves@redhat.com>
6369
6370         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6371         * gdbtypes.h (TYPE_STATIC): Delete.
6372         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6373         is_synchronized, is_native>: Delete.
6374         <dummy>: Bump.
6375         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6376         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6377         (TYPE_FN_FIELD_ABSTRACT): Delete.
6378
6379 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6380
6381         * buffer.h (buffer_finish): Fix spelling mistakes.
6382
6383 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6384
6385         * .dir-locals.el: Automatically switch to C-style comments in
6386         versions of Emacs that support the feature.
6387
6388 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6389             Pedro Alves  <palves@redhat.com>
6390
6391         PR cli/21688
6392         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6393         (process_next_line): New variable 'inline_cmd'.
6394         Adjust 'if' clauses for "python", "compile" and "guile" to use
6395         'command_name_equals' and check for '!inline_cmd'.
6396
6397 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6398
6399         PR cli/21688
6400         * cli/cli-script.c (command_name_equals_not_inline): New function.
6401         (process_next_line): Adjust 'if' clauses for "python", "compile"
6402         and "guile" to use command_name_equals_not_inline.
6403
6404 2017-06-29  Pedro Alves  <palves@redhat.com>
6405
6406         * completer.c (expression_completer): Call
6407         linespec_location_completer instead of location_completer.
6408
6409 2017-06-29  Pedro Alves  <palves@redhat.com>
6410
6411         * completer.c (expression_completer): Remove code that recomputes
6412         'text' from 'word'.
6413
6414 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6415
6416         * regformats/regdat.sh: Generate code with
6417         "ifndef IN_PROCESS_AGENT".
6418
6419 2017-06-28  Pedro Alves  <palves@redhat.com>
6420
6421         * command.h: Include "common/scoped_restore.h".
6422
6423 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6424
6425         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6426         instead of obstack_grow.
6427
6428 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6429
6430         PR gdb/21337
6431         * symfile.c (reread_symbols): Call objfiles_changed just before
6432         read_symbols.
6433
6434 2017-06-27  Pedro Alves  <palves@redhat.com>
6435
6436         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6437         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6438         (completion_list_add_symbol, completion_list_add_msymbol):
6439         ... these new functions.
6440         (add_symtab_completions)
6441         (default_make_symbol_completion_list_break_on_1): Adjust.
6442
6443 2017-06-27  Pedro Alves  <palves@redhat.com>
6444
6445         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6446         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6447         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6448         dtor.
6449         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6450         'storage_obstack' field an auto_obstack.  In-class initialize all
6451         non-bitfield fields.  Make minsyms_read bool.
6452         * symfile.c (read_symbols): Adjust.
6453
6454 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6455
6456         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6457         (gdbsim_store_register): Likewise.
6458
6459 2017-06-27  Pedro Alves  <palves@redhat.com>
6460
6461         * c-exp.y (name_obstack): Now an auto_obstack.
6462         (yylex): Use auto_obstack::clear.
6463         (c_parse): Use auto_obstack::clear instead of reinitializing and
6464         freeing the obstack.
6465         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6466         * d-exp.y (name_obstack): Now an auto_obstack.
6467         (yylex): Use auto_obstack::clear.
6468         (d_parse): Use auto_obstack::clear instead of reinitializing and
6469         freeing the obstack.
6470         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6471         auto_obstack.
6472         * dwarf2read.c (create_addrmap_from_index)
6473         (dwarf2_build_psymtabs_hard)
6474         (update_enumeration_type_from_children): Likewise.
6475         * gdb_obstack.h (auto_obstack): New type.
6476         * go-exp.y (name_obstack): Now an auto_obstack.
6477         (build_packaged_name): Use auto_obstack::clear.
6478         (go_parse): Use auto_obstack::clear instead of reinitializing and
6479         freeing the obstack.
6480         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6481         auto_obstack.
6482         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6483         * rust-exp.y (work_obstack): Now an auto_obstack.
6484         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6485         reinitializing and freeing the obstack.
6486         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6487         (host_char_to_target): Use auto_obstack.
6488         * utils.h (make_cleanup_obstack_free): Delete declaration.
6489         * valprint.c (generic_emit_char, generic_printstr): Use
6490         auto_obstack.
6491
6492 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6493
6494         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6495         thread.
6496         (darwin_init_thread_list): Don't update dummy thread.
6497         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6498
6499 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6500
6501         * record-full.c (netorder16): Remove.
6502
6503 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6504
6505         * common/diagnostics.h: Define macros for GCC.
6506         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6507         * common/vec.h: Include diagnostics.h.
6508         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6509         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6510         warning.
6511
6512 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6513
6514         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6515         New macro.
6516         * ada-lex.l: Ignore deprecated register warnings.
6517
6518 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6519
6520         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6521         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6522
6523 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6524
6525         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6526         its own line.
6527
6528 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6529
6530         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6531
6532 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6533
6534         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6535         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6536         (xtensa_register_read_masked): Likewise.
6537
6538 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6539
6540         * common/environ.c (gdb_environ::unset): Update comment.
6541
6542 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6543
6544         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6545         registers.
6546
6547 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6548
6549         * record-full.c (record_full_exec_insn): Use byte_vector.
6550
6551 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6552
6553         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6554         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6555
6556 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6557
6558         * remote.c (cached_reg): Move from here...
6559         * regcache.h (cached_reg): ...to here.
6560         * python/py-unwind.c (struct reg_info): Remove.
6561         (cached_frame_info): Use cached_reg_t.
6562         (pyuw_prev_register): Likewise.
6563         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6564         (pyuw_dealloc_cache): Free all registers.
6565
6566 2017-06-22  Pedro Alves  <palves@redhat.com>
6567             Simon Marchi  <simon.marchi@ericsson.com>
6568
6569         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6570         warning.
6571         * common/diagnostics.h: New file.
6572
6573 2017-06-22  Pedro Alves  <palves@redhat.com>
6574
6575         * common/agent.h: Add include guards.
6576
6577 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6578
6579         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6580         talk about addressable units instead of bytes.
6581
6582 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6583
6584         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6585         of '::const_iterator'.
6586
6587 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6588
6589         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6590         'unittests/environ-selftests.c'.
6591         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6592         * charset.c (find_charset_names): Declare object 'iconv_env'.
6593         Update code to use 'iconv_env' object.  Remove call to
6594         'free_environ'.
6595         * common/environ.c: Include <utility>.
6596         (make_environ): Delete function.
6597         (free_environ): Delete function.
6598         (gdb_environ::clear): New function.
6599         (gdb_environ::operator=): New function.
6600         (gdb_environ::get): Likewise.
6601         (environ_vector): Delete function.
6602         (set_in_environ): Delete function.
6603         (gdb_environ::set): New function.
6604         (unset_in_environ): Delete function.
6605         (gdb_environ::unset): New function.
6606         (gdb_environ::envp): Likewise.
6607         * common/environ.h: Include <vector>.
6608         (struct gdb_environ): Delete; transform into...
6609         (class gdb_environ): ... this class.
6610         (free_environ): Delete prototype.
6611         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6612         environ_vector): Likewise.
6613         * infcmd.c (run_command_1): Update code to call
6614         'envp' from 'gdb_environ' class.
6615         (environment_info): Update code to call methods from 'gdb_environ'
6616         class.
6617         (unset_environment_command): Likewise.
6618         (path_info): Likewise.
6619         (path_command): Likewise.
6620         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6621         (inferior::inferior): Initialize 'environment' using the host's
6622         information.
6623         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6624         Include "environ.h".
6625         (class inferior) <environment>: Change type from 'struct
6626         gdb_environ' to 'gdb_environ'.
6627         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6628         methods from 'gdb_environ' class.
6629         * solib.c (solib_find_1): Likewise
6630         * unittests/environ-selftests.c: New file.
6631
6632 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6633
6634         * features/i386/i386-linux.xml: Exchange the order of including
6635         32bit-linux.xml and 32bit-sse.xml.
6636         * features/i386/i386-linux.c: Regenerated.
6637
6638 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6639
6640         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6641         Delete copy ctor and assignment operator.
6642         (tdesc_type): Likewise.
6643         (tdesc_feature): Likewise.
6644         (tdesc_free_reg): Remove.
6645         (tdesc_create_reg): Use new.
6646         (tdesc_free_type): Remove.
6647         (tdesc_create_vector): Use new.
6648         (tdesc_create_union): Likewise.
6649         (tdesc_create_flags): Likewise.
6650         (tdesc_create_enum): Likewise.
6651         (tdesc_free_feature): Delete.
6652         (free_target_description): Use delete.
6653
6654 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6655
6656         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6657         registers.
6658
6659 2017-06-19  Pedro Alves  <palves@redhat.com>
6660
6661         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6662         after gdb::unlinker.
6663
6664 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6665
6666         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6667         gdb_environ to access an environment variable.
6668
6669 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6670
6671         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6672         gdb_byte*.
6673
6674 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6675
6676         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6677
6678 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6679
6680         * configure: Re-generate.
6681         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6682
6683 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6684
6685         * configure: Re-generate.
6686         * warning.m4: Pass -Werror to compiler when checking for
6687         supported warning flags.
6688
6689 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6690
6691         * Makefile.in (COMPILE.pre): Add "-x c++".
6692
6693 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6694             Pedro Alves  <palves@redhat.com>
6695             Yao Qi  <yao.qi@linaro.org>
6696
6697         * defs.h (RequireLongest): New.
6698         (extract_integer): Declare function template.
6699         (extract_signed_integer): Remove the declaration, but define it
6700         static inline.
6701         (extract_unsigned_integer): Likewise.
6702         (store_integer): Declare function template.
6703         (store_signed_integer): Remove the declaration, but define it
6704         static inline.
6705         (store_unsigned_integer): Likewise.
6706         * findvar.c (extract_integer): New function template.
6707         (extract_signed_integer): Remove.
6708         (extract_unsigned_integer): Remove.
6709         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6710         instantiations.
6711         (store_integer): New function template.
6712         (store_signed_integer): Remove.
6713         (store_unsigned_integer): Remove.
6714         (store_integer): Explicit instantiations.
6715         * regcache.c (regcache_raw_read_signed): Update.
6716         (regcache::raw_read): New function.
6717         (regcache::raw_read_signed): Remove.
6718         (regcache::raw_read_unsigned): Remove.
6719         (regcache_raw_read_unsigned): Update.
6720         (regcache_raw_write_unsigned): Update.
6721         (regcache::raw_write_signed): Remove.
6722         (regcache::raw_write): New function.
6723         (regcache_cooked_read_signed): Update.
6724         (regcache::raw_write_unsigned): Remove.
6725         (regcache::cooked_read_signed): Remove.
6726         (regcache_cooked_read_unsigned): Update.
6727         (regcache::cooked_read_unsigned): Remove.
6728         (regcache_cooked_write_signed): Update.
6729         (regcache_cooked_write_unsigned): Update.
6730         * regcache.h (regcache) <raw_read_signed>: Remove.
6731         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6732         <raw_read, raw_write>: New.
6733         <cooked_read_signed, cooked_write_signed>: Remove.
6734         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6735         <cooked_read, cooked_write>: New.
6736         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6737         (sh64_pseudo_register_write): Update.
6738
6739 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6740
6741         * arc-tdep.c (arc_disassembler_options): New variable.
6742         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6743         of default_print_insn.
6744         (arc_delayed_print_insn): Set info->section when needed,
6745         use default_print_insn to retrieve a disassembler.
6746
6747 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6748
6749         PR gdb/21574
6750         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6751         to mention $SHELL and startup-with-shell.
6752
6753 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6754
6755         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6756
6757 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6758
6759         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6760         default_print_insn instead of print_insn_aarch64.
6761         * arm-tdep.c (gdb_print_insn_arm): Call
6762         default_print_insn instead of print_insn_big_arm
6763         and print_insn_little_arm.
6764         * i386-tdep.c (i386_print_insn): Call default_print_insn
6765         instead of print_insn_i386.
6766         * ia64-tdep.c (ia64_print_insn): Call
6767         default_print_insn instead of print_insn_ia64.
6768         * mips-tdep.c (gdb_print_insn_mips): Call
6769         default_print_insn instead of print_insn_big_mips
6770         and print_insn_little_mips.
6771         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6772         instead of print_insn_spu.
6773
6774 2017-06-14  Pedro Alves  <palves@redhat.com>
6775
6776         * ada-lang.c: Include "common/byte-vector.h".
6777         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6778         * charset.c (wchar_iterator::iterate): Resize the vector instead
6779         of reserving it.
6780         * common/byte-vector.h: Include "common/def-vector.h".
6781         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6782         * cli/cli-dump.c: Include "common/byte-vector.h".
6783         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6784         * common/byte-vector.h: New file.
6785         * common/def-vector.h: New file.
6786         * common/default-init-alloc.h: New file.
6787         * dwarf2loc.c: Include "common/byte-vector.h".
6788         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6789         instead of reserving it.
6790         * dwarf2read.c: Include "common/byte-vector.h".
6791         (data_buf::m_vec): Now a gdb::byte_vector.
6792         * gdb_regex.c: Include "common/def-vector.h".
6793         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6794         * mi/mi-main.c: Include "common/byte-vector.h".
6795         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6796         * printcmd.c: Include "common/byte-vector.h".
6797         (print_scalar_formatted): Use gdb::byte_vector.
6798         * valprint.c: Include "common/byte-vector.h".
6799         (maybe_negate_by_bytes, print_decimal_chars): Use
6800         gdb::byte_vector.
6801
6802 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6803
6804         * darwin-nat.c: Include "nat/fork-inferior.h".
6805
6806 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6807
6808         * configure.nat: Factor out Darwin bits that are not
6809         architecture-specific.  Add fork-inferior.o.
6810
6811 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6812
6813         * configure.nat: Factor out AIX bits that are not
6814         architecture-specific.  Add fork-inferior.o.
6815
6816 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6817
6818         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6819         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6820         wrappers that just call rw_pieced_value.
6821
6822 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6823
6824         * dwarf2loc.c (write_pieced_value): When writing the data for a
6825         memory piece, use write_memory_with_notification instead of
6826         write_memory.
6827
6828 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6829
6830         * valops.c (read_value_memory): Change embedded_offset to
6831         represent a bit offset instead of a byte offset.
6832         * value.h (read_value_memory): Adjust comment.
6833
6834 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6835
6836         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6837         dest_offset_bits and source_offset_bits.
6838         (write_pieced_value): Likewise.
6839
6840 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6841
6842         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6843         given by DW_OP_bit_piece.
6844         (write_pieced_value): Likewise.
6845
6846 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6847
6848         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6849         some other preparations to the places where sufficient information
6850         is available.
6851         (write_pieced_value): Likewise.
6852
6853 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6854
6855         * dwarf2loc.c (bits_to_bytes): New function.
6856         (read_pieced_value): Fix offset calculations for register pieces
6857         on big-endian targets.
6858         (write_pieced_value): Likewise.
6859
6860 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6861
6862         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6863         (write_pieced_value): Likewise.
6864
6865 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6866
6867         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6868         transfer the source value's least significant bits, instead of its
6869         lowest-addressed ones.  Rename type_len to max_offset.
6870         (read_pieced_value): Mirror above changes to write_pieced_value as
6871         applicable.
6872
6873 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6874
6875         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6876         truncate full bytes from dest_offset_bits before using it as an
6877         offset into the buffer.
6878
6879 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6880
6881         * dwarf2loc.c (write_pieced_value): Include transfer size in
6882         byte-wise check.
6883
6884 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6885
6886         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6887         calculation of this_size.
6888
6889 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6890
6891         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6892         when targeting a bit-field.
6893         (write_pieced_value): Likewise.
6894
6895 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6896
6897         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6898         (allocate_piece_closure): Drop addr_size parameter.
6899         (dwarf2_evaluate_loc_desc_full): Adjust call to
6900         allocate_piece_closure.
6901
6902 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6903
6904         PR gdb/21226
6905         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6906         the LSB end, independent of endianness.
6907
6908 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6909
6910         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6911         size capping.
6912
6913 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6914
6915         * mips-linux-nat.c: Move include features/mips*-linux.c to
6916         mips-linux-tdep.c.
6917         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6918         to mips-linux-tdep.c.
6919         * mips-linux-tdep.c: Include features/mips*-linux.c
6920         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6921         functions.
6922         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6923         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6924         (tdesc_mips64_dsp_linux): Declare.
6925
6926 2017-06-12  Tom Tromey  <tom@tromey.com>
6927
6928         * valprint.h (val_print_type_code_int): Remove.
6929         * valprint.c (generic_val_print_int): Always call
6930         val_print_scalar_formatted.
6931         (val_print_type_code_int): Remove.
6932         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6933         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6934         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6935         * ada-valprint.c (ada_val_print_num): Use
6936         val_print_scalar_formatted.
6937
6938 2017-06-12  Tom Tromey  <tom@tromey.com>
6939
6940         * printcmd.c (print_scalar_formatted): Unify the two switches.
6941         Don't convert scalars to LONGEST.
6942
6943 2017-06-12  Tom Tromey  <tom@tromey.com>
6944
6945         PR exp/16225:
6946         * valprint.h (print_decimal_chars): Update.
6947         * valprint.c (maybe_negate_by_bytes): New function.
6948         (print_decimal_chars): Add "is_signed" argument.
6949         * printcmd.c (print_scalar_formatted): Update.
6950
6951 2017-06-12  Tom Tromey  <tom@tromey.com>
6952
6953         PR exp/16225:
6954         * valprint.h (print_binary_chars, print_hex_chars): Update.
6955         * valprint.c (val_print_type_code_int): Update.
6956         (print_binary_chars): Add "zero_pad" argument.
6957         (emit_octal_digit): New function.
6958         (print_octal_chars): Don't zero-pad.
6959         (print_decimal_chars): Likewise.
6960         (print_hex_chars): Add "zero_pad" argument.
6961         * sh64-tdep.c (sh64_do_fp_register): Update.
6962         * regcache.c (regcache::dump): Update.
6963         * printcmd.c (print_scalar_formatted): Update.
6964         * infcmd.c (default_print_one_register_info): Update.
6965
6966 2017-06-12  Pedro Alves  <palves@redhat.com>
6967             Alan Hayward  <alan.hayward@arm.com>
6968
6969         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6970         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6971         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6972         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6973         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6974
6975 2017-06-12  Pedro Alves  <palves@redhat.com>
6976
6977         * dwarf2read.c (mapped_symtab::data): Now a vector of
6978         symtab_index_entry instead of vector of
6979         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6980         whether an element's name is NULL instead of checking whether the
6981         element itself is NULL.
6982         (find_slot): Change return type.  Adjust.
6983         (hash_expand, , add_index_entry, uniquify_cu_indices)
6984         (write_hash_table): Adjust.
6985
6986 2017-06-12  Pedro Alves  <palves@redhat.com>
6987
6988         * dwarf2read.c (recursively_count_psymbols): New function.
6989         (write_psymtabs_to_index): Call it to compute number of psyms and
6990         pass estimate size of psyms_seen to unordered_set's ctor.
6991
6992 2017-06-12  Pedro Alves  <palves@redhat.com>
6993
6994         * dwarf2read.c (write_hash_table): Check if key already exists
6995         before emplacing.
6996
6997 2017-06-12  Pedro Alves  <palves@redhat.com>
6998
6999         * dwarf2read.c (data_buf::append_space): Rename to...
7000         (data_buf::grow): ... this, and make private.  Adjust all callers.
7001         (data_buf::append_uint): New method.
7002         (add_address_entry, write_one_signatured_type)
7003         (write_psymtabs_to_index): Use it.
7004
7005 2017-06-12  Pedro Alves  <palves@redhat.com>
7006
7007         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7008         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7009         (data_buf::file_write): Call ::fwrite directly.
7010
7011 2017-06-12  Pedro Alves  <palves@redhat.com>
7012
7013         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7014         std::vector::erase.
7015
7016 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7017
7018         Code cleanup: C++ify .gdb_index producer.
7019         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7020         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7021         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7022         (create_strtab, add_string): Remove.
7023         (file_write, data_buf): New.
7024         (struct symtab_index_entry): Use std::vector for cu_indices.
7025         (struct mapped_symtab): Use std::vector for data.
7026         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7027         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7028         Remove.
7029         (find_slot): Change return type.  Update it to the new data structures.
7030         (hash_expand, add_index_entry): Update it to the new data structures.
7031         (offset_type_compare): Remove.
7032         (uniquify_cu_indices): Update it to the new data structures.
7033         (c_str_view, c_str_view_hasher, vector_hasher): New.
7034         (add_indices_to_cpool): Remove.
7035         (write_hash_table): Update it to the new data structures.
7036         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7037         (eq_psymtab_cu_index): Remove.
7038         (psym_index_map): New typedef.
7039         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7040         reference and std::unordered_map for cu_index_htab.
7041         (add_address_entry, add_address_entry_worker, write_address_map)
7042         (write_psymbols): Update it to the new data structures.
7043         (write_obstack): Remove.
7044         (struct signatured_type_index_data): Change types_list to a data_buf
7045         reference and psyms_seen to a std::unordered_set reference.
7046         (write_one_signatured_type, recursively_write_psymbols)
7047         (write_psymtabs_to_index): Update it to the new data structures.
7048
7049 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7050
7051         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7052         separate-debug-file commands.
7053         * symfile.h (separate_debug_file_debug): New global.
7054         * symfile.c (separate_debug_file_debug): New global.
7055         (separate_debug_file_exists, find_separate_debug_file): Add
7056         debug output.
7057         (_initialize_symfile): Add "set debug separate-debug-file"
7058         command.
7059         * build-id.c (build_id_to_debug_bfd,
7060         find_separate_debug_file_by_buildid): Add debug output.
7061
7062 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7063
7064         * gdbarch.sh (displaced_step_free_closure): Remove.
7065         * gdbarch.h, gdbarch.c: Re-generate.
7066         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7067         displaced_step_free_closure.
7068         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7069         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7070         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7071         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7072         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7073         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7074         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7075         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7076         * infrun.c (displaced_step_clear): Call xfree instead of
7077         gdbarch_displaced_step_free_closure.
7078
7079 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7080
7081         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7082         NULL".
7083
7084 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7085
7086         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7087         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7088         (mn10300_push_dummy_call): Likewise.
7089
7090 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7091
7092         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7093
7094 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7095
7096         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7097
7098 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7099
7100         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7101         able to start inferiors using a shell.
7102         (New remote packets): Announce new packet "QStartupWithShell".
7103         * remote.c: Add PACKET_QStartupWithShell.
7104         (extended_remote_create_inferior): Handle new
7105         PACKET_QStartupWithShell.
7106         (remote_protocol_features) <QStartupWithShell>: New entry for
7107         PACKET_QStartupWithShell.
7108         (_initialize_remote): Call "add_packet_config_cmd" for
7109         QStartupShell.
7110
7111 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7112             Pedro Alves  <palves@redhat.com>
7113
7114         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7115         and "nat/fork-inferior.h".
7116         * common/common-inferior.h: New file, with contents from
7117         "gdb/inferior.h".
7118         * commom/common-utils.c: Include "common-utils.h".
7119         (stringify_argv): New function.
7120         * common/common-utils.h (stringify_argv): New prototype.
7121         * configure.nat: Add "fork-inferior.o" as a dependency for
7122         "*linux*", "fbsd*" and "nbsd*" hosts.
7123         * corefile.c (get_exec_file): Update comment.
7124         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7125         instead of "startup_inferior".
7126         (darwin_create_inferior): Call "add_thread_silent" after
7127         "fork_inferior".
7128         * fork-child.c: Cleanup unnecessary includes.
7129         (SHELL_FILE): Move to "common/common-fork-child.c".
7130         (environ): Likewise.
7131         (exec_wrapper): Initialize.
7132         (get_exec_wrapper): New function.
7133         (breakup_args): Move to "common/common-fork-child.c"; rename to
7134         "breakup_args_for_exec".
7135         (escape_bang_in_quoted_argument): Move to
7136         "common/common-fork-child.c".
7137         (saved_ui): New variable.
7138         (prefork_hook): New function.
7139         (postfork_hook): Likewise.
7140         (postfork_child_hook): Likewise.
7141         (gdb_startup_inferior): Likewise.
7142         (fork_inferior): Move to "common/common-fork-child.c".  Update
7143         function to support gdbserver.
7144         (startup_inferior): Likewise.
7145         * gdbcore.h (get_exec_file): Remove declaration.
7146         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7147         instead of "startup_inferior".  Call "add_thread_silent" after
7148         "fork_inferior".
7149         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7150         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7151         instead of "startup_inferior".  Call "add_thread_silent" after
7152         "fork_inferior".
7153         * inferior.h: Include "common-inferior.h".
7154         (trace_start_error): Move to "common/common-utils.h".
7155         (trace_start_error_with_name): Likewise.
7156         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7157         (startup_inferior): Likewise.
7158         (gdb_startup_inferior): New prototype.
7159         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7160         * nat/fork-inferior.h: New file.
7161         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7162         instead of "startup_inferior".  Call "add_thread_silent" after
7163         "fork_inferior".
7164         * target.h (target_terminal_init): Move prototype to
7165         "target/target.h".
7166         (target_terminal_inferior): Likewise.
7167         (target_terminal_ours): Likewise.
7168         * target/target.h (target_terminal_init): New prototype, moved
7169         from "target.h".
7170         (target_terminal_inferior): Likewise.
7171         (target_terminal_ours): Likewise.
7172         * utils.c (gdb_flush_out_err): New function.
7173
7174 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7175
7176         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7177         * common/common-gdbthread.h: New file, with parts from
7178         "gdb/gdbthread.h".
7179         * gdbthread.h: Include "common-gdbthread.h".
7180         (switch_to_thread): Moved to "common/common-gdbthread.h".
7181
7182 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7183
7184         * Makefile.in (SFILES): Add "common/job-control.c".
7185         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7186         (COMMON_OBS): Add "job-control.o".
7187         * common/job-control.c: New file, with contents from
7188         "gdb/inflow.c".
7189         * common/job-control.h: New file, with contents from "terminal.h".
7190         * fork-child.c: Include "job-control.h".
7191         * inflow.c: Include "job-control.h".
7192         (gdb_setpgid): Move to "common/common-inflow.c".
7193         (_initialize_inflow): Move setting of "job_control" to
7194         "handle_job_control".
7195         * terminal.h (job_control): Moved to "common/common-terminal.h".
7196         (gdb_setpgid): Likewise.
7197         * top.c: Include "job_control.h".
7198         * utils.c: Likewise.
7199         (job_control): Moved to "job-control.c".
7200
7201 2017-06-07  Pedro Alves  <palves@redhat.com>
7202
7203         * Makefile.in (SFILES): Add gdb_regex.c.
7204         (COMMON_OBS): Add gdb_regex.o.
7205         * ada-lang.c (ada_add_standard_exceptions)
7206         (ada_add_exceptions_from_frame, name_matches_regex)
7207         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7208         parameter type to compiled_regex.  Adjust.
7209         (ada_exceptions_list): Use compiled_regex.
7210         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7211         std::unique_ptr<compiled_regex>.
7212         (exception_catchpoint::~exception_catchpoint): Remove regfree
7213         call.
7214         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7215         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7216         * breakpoint.c (solib_catchpoint::compiled): Now a
7217         std::unique_ptr<compiled_regex>.
7218         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7219         (check_status_catch_solib): Adjust to use compiled_regex.
7220         (add_solib_catchpoint): Adjust to use compiled_regex.
7221         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7222         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7223         compiled_regex reference.  Adjust to use it.
7224         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7225         declaration.  Include "gdb_regex.h".
7226         (apropos_cmd): Change regex parameter to compiled_regex reference.
7227         * gdb_regex.c: New file.
7228         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7229         declarations.
7230         (class compiled_regex): New.
7231         * linux-tdep.c: Include "common/gdb_optional.h".
7232         (struct mapping_regexes): New, factored out from
7233         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7234         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7235         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7236         * probe.c: Include "common/gdb_optional.h".
7237         (collect_probes): Use compiled_regex and gdb::optional and remove
7238         cleanups.
7239         * skip.c: Include "common/gdb_optional.h".
7240         (skiplist_entry::compiled_function_regexp): Now a
7241         gdb::optional<compiled_regex>.
7242         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7243         (free_skiplist_entry): Remove regfree call.
7244         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7245         compiled_regex and gdb::optional.
7246         * symtab.c: Include "common/gdb_optional.h".
7247         (search_symbols): Use compiled_regex and gdb::optional.
7248         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7249         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7250         to gdb_regex.c.
7251
7252 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7253
7254         * regcache.c (regcache::save): Avoid buffer use.
7255         (regcache::dump): Likewise.
7256
7257 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7258
7259         * sh-tdep.c (sh_pseudo_register_read): Remove
7260         MAX_REGISTER_SIZE.
7261         (sh_pseudo_register_write): Likewise.
7262         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7263         (sh64_pseudo_register_write): Likewise
7264
7265 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7266
7267         * aarch64-tdep.c (aarch64_store_return_value): Use
7268         V_REGISTER_SIZE.
7269         (aarch64_pseudo_read_value): Likewise.
7270         (aarch64_pseudo_write): Likewise.
7271
7272 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7273
7274         * regformats/regdef.h (set_register_cache): Remove the
7275         declaration.
7276
7277 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7278
7279         * frame.c (frame_unwind_register_signed): Use
7280         frame_unwind_register_value.
7281
7282 2017-06-06  Pedro Alves  <palves@redhat.com>
7283
7284         PR breakpoints/21553
7285         * breakpoint.c (create_breakpoints_sal_default)
7286         (init_breakpoint_sal, create_breakpoint_sal): Use
7287         gdb::unique_xmalloc_ptr for string parameters.
7288         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7289         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7290         (base_breakpoint_create_breakpoints_sal)
7291         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7292         (strace_marker_create_breakpoints_sal)
7293         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7294         string parameters.
7295         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7296         gdb::unique_xmalloc_ptr for string parameters.
7297         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7298         parameters.
7299
7300 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7301
7302         * alpha-tdep.c (alpha_register_to_value): Use
7303         get_frame_register_value.
7304         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7305
7306 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7307
7308         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7309         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7310         (ia64_value_to_register): Likewise.
7311         (ia64_extract_return_value): Likewise.
7312         (ia64_store_return_value): Likewise.
7313         (ia64_push_dummy_call): Likewise.
7314
7315 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7316
7317         GDB 8.0 released.
7318
7319 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7320
7321         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7322
7323 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7324
7325         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7326         parameter.
7327         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7328
7329 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7330
7331         * event-loop.c (poll_timers): Unallocate timer using delete
7332         instead of xfree.
7333
7334 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7335
7336         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7337         (struct breakpoint) <~breakpoint>: New.
7338         (struct watchpoint): Inherit from breakpoint.
7339         <~watchpoint>: New.
7340         <base>: Remove.
7341         (struct tracepoint): Inherit from breakpoint.
7342         <base>: Remove.
7343         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7344         (struct longjmp_breakpoint): Inherit from breakpoint.
7345         <~longjmp_breakpoint>: New.
7346         <base>: Remove.
7347         (new_breakpoint_from_type): Remove casts.
7348         (watchpoint_in_thread_scope): Remove reference to base field.
7349         (watchpoint_del_at_next_stop): Likewise.
7350         (update_watchpoint): Likewise.
7351         (watchpoint_check): Likewise.
7352         (bpstat_check_watchpoint): Likewise.
7353         (set_longjmp_breakpoint): Likewise.
7354         (struct fork_catchpoint): Inherit from breakpoint.
7355         <base>: Remove.
7356         (struct solib_catchpoint): Inherit from breakpoint.
7357         <~solib_catchpoint>: New.
7358         <base>: Remove.
7359         (dtor_catch_solib): Change to ...
7360         (solib_catchpoint::~solib_catchpoint): ... this.
7361         (breakpoint_hit_catch_solib): Remove reference to base field.
7362         (add_solib_catchpoint): Likewise.
7363         (create_fork_vfork_event_catchpoint): Likewise.
7364         (struct exec_catchpoint): Inherit from breakpoint.
7365         <~exec_catchpoint>: New.
7366         <base>: Remove.
7367         (dtor_catch_exec): Change to ...
7368         (exec_catchpoint::~exec_catchpoint): ... this.
7369         (dtor_watchpoint): Change to ...
7370         (watchpoint::~watchpoint): ... this.
7371         (watch_command_1): Remove reference to base field.
7372         (catch_exec_command_1): Likewise.
7373         (base_breakpoint_dtor): Change to ...
7374         (breakpoint::~breakpoint): ... this.
7375         (base_breakpoint_ops): Remove dtor field value.
7376         (longjmp_bkpt_dtor): Change to ...
7377         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7378         (strace_marker_create_breakpoints_sal): Remove reference to base
7379         field.
7380         (delete_breakpoint): Don't manually call breakpoint destructor.
7381         (create_tracepoint_from_upload): Remove reference to base field.
7382         (trace_pass_set_count): Likewise.
7383         (initialize_breakpoint_ops): Don't initialize
7384         momentary_breakpoint_ops, don't set dtors.
7385         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7386         <~ada_catchpoint>: New.
7387         <base>: Remove.
7388         (create_excep_cond_exprs): Remove reference to base field.
7389         (dtor_exception): Change to ...
7390         (ada_catchpoint::~ada_catchpoint): ... this.
7391         (dtor_catch_exception): Remove.
7392         (dtor_catch_exception_unhandled): Remove.
7393         (dtor_catch_assert): Remove.
7394         (create_ada_exception_catchpoint): Remove reference to base
7395         field.
7396         (initialize_ada_catchpoint_ops): Don't set dtors.
7397         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7398         breakpoint.
7399         <~signal_catchpoint>: New.
7400         <base>: Remove.
7401         (signal_catchpoint_dtor): Change to ...
7402         (signal_catchpoint::~signal_catchpoint): ... this.
7403         (create_signal_catchpoint): Remove reference to base field.
7404         (initialize_signal_catchpoint_ops): Don't set dtor.
7405         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7406         from breakpoint.
7407         <~syscall_catchpoint>: New.
7408         <base>: Remove.
7409         (dtor_catch_syscall): Change to ...
7410         (syscall_catchpoint::~syscall_catchpoint): ... this.
7411         (create_syscall_event_catchpoint): Remove reference to base
7412         field.
7413         (initialize_syscall_catchpoint_ops): Don't set dtor.
7414         * break-catch-throw.c (struct exception_catchpoint): Inherit
7415         from breakpoint.
7416         <~exception_catchpoint>: New.
7417         <base>: Remove.
7418         (dtor_exception_catchpoint): Change to ...
7419         (exception_catchpoint::~exception_catchpoint): ... this.
7420         (handle_gnu_v3_exceptions): Remove reference to base field.
7421         (initialize_throw_catchpoint_ops): Don't set dtor.
7422         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7423         field.
7424         * remote.c (remote_get_tracepoint_status): Likewise.
7425         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7426         * tracefile.c (tracefile_fetch_registers): Likewise.
7427         * tracepoint.c (actions_command): Likewise.
7428         (validate_actionline): Likewise.
7429         (tfind_1): Likewise.
7430         (get_traceframe_location): Likewise.
7431         (find_matching_tracepoint_location): Likewise.
7432         (parse_tracepoint_status): Likewise.
7433         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7434
7435 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7436
7437         * breakpoint.c (struct longjmp_breakpoint): New struct.
7438         (is_tracepoint_type): Change return type to bool.
7439         (is_longjmp_type): New function.
7440         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7441         (set_raw_breakpoint_without_location): Use
7442         new_breakpoint_from_type.
7443         (set_raw_breakpoint): Likewise.
7444
7445 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7446
7447         * breakpoint.c (new_breakpoint_from_type): New function.
7448         (create_breakpoint_sal): Use new_breakpoint_from_type and
7449         unique_ptr.
7450         (create_breakpoint): Likewise.
7451
7452 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7453
7454         * memattr.c (mem_info_command): Rename to ...
7455         (info_mem_command): ... this.
7456         (mem_enable_command): Rename to ...
7457         (enable_mem_command): ... this.
7458         (mem_disable_command): Rename to ...
7459         (disable_mem_command): ... this.
7460         (mem_delete_command): Rename to ...
7461         (delete_mem_command): ... this.
7462         (_initialize_mem): Adjust function names.
7463
7464 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7465
7466         * btrace.c (handle_pt_insn_events): New.
7467         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7468         STATUS.  Split into this and ...
7469         (handle_pt_insn_event_flags): ... this.
7470
7471 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7472
7473         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7474         and struct pt_insn.resynced.
7475         * configure: Regenerated.
7476         * config.in: Regenerated.
7477
7478 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7479
7480         * btrace.c (ftrace_find_call_by_number): New function.
7481         (ftrace_new_function): Store objects, not pointers.
7482         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7483         ftrace_new_gap, ftrace_update_function,
7484         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7485         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7486         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7487         btrace_ends_with_single_insn, btrace_call_get): Account for
7488         btrace_thread_info::functions now storing objects.
7489         * btrace.h (struct btrace_thread_info): Add constructor.
7490         (struct btrace_thread_info) <functions>: Make std::vector.
7491         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7492         Initialize with default values.
7493         * record-btrace.c (record_btrace_frame_sniffer): Account for
7494         btrace_thread_info::functions now storing objects.
7495
7496 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7497
7498         * btrace.c: Remove typedef bfun_s.
7499         (ftrace_new_gap): Directly add gaps to the list of gaps.
7500         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7501         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7502         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7503         instead of gdb VEC.
7504
7505 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7506
7507         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7508         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7509         with btrace_thread_info::next_segment and
7510         btrace_thread_info::prev_segment.
7511         * btrace.h: Remove struct btrace_func_link.
7512         (struct btrace_function): Replace pair of function segment pointers
7513         with pair of indices.
7514         * python/py-record-btrace.c (btpy_call_prev_sibling,
7515         btpy_call_next_sibling): Replace references to
7516         btrace_thread_info::segment with btrace_thread_info::next_segment and
7517         btrace_thread_info::prev_segment.
7518         * record-btrace.c (record_btrace_frame_this_id): Use
7519         btrace_find_call_by_number.
7520
7521 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7522
7523         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7524         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7525         btrace_insn_next, btrace_insn_prev): Remove references to
7526         btrace_thread_info::flow.
7527         * btrace.h (struct btrace_function): Remove FLOW.
7528
7529 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7530
7531         * btrace.c (ftrace_find_call_by_number): New function.
7532         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7533         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7534         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7535         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7536         index.
7537         * btrace.h (struct btrace_function): Turn UP into an index.
7538         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7539         as an index.
7540         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7541         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7542         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7543
7544 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7545
7546         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7547         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7548         ftrace_update_function, ftrace_compute_global_level_offset,
7549         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7550         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7551         btrace_insn_end, btrace_is_empty): Remove references to
7552         btrace_thread_info::begin and btrace_thread_info::end.
7553         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7554         (struct btrace_thread_info) <functions>: Adjust comment.
7555         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7556         btrace_thread_info::begin.
7557
7558 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7559
7560         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7561         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7562         ftrace_update_function): Remove arguments that implicitly were always
7563         BTINFO->END.
7564         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7565         Don't pass BTINFO->END.
7566
7567 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7568
7569         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7570         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7571         btrace_find_insn_by_number): Replace function segment pointer with
7572         index.
7573         (btrace_insn_cmp): Simplify.
7574         * btrace.h: (struct btrace_insn_iterator) Rename index to
7575         insn_index.  Replace function segment pointer with index into function
7576         segment vector.
7577         * record-btrace.c (record_btrace_call_history): Replace function
7578         segment pointer use with index.
7579         (record_btrace_frame_sniffer): Retrieve function call segment through
7580         vector.
7581         (record_btrace_set_replay): Remove defunc't safety check.
7582
7583 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7584
7585         * btrace.c (btrace_ends_with_single_insn): New function.
7586         (btrace_call_get, btrace_call_number, btrace_call_begin,
7587         btrace_call_end, btrace_call_next, btrace_call_prev,
7588         btrace_find_call_by_number): Use index into call segment vector
7589         instead of pointer.
7590         (btrace_call_cmp): Simplify.
7591         * btrace.h (struct btrace_call_iterator): Replace function call segment
7592         pointer with index into vector.
7593         * record-btrace.c (record_btrace_call_history): Use index instead of
7594         pointer.
7595
7596 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7597
7598         * btrace.c (btrace_insn_begin, btrace_insn_end,
7599         btrace_find_insn_by_number): Add btinfo to iterator.
7600         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7601
7602 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7603
7604         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7605         and save pointers directly.
7606         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7607         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7608         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7609         changed signature of functions.
7610         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7611         (btrace_fetch): Remove code that adds btrace_function pointers to
7612         vector of btrace_functions.
7613         (btrace_clear): Simplify freeing vector of btrace_functions.
7614
7615 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7616
7617         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7618         Replace VEC_* with std::vector functions.
7619         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7620         (struct btrace_thread_info)<functions>: Change type to std::vector.
7621
7622 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7623
7624         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7625         "Removed targets and native configurations" up.  Merge duplicate
7626         "New commands" sub-sections.  Add "New options" sub-sections.
7627
7628 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7629
7630         * defs.h (copy_integer_to_size): New declaration.
7631         * findvar.c (copy_integer_to_size): New function.
7632         (do_cint_test): New selftest function.
7633         (copy_integer_to_size_test): Likewise.
7634         (_initialize_findvar): Likewise.
7635         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7636         (mips_fbsd_collect_reg): Use raw_collect_integer.
7637         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7638         (mips64_fill_gregset): Use raw_collect_integer
7639         (mips64_fill_fpregset): Use raw_supply_integer.
7640         * regcache.c (regcache::raw_supply_integer): New function.
7641         (regcache::raw_collect_integer): Likewise.
7642         * regcache.h: (regcache::raw_supply_integer): New declaration.
7643         (regcache::raw_collect_integer): Likewise.
7644
7645 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7646
7647         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7648         (COMMON_OBS): Add gdbarch-selftests.o.
7649         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7650         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7651         * gdbarch-selftests.c: New file.
7652         * regcache.h (regcache) <~regcache>: Mark it virtual if
7653         GDB_SELF_TEST.
7654         <raw_write>: Likewise.
7655
7656 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7657
7658         * regcache.c (current_regcache): Change it to
7659         regcache::current_regcache.
7660         (regcache_observer_target_changed): Update.
7661         (regcache_thread_ptid_changed): Make it a regcache static
7662         method.
7663         (regcache_thread_ptid_changed): Update.
7664         (class regcache_access): New.
7665         (current_regcache_test): Update.
7666         (_initialize_regcache): Update.
7667         * regcache.h: Include forward_list.
7668         (regcache): Declare regcache_thread_ptid_changed and declare
7669         registers_changed_ptid as friend.
7670
7671 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7672
7673         * i387-tdep.c (i387_register_to_value): Use register_size
7674         instead of TYPE_LENGTH.
7675         * m68k-tdep.c (m68k_register_to_value): Likewise.
7676
7677 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7678
7679         * i387-tdep.c (i387_convert_register_p): Return false if type
7680         code isn't TYPE_CODE_FLT.
7681
7682 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7683
7684         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7685         length is 4.
7686         (alpha_register_to_value): Remove type length check.
7687         (alpha_value_to_register): Likewise.
7688
7689 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7690
7691         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7692         TYPE_CODE_FLT.
7693
7694 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7695
7696         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7697         TYPE_CODE_FLT or not.
7698
7699 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7700
7701         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7702         * avr-tdep.c (avr_gdbarch_init): Likewise.
7703         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7704         * cris-tdep.c (cris_gdbarch_init): Likewise.
7705         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7706         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7707         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7708         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7709         * mep-tdep.c (mep_gdbarch_init): Likewise.
7710         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7711         * mips-tdep.c (mips_gdbarch_init): Likewise.
7712         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7713         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7714         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7715         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7716         * v850-tdep.c (v850_gdbarch_init): Likewise.
7717
7718 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7719
7720         * selftest-arch.c (tests_with_arch): Call registers_changed
7721         and reinit_frame_cache.
7722         * selftest.c (run_self_tests): Likewise.
7723
7724 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7725
7726         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7727         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7728
7729 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7730
7731         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7732         set_gdbarch_print_insn.
7733
7734 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7735
7736         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7737         set_gdbarch_print_insn.
7738
7739 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7740
7741         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7742         set_gdbarch_print_insn.
7743         * arc-tdep.c (arc_gdbarch_init): Likewise.
7744         * arch-utils.c: include dis-asm.h.
7745         (default_print_insn): New function.
7746         * arch-utils.h (default_print_insn): Declare.
7747         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7748         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7749         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7750         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7751         * frv-tdep.c (frv_gdbarch_init): Likewise.
7752         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7753         * gdbarch.sh (print_insn): Use default_print_insn.
7754         * gdbarch.c: Regenerated.
7755         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7756         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7757         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7758         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7759         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7760         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7761         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7762         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7763         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7764         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7765         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7766         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7767         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7768         * mt-tdep.c (mt_gdbarch_init): Likewise.
7769         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7770         * nios2-tdep.c (nios2_print_insn): Remove.
7771         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7772         * rx-tdep.c (rx_gdbarch_init): Likewise.
7773         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7774         * score-tdep.c (score_print_insn): Remove.
7775         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7776         * sh-tdep.c (sh_gdbarch_init): Likewise.
7777         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7778         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7779         * tic6x-tdep.c (tic6x_print_insn): Remove.
7780         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7781         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7782         * v850-tdep.c (v850_gdbarch_init): Likewise.
7783         * vax-tdep.c (vax_gdbarch_init): Likewise.
7784         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7785         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7786
7787 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7788
7789         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7790         (MIPS_FP0_REGNUM): Remove.
7791         (MIPS_FSR_REGNUM): Remove.
7792         (mips_fbsd_supply_fpregs): Use mips_regnum.
7793         (mips_fbsd_supply_gregs): Likewise.
7794         (mips_fbsd_collect_fpregs): Likewise.
7795         (mips_fbsd_collect_gregs): Likewise.
7796
7797 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7798
7799         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7800         (getpfpregs_supplies): New function.
7801         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7802         getfpregs_supplies.
7803         (mips_fbsd_store_inferior_registers): Likewise.
7804
7805 2017-05-22  Pedro Alves <palves@redhat.com>
7806
7807         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7808         maintainer.
7809
7810 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7811
7812         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7813         (store_register): Likewise.
7814         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7815         (get_decimal_float_return_value): Likewise.
7816         (do_ppc_sysv_return_value): Likewise.
7817         (ppc64_sysv_abi_push_integer): Likewise.
7818         (ppc64_sysv_abi_push_freg): Likewise.
7819         (ppc64_sysv_abi_return_value_base): Likewise.
7820         (ppc64_sysv_abi_return_value): Likewise.
7821         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7822         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7823         * rs6000-nat.c: Likewise.
7824         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7825         (rs6000_value_to_register): Likewise.
7826         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7827
7828 2017-05-21  Tom Tromey  <tom@tromey.com>
7829
7830         PR rust/21466:
7831         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7832         arrays as "[T]", not "[T; ]".
7833
7834 2017-05-19  Tom Tromey  <tom@tromey.com>
7835
7836         PR rust/21484:
7837         * rust-lang.c (exp_descriptor_rust): New function.
7838         (rust_language_defn): Use it.
7839         * p-lang.c (pascal_language_defn): Update.
7840         * opencl-lang.c (opencl_language_defn): Update.
7841         * objc-lang.c (objc_language_defn): Update.
7842         * m2-lang.c (m2_language_defn): Update.
7843         * language.h (struct language_defn)
7844         <la_watch_location_expression>: New member.
7845         * language.c (unknown_language_defn, auto_language_defn)
7846         (local_language_defn): Update.
7847         * go-lang.c (go_language_defn): Update.
7848         * f-lang.c (f_language_defn): Update.
7849         * d-lang.c (d_language_defn): Update.
7850         * c-lang.h (c_watch_location_expression): Declare.
7851         * c-lang.c (c_watch_location_expression): New function.
7852         (c_language_defn, cplus_language_defn, asm_language_defn)
7853         (minimal_language_defn): Use it.
7854         * breakpoint.c (watch_command_1): Call
7855         la_watch_location_expression.
7856         * ada-lang.c (ada_language_defn): Update.
7857
7858 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7859
7860         PR tui/21482
7861         * gdb_curses.h (NOMACROS): Define.
7862         (NCURSES_NOMACROS): Define.
7863
7864 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7865
7866         PR tui/21482
7867         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7868         arg to char *.
7869         * tui/tui-wingeneral.c (box_win): Likewise.
7870         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7871         (tui_show_source_line): Likewise.
7872         (tui_show_exec_info_content): Likewise.
7873
7874 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7875
7876         * sparc-tdep.c (sparc_structure_return_p)
7877         (sparc_arg_on_registers_p): New functions.
7878         (sparc32_store_arguments): Use them.
7879         * sparc64-tdep.c (sparc64_16_byte_align_p)
7880         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7881         Handle TYPE_CODE_ARRAY.
7882
7883 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7884
7885         * cli/cli-decode.c (add_alias_cmd): New function.
7886         * command.h (add_alias_cmd): Declare.
7887         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7888         instead call add_alias_cmd.
7889
7890 2017-05-17  Pedro Alves  <palves@redhat.com>
7891
7892         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7893         (nat_makefile_frag): ... this.  All references updated.
7894         * configure.ac: Likewise.
7895         * configure.nat: Likewise.  Enhance comments.
7896         * configure: Regenerate.
7897
7898 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7899
7900         * procfs.c (procfs_create_inferior): Change prototype to match
7901         definition.
7902
7903 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7904
7905         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7906         C++ compiler warning.
7907
7908 2017-05-12  Tom Tromey  <tom@tromey.com>
7909
7910         PR rust/21483:
7911         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7912         recurse, just call value_struct_elt directly.
7913
7914 2017-05-12  Tom Tromey  <tom@tromey.com>
7915
7916         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7917         OP_RUST_ARRAY>: Fix.
7918
7919 2017-05-12  Tom Tromey  <tom@tromey.com>
7920
7921         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7922
7923 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7924
7925         * regcache.c: Include <forward_list>.
7926         (struct regcache_list): Remove.
7927         (current_regcache): Update.
7928         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7929         (regcache_thread_ptid_changed): Likewise.
7930         (registers_changed_ptid): Likewise.
7931         (current_regcache_size): Likewise.
7932
7933 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7934
7935         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7936         (current_regcache_size): New function.
7937         (current_regcache_test): New function.
7938         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7939
7940 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7941
7942         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7943         (print_gp_register_row): Use get_frame_register_value.
7944
7945 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7946
7947         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7948         (mips_supply_fpregset): Likewise.
7949         (mips64_supply_gregset): Likewise.
7950
7951 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7952
7953         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7954         regcache->raw_supply_zeroed.
7955
7956 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7957
7958         * configure.nat: Rearrange 'case' statements to match
7959         host before cpu.
7960
7961 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7962
7963         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7964         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7965         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7966         "@nat_extra_makefile_frag@".
7967         (Makefile): Remove dependency on "@frags@".
7968         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7969         (data-directory/Makefile): Likewise.
7970         * config/aarch64/linux.mh: Deleted; moved contents to
7971         "gdb/configure.nat".
7972         * config/alpha/alpha-linux.mh: Likewise.
7973         * config/alpha/nbsd.mh: Likewise.
7974         * config/arm/linux.mh: Likewise.
7975         * config/arm/nbsdelf.mh: Likewise.
7976         * config/i386/cygwin.mh: Likewise.
7977         * config/i386/cygwin64.mh: Likewise.
7978         * config/i386/darwin.mh: Likewise.
7979         * config/i386/fbsd.mh: Likewise.
7980         * config/i386/fbsd64.mh: Likewise.
7981         * config/i386/go32.mh: Likewise.
7982         * config/i386/i386gnu.mh: Likewise.
7983         * config/i386/i386sol2.mh: Likewise.
7984         * config/i386/linux.mh: Likewise.
7985         * config/i386/linux64.mh: Likewise.
7986         * config/i386/mingw.mh: Likewise.
7987         * config/i386/mingw64.mh: Likewise.
7988         * config/i386/nbsd64.mh: Likewise.
7989         * config/i386/nbsdelf.mh: Likewise.
7990         * config/i386/nto.mh: Likewise.
7991         * config/i386/obsd.mh: Likewise.
7992         * config/i386/obsd64.mh: Likewise.
7993         * config/i386/sol2-64.mh: Likewise.
7994         * config/ia64/linux.mh: Likewise.
7995         * config/m32r/linux.mh: Likewise.
7996         * config/m68k/linux.mh: Likewise.
7997         * config/m68k/nbsdelf.mh: Likewise.
7998         * config/m68k/obsd.mh: Likewise.
7999         * config/m88k/obsd.mh: Likewise.
8000         * config/mips/fbsd.mh: Likewise.
8001         * config/mips/linux.mh: Likewise.
8002         * config/mips/nbsd.mh: Likewise.
8003         * config/mips/obsd64.mh: Likewise.
8004         * config/pa/linux.mh: Likewise.
8005         * config/pa/nbsd.mh: Likewise.
8006         * config/pa/obsd.mh: Likewise.
8007         * config/powerpc/aix.mh: Likewise.
8008         * config/powerpc/fbsd.mh: Likewise.
8009         * config/powerpc/linux.mh: Likewise.
8010         * config/powerpc/nbsd.mh: Likewise.
8011         * config/powerpc/obsd.mh: Likewise.
8012         * config/powerpc/ppc64-linux.mh: Likewise.
8013         * config/powerpc/spu-linux.mh: Likewise.
8014         * config/s390/linux.mh: Likewise.
8015         * config/sh/nbsd.mh: Likewise.
8016         * config/sparc/fbsd.mh: Likewise.
8017         * config/sparc/linux.mh: Likewise.
8018         * config/sparc/linux64.mh: Likewise.
8019         * config/sparc/nbsd64.mh: Likewise.
8020         * config/sparc/nbsdelf.mh: Likewise.
8021         * config/sparc/obsd64.mh: Likewise.
8022         * config/sparc/sol2.mh: Likewise.
8023         * config/tilegx/linux.mh: Likewise.
8024         * config/vax/nbsdelf.mh: Likewise.
8025         * config/vax/obsd.mh: Likewise.
8026         * config/xtensa/linux.mh: Likewise.
8027         * config/i386/i386gnu.mn: New file, with excerpts from
8028         "config/i386/i386gnu.mh".
8029         * configure: Regenerate.
8030         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8031         *.mh files under "gdb/config".
8032         * configure.nat: New file, with contents from the
8033         "gdb/config/*/*.mh" files.
8034
8035 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8036
8037         * btrace.c (btrace_clear): Free insn vector.
8038
8039 2017-05-05  Pedro Alves  <palves@redhat.com>
8040
8041         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8042         * configure: Regenerate.
8043
8044 2017-05-04  Pedro Alves  <palves@redhat.com>
8045
8046         * Makefile.in (SFILES): Add progspace-and-thread.c.
8047         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8048         (COMMON_OBS): Add progspace-and-thread.o.
8049         * breakpoint.c: Include "progspace-and-thread.h".
8050         (update_inserted_breakpoint_locations)
8051         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8052         Use scoped_restore_current_pspace_and_thread.
8053         (create_std_terminate_master_breakpoint): Use
8054         scoped_restore_current_program_space.
8055         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8056         (print_breakpoint_location): Use
8057         scoped_restore_current_program_space.
8058         (bp_loc_is_permanent): Use
8059         scoped_restore_current_pspace_and_thread.
8060         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8061         (download_tracepoint_locations): Use
8062         scoped_restore_current_pspace_and_thread.
8063         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8064         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8065         (enum step_over_calls_kind): Moved from inferior.h.
8066         (class scoped_restore_current_thread): New class.
8067         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8068         declaration.
8069         (scoped_restore_current_thread): New class.
8070         * infcmd.c: Include "common/gdb_optional.h".
8071         (continue_1, proceed_after_attach): Use
8072         scoped_restore_current_thread.
8073         (notice_new_inferior): Use scoped_restore_current_thread.
8074         * inferior.c: Include "progspace-and-thread.h".
8075         (restore_inferior, save_current_inferior): Delete.
8076         (add_inferior_command, clone_inferior_command): Use
8077         scoped_restore_current_pspace_and_thread.
8078         * inferior.h (scoped_restore_current_inferior): New class.
8079         * infrun.c: Include "progspace-and-thread.h" and
8080         "common/gdb_optional.h".
8081         (follow_fork_inferior): Use
8082         scoped_restore_current_pspace_and_thread.
8083         (scoped_restore_exited_inferior): New class.
8084         (handle_vfork_child_exec_or_exit): Use
8085         scoped_restore_exited_inferior,
8086         scoped_restore_current_pspace_and_thread,
8087         scoped_restore_current_thread and scoped_restore.
8088         (fetch_inferior_event): Use scoped_restore_current_thread.
8089         * linespec.c (decode_line_full, decode_line_1): Use
8090         scoped_restore_current_program_space.
8091         * mi/mi-main.c: Include "progspace-and-thread.h".
8092         (exec_continue): Use scoped_restore_current_thread.
8093         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8094         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8095         * proc-service.c (ps_pglobal_lookup): Use
8096         scoped_restore_current_program_space.
8097         * progspace-and-thread.c: New file.
8098         * progspace-and-thread.h: New file.
8099         * progspace.c (release_program_space, clone_program_space): Use
8100         scoped_restore_current_program_space.
8101         (restore_program_space, save_current_program_space)
8102         (save_current_space_and_thread): Delete.
8103         (switch_to_program_space_and_thread): Moved to
8104         progspace-and-thread.c.
8105         * progspace.h (save_current_program_space)
8106         (save_current_space_and_thread): Delete declarations.
8107         (scoped_restore_current_program_space): New class.
8108         * remote.c (remote_btrace_maybe_reopen): Use
8109         scoped_restore_current_thread.
8110         * symtab.c: Include "progspace-and-thread.h".
8111         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8112         * thread.c (print_thread_info_1): Use
8113         scoped_restore_current_thread.
8114         (struct current_thread_cleanup): Delete.
8115         (do_restore_current_thread_cleanup)
8116         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8117         (scoped_restore_current_thread::~scoped_restore_current_thread):
8118         ... this new dtor.
8119         (make_cleanup_restore_current_thread): Rename/convert to ...
8120         (scoped_restore_current_thread::scoped_restore_current_thread):
8121         ... this new ctor.
8122         (thread_apply_all_command): Use scoped_restore_current_thread.
8123         (thread_apply_command): Use scoped_restore_current_thread.
8124         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8125         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8126
8127 2017-05-04  Pedro Alves  <palves@redhat.com>
8128
8129         * thread.c (make_cleanup_restore_current_thread): Move
8130         find_thread_ptid call before the is_stopped call.  Assert that the
8131         thread is found.  Replace is_stopped call by checking the thread's
8132         state directly.  Remove unnecessary NULL-thread check.
8133
8134 2017-05-04  Pedro Alves  <palves@redhat.com>
8135
8136         * corelow.c (thread_section_name): New class.
8137         (get_core_register_section, get_core_siginfo): Use it.
8138
8139 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8140
8141         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8142         (get_core_register_section): Remove xfree of NULL pointer.
8143
8144 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8145
8146         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8147         * regcache.c (regcache::raw_supply_zeroed): New function.
8148         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8149
8150 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8151
8152         * gdbarch.sh: Remove commented out definition of
8153         TARGET_CHAR_BIT.
8154         * gdbarch.h: Re-generate.
8155
8156 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8157
8158         * configure: Regenerate.
8159
8160 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8161
8162         * solib-target.c (solib_target_relocate_section_addresses):
8163         Remove num_section_bases, num_bases, segment_bases variables.
8164
8165 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8166
8167         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8168
8169 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8170
8171         * solib-target.c: Include <vector>
8172         (struct lm_info_target) <~lm_info_target>: Remove.
8173         <segment_bases, section_bases>: Change type to
8174         std::vector<CORE_ADDR>.
8175         (library_list_start_segment, library_list_start_section,
8176         library_list_end_library,
8177         solib_target_relocate_section_addresses): Adjust.
8178
8179 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8180
8181         * gdbarch.sh (software_single_step): Change return type to
8182         std::vector<CORE_ADDR>.
8183         * gdbarch.c, gdbarch.h: Re-generate.
8184         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8185         Adjust.
8186         (arm_deal_with_atomic_sequence_raw): Adjust.
8187         (thumb_get_next_pcs_raw): Adjust.
8188         (arm_get_next_pcs_raw): Adjust.
8189         (arm_get_next_pcs): Adjust.
8190         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8191         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8192         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8193         (alpha_software_single_step): Adjust.
8194         * alpha-tdep.h (alpha_software_single_step): Adjust.
8195         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8196         * arm-tdep.c (arm_software_single_step): Adjust.
8197         (arm_breakpoint_kind_from_current_state): Adjust.
8198         * arm-tdep.h (arm_software_single_step): Adjust.
8199         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8200         * cris-tdep.c (cris_software_single_step): Adjust.
8201         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8202         (micromips_deal_with_atomic_sequence): Adjust.
8203         (deal_with_atomic_sequence): Adjust.
8204         (mips_software_single_step): Adjust.
8205         * mips-tdep.h (mips_software_single_step): Adjust.
8206         * moxie-tdep.c (moxie_software_single_step): Adjust.
8207         * nios2-tdep.c (nios2_software_single_step): Adjust.
8208         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8209         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8210         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8211         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8212         * sparc-tdep.c (sparc_software_single_step): Adjust.
8213         * spu-tdep.c (spu_software_single_step): Adjust.
8214         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8215
8216 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8217
8218         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8219         * gdbarch.h: Re-generate.
8220
8221 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8222
8223         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8224         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8225         * python/py-instruction.c, python/py-instruction.h: New file.
8226         * python/py-record.c: Add py-instruction.h include.
8227         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8228         gdb.RecordInstruction.
8229         * python/python-internal.h: Add gdbpy_initialize_instruction
8230         declaration.
8231         * python/python.c (do_start_initialization): Add
8232         gdbpy_initialize_instruction.
8233
8234 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8235
8236         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8237         Remove.
8238         (btrace_func_from_recpy_func): New function.
8239         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8240         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8241         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8242         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8243         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8244         Also, use new helper functions.
8245         (btpy_list_item): Use new helper functions.
8246         (recpy_bt_function_call_history): Use new type name.
8247         (btpy_call_getset): Remove.
8248         (gdbpy_initialize_btrace): Remove code to initialize
8249         gdb.BtraceFunctionCall.
8250         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8251         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8252         recpy_bt_func_prev, recpy_bt_func_next): New export.
8253         * python/py-record.c (recpy_func_type): New static object.
8254         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8255         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8256         recpy_func_next): New function.
8257         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8258         (recpy_func_getset): New static object.
8259         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8260         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8261
8262 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8263
8264         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8265         (btpy_object, btpy_insn_type, btpy_new): Remove.
8266         (btpy_list_object): Use gdb.RecordInstruction type instead of
8267         gdb.BtraceInstruction type.
8268         (btrace_insn_from_recpy_insn): New function.
8269         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8270         btpy_new.
8271         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8272         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8273         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8274         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8275         instead of btpy_object.
8276         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8277         btpy_insn_data, btpy_insn_decode): Rename to ...
8278         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8279         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8280         recpy_bt_insn_decode): This.  Also, use new helper functions.
8281         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8282         recpy_insn_type.
8283         (btpy_insn_getset): Remove.
8284         (gdbpy_initialize_btrace): Remove code to initialize
8285         gdb.BtraceInstruction.  Use recpy_element_object.
8286         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8287         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8288         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8289         * python/py-record.c (recpy_insn_type): New static object.
8290         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8291         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8292         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8293         New function.
8294         (recpy_insn_getset): New static object.
8295         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8296         * python/py-record.h (recpy_element_object): New typedef.
8297         (recpy_insn_type, recpy_insn_new): New export.
8298
8299 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8300
8301         * py-record-btrace.c (btpy_insn_new): Removed.
8302         (btpy_insn_or_gap_new): New function.
8303         (btpy_insn_error): Removed.
8304         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8305         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8306         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8307         btpy_insn_or_gap_new instead of btpy_insn_new.
8308         (btpy_insn_getset): Remove btpy_insn_error.
8309         * py-record.c (recpy_gap_type): New static object.
8310         (recpy_gap_object): New typedef.
8311         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8312         recpy_gap_reason_string): New function.
8313         (recpy_gap_getset): New static object.
8314         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8315         * py-record.h (recpy_gap_new): New export.
8316
8317 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8318
8319         * python/py-record.c (recpy_ptid): Remove.
8320         (recpy_record_getset): Remove recpy_ptid.
8321
8322 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8323
8324         * btrace.c (btrace_fetch): Set inferior_ptid.
8325         * python/py-record-btrace.c: Add "py-record.h" include.
8326         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8327         recpy_bt_end, recpy_bt_instruction_history,
8328         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8329         in gdb.Record object instead of current ptid.
8330         * python/py-record.c: Include new "py-record.h" file.
8331         (recpy_record_object): Moved to py-record.h.
8332         * python/py-record.h: New file.
8333
8334 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8335
8336         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8337         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8338         indentation.
8339
8340 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8341
8342         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8343         the past maintainers section.
8344
8345 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8346
8347         * infcmd.c (get_return_value): Use regcache ctor, and remove
8348         cleanup.
8349
8350 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8351             Pedro Alves  <palves@redhat.com>
8352
8353         * regcache.c (regcache::regcache): New tag dispatch ctor.
8354         (do_cooked_read): Moved above.
8355         (regcache_dup): Use the tag dispatch ctor..
8356         * regcache.h (regcache): Declare ctor, delete copy ctor and
8357         assignment operator, remove friend regcache_dup.
8358
8359 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8360
8361         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8362         call method save instead of regcache_cpy.
8363         * regcache.h (struct regcache): Make regcache_dup a friend.
8364
8365 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8366
8367         * regcache.c (struct regcache): Move to regcache.h
8368         (regcache::arch): New method.
8369         (regcache_get_ptid): Update.
8370         (get_regcache_arch): Call arch method.
8371         (get_regcache_aspace): Call method aspace.
8372         (register_buffer): Change it to method.
8373         (regcache_save): Change it to regcache::save.
8374         (regcache_restore): Likewise.
8375         (regcache_cpy_no_passthrough): Remove the declaration.
8376         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8377         (regcache_cpy_no_passthrough): Change it to method
8378         cpy_no_passthrough.
8379         (regcache_register_status): Change it to method
8380         get_register_status.
8381         (regcache_invalidate): Change it to method invalidate.
8382         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8383         (regcache_raw_update): Change it to method raw_update.
8384         (regcache_raw_read): Likewise.
8385         (regcache_raw_read_signed): Likewise.
8386         (regcache_raw_read_unsigned): Likewise.
8387         (regcache_raw_write_signed): Likewise.
8388         (regcache_raw_write_unsigned): Likewise.
8389         (regcache_cooked_read): Likewise.
8390         (regcache_cooked_read_value): Likewise.
8391         (regcache_cooked_read_signed): Likewise.
8392         (regcache_cooked_read_unsigned): Likewise.
8393         (regcache_cooked_write_signed): Likewise.
8394         (regcache_cooked_write_unsigned): Likewise.
8395         (regcache_raw_set_cached_value): Likewise.
8396         (regcache_raw_write): Likewise.
8397         (regcache_cooked_write): Likewise.
8398         (regcache_xfer_part): Likewise.
8399         (regcache_raw_read_part): Likewise.
8400         (regcache_raw_write_part): Likewise.
8401         (regcache_cooked_read_part): Likewise.
8402         (regcache_cooked_write_part): Likewise.
8403         (regcache_raw_supply): Likewise.
8404         (regcache_raw_collect): Likewise.
8405         (regcache_transfer_regset): Likewise.
8406         (regcache_supply_regset): Likewise.
8407         (regcache_collect_regset): Likewise.
8408         (regcache_debug_print_register): Likewise.
8409         (enum regcache_dump_what): Move it to regcache.h.
8410         (regcache_dump): Change it to method dump.
8411         * regcache.h (enum regcache_dump_what): New.
8412         (class regcache): New.
8413         * target.c (target_fetch_registers): Call method
8414         debug_print_register.
8415         (target_store_registers): Likewise.
8416
8417 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8418
8419         * windows-nat.c (struct lm_info_windows): Initialize field.
8420         (windows_make_so): Allocate lm_info_windows with new.
8421         (windows_free_so): Free lm_info_windows with delete.
8422
8423 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8424
8425         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8426         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8427         cleanup.
8428         (darwin_free_so): Free lm_info_darwin with delete.
8429
8430 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8431
8432         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8433         <l_addr_p>: Change type to bool.
8434         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8435         (svr4_free_so): Free lm_info_svr4 with delete.
8436         (svr4_copy_library_list): Replace memcpy with call to copy
8437         constructor.
8438         (library_list_start_library, svr4_default_sos): Allocate
8439         lm_info_svr4 with new.
8440
8441 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * solib-target.c (struct lm_info_target): Add destructor,
8444         initialize fields.
8445         <name>: Change type to std::string.
8446         (library_list_start_library): Allocate lm_info_target with new.
8447         (solib_target_free_library_list): Free lm_info_target with
8448         delete.
8449         (solib_target_current_sos): Adapt to std::string.
8450         (solib_target_free_so): Free lm_info_target with delete.
8451
8452 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8453
8454         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8455         fields.
8456         (frv_current_sos): Allocate lm_info_frv with new.
8457         (frv_relocate_main_executable): Free lm_info_frv with delete,
8458         allocate with new.
8459         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8460
8461 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8462
8463         * solib-frv.c (struct lm_info_frv): Fix indentation.
8464
8465 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8466
8467         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8468         map field.
8469         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8470         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8471         and allocate with new.
8472         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8473
8474 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8475
8476         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8477         <filename, member_name>: Change type to std::string.
8478         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8479         (library_list_start_library): Allocate lm_info_aix with new.
8480         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8481         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8482         with copy constructor.
8483
8484 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8485
8486         * solist.h (struct lm_info): Remove.
8487         (struct lm_info_base): New class.
8488         (struct so_list) <lm_info>: Change type to lm_info_base *.
8489         * nto-tdep.c (struct lm_info): Remove.
8490         (lm_addr): Adjust.
8491         * solib-aix.c (struct lm_info): Rename to ...
8492         (struct lm_info_aix): ... this.  Extend lm_info_base.
8493         (lm_info_p): Rename to ...
8494         (lm_info_aix_p): ... this, and adjust.
8495         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8496         solib_aix_parse_libraries, library_list_start_library,
8497         solib_aix_free_library_list, solib_aix_parse_libraries,
8498         solib_aix_get_library_list,
8499         solib_aix_relocate_section_addresses, solib_aix_free_so,
8500         solib_aix_get_section_offsets,
8501         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8502         Adjust.
8503         (struct solib_aix_inferior_data) <library_list>: Adjust.
8504         * solib-darwin.c (struct lm_info): Rename to ...
8505         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8506         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8507         * solib-dsbt.c (struct lm_info): Rename to ...
8508         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8509         (struct dsbt_info) <main_executable_lm_info): Adjust.
8510         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8511         dsbt_relocate_section_addresses): Adjust.
8512         * solib-frv.c (struct lm_info): Rename to ...
8513         (struct lm_info_frv): ... this.  Extend lm_info_base.
8514         (main_executable_lm_info): Adjust.
8515         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8516         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8517         find_canonical_descriptor_in_load_object,
8518         frv_fdpic_find_canonical_descriptor): Adjust.
8519         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8520         to lm_info_svr4.
8521         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8522         svr4_clear_so, svr4_copy_library_list,
8523         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8524         svr4_current_sos, svr4_fetch_objfile_link_map,
8525         solist_update_incremental): Adjust.
8526         * solib-svr4.h (struct lm_info_svr4): Move here from
8527         solib-svr4.c.
8528         * solib-target.c (struct lm_info): Rename to ...
8529         (struct lm_info_target): ... this.  Extend lm_info_base.
8530         (lm_info_p): Rename to ...
8531         (lm_info_target_p): ... this.
8532         (solib_target_parse_libraries, library_list_start_segment,
8533         library_list_start_section, library_list_start_library,
8534         library_list_end_library, solib_target_free_library_list,
8535         solib_target_current_sos, solib_target_free_so,
8536         solib_target_relocate_section_addresses): Adjust.
8537         * windows-nat.c (struct lm_info): Rename to ...
8538         (struct lm_info_windows): ... this.  Extend lm_info_base.
8539         (windows_make_so, handle_load_dll, handle_unload_dll,
8540         windows_xfer_shared_libraries): Adjust.
8541
8542 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8543
8544         * solib-darwin.c (struct darwin_so_list): Remove.
8545         (darwin_current_sos): Allocate an so_list object instead of a
8546         darwin_so_list, separately allocate an lm_info object.
8547         (darwin_free_so): Free lm_info.
8548
8549 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8550
8551         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8552         with fprintf_filtered.
8553
8554 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8555
8556         * regcache.c (regcache::regcache): New function.
8557         (regcache::~regcache): New function.
8558         (regcache_xmalloc_1): Remove.
8559         (regcache_xmalloc): Call new regcache.
8560         (regcache_xfree): Call delete regcache.
8561         (get_thread_arch_aspace_regcache): Call new regcache.
8562
8563 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8564
8565         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8566         lwp instead of ptid_get_lwp.
8567
8568 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8569
8570         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8571         lwp_info instead of getting from inferior_ptid.
8572
8573 2017-04-27  Keith Seitz  <keiths@redhat.com>
8574
8575         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8576         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8577         (CV_CONVERSION_BADNESS): Define.
8578         (rank_one_type): Remove overly restrictive rvalue reference
8579         rank checks.
8580         Add cv-qualifier checks and subranks for type equality.
8581         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8582         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8583         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8584
8585 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8586
8587         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8588         count when creating the object.
8589
8590 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8591             Ulrich Weigand  <uweigand@de.ibm.com>
8592
8593         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8594         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8595         is used in AIX.
8596         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8597         (process_xcoff_symbol): Likewise.
8598         (scan_xcoff_symtab): Likewise.
8599
8600 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8601
8602         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8603         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8604         (ia64_access_reg): Use get_frame_register_unsigned.
8605         (ia64_access_rse_reg): Likewise.
8606         (ia64_libunwind_frame_prev_register): Likewise.
8607
8608 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8609
8610         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8611         * gdbarch.c: Regenerated.
8612         * gdbarch.h: Regenerated.
8613         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8614         visibility external.
8615         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8616         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8617         (enum cfa_how_kind): Move to ...
8618         (struct dwarf2_frame_state_reg_info): Likewise.
8619         (struct dwarf2_frame_state): Likewise.
8620         * dwarf2-frame.h: ... here.
8621         (dwarf2_frame_state_alloc_regs): New declaration.
8622         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8623         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8624
8625 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8626
8627         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8628         regcache_raw_read_unsigned.
8629         (xtensa_pseudo_register_write): Likewise.
8630
8631 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8632
8633         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8634         (nds32_pseudo_register_write): Likewise.
8635
8636 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8637
8638         * regcache.c (struct regcache) <readonly_p>: Change its type
8639         to bool.
8640         (regcache_xmalloc_1): Update parameter type and callers update.
8641
8642 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8643
8644         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8645         set_gdbarch_wchar_bit.
8646         * arm-tdep.c (arm_gdbarch_init): Likewise.
8647
8648 2017-04-25  Pedro Alves  <palves@redhat.com>
8649
8650         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8651         (BothAreRelocatable, memcopy, memmove): Don't define.
8652         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8653         macros.
8654
8655 2017-04-25  Pedro Alves  <palves@redhat.com>
8656
8657         * common/common-defs.h: Include "common/poison.h".
8658         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8659         and adjust.
8660         * common/poison.h: New file.
8661         * common/traits.h: Include <type_traits>.
8662         (Not, Or, Requires): New, moved from common/function-view.h.
8663
8664 2017-04-25  Pedro Alves  <palves@redhat.com>
8665
8666         * breakpoint.h (struct breakpoint): In-class initialize all
8667         fields.  Make boolean fields "bool".
8668         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8669         memset call and initializations no longer necessary.
8670
8671 2017-04-25  Pedro Alves  <palves@redhat.com>
8672
8673         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8674         reference.
8675         (pt_btrace_insn): New function.
8676         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8677
8678 2017-04-25  Pedro Alves  <palves@redhat.com>
8679
8680         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8681         "base" field and inherit from "bp_location" instead.  Add
8682         non-default ctor.
8683         (allocate_location_exception): Use new non-default ctor.
8684         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8685         (init_bp_location): Convert to ...
8686         (bp_location::bp_location): ... this new ctor, and remove memset
8687         call.
8688         (base_breakpoint_allocate_location): Use the new non-default ctor.
8689         * breakpoint.h (bp_location): Now a class.  Declare default and
8690         non-default ctors.  In-class initialize all members.
8691         (init_bp_location): Remove declaration.
8692
8693 2017-04-25  Pedro Alves  <palves@redhat.com>
8694
8695         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8696         assignment operator.
8697
8698 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8699
8700         * doublest.c (convert_doublest_to_floatformat): Call
8701         floatformat_totalsize_bytes.
8702
8703 2017-04-22  Tom Tromey  <tom@tromey.com>
8704
8705         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8706         ui_out_emit_list.
8707         * stack.c (print_frame): Use ui_out_emit_list.
8708         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8709         ui_out_emit_list.
8710         * mi/mi-main.c (print_one_inferior)
8711         (mi_cmd_data_list_register_names)
8712         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8713         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8714         ui_out_emit_list.
8715         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8716         (mi_output_solib_attribs): Use ui_out_emit_list,
8717         ui_out_emit_tuple.
8718         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8719         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8720         (mi_cmd_stack_list_args, list_args_or_locals): Use
8721         ui_out_emit_list.
8722         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8723         * breakpoint.c (print_solib_event, output_thread_groups): Use
8724         ui_out_emit_list.
8725
8726 2017-04-22  Tom Tromey  <tom@tromey.com>
8727
8728         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8729         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8730         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8731
8732 2017-04-22  Tom Tromey  <tom@tromey.com>
8733
8734         * tracepoint.c (tvariables_info_1)
8735         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8736
8737 2017-04-22  Tom Tromey  <tom@tromey.com>
8738
8739         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8740         annotate_arg_emitter.
8741         * breakpoint.c (print_mention_watchpoint)
8742         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8743         * annotate.h (struct annotate_arg_emitter): New.
8744
8745 2017-04-22  Tom Tromey  <tom@tromey.com>
8746
8747         * record-btrace.c (record_btrace_insn_history)
8748         (record_btrace_insn_history_range, record_btrace_call_history)
8749         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8750         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8751         ui_out_emit_tuple.
8752         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8753         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8754         * skip.c (skip_info): Use ui_out_emit_tuple.
8755         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8756         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8757         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8758         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8759         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8760         ui_out_emit_tuple.
8761         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8762         (output_register, mi_cmd_data_read_memory)
8763         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8764         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8765         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8766         Use ui_out_emit_tuple.
8767         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8768         ui_out_emit_tuple.
8769         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8770         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8771         * linux-thread-db.c (info_auto_load_libthread_db): Use
8772         ui_out_emit_tuple.
8773         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8774         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8775         * disasm.c (do_mixed_source_and_assembly_deprecated)
8776         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8777         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8778         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8779         * breakpoint.c (print_one_breakpoint_location)
8780         (print_one_breakpoint): Use ui_out_emit_tuple.
8781         * auto-load.c (print_script, info_auto_load_cmd): Use
8782         ui_out_emit_tuple.
8783         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8784
8785 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8786
8787         * thread.c (print_thread_info_1): Remove dead code.
8788
8789 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8790
8791         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8792         GDB_SELF_TEST.
8793         * arm-tdep.c (selftests::arm_record_test): Likewise.
8794
8795 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8796
8797         * regcache.c (regcache_restore): Remove argument 2.  Replace
8798         argument 3 with regcache.  Get register status from
8799         src->register_status and get register contents from
8800         register_buffer (src, regnum).
8801         (regcache_cpy): Update.
8802
8803 2017-04-19  Pedro Alves  <palves@redhat.com>
8804
8805         * gdbthread.h (thread): Add missing closing parenthesis in
8806         comment.
8807
8808 2017-04-19  Pedro Alves  <palves@redhat.com>
8809
8810         * common/refcounted-object.h: New file.
8811         * gdbthread.h: Include "common/refcounted-object.h".
8812         (thread_info): Inherit from refcounted_object and add comments.
8813         (thread_info::incref, thread_info::decref)
8814         (thread_info::m_refcount): Delete.
8815         (thread_info::deletable): Use the refcounted_object::refcount()
8816         method.
8817         * inferior.c (current_inferior_): Add comment.
8818         (set_current_inferior): Increment/decrement refcounts.
8819         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8820         not-deletable instead of comparing with the current inferior.
8821         (initialize_inferiors): Increment the initial inferior's refcount.
8822         * inferior.h (struct inferior): Forward declare.
8823         Include "common/refcounted-object.h".
8824         (current_inferior, set_current_inferior): Move declaration to
8825         before struct inferior's definition, and fix comment.
8826         (inferior): Inherit from refcounted_object.  Add comments.
8827         * thread.c (switch_to_thread_no_regs): Reference the thread's
8828         inferior pointer directly instead of doing a ptid lookup.
8829         (switch_to_no_thread): New function.
8830         (switch_to_thread(thread_info *)): New function, factored out
8831         from ...
8832         (switch_to_thread(ptid_t)): ... this.
8833         (restore_current_thread): Delete.
8834         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8835         fields, and add 'inf' field.
8836         (do_restore_current_thread_cleanup): Check whether old->inf is
8837         alive instead of looking up an inferior by ptid.  Use
8838         switch_to_thread and switch_to_no_thread.
8839         (restore_current_thread_cleanup_dtor): Use old->inf directly
8840         instead of lookup up an inferior by id.  Decref the inferior.
8841         Don't restore 'removable'.
8842         (make_cleanup_restore_current_thread): Same the inferior pointer
8843         in old, instead of the inferior number.  Incref the inferior.
8844         Don't save/clear 'removable'.
8845
8846 2017-04-19  Pedro Alves  <palves@redhat.com>
8847
8848         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8849         unittests/scoped_restore-selftests.c.
8850         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8851         * common/scoped_restore.h (scoped_restore_base): Make "class".
8852         (scoped_restore_base::release): New public method.
8853         (scoped_restore_base::scoped_restore_base): New protected ctor.
8854         (scoped_restore_base::m_saved_var): New protected field.
8855         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8856         scoped_restore_base base class instead of m_saved_var directly.
8857         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8858         (scoped_restore_tmpl::scoped_restore_tmpl(const
8859         scoped_restore_tmpl<T>&)): Likewise.
8860         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8861         method.
8862         (scoped_restore_tmpl::saved_var): New method.
8863         (scoped_restore_tmpl::m_saved_var): Delete.
8864         * inferior.h (inferior::detaching): Now a bool.
8865         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8866         cleanup.
8867         * unittests/scoped_restore-selftests.c: New file.
8868
8869 2017-04-19  Pedro Alves  <palves@redhat.com>
8870
8871         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8872         Re-sort in alphabetic order.
8873
8874 2017-04-18  Pedro Alves  <palves@redhat.com>
8875
8876         * xml-support.c (obstack_xml_printf): Delete.
8877         * xml-support.h (obstack_xml_printf): Delete.
8878
8879 2017-04-18  Pedro Alves  <palves@redhat.com>
8880
8881         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8882         vdebug, verror, body_text, start_element, end_element, name,
8883         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8884         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8885         is_xinclude>: Make private and add m_ prefix.
8886         (gdb_xml_parser::body_text): New method, based on ...
8887         (gdb_xml_body_text): ... this.  Adjust.
8888         (gdb_xml_parser::vdebug): New method, based on ...
8889         (gdb_xml_debug): ... this.  Adjust.
8890         (gdb_xml_parser::verror): New method, based on ...
8891         (gdb_xml_error): ... this.  Adjust.
8892         (gdb_xml_parser::start_element): New method, based on ...
8893         (gdb_xml_start_element): ... this.  Adjust.
8894         (gdb_xml_start_element_wrapper): Defer to
8895         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8896         (gdb_xml_parser::end_element): New method, based on ...
8897         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8898         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8899         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8900         (gdb_xml_parser::use_dtd): New method, based on ...
8901         (gdb_xml_use_dtd): ... this.  Adjust.
8902         (gdb_xml_parser::parse): New method, based on ...
8903         (gdb_xml_parse): ... this.  Adjust.
8904         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8905         (xinclude_start_include): Adjust to call the parser's name method.
8906         (xml_xinclude_default, xml_xinclude_start_doctype)
8907         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8908         method.
8909         (xml_process_xincludes): Adjust to call parser methods.
8910         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8911         declarations.
8912
8913 2017-04-18  Pedro Alves  <palves@redhat.com>
8914
8915         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8916         gdb::optional<std::string>.
8917         * xml-support.c: Include <string>.
8918         (scope_level::scope_level(scope_level &&))
8919         (scope_level::~scope_level): Delete.
8920         (scope_level::body): Now a std::string.
8921         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8922         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8923         parameter.
8924         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8925         (xinclude_parsing_data::output): Now a std::string reference.
8926         (xinclude_start_include): Adjust.
8927         (xml_xinclude_default): Adjust.
8928         (xml_process_xincludes): Add 'output' parameter, and return bool.
8929         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8930         and return bool.
8931         * xml-tdesc.c: Include <unordered_map> and <string>.
8932         (tdesc_xml_cache): Delete.
8933         (tdesc_xml_cache_s): Delete.
8934         (xml_cache): Now an std::unordered_map.
8935         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8936         (target_fetch_description_xml): Change return type to
8937         gdb::optional<std::string>, and adjust.
8938         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8939         (target_fetch_description_xml): Change return type to
8940         gdb::optional<std::string>.
8941
8942 2017-04-18  Pedro Alves  <palves@redhat.com>
8943
8944         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8945         unittests/optional-selftests.c.
8946         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8947         * unittests/optional-selftests.c: New file.
8948         * unittests/optional/assignment/1.cc: New file.
8949         * unittests/optional/assignment/2.cc: New file.
8950         * unittests/optional/assignment/3.cc: New file.
8951         * unittests/optional/assignment/4.cc: New file.
8952         * unittests/optional/assignment/5.cc: New file.
8953         * unittests/optional/assignment/6.cc: New file.
8954         * unittests/optional/assignment/7.cc: New file.
8955         * unittests/optional/cons/copy.cc: New file.
8956         * unittests/optional/cons/default.cc: New file.
8957         * unittests/optional/cons/move.cc: New file.
8958         * unittests/optional/cons/value.cc: New file.
8959         * unittests/optional/in_place.cc: New file.
8960         * unittests/optional/observers/1.cc: New file.
8961         * unittests/optional/observers/2.cc: New file.
8962
8963 2017-04-18  Pedro Alves  <palves@redhat.com>
8964
8965         * common/gdb_optional.h: Include common/traits.h.
8966         (in_place_t): New type.
8967         (in_place): New constexpr variable.
8968         (optional::optional): Remove member initialization of
8969         m_instantiated.
8970         (optional::optional(in_place_t...)): New constructor.
8971         (optional::~optional): Use reset.
8972         (optional::optional(const optional&)): New.
8973         (optional::optional(const optional&&)): New.
8974         (optional::optional(T &)): New.
8975         (optional::optional(T &&)): New.
8976         (operator::operator=(const optional &)): New.
8977         (operator::operator=(optional &&)): New.
8978         (operator::operator= (const T &))
8979         (operator::operator= (T &&))
8980         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8981         (operator::reset): New.
8982         (operator::m_instantiated):: Add in-class initializer.
8983         * common/traits.h: Include <type_traits>.
8984         (struct And): New types.
8985
8986 2017-04-18  Pedro Alves  <palves@redhat.com>
8987
8988         * xml-support.c: Include <vector>.
8989         (scope_level::scope_level(const gdb_xml_element *))
8990         (scope_level::scope_level(scope_level&&)): New.
8991         (scope_level::~scope_level): New.
8992         (scope_level_s): Delete.
8993         (gdb_xml_parser::scopes): Now a std::vector.
8994         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8995         Use std::vector.
8996         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8997         scope cleanup code.
8998         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8999         of the scopes member.  Use std::vector::emplace_back.
9000
9001 2017-04-18  Pedro Alves  <palves@redhat.com>
9002
9003         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9004         a bool.
9005         (gdb_xml_end_element): Change type of first parameter.
9006         (gdb_xml_cleanup): Rename to ...
9007         (gdb_xml_parser::~gdb_xml_parser): ... this.
9008         (gdb_xml_create_parser_and_cleanup): Delete with ...
9009         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9010         to this new ctor.
9011         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9012         using gdb_xml_create_parser_and_cleanup.
9013         (xinclude_parsing_data): Add ctor/dtor.
9014         (xml_xinclude_cleanup): Delete.
9015         (xml_process_xincludes): Create a local xinclude_parsing_data
9016         instead of heap-allocating one.  Create a local gdb_xml_parser
9017         instead of heap-allocating one with
9018         gdb_xml_create_parser_and_cleanup.
9019
9020 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9021
9022         PR threads/20743
9023         * fbsd-nat.c (resume_one_thread_cb): Remove.
9024         (resume_all_threads_cb): Remove.
9025         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9026         iterate_over_threads.
9027
9028 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9029
9030         * NEWS: Create a new section for the next release branch.
9031         Rename the section of the current branch, now that it has
9032         been cut.
9033
9034 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9035
9036         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9037         * version.in: Bump version to 8.0.50.DATE-git.
9038
9039 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9040
9041         PR gdb/21385
9042         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9043         independently of the host, and fix build breakage on Cygwin.
9044
9045 2017-04-13  Pedro Alves  <palves@redhat.com>
9046
9047         * inferior.c (free_inferior): Convert to ...
9048         (inferior::~inferior): ... this dtor.
9049         (inferior::inferior): New ctor, factored out from ...
9050         (add_inferior_silent): ... here.  Allocate the inferior with a new
9051         expression.
9052         (delete_inferior): Call delete instead of free_inferior.
9053         * inferior.h (gdb_environ, continuation): Forward declare.
9054         (inferior): Now a class.  Add in-class initialization to all
9055         members.  Make boolean fields bool, except 'detaching'.
9056         (inferior::inferior): New explicit ctor.
9057         (inferior::~inferior): New.
9058
9059 2017-04-13  Pedro Alves  <palves@redhat.com>
9060
9061         * inferior.c (init_inferior_list): Delete.
9062         * inferior.h (init_inferior_list): Delete.
9063
9064 2017-04-13  Pedro Alves  <palves@redhat.com>
9065
9066         PR threads/13217
9067         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9068         (top level): Call it twice, with different thread sets.
9069
9070 2017-04-13  Pedro Alves  <palves@redhat.com>
9071
9072         * thread.c: Include <algorithm>.
9073         (thread_array_cleanup): Delete.
9074         (scoped_inc_dec_ref): New class.
9075         (live_threads_count): New function.
9076         (set_thread_refcount): Delete.
9077         (tp_array_compar_ascending): Now a bool.
9078         (tp_array_compar): Convert to a std::sort comparison function.
9079         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9080         and live_threads_count.
9081
9082 2017-04-13  Pedro Alves  <palves@redhat.com>
9083
9084         * infrun.c (follow_fork_inferior): Also switch the current
9085         inferior.
9086
9087 2017-04-13  Pedro Alves  <palves@redhat.com>
9088
9089         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9090         before calling create_internal_breakpoint.
9091
9092 2017-04-13  Pedro Alves  <palves@redhat.com>
9093
9094         * fork-child.c (execv_argv): New class.
9095         (breakup_args): Refactored as ...
9096         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9097         Copy arguments to storage and replace separators with NULL
9098         terminators in place.
9099         (escape_bang_in_quoted_argument): Adjust to return bool.
9100         (execv_argv::execv_argv): New ctor.
9101         (execv_argv::init_for_shell): New method, factored out from
9102         fork_inferior.  Don't strdup strings into the vector.
9103         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9104         Remove free_vector_argv call.
9105
9106 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9107
9108         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9109         tdep->rx_psw_type.
9110
9111 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9112
9113         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9114         * rx-tdep.c (rx_gdbarch_init): Likewise.
9115
9116 2017-04-13  Pedro Alves  <palves@redhat.com>
9117
9118         * breakpoint.h (struct breakpoint): Reindent.
9119
9120 2017-04-13  Pedro Alves  <palves@redhat.com>
9121
9122         * breakpoint.c (bp_location): Rename to ...
9123         (bp_locations): ... this.  All references updated.
9124         (bp_location_count): Rename to ...
9125         (bp_locations_count): ... this.  All references updated.
9126         (bp_location_placed_address_before_address_max): Rename to ...
9127         (bp_locations_placed_address_before_address_max): ... this.  All
9128         references updated.
9129         (bp_location_shadow_len_after_address_max): Rename to ...
9130         (bp_locations_shadow_len_after_address_max): ... this.  All
9131         references updated.
9132         (bp_location_compare_addrs): Rename to ...
9133         (bp_locations_compare_addrs): ... this.  All references updated.
9134         (bp_location_compare):Rename to ...
9135         (bp_locations_compare): ... this.  All references updated.
9136         (bp_location_target_extensions_update): Rename to ...
9137         (bp_locations_target_extensions_update): ... this.  All references
9138         updated.
9139
9140 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9141
9142         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9143         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9144         'sgtty.h'.
9145         * common/gdb_termios.h: New file, with parts of "terminal.h".
9146         * inflow.c: Include "gdb_termios.h".
9147         * ser-unix.c: Include "gdb_termios.h".
9148         * terminal.h: Move terminal-related defines to
9149         "common/gdb_termios.h".
9150
9151 2017-04-12  Tom Tromey  <tom@tromey.com>
9152
9153         * probe.c (parse_probes): Update.
9154         * location.h (delete_event_location): Don't declare.
9155         (event_location_deleter::operator()): Update.
9156         * location.c (event_location_deleter::operator()): Rename from
9157         delete_event_location.
9158         * linespec.h (linespec_result) <location>: Change type to
9159         event_location_up.
9160         * linespec.c (canonicalize_linespec, event_location_to_sals)
9161         (decode_objc): Update.
9162         (linespec_result): Don't call delete_event_location.
9163         * breakpoint.c (create_breakpoints_sal)
9164         (bkpt_probe_create_sals_from_location)
9165         (strace_marker_create_sals_from_location): Update.
9166
9167 2017-04-12  Tom Tromey  <tom@tromey.com>
9168
9169         * linespec.h (struct linespec_result): Add constructor and
9170         destructor.
9171         (init_linespec_result, destroy_linespec_result)
9172         (make_cleanup_destroy_linespec_result): Don't declare.
9173         * linespec.c (init_linespec_result): Remove.
9174         (linespec_result::~linespec_result): Rename from
9175         destroy_linespec_result.  Update.
9176         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9177         Remove.
9178         * breakpoint.c (create_breakpoint, break_range_command)
9179         (decode_location_default): Update.
9180         * ax-gdb.c (agent_command_1): Update.
9181
9182 2017-04-12  Tom Tromey  <tom@tromey.com>
9183
9184         * remote.c (remote_download_tracepoint): Update.
9185         * python/py-breakpoint.c (bppy_get_location): Update.
9186         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9187         (gdbscm_breakpoint_location): Update.
9188         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9189         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9190         Change type to event_location_up.
9191         * breakpoint.c (create_overlay_event_breakpoint)
9192         (create_longjmp_master_breakpoint)
9193         (create_std_terminate_master_breakpoint)
9194         (create_exception_master_breakpoint)
9195         (breakpoint_event_location_empty_p, print_breakpoint_location)
9196         (print_one_breakpoint_location, create_thread_event_breakpoint)
9197         (init_breakpoint_sal, create_breakpoint)
9198         (print_recreate_ranged_breakpoint, break_range_command)
9199         (init_ada_exception_breakpoint, say_where): Update.
9200         (base_breakpoint_dtor): Don't call delete_event_location.
9201         (bkpt_print_recreate, tracepoint_print_recreate)
9202         (dprintf_print_recreate, update_static_tracepoint)
9203         (breakpoint_re_set_default): Update.
9204
9205 2017-04-12  Tom Tromey  <tom@tromey.com>
9206
9207         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9208         type of "to_do".  Update.
9209         (compute_stack_depth): Use std::vector.
9210
9211 2017-04-12  Tom Tromey  <tom@tromey.com>
9212
9213         * printcmd.c (find_instruction_backward): Use std::vector.
9214
9215 2017-04-12  Tom Tromey  <tom@tromey.com>
9216
9217         * symfile.c (objfilep): Remove typedef.
9218         (reread_symbols): Use a std::vector.
9219
9220 2017-04-12  Tom Tromey  <tom@tromey.com>
9221
9222         * mi/mi-main.c (exec_direction_forward): Remove.
9223         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9224         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9225         scoped_restore.
9226         * guile/guile.c (guile_repl_command, guile_command)
9227         (gdbscm_execute_gdb_command): Use scoped_restore.
9228         * go-exp.y (go_parse): Use scoped_restore.
9229         * d-exp.y (d_parse): Use scoped_restore.
9230         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9231         * c-exp.y (c_parse): Use scoped_restore.
9232
9233 2017-04-12  Tom Tromey  <tom@tromey.com>
9234
9235         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9236         (mi_parse): Update return type.
9237         (mi_parse_free): Remove.
9238         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9239         (mi_parse::~mi_parse): Rename from mi_parse_free.
9240         (mi_parse_cleanup): Remove.
9241         (mi_parse): Return a unique_ptr.  Use new.
9242         * mi/mi-main.c (mi_execute_command): Update.
9243
9244 2017-04-12  Tom Tromey  <tom@tromey.com>
9245
9246         * location.c (explicit_location_lex_one): Return a
9247         unique_xmalloc_ptr.
9248         (string_to_explicit_location): Update.  Remove cleanups.
9249
9250 2017-04-12  Tom Tromey  <tom@tromey.com>
9251
9252         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9253         (compare_value_and_voffset): Change type.  Update.
9254         (compute_vtable_size): Change type of "offset_vec".
9255         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9256         (gnuv3_get_typeid): Remove extraneous declaration.
9257
9258 2017-04-12  Tom Tromey  <tom@tromey.com>
9259
9260         * charset.h (wchar_iterator): Fix comment.
9261
9262 2017-04-12  Tom Tromey  <tom@tromey.com>
9263
9264         * charset.c (iconv_wrapper): New class.
9265         (cleanup_iconv): Remove.
9266         (convert_between_encodings): Use it.
9267
9268 2017-04-12  Tom Tromey  <tom@tromey.com>
9269
9270         * symfile.h (increment_reading_symtab): Update type.
9271         * symfile.c (decrement_reading_symtab): Remove.
9272         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9273         * psymtab.c (psymtab_to_symtab): Update.
9274         * dwarf2read.c (dw2_instantiate_symtab): Update.
9275
9276 2017-04-12  Tom Tromey  <tom@tromey.com>
9277
9278         * jit.c (struct jit_reader): Declare separately.  Add constructor
9279         and destructor.  Change type of "handle".
9280         (loaded_jit_reader): Define separately.
9281         (jit_reader_load): Update.  New "new".
9282         (jit_reader_unload_command): Use "delete".
9283         * gdb-dlfcn.h (struct dlclose_deleter): New.
9284         (gdb_dlhandle_up): New typedef.
9285         (gdb_dlopen, gdb_dlsym): Update types.
9286         (gdb_dlclose): Remove.
9287         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9288         (gdb_dlsym): Change type of "handle".
9289         (make_cleanup_dlclose): Remove.
9290         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9291         * compile/compile-c-support.c (load_libcc): Update.
9292
9293 2017-04-12  Tom Tromey  <tom@tromey.com>
9294
9295         * symtab.h (find_pcs_for_symtab_line): Change return type.
9296         * symtab.c (find_pcs_for_symtab_line): Change return type.
9297         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9298         type of "vec".  Update.
9299         (ltpy_get_pcs_for_line): Update.
9300         * linespec.c (decode_digits_ordinary): Update.
9301
9302 2017-04-12  Tom Tromey  <tom@tromey.com>
9303
9304         * tracepoint.c (actions_command): Update.
9305         * python/python.c (python_command, python_interactive_command):
9306         Update.
9307         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9308         * guile/guile.c (guile_command): Update.
9309         * defs.h (read_command_lines, read_command_lines_1): Return
9310         command_line_up.
9311         (command_lines_deleter): New struct.
9312         (command_line_up): New typedef.
9313         * compile/compile.c (compile_code_command)
9314         (compile_print_command): Update.
9315         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9316         command_line_up.
9317         (make_cleanup_free_command_lines): Remove.
9318         * cli/cli-script.c (get_command_line, read_command_lines_1)
9319         (copy_command_lines): Return command_line_up.
9320         (while_command, if_command, read_command_lines, define_command)
9321         (document_command): Update.
9322         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9323         Remove.
9324         * breakpoint.h (breakpoint_set_commands): Change type of
9325         "commands".
9326         * breakpoint.c (breakpoint_set_commands): Change type of
9327         "commands".  Update.
9328         (do_map_commands_command, update_dprintf_command_list)
9329         (create_tracepoint_from_upload): Update.
9330
9331 2017-04-12  Tom Tromey  <tom@tromey.com>
9332
9333         * tracepoint.c (scope_info): Update.
9334         * spu-tdep.c (spu_catch_start): Update.
9335         * python/python.c (gdbpy_decode_line): Update.
9336         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9337         * python/py-breakpoint.c (bppy_init): Update.
9338         * probe.c (parse_probes): Update.
9339         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9340         * location.h (event_location_deleter): New struct.
9341         (event_location_up): New typedef.
9342         (new_linespec_location, new_address_location, new_probe_location)
9343         (new_explicit_location, copy_event_location)
9344         (string_to_event_location, string_to_event_location_basic)
9345         (string_to_explicit_location): Update return type.
9346         (make_cleanup_delete_event_location): Remove.
9347         * location.c (new_linespec_location, new_address_location)
9348         (new_probe_location, new_explicit_location, copy_event_location):
9349         Return event_location_up.
9350         (delete_event_location_cleanup)
9351         (make_cleanup_delete_event_location): Remove.
9352         (string_to_explicit_location, string_to_event_location_basic)
9353         (string_to_event_location): Return event_location_up.
9354         * linespec.c (canonicalize_linespec, event_location_to_sals)
9355         (decode_line_with_current_source)
9356         (decode_line_with_last_displayed, decode_objc): Update.
9357         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9358         * completer.c (location_completer): Update.
9359         * cli/cli-cmds.c (edit_command, list_command): Update.
9360         * breakpoint.c (create_overlay_event_breakpoint)
9361         (create_longjmp_master_breakpoint)
9362         (create_std_terminate_master_breakpoint)
9363         (create_exception_master_breakpoint)
9364         (create_thread_event_breakpoint): Update.
9365         (init_breakpoint_sal): Update.  Remove some dead code.
9366         (create_breakpoint_sal): Change type of "location".  Update.
9367         (create_breakpoints_sal, create_breakpoint, break_command_1)
9368         (dprintf_command, break_range_command, until_break_command)
9369         (init_ada_exception_breakpoint)
9370         (strace_marker_create_sals_from_location)
9371         (update_static_tracepoint, trace_command, ftrace_command)
9372         (strace_command, create_tracepoint_from_upload): Update.
9373         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9374         * ax-gdb.c (agent_command_1): Update.
9375
9376 2017-04-12  Pedro Alves  <palves@redhat.com>
9377
9378         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9379         * configure.tgt: Handle i[34567]86-*-go32* and
9380         i[34567]86-*-msdosdjgpp*.
9381         * i386-tdep.c (i386_svr4_reg_to_regnum):
9382         Make extern.
9383         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9384         i386-go32-tdep.c.
9385         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9386         * i386-go32-tdep.c: New file.
9387         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9388         declarations.
9389
9390 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9391
9392         * aix-thread.c (pd_status2str): Change return type to const char *.
9393
9394 2017-04-12  Pedro Alves  <palves@redhat.com>
9395
9396         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9397         calls to set_gdbarch_gnu_triplet_regexp.
9398
9399 2017-04-12  Pedro Alves  <palves@redhat.com>
9400
9401         PR gdb/21323
9402         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9403         New enum value.
9404         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9405         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9406         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9407         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9408         * gdbarch.h, gdbarch.c: Regenerate.
9409         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9410         gdbarch_wchar_bit and gdbarch_wchar_signed.
9411         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9412         * arm-tdep.c (arm_gdbarch_init): Likewise.
9413         * avr-tdep.c (avr_gdbarch_init): Likewise.
9414         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9415         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9416         * i386-tdep.c (i386_go32_init_abi): Likewise.
9417         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9418         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9419         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9420         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9421         * sh-tdep.c (sh_gdbarch_init): Likewise.
9422         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9423         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9424         * windows-tdep.c (windows_init_abi): Likewise.
9425         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9426
9427 2017-04-12  Pedro Alves  <palves@redhat.com>
9428
9429         PR c++/21323
9430         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9431         cplus_primitive_type_char32_t>: New enum values.
9432         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9433         and cplus_primitive_type_char32_t.
9434         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9435         32, use the archtecture's built-in type for char16_t and char32_t,
9436         respectively.  Otherwise, fallback to init_integer_type as before,
9437         but make the type unsigned, and issue a complaint.
9438         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9439
9440 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9441
9442         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9443         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9444
9445 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9446
9447         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9448         'const char *'.
9449
9450 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9451
9452         * common/common-utils.c (free_vector_argv): New function.
9453         * common/common-utils.h: Include <vector>.
9454         (free_vector_argv): New prototype.
9455         * darwin-nat.c (darwin_create_inferior): Rewrite function
9456         prototype in order to constify "exec_file" and accept a
9457         "std::string" for "allargs".
9458         * fork-child.c: Include <vector>.
9459         (breakup_args): Rewrite function, using C++.
9460         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9461         and accept "std::string" for "allargs".  Update the code to
9462         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9463         and "execvp".
9464         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9465         order to constify "exec_file" and accept a "std::string" for
9466         "allargs".
9467         * go32-nat.c (go32_create_inferior): Likewise.
9468         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9469         * infcmd.c (run_command_1): Constify "exec_file".  Use
9470         "std::string" for inferior arguments.
9471         * inferior.h (fork_inferior): Update prototype.
9472         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9473         prototype in order to constify "exec_file" and accept a
9474         "std::string" for "allargs".
9475         * nto-procfs.c (procfs_create_inferior): Likewise.
9476         * procfs.c (procfs_create_inferior): Likewise.
9477         * remote-sim.c (gdbsim_create_inferior): Likewise.
9478         * remote.c (extended_remote_run): Update code to accept
9479         "std::string" as argument.
9480         (extended_remote_create_inferior): Rewrite function prototype in
9481         order to constify "exec_file" and accept a "std::string" for
9482         "allargs".
9483         * rs6000-nat.c (super_create_inferior): Likewise.
9484         (rs6000_create_inferior): Likewise.
9485         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9486         * windows-nat.c (windows_create_inferior): Likewise.
9487
9488 2017-04-11  Pedro Alves  <palves@redhat.com>
9489
9490         * thread.c: Fix whitespace throughout.
9491
9492 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9493
9494         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9495
9496 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9497
9498         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9499
9500 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9501
9502         PR gdb/21364
9503         * osdata.c (info_osdata): Check if 'type' is an empty string
9504         instead of NULL.
9505
9506 2017-04-10  Pedro Alves  <palves@redhat.com>
9507
9508         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9509         (ptid_to_global_thread_id, in_thread_list)
9510         (do_captured_list_thread_ids, set_resumed, set_running)
9511         (set_executing, set_stop_requested, finish_thread_state)
9512         (validate_registers_access, can_access_registers_ptid)
9513         (print_thread_info_1, switch_to_thread)
9514         (do_restore_current_thread_cleanup)
9515         (make_cleanup_restore_current_thread, thread_command)
9516         (thread_name_command): Use operator== instead of ptid_equal.
9517
9518 2017-04-10  Pedro Alves  <palves@redhat.com>
9519
9520         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9521         (current_thread_cleanup_chain): Delete.
9522         (restore_current_thread_cleanup_dtor)
9523         (make_cleanup_restore_current_thread): Remove references to
9524         current_thread_cleanup_chain.
9525
9526 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9527
9528         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9529         REG_UNKNOWN.
9530
9531 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9532
9533         PR gdb/19942
9534         * gdbthread.h (thread_info::deletable): New method.
9535         (thread_info::incref): New method.
9536         (thread_info::decref): New method.
9537         (thread_info::refcount): Move it to private.
9538         * infrun.c (save_stop_context): Call inc_refcount.
9539         (release_stop_context_cleanup): Likewise.
9540         * thread.c (set_thread_exited): New function.
9541         (init_thread_list): Delete "tp" only it is deletable, otherwise
9542         call set_thread_exited.
9543         (delete_thread_1): Call set_thread_exited.
9544         (current_thread_cleanup) <inferior_pid>: Remove.
9545         <thread>: New field.
9546         (restore_current_thread_ptid_changed): Removed.
9547         (do_restore_current_thread_cleanup): Adjust.
9548         (restore_current_thread_cleanup_dtor): Don't call
9549         find_thread_ptid.
9550         (set_thread_refcount): Use dec_refcount.
9551         (make_cleanup_restore_current_thread): Adjust.
9552         (thread_apply_all_command): Call inc_refcount.
9553         (_initialize_thread): Don't call
9554         observer_attach_thread_ptid_changed.
9555
9556 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9557
9558         * thread.c (delete_thread_1): Hoist code on marking thread as
9559         exited.
9560
9561 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9562
9563         * windows-nat.c (windows_detach): Initialize ptid with
9564         minus_one_ptid.
9565
9566 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9567
9568         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9569
9570 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9571
9572         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9573         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9574         (bfin_pseudo_register_write): Likewise
9575
9576 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9577
9578         * common/ptid.h (struct ptid): Change to...
9579         (class ptid_t): ... this.
9580         <ptid_t>: New constructors.
9581         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9582         matches>: New methods.
9583         <make_null, make_minus_one>: New static methods.
9584         <pid>: Rename to...
9585         <m_pid>: ...this.
9586         <lwp>: Rename to...
9587         <m_lwp>: ...this.
9588         <tid>: Rename to...
9589         <m_tid>: ...this.
9590         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9591         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9592         as references, move comment to class ptid_t.
9593         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9594         ptid_t static methods.
9595         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9596         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9597         Take ptid arguments as references, implement using ptid_t methods.
9598         * unittests/ptid-selftests.c: New file.
9599         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9600         unittests/ptid-selftests.c.
9601         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9602
9603 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9604
9605         * python/python.c (python_run_simple_file): Cast mode literal to
9606         non-const char pointer as expected by PyFile_FromString.
9607
9608 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9609
9610         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9611         minus_one_ptid and null_ptid.
9612
9613 2017-04-05  Pedro Alves  <palves@redhat.com>
9614
9615         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9616         * configure: Regenerate.
9617
9618 2017-04-05  Pedro Alves  <palves@redhat.com>
9619
9620         * ada-exp.y (yyerror): Constify.
9621         * ada-lang.c (bound_name, get_selections)
9622         (ada_variant_discrim_type)
9623         (ada_variant_discrim_name, ada_value_struct_elt)
9624         (ada_lookup_struct_elt_type, is_unchecked_variant)
9625         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9626         (catch_ada_exception_command_split)
9627         (catch_ada_assert_command_split, catch_assert_command)
9628         (ada_op_name): Constify.
9629         * ada-lang.h (ada_yyerror, get_selections)
9630         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9631         * arc-tdep.c (arc_print_frame_cache): Constify.
9632         * arm-tdep.c (arm_skip_stub): Constify.
9633         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9634         (gen_aggregate_elt_ref): Constify.
9635         * bcache.c (print_bcache_statistics): Constify.
9636         * bcache.h (print_bcache_statistics): Constify.
9637         * break-catch-throw.c (catch_exception_command_1):
9638         * breakpoint.c (struct ep_type_description::description):
9639         Constify.
9640         (add_solib_catchpoint): Constify.
9641         (catch_fork_command_1): Add cast.
9642         (add_catch_command): Constify.
9643         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9644         Constify.
9645         * bsd-uthread.c (bsd_uthread_state): Constify.
9646         * buildsym.c (patch_subfile_names): Constify.
9647         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9648         Constify.
9649         * c-exp.y (yyerror): Constify.
9650         (token::oper): Constify.
9651         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9652         * c-varobj.c (cplus_describe_child): Constify.
9653         * charset.c (find_charset_names): Add cast.
9654         (find_charset_names): Constify array and add const_cast.
9655         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9656         (edit_command): Constify.
9657         * cli/cli-decode.c (lookup_cmd): Constify.
9658         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9659         Constify.
9660         (struct dump_context): Constify.
9661         (add_dump_command, restore_command): Constify.
9662         * cli/cli-script.c (get_command_line): Constify.
9663         * cli/cli-script.h (get_command_line): Constify.
9664         * cli/cli-utils.c (check_for_argument): Constify.
9665         * cli/cli-utils.h (check_for_argument): Constify.
9666         * coff-pe-read.c (struct read_pe_section_data): Constify.
9667         * command.h (lookup_cmd): Constify.
9668         * common/print-utils.c (decimal2str): Constify.
9669         * completer.c (gdb_print_filename): Constify.
9670         * corefile.c (set_gnutarget): Constify.
9671         * cp-name-parser.y (yyerror): Constify.
9672         * cp-valprint.c (cp_print_class_member): Constify.
9673         * cris-tdep.c (cris_register_name, crisv32_register_name):
9674         Constify.
9675         * d-exp.y (yyerror): Constify.
9676         (struct token::oper): Constify.
9677         * d-lang.h (d_yyerror): Constify.
9678         * dbxread.c (struct header_file_location::name): Constify.
9679         (add_old_header_file, add_new_header_file, last_function_name)
9680         (dbx_next_symbol_text, add_bincl_to_list)
9681         (find_corresponding_bincl_psymtab, set_namestring)
9682         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9683         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9684         * defs.h (command_line_input, print_address_symbolic)
9685         (deprecated_readline_begin_hook): Constify.
9686         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9687         Constify.
9688         * event-top.c (handle_line_of_input): Constify and add cast.
9689         * exceptions.c (catch_errors): Constify.
9690         * exceptions.h (catch_errors): Constify.
9691         * expprint.c (print_subexp_standard, op_string, op_name)
9692         (op_name_standard, dump_raw_expression, dump_raw_expression):
9693         * expression.h (op_name, op_string, dump_raw_expression):
9694         Constify.
9695         * f-exp.y (yyerror): Constify.
9696         (struct token::oper): Constify.
9697         (struct f77_boolean_val::name): Constify.
9698         * f-lang.c (f_word_break_characters): Constify.
9699         * f-lang.h (f_yyerror): Constify.
9700         * fork-child.c (fork_inferior): Add cast.
9701         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9702         (new_variant): Constify.
9703         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9704         * gdbarch.c: Regenerate.
9705         * gdbcore.h (set_gnutarget): Constify.
9706         * go-exp.y (yyerror): Constify.
9707         (token::oper): Constify.
9708         * go-lang.h (go_yyerror): Constify.
9709         * go32-nat.c (go32_sysinfo): Constify.
9710         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9711         * guile/scm-cmd.c (cmdscm_function): Constify.
9712         * guile/scm-param.c (pascm_param_value): Constify.
9713         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9714         (h8300sx_register_name): Constify.
9715         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9716         Constify.
9717         * ia64-tdep.c (ia64_register_names): Constify.
9718         * infcmd.c (construct_inferior_arguments): Constify.
9719         (path_command, attach_post_wait): Constify.
9720         * language.c (show_range_command, show_case_command)
9721         (unk_lang_error): Constify.
9722         * language.h (language_defn::la_error)
9723         (language_defn::la_name_of_this): Constify.
9724         * linespec.c (decode_line_2): Constify.
9725         * linux-thread-db.c (thread_db_err_str): Constify.
9726         * lm32-tdep.c (lm32_register_name): Constify.
9727         * m2-exp.y (yyerror): Constify.
9728         * m2-lang.h (m2_yyerror): Constify.
9729         * m32r-tdep.c (m32r_register_names): Constify and make static.
9730         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9731         * m88k-tdep.c (m88k_register_name): Constify.
9732         * macroexp.c (appendmem): Constify.
9733         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9734         (upgrade_type, parse_external, parse_partial_symbols)
9735         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9736         (new_symbol): Constify.
9737         * memattr.c (mem_info_command): Constify.
9738         * mep-tdep.c (register_name_from_keyword): Constify.
9739         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9740         Constify.
9741         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9742         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9743         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9744         cast.
9745         (mi_execute_async_cli_command): Constify.
9746         * mips-tdep.c (mips_register_name): Constify.
9747         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9748         (am33_register_name, am33_2_register_name)
9749         * moxie-tdep.c (moxie_register_names): Constify.
9750         * nat/linux-osdata.c (osdata_type): Constify fields.
9751         * nto-tdep.c (nto_parse_redirection): Constify.
9752         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9753         (lookup_child_selector): Constify.
9754         (objc_methcall::name): Constify.
9755         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9756         (lookup_struct_typedef): Constify.
9757         * objfiles.c (pc_in_section): Constify.
9758         * objfiles.h (pc_in_section): Constify.
9759         * p-exp.y (struct token::oper): Constify.
9760         (yyerror): Constify.
9761         * p-lang.h (pascal_yyerror): Constify.
9762         * parser-defs.h (op_name_standard): Constify.
9763         (op_print::string): Constify.
9764         (exp_descriptor::op_name): Constify.
9765         * printcmd.c (print_address_symbolic): Constify.
9766         * psymtab.c (print_partial_symbols): Constify.
9767         * python/py-breakpoint.c (stop_func): Constify.
9768         (bppy_get_expression): Constify.
9769         * python/py-cmd.c (cmdpy_completer::name): Constify.
9770         (cmdpy_function): Constify.
9771         * python/py-event.c (evpy_add_attribute)
9772         (gdbpy_initialize_event_generic): Constify.
9773         * python/py-event.h (evpy_add_attribute)
9774         (gdbpy_initialize_event_generic): Constify.
9775         * python/py-evts.c (add_new_registry): Constify.
9776         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9777         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9778         * python/py-inferior.c (get_buffer): Add cast.
9779         * python/py-param.c (parm_constant::name): Constify.
9780         * python/py-unwind.c (fprint_frame_id): Constify.
9781         * python/python.c (gdbpy_parameter_value): Constify.
9782         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9783         * remote.c (memory_packet_config::name): Constify.
9784         (show_packet_config_cmd, remote_write_bytes)
9785         (remote_buffer_add_string):
9786         * reverse.c (exec_reverse_once): Constify.
9787         * rs6000-tdep.c (variant::name, variant::description): Constify.
9788         * rust-exp.y (rustyyerror): Constify.
9789         * rust-lang.c (rust_op_name): Constify.
9790         * rust-lang.h (rustyyerror): Constify.
9791         * serial.h (serial_ops::name): Constify.
9792         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9793         (sh_sh3e_register_name, sh_sh2e_register_name)
9794         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9795         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9796         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9797         (sh_sh4al_dsp_register_name): Constify.
9798         * sh64-tdep.c (sh64_register_name): Constify.
9799         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9800         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9801         * stabsread.c (patch_block_stabs, read_type_number)
9802         (ref_map::stabs, ref_add, process_reference)
9803         (symbol_reference_defined, define_symbol, define_symbol)
9804         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9805         (read_one_struct_field, read_struct_fields, read_baseclasses)
9806         (read_tilde_fields, read_struct_type, read_array_type)
9807         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9808         (read_huge_number, read_range_type, read_args, common_block_start)
9809         (find_name_end): Constify.
9810         * stabsread.h (common_block_start, define_symbol)
9811         (process_one_symbol, symbol_reference_defined, ref_add):
9812         * symfile.c (get_section_index, add_symbol_file_command):
9813         * symfile.h (get_section_index): Constify.
9814         * target-descriptions.c (tdesc_type::name): Constify.
9815         (tdesc_free_type): Add cast.
9816         * target.c (find_default_run_target):
9817         (add_deprecated_target_alias, find_default_run_target)
9818         (target_announce_detach): Constify.
9819         (do_option): Constify.
9820         * target.h (add_deprecated_target_alias): Constify.
9821         * thread.c (print_thread_info_1): Constify.
9822         * top.c (deprecated_readline_begin_hook, command_line_input):
9823         Constify.
9824         (init_main): Add casts.
9825         * top.h (handle_line_of_input): Constify.
9826         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9827         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9828         (tfind_command): Rename to ...
9829         (tfind_command_1): ... this and constify.
9830         (tfind_command): New function.
9831         (tfind_end_command, tfind_start_command): Adjust.
9832         (encode_source_string): Constify.
9833         * tracepoint.h (encode_source_string): Constify.
9834         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9835         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9836         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9837         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9838         * tui/tui-win.c (parse_scrolling_args): Constify.
9839         * tui/tui-windata.c (tui_erase_data_content): Constify.
9840         * tui/tui-windata.h (tui_erase_data_content): Constify.
9841         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9842         * tui/tui.c (tui_enable): Add cast.
9843         * utils.c (defaulted_query): Constify.
9844         (init_page_info): Add cast.
9845         (puts_debug, subset_compare): Constify.
9846         * utils.h (subset_compare): Constify.
9847         * varobj.c (varobj_format_string): Constify.
9848         * varobj.h (varobj_format_string): Constify.
9849         * vax-tdep.c (vax_register_name): Constify.
9850         * windows-nat.c (windows_detach): Constify.
9851         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9852         * xml-support.c (gdb_xml_end_element): Constify.
9853         * xml-tdesc.c (tdesc_start_reg): Constify.
9854         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9855         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9856         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9857
9858 2017-04-05  Pedro Alves  <palves@redhat.com>
9859
9860         * proc-api.c (struct trans): Constify.
9861         (procfs_note): Constify.
9862         * proc-events.c (struct trans, syscall_table):
9863         * proc-flags.c (struct trans): Constify.
9864         * proc-utils.h (procfs_note): Constify.
9865         * proc-why.c (struct trans): Constify.
9866         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9867         (procfs_detach): Constify.
9868         * sol-thread.c (struct string_map): Constify.
9869         (td_err_string, td_state_string): Constify.
9870
9871 2017-04-05  Pedro Alves  <palves@redhat.com>
9872
9873         * proc-api.c (procfs_filename): Don't initialize
9874         procfs_filename.
9875         (prepare_to_trace): Assume procfs_filename is non-NULL.
9876         (_initialize_proc_api): Give procfs_filename a default value here.
9877
9878 2017-04-05  Pedro Alves  <palves@redhat.com>
9879
9880         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9881         'cond_string' parameter.
9882         (extract_exception_regexp): Constify 'string' parameter.
9883         (catch_exception_command_1): Constify.
9884         * breakpoint.c (init_catchpoint)
9885         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9886         parameter.
9887         (ep_parse_optional_if_clause, catch_fork_command_1)
9888         (catch_exec_command_1): Constify.
9889         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9890         parameter.
9891         (ep_parse_optional_if_clause): Constify.
9892         * cli/cli-utils.c (remove_trailing_whitespace)
9893         (check_for_argument): Constify.
9894         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9895         non-const overload.
9896         (check_for_argument): Likewise.
9897
9898 2017-04-05  Pedro Alves  <palves@redhat.com>
9899
9900         * event-top.c (command_line_handler): Add cast to execute_command
9901         call.
9902         * record-btrace.c (cmd_record_btrace_bts_start)
9903         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9904         (cmd_record_btrace_start): Add cast to execute_command call.
9905         * record-full.c (record_full_goto_insn):
9906         * record.c (record_start, record_stop): Add cast to
9907         execute_command_to_string calls.
9908         (cmd_record_start): Add cast to execute_command calls.
9909
9910 2017-04-05  Pedro Alves  <palves@redhat.com>
9911
9912         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9913         static inline function.
9914         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9915         array and use gdb_PyArg_ParseTupleAndKeywords.
9916         * python/py-cmd.c (cmdpy_init): Likewise.
9917         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9918         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9919         (infpy_search_memory): Likewise.
9920         * python/py-objfile.c (objfpy_add_separate_debug_file)
9921         (gdbpy_lookup_objfile): Likewise.
9922         * python/py-symbol.c (gdbpy_lookup_symbol)
9923         (gdbpy_lookup_global_symbol): Likewise.
9924         * python/py-type.c (gdbpy_lookup_type): Likewise.
9925         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9926         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9927         Likewise.
9928
9929 2017-04-05  Pedro Alves  <palves@redhat.com>
9930
9931         * python/python-internal.h (gdb_PyGetSetDef): New type.
9932         * python/py-block.c (block_object_getset)
9933         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9934         * python/py-event.c (event_object_getset)
9935         (finish_breakpoint_object_getset): Likewise.
9936         * python/py-inferior.c (inferior_object_getset): Likewise.
9937         * python/py-infthread.c (thread_object_getset): Likewise.
9938         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9939         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9940         * python/py-objfile.c (objfile_getset): Likewise.
9941         * python/py-progspace.c (pspace_getset): Likewise.
9942         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9943         Likewise.
9944         * python/py-record.c (recpy_record_getset): Likewise.
9945         * python/py-symbol.c (symbol_object_getset): Likewise.
9946         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9947         Likewise.
9948         * python/py-type.c (type_object_getset, field_object_getset):
9949         Likewise.
9950         * python/py-value.c (value_object_getset): Likewise.
9951
9952 2017-04-05  Pedro Alves  <palves@redhat.com>
9953
9954         * python/python-internal.h (gdb_PyObject_CallMethod)
9955         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9956         New functions.
9957         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9958         (PySys_GetObject, PySys_SetPath): New macros.
9959
9960 2017-04-05  Pedro Alves  <palves@redhat.com>
9961
9962         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9963         info_osdata_command.
9964         * osdata.c (info_osdata_command): Rename to ...
9965         (info_osdata): ... this.  Constify 'type' parameter, and remove
9966         the 'from_tty' parameter.  Accept NULL TYPE.
9967         (info_osdata_command): New function.
9968         * osdata.h (info_osdata_command): Remove declaration.
9969         (info_osdata): New declaration.
9970
9971 2017-04-05  Pedro Alves  <palves@redhat.com>
9972
9973         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9974         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9975         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9976         parameter.
9977         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9978         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9979         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9980         parameter.
9981         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9982         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9983         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9984         (mi_cmd_file_list_exec_source_files)
9985         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9986         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9987         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9988         parameter.
9989         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9990         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9991         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9992         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9993         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9994         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9995         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9996         'command' parameter.
9997         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9998         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9999         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10000         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10001         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10002         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10003         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10004         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10005         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10006         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10007         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10008         parameter.
10009         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10010         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10011         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10012         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10013         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10014         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10015         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10016         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10017         (mi_cmd_data_list_changed_registers)
10018         (mi_cmd_data_write_register_values)
10019         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10020         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10021         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10022         (mi_cmd_list_features, mi_cmd_list_target_features)
10023         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10024         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10025         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10026         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10027         (mi_cmd_trace_frame_collected): Constify 'command'
10028         parameter.
10029         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10030         'command' parameter.
10031
10032 2017-04-05  Pedro Alves  <palves@redhat.com>
10033
10034         * ada-lang.c (ada_completer_word_break_characters): Now a const
10035         array.
10036         (ada_get_gdb_completer_word_break_characters): Constify.
10037         * completer.c (gdb_completer_command_word_break_characters)
10038         (gdb_completer_file_name_break_characters)
10039         (gdb_completer_quote_characters): Now const arrays.
10040         (get_gdb_completer_quote_characters): Constify.
10041         (set_rl_completer_word_break_characters): New function.
10042         (set_gdb_completion_word_break_characters)
10043         (complete_line_internal): Use it.
10044         * completer.h (get_gdb_completer_quote_characters): Constify.
10045         (set_rl_completer_word_break_characters): Declare.
10046         * f-lang.c (f_word_break_characters): Constify.
10047         * language.c (default_word_break_characters): Constify.
10048         * language.h (language_defn::la_word_break_characters): Constify.
10049         (default_word_break_characters): Constify.
10050         * top.c (init_main): Use set_rl_completer_word_break_characters.
10051
10052 2017-04-05  Pedro Alves  <palves@redhat.com>
10053
10054         * aix-thread.c (aix_thread_pid_to_str)
10055         (aix_thread_extra_thread_info): Constify.
10056         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10057         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10058         (bsd_uthread_pid_to_str): Constify.
10059         * corelow.c (core_pid_to_str): Constify.
10060         * darwin-nat.c (darwin_pid_to_str): Constify.
10061         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10062         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10063         Constify.
10064         * gnu-nat.c (gnu_pid_to_str): Constify.
10065         * go32-nat.c (go32_pid_to_str): Constify.
10066         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10067         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10068         * inferior.c (inferior_pid_to_str): Constify.
10069         * linux-nat.c (linux_nat_pid_to_str): Constify.
10070         * linux-tdep.c (linux_core_pid_to_str): Constify.
10071         * linux-thread-db.c (thread_db_pid_to_str)
10072         (thread_db_extra_thread_info): Constify.
10073         * nto-tdep.c (nto_extra_thread_info): Constify.
10074         * nto-tdep.h (nto_extra_thread_info): Constify.
10075         * obsd-nat.c (obsd_pid_to_str): Constify.
10076         * procfs.c (procfs_pid_to_str): Constify.
10077         * ravenscar-thread.c (ravenscar_extra_thread_info)
10078         (ravenscar_pid_to_str): Constify.
10079         * remote-sim.c (gdbsim_pid_to_str): Constify.
10080         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10081         Constify.
10082         * sol-thread.c (solaris_pid_to_str): Constify.
10083         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10084         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10085         * target.c (default_pid_to_str, target_pid_to_str)
10086         (normal_pid_to_str, default_pid_to_str): Constify.
10087         * target.h (target_ops::to_pid_to_str)
10088         (target_ops::to_extra_thread_info): Constify.
10089         (target_pid_to_str, normal_pid_to_str): Constify.
10090         * windows-nat.c (windows_pid_to_str): Constify.
10091         * gdbarch.sh (core_pid_to_str): Constify.
10092         * target-delegates.c: Regenerate.
10093         * gdbarch.h, gdbarch.c: Regenerate.
10094
10095 2017-04-05  Pedro Alves  <palves@redhat.com>
10096
10097         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10098         the memory of the temporary warning_pre_print override.
10099         * utils.c (warning_pre_print): Constify.
10100         * utils.h (warning_pre_print): Constify.
10101
10102 2017-04-05  Pedro Alves  <palves@redhat.com>
10103
10104         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10105         (shell_command): New function.
10106         (make_command): Use std::string.
10107         (init_cli_cmds): Register shell_command instead of shell_escape.
10108
10109 2017-04-05  Pedro Alves  <palves@redhat.com>
10110
10111         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10112         * tracepoint.c (default_collect): Don't initialize.
10113
10114 2017-04-05  Pedro Alves  <palves@redhat.com>
10115
10116         * macroexp.c (macro_buffer::shared): Now a bool.
10117         (init_buffer): Update.
10118         (init_shared_buffer): Constify 'addr' parameter.
10119         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10120         casts.
10121
10122 2017-04-05  Pedro Alves  <palves@redhat.com>
10123
10124         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10125         * disasm.c (set_disassembler_options): Constify local.
10126         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10127
10128 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10129
10130         PR gdb/21352
10131         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10132         option.
10133
10134 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10135
10136         * frame.c (frame_unwind_register_unsigned): Call
10137         frame_unwind_register_value.
10138
10139 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10140
10141         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10142         Use gdb_test_multiple, and don't match anchor.
10143
10144 2017-04-05  Pedro Alves  <palves@redhat.com>
10145
10146         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10147         (Write After Approval): Remove Simon Marchi.
10148
10149 2017-04-05  Pedro Alves  <palves@redhat.com>
10150
10151         * common/gdb_optional.h (optional::optional): Make constexpr and
10152         initialize m_dummy.
10153
10154 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10155
10156         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10157         (amd64fbsd_jmp_buf_reg_offset): Remove.
10158         (amd64fbsd_supply_uthread): Remove function.
10159         (amd64fbsd_collect_uthread): Remove function.
10160         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10161         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10162         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10163         (fbsd-nat.c): Update comment.
10164         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10165         (i386fbsd_jmp_buf_reg_offset): Remove.
10166         (i386fbsd_supply_uthread): Remove function.
10167         (i386fbsd_collect_uthread): Remove function.
10168         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10169
10170 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10171
10172         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10173         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10174         * NEWS: Mention that support for FreeBSD/alpha was removed.
10175         * alpha-fbsd-tdep.c: Delete file.
10176         * config/alpha/fbsd.mh: Delete file.
10177         * configure.host: Delete alpha*-*-freebsd* and
10178         alpha*-*-kfreebsd*-gnu.
10179         * configure.tgt: Delete alpha*-*-freebsd* and
10180         alpha*-*-kfreebsd*-gnu.
10181
10182 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10183
10184         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10185         amd64bsd_store_inferior_registers): Use ptid from regcache.
10186
10187 2017-04-04  Pedro Alves  <palves@redhat.com>
10188
10189         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10190         data fields, make them private and add "m_" prefixes.
10191         (lnp_state_machine::lnp_state_machine): New ctor.
10192         (record_line, check_line_address, handle_set_discriminator)
10193         (handle_set_address, handle_advance_pc, handle_special_opcode)
10194         (handle_advance_line, handle_set_file, handle_negate_stmt)
10195         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10196         (end_sequence, advance_line): New methods.
10197         (m_gdbarch, m_record_lines_p): New fields.
10198         (lnp_reader_state): Delete.
10199         (dwarf_record_line): Rename to ...
10200         (lnp_state_machine::record_line): ... adjust.
10201         (init_lnp_state_machine): Delete.
10202         (lnp_state_machine::lnp_state_machine): New.
10203         (check_line_address): Rename to ...
10204         (lnp_state_machine::check_line_address): This.
10205         (dwarf_decode_lines_1): Remove reference to "reader_state".
10206         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10207         State machine internal state manipulation moved to
10208         lnp_state_machine methods.
10209
10210 2017-04-04  Pedro Alves  <palves@redhat.com>
10211
10212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10213         unittests/offset-type-selftests.c.
10214         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10215         * common/offset-type.h: New file.
10216         * common/preprocessor.h: New file.
10217         * common/traits.h: New file.
10218         * common/valid-expr.h: New file.
10219         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10220         sect_offset and cu_offset strong typedefs throughout.
10221         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10222         typedefs throughout.
10223         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10224         sect_offset and cu_offset strong typedefs throughout.
10225         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10226         typedefs throughout.
10227         * gdbtypes.h: Include "common/offset-type.h".
10228         (cu_offset): Now an offset type (strong typedef) instead of a
10229         struct.
10230         (sect_offset): Likewise.
10231         (union call_site_parameter_u): Rename "param_offset" field to
10232         "param_cu_off".
10233         * unittests/offset-type-selftests.c: New file.
10234
10235 2017-04-04  Pedro Alves  <palves@redhat.com>
10236
10237         * common/underlying.h: New file.
10238         * dwarf2read.c: Include "common/gdb_optional.h" and
10239         "common/underlying.h".
10240         (dir_index, file_name_index): New types.
10241         (file_entry): Use them.
10242         (file_entry::include): Use to_underlying.
10243         (line_header::add_file_name): Use dir_index.
10244         (read_formatted_entries): Use gdb::optional.  Read form before
10245         writting to file_entry.
10246         (dwarf_decode_line_header): Use dir_index.
10247         (lnp_state_machine::current_file): Use to_underlying.
10248         (lnp_state_machine::file): Change type to file_name_index.
10249         (dwarf_record_line): Use to_underlying.
10250         (init_lnp_state_machine): Use file_name_index.
10251         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10252
10253 2017-04-04  Pedro Alves  <palves@redhat.com>
10254
10255         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10256         operator bool, has_value and get methods.
10257
10258 2017-04-04  Pedro Alves  <palves@redhat.com>
10259
10260         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10261         fields.
10262         (line_header): Initialize all data fields.  Change type of
10263         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10264         Change type of include_dirs to std::vector<const char *>.  Remove
10265         num_include_dirs, include_dirs_size.  Change type of file_names to
10266         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10267         (line_header::line_header): New.
10268         (line_header::add_include_dir, line_header::add_file_name): New
10269         methods.
10270         (line_header::include_dir_at): Remove NULL check.
10271         (line_header::file_name_at): Add const overload.
10272         (line_header_up): New unique_ptr typedef.
10273         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10274         std::vector.  Remove free_line_header call.
10275         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10276         free_line_header call.
10277         (free_cu_line_header): Delete.
10278         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10279         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10280         Adjust to use std::vector.
10281         (free_line_header): Delete.
10282         (free_line_header_voidp): Use delete.
10283         (add_include_dir): Replace with ...
10284         (line_header::add_include_dir): ... this method.  Use std::vector.
10285         (add_file_name): Replace with ...
10286         (line_header::add_file_name): ... this method.  Use std::vector.
10287         (add_include_dir_stub): Delete.
10288         (read_formatted_entries): Remove memset.
10289         (dwarf_decode_line_header): Return a line_header_up instead of a
10290         raw pointer.  Remove cleanup handling.  Pass lambdas to
10291         read_formatted_entries.  Adjust to use line_header methods.
10292         (dwarf_decode_lines_1): Adjust to use line_header methods.
10293         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10294         use std::vector.
10295
10296 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10297
10298         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10299         instead of struct ptid.
10300
10301 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10302
10303         * frame.c (get_frame_register_bytes): Unwind using value.
10304         (put_frame_register_bytes): Likewise.
10305
10306 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10307
10308         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10309         aggregate-like.
10310
10311 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10312
10313         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10314
10315 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10316
10317         * gdbthread.h (struct thread_info): Declare constructor and
10318         destructor.  Add some in-class member initializers.
10319         * thread.c (free_thread): Remove.
10320         (init_thread_list): Call delete instead of free_thread.
10321         (new_thread): Call thread_info constructor.
10322         (thread_info::thread_info): New function.
10323         (thread_info::~thread_info): New function.
10324         (delete_thread_1): Call delete instead of free_thread.
10325         (make_cleanup_restore_current_thread): Move tp and frame to
10326         inner block.
10327
10328 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10329
10330         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10331         (arc_skip_prologue): Likewise.
10332         (arc_make_frame_cache): Likewise.
10333         (arc_pv_get_operand): New function.
10334         (arc_is_in_prologue): Likewise.
10335         (arc_analyze_prologue): Likewise.
10336         (arc_print_frame_cache): Likewise.
10337         (MAX_PROLOGUE_LENGTH): New constant.
10338
10339 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10340
10341         * configure.tgt: Add arc-insn.o.
10342         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10343         (dump_arc_instruction_command): New function.
10344         (arc_fprintf_disasm): Likewise.
10345         (arc_disassemble_info): Likewise.
10346         (arc_insn_get_operand_value): Likewise.
10347         (arc_insn_get_operand_value_signed): Likewise.
10348         (arc_insn_get_memory_base_reg): Likewise.
10349         (arc_insn_get_memory_offset): Likewise.
10350         (arc_insn_get_branch_target): Likewise.
10351         (arc_insn_dump): Likewise.
10352         (arc_insn_get_linear_next_pc): Likewise.
10353         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10354         (arc_disassemble_info): Likewise.
10355         (arc_insn_get_branch_target): Likewise.
10356         (arc_insn_get_linear_next_pc): Likewise.
10357         * NEWS: Mention new "maint print arc arc-instruction".
10358
10359 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10360
10361         * arc-tdep (maintenance_print_arc_list): New variable.
10362         (maintenance_print_arc_command): New function.
10363
10364 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10365
10366         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10367         Add "limm" and "reserved".
10368         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10369         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10370         * arc-tdep.h (arc_regnum): Likewise.
10371
10372 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10373
10374         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10375         for THREADPTR register.
10376         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10377         register.
10378         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10379         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10380         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10381
10382 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10383
10384         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10385         registers above gdbarch_num_regs (gdbarch) as privileged in
10386         call0 ABI.
10387
10388 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10389
10390         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10391         for a single specified register or for all registers in
10392         a0_base..a0_base + C0_NREGS range.
10393         (supply_gregset_reg): Call regcache_raw_supply for a single
10394         specified register or for all registers in a0_base..a0_base +
10395         C0_NREGS range.
10396
10397 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10398
10399         * arch/xtensa.h (C0_NREGS): Add definition.
10400         * xtensa-tdep.c (C0_NREGS): Remove definition.
10401
10402 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10403
10404         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10405         Drop xtensa_default_isa initialization.
10406         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10407
10408 2017-03-27  Pedro Alves  <palves@redhat.com>
10409
10410         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10411         (file_entry::include_dir): New method.
10412         (line_header::include_dir_at, line_header::file_name_at): New
10413         methods.
10414         (setup_type_unit_groups, setup_type_unit_groups)
10415         (psymtab_include_file_name): Simplify using the new methods.
10416         (lnp_state_machine) <the_line_header>: New field.
10417         <file>: Add comment.
10418         (lnp_state_machine::current_file): New method.
10419         (dwarf_record_line): Simplify using the new methods.
10420         (init_lnp_state_machine): Initialize the "the_line_header" field.
10421         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10422         Simplify using the new methods.
10423
10424 2017-03-27  Pedro Alves  <palves@redhat.com>
10425
10426         * cp-name-parser.y (make_empty): Delete.
10427         (demangler_special, nested_name, ptr_operator, array_indicator)
10428         (direct_declarator, declarator_1): Use fill_comp instead of
10429         make_empty.
10430
10431 2017-03-27  Pedro Alves  <palves@redhat.com>
10432
10433         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10434         to ATTRIBUTE_PRINTF.
10435         * solib-target.c (library_list_start_list): Print "string" not
10436         "version".
10437         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10438         gdb_xml_error call.
10439
10440 2017-03-27  Pedro Alves  <palves@redhat.com>
10441
10442         * dwarf2read.c (struct file_and_directory): New.
10443         (dwarf2_get_dwz_file): Adjust to use std::string.
10444         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10445         (find_file_and_directory): Adjust to return a file_and_directory
10446         object.
10447         (read_file_scope): Adjust to use file_and_directory.  Remove
10448         make_cleanup/do_cleanups calls.
10449         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10450         make_cleanup/do_cleanups calls.
10451         * python/python.c (do_start_initialization): Adjust to ldirname
10452         returning a std::string.
10453         * utils.c (ldirname): Now returns a std::string.
10454         * utils.h (ldirname): Change return type to std::string.
10455         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10456         returning a std::string.
10457         * xml-tdesc.c (file_read_description_xml): Likewise.
10458
10459 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10460
10461         * regcache.c (regcache_debug_print_register): New function.
10462         * regcache.h (regcache_debug_print_register): New declaration.
10463         * target.c (debug_print_register): Remove.
10464         (target_fetch_registers): Call regcache_debug_print_register.
10465         (target_store_registers): Likewise.
10466
10467 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10468
10469         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10470         reference beyond the 'lh->include_dirs' array before accessing to
10471         it.
10472         (psymtab_include_file_name): Likewise.
10473         (dwarf_decode_lines_1): Likewise.
10474         (dwarf_decode_lines): Likewise.
10475         (file_file_name): Likewise.
10476
10477 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10478
10479         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10480         inferior_ptid.
10481         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10482         ps_lsetfpregs): Likewise.
10483         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10484         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10485         ps_lsetfpregs): Likewise.
10486         * target.c (target_fetch_registers, target_store_registers):
10487         Remove asserts.
10488
10489 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10490
10491         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10492
10493 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10494
10495         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10496         (_initialize_aarch64_tdep): Register it.
10497         (aarch64_record_load_store): Handle PRFM instruction.
10498         (aarch64_process_record_test): New function.
10499
10500 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10501
10502         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10503         indentation.
10504
10505 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10506
10507         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10508
10509 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10510
10511         python/python.c (do_start_initialization): Fix memory leak.
10512
10513 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10514
10515         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10516         using get_ptrace_pid.
10517         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10518         inferior_ptid.
10519         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10520         inferior_ptid instead of pid.
10521
10522 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10523
10524         * aarch64-tdep.c: Wrap locally used classes in anonymous
10525         namespace.
10526         * arm-tdep.c: Likewise.
10527         * linespec.c: Likewise.
10528         * ui-out.c: Likewise.
10529
10530 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10531
10532         PR gdb/19637
10533         * python/lib/gdb/printer/bound_registers.py: Import sys.
10534
10535 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10536
10537         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10538         windows_thread_info parameter and use it instead of
10539         current_thread.
10540         (windows_fetch_inferior_registers): Don't set current_thread,
10541         pass the thread to do_windows_fetch_inferior_registers.  Use
10542         ptid from regcache instead of inferior_ptid.
10543         (do_windows_store_inferior_registers): Add windows_thread_info
10544         parameter and use it instead of current_thread.
10545         (windows_store_inferior_registers): Don't set current_thread,
10546         pass the thread to do_windows_store_inferior_registers.  Use
10547         ptid from regcache instead of inferior_ptid.
10548
10549 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10550
10551         * ser-mingw.c (ser_windows_raw): Remove reference to
10552         struct serial::current_timeout.
10553
10554 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10555
10556         PR tdep/20928
10557         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10558         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10559         (sparc64_fsr_type): Fix %fsr decoding.
10560
10561 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10562
10563         * python/py-record-btrace.c (btpy_insn_data): Change return type
10564         for Python 2.
10565
10566 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10567
10568         * spu-linux-nat.c (spu_fetch_inferior_registers,
10569         spu_store_inferior_registers): Use ptid from regcache, set and
10570         restore inferior_ptid.
10571         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10572         Likewise.
10573
10574 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10575
10576         * i386-linux-nat.c (fetch_register, store_register,
10577         i386_linux_fetch_inferior_registers,
10578         i386_linux_store_inferior_registers): Use ptid from regcache.
10579         * ia64-linux-nat.c (ia64_linux_fetch_register,
10580         ia64_linux_store_register): Likewise.
10581         * inf-ptrace.c (inf_ptrace_fetch_register,
10582         inf_ptrace_store_register): Likewise.
10583         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10584         m32r_linux_store_inferior_registers): Likewise.
10585         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10586         m68kbsd_store_inferior_registers): Likewise.
10587         * m68k-linux-nat.c (fetch_register, store_register,
10588         m68k_linux_fetch_inferior_registers,
10589         m68k_linux_store_inferior_registers): Likewise.
10590         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10591         m88kbsd_store_inferior_registers): Likewise.
10592         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10593         mips_fbsd_store_inferior_registers): Likewise.
10594         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10595         mips64_linux_regsets_store_registers): Likewise.
10596         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10597         mipsnbsd_store_inferior_registers): Likewise.
10598         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10599         mips64obsd_store_inferior_registers): Likewise.
10600         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10601         Likewise.
10602         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10603         ppcfbsd_store_inferior_registers): Likewise.
10604         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10605         ppc_linux_store_inferior_registers): Likewise.
10606         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10607         ppcnbsd_store_inferior_registers): Likewise.
10608         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10609         ppcobsd_store_registers): Likewise.
10610         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10611         Likewise.
10612         * ravenscar-thread.c (ravenscar_fetch_registers,
10613         ravenscar_store_registers, ravenscar_prepare_to_store):
10614         Likewise.
10615         * record-btrace.c (record_btrace_fetch_registers,
10616         record_btrace_store_registers, record_btrace_prepare_to_store):
10617         Likewise.
10618         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10619         Lookup inferior using ptid from regcache, instead of
10620         current_inferior.
10621         * remote.c (remote_fetch_registers, remote_store_registers): Use
10622         ptid from regcache.
10623         * rs6000-nat.c (fetch_register, store_register): Likewise.
10624         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10625         s390_linux_store_inferior_registers): Likewise.
10626         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10627         shnbsd_store_inferior_registers): Likewise.
10628         * sol-thread.c (sol_thread_fetch_registers,
10629         sol_thread_store_registers): Likewise.
10630         * sparc-nat.c (sparc_fetch_inferior_registers,
10631         sparc_store_inferior_registers): Likewise.
10632         * tilegx-linux-nat.c (fetch_inferior_registers,
10633         store_inferior_registers): Likewise.
10634         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10635         vaxbsd_store_inferior_registers): Likewise.
10636         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10637         store_xtregs): Likewise.
10638
10639 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10640
10641         PR gdb/14441
10642         * NEWS: Mention support for rvalue references in GDB and python.
10643         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10644         supports both lvalue and rvalue references.
10645
10646 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10647
10648         PR gdb/14441
10649         * gdbtypes.c (rank_one_type): Implement overloading
10650         resolution rules regarding rvalue references.
10651
10652 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10653
10654         PR gdb/14441
10655         * aarch64-tdep.c (aarch64_type_align)
10656         (aarch64_extract_return_value, aarch64_store_return_value): Change
10657         lvalue reference type checks to general reference type checks.
10658         * amd64-tdep.c (amd64_classify): Likewise.
10659         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10660         Likewise.
10661         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10662         (arm_store_return_value): Likewise.
10663         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10664         * c-typeprint.c (c_print_type): Likewise.
10665         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10666         (cplus_number_of_children, cplus_describe_child): Likewise.
10667         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10668         * completer.c (expression_completer): Likewise.
10669         * cp-support.c (make_symbol_overload_list_adl_namespace):
10670         Likewise.
10671         * darwin-nat-info.c (info_mach_region_command): Likewise.
10672         * dwarf2loc.c (entry_data_value_coerce_ref)
10673         (value_of_dwarf_reg_entry): Likewise.
10674         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10675         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10676         Likewise.
10677         * findvar.c (extract_typed_address, store_typed_address):
10678         Likewise.
10679         * gdbtypes.c (rank_one_type): Likewise.
10680         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10681         * infcall.c (value_arg_coerce): Likewise.
10682         * language.c (pointer_type): Likewise.
10683         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10684         Likewise.
10685         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10686         * mn10300-tdep.c (mn10300_type_align): Likewise.
10687         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10688         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10689         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10690         Likewise.
10691         * printcmd.c (print_formatted, x_command): Likewise.
10692         * python/py-type.c (typy_get_composite, typy_template_argument):
10693         Likewise.
10694         * python/py-value.c (valpy_referenced_value)
10695         (valpy_get_dynamic_type, value_has_field): Likewise.
10696         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10697         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10698         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10699         * spu-tdep.c (spu_scalar_value_p): Likewise.
10700         * symtab.c (lookup_symbol_aux): Likewise.
10701         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10702         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10703         Likewise.
10704         * valops.c (value_cast_pointers, value_cast)
10705         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10706         (value_struct_elt, value_struct_elt_bitpos)
10707         (value_find_oload_method_list, find_overload_match)
10708         (value_rtti_indirect_type): Likewise.
10709         * valprint.c (val_print_scalar_type_p, generic_val_print):
10710         Likewise.
10711         * value.c (value_actual_type, value_as_address, unpack_long)
10712         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10713         (coerce_ref): Likewise.
10714         * varobj.c (varobj_get_value_type): Likewise.
10715
10716 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10717
10718         PR gdb/14441
10719         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10720         table of constants.
10721         * python/lib/gdb/command/explore.py: Support exploring values
10722         of rvalue reference types.
10723         * python/lib/gdb/types.py: Implement get_basic_type() for
10724         rvalue reference types.
10725         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10726         constant.
10727         * python/py-value.c (valpy_getitem): Add an rvalue reference
10728         check.
10729         (valpy_reference_value): Add new parameter "refcode".
10730         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10731         New wrappers for valpy_reference_value().
10732         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10733         (gdbpy_invoke_xmethod): Likewise.
10734
10735 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10736
10737         PR gdb/14441
10738         * dwarf2read.c (process_die, read_type_die_1): Handle the
10739         DW_TAG_rvalue_reference_type DIE.
10740         (read_tag_reference_type): Add new parameter "refcode".
10741
10742 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10743
10744         PR gdb/14441
10745         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10746         (c_type_print_modifier, c_type_print_varspec_suffix)
10747         (c_type_print_base): Support printing rvalue reference types.
10748         * c-valprint.c (c_val_print, c_value_print): Support printing
10749         rvalue reference values.
10750
10751 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10752
10753         PR gdb/14441
10754         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10755         typename.
10756         * cp-support.c (replace_typedefs): Handle
10757         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10758         * python/py-type.c (typy_lookup_type): Likewise.
10759
10760 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10761
10762         PR gdb/14441
10763         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10764         * parse.c (insert_type): Change assert statement.
10765         (follow_types): Handle rvalue reference types.
10766         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10767         constant.
10768
10769 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10770
10771         PR gdb/14441
10772         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10773         value_ref() interface.
10774         * c-valprint.c (c_value_print): Likewise.
10775         * infcall.c (value_arg_coerce): Likewise.
10776         * python/py-value.c (valpy_reference_value): Likewise.
10777         * valops.c (value_cast, value_reinterpret_cast)
10778         (value_dynamic_cast, typecmp): Likewise.
10779         (value_ref): Parameterize by kind of return value reference type.
10780         * value.h (value_ref): Add new parameter "refcode".
10781
10782 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10783
10784         PR gdb/14441
10785         * dwarf2read.c (read_tag_reference_type): Use
10786         lookup_lvalue_reference_type() instead of lookup_reference_type().
10787         * eval.c (evaluate_subexp_standard): Likewise.
10788         * f-exp.y: Likewise.
10789         * gdbtypes.c (make_reference_type, lookup_reference_type):
10790         Generalize with rvalue reference types.
10791         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10792         convenience wrappers for lookup_reference_type().
10793         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10794         reference kind parameter.
10795         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10796         wrappers for lookup_reference_type().
10797         * guile/scm-type.c (gdbscm_type_reference): Use
10798         lookup_lvalue_reference_type() instead of lookup_reference_type().
10799         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10800         * parse.c (follow_types): Likewise.
10801         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10802         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10803         Likewise.
10804         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10805         (gdbpy_invoke_xmethod): Likewise.
10806         * stabsread.c: Provide extra argument to make_reference_type()
10807         call.
10808         * valops.c (value_ref, value_rtti_indirect_type): Use
10809         lookup_lvalue_reference_type() instead of lookup_reference_type().
10810
10811 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10812
10813         PR gdb/14441
10814         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10815         (TYPE_IS_REFERENCE): New macro.
10816         (struct type): Add rvalue_reference_type field.
10817         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10818
10819 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10820
10821         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10822         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10823         New function definition.
10824         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10825         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10826         New function declaration.
10827         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10828         * mi/mi-interp.h: New file.
10829         * solib.c (info_sharedlibrary_command): Replace for loop with
10830         ALL_SO_LIBS macro
10831         * solib.h (update_solib_list): New function declaration.
10832         (so_list_head): Move macro.
10833         * solist.h (ALL_SO_LIBS): New macro.
10834
10835 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10836
10837         * infcmd.c (post_create_inferior): Remove unused argument in
10838         call to solib_add.
10839         * remote.c (remote_start_remote): Likewise.
10840         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10841         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10842         (enable_break): Likewise.
10843         * solib.c (update_solib_list): Remove unused target argument
10844         and its documentation.
10845         (solib_add): Remove unused target argument.  Remove unused
10846         argument in call to update_solib_list.
10847         (info_sharedlibrary_command): Remove unused argument in call
10848         to update_solib_list.
10849         (sharedlibrary_command): Remove unused argument in call to
10850         solib_add.
10851         (handle_solib_event): Likewise.
10852         (reload_shared_libraries): Likewise.
10853         * solib.h (solib_add): Remove unused target argument.
10854
10855 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10856
10857         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10858         (s390_displaced_step_fixup): Cover relative branches with the
10859         default fixup handling.  This fixes lack of support for some
10860         relative branch instructions.
10861
10862 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10863
10864         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10865         ptid from regcache.
10866
10867 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10868
10869         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10870         i386_darwin_store_inferior_registers): Use ptid from regcache.
10871
10872 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10873
10874         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10875         i386bsd_store_inferior_registers): Use ptid from regcache.
10876
10877 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10878
10879         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10880         hppaobsd_store_registers): Use ptid from regcache.
10881
10882 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10883
10884         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10885         hppanbsd_store_registers): Use ptid from regcache.
10886
10887 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10888
10889         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10890         from regcache.  Use get_ptrace_pid.
10891
10892 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10893
10894         * corelow.c (get_core_register_section): Use ptid from regcache,
10895         update doc.
10896
10897 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10898
10899         * bsd-uthread.c (bsd_uthread_fetch_registers,
10900         bsd_uthread_store_registers): Use ptid from regcache, set and
10901         restore inferior_ptid.
10902
10903 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10904
10905         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10906         fetch_fp_regs, store_register, store_regs, store_fp_register,
10907         store_fp_regs): Use ptid from regcache.
10908
10909 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10910
10911         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10912         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10913         store_vfp_regs): Use ptid from regcache.
10914
10915 2017-03-17  Pedro Alves  <palves@redhat.com>
10916
10917         PR remote/21188
10918         * ser-base.c (ser_base_wait_for): Add comment.
10919         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10920         version.
10921         * ser-unix.c (hardwire_raw): Remove reference to
10922         scb->current_timeout.
10923         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10924         (hardwire_ops): Install ser_base_readchar instead of
10925         hardwire_readchar.
10926         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10927         Remove fields.
10928
10929 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10930
10931         PR gdb/19637
10932         * python/lib/gdb/printer/bound_registers.py: Add support for
10933         Python 3.
10934
10935 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10936
10937         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10938         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10939         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10940         byte_offset to subobj_byte_offset.  Fix the handling of
10941         DWARF_VALUE_STACK on big-endian targets when coming via an
10942         implicit pointer.
10943         (dwarf2_evaluate_loc_desc): Adjust call to
10944         dwarf2_evaluate_loc_desc_full.
10945         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10946         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10947
10948 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10949
10950         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10951         and REVSH instructions.
10952
10953 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10954
10955         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10956         (arm_record_test): Declare.
10957         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10958         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10959         align with the manual.
10960         (thumb_record_misc): Adjust the code order to align with the
10961         manual.
10962         (thumb2_record_decode_insn_handler): Fix instruction matching.
10963         (instruction_reader_thumb): New class.
10964         (arm_record_test): New function.
10965
10966 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10967
10968         * arm-tdep.c (abstract_memory_reader): New class.
10969         (instruction_reader): New class.
10970         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10971         (decode_insn): Likewise.
10972
10973 2017-03-16  Doug Evans  <dje@google.com>
10974
10975         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10976         member.  Change type of TYPE member to SCM.  All uses updated.
10977         (lsscm_make_lazy_string_smob): Add assert.
10978         (lsscm_make_lazy_string): Flag bad length values.
10979         (lsscm_elt_type): New function.
10980         (gdbscm_lazy_string_to_value): Rewrite to use
10981         lsscm_safe_lazy_string_to_value.
10982         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10983         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10984         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10985         in incoming type.
10986         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10987         * guile/scm-type.c (tyscm_scm_to_type): New function.
10988
10989 2017-03-15  Doug Evans  <dje@google.com>
10990
10991         PR python/17728, python/18439, python/18779
10992         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10993         member.  Change type of TYPE member to PyObject *.  All uses updated.
10994         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10995         (gdbpy_create_lazy_string_object): Flag bad length values.
10996         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10997         Handle typedefs in incoming type.
10998         (stpy_lazy_string_elt_type): New function.
10999         (gdbpy_extract_lazy_string): Call it.
11000         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11001         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11002         typedefs in incoming type.
11003
11004 2017-03-16  Doug Evans  <dje@google.com>
11005
11006         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11007         * guile/scm-type.c (tyscm_scm_to_type): New function.
11008
11009 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11010
11011         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11012         "ULONGEST" for "skip".
11013
11014 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11015
11016         PR gdb/21220
11017         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11018         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11019         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11020         over ptrace peek/poke until end of buffer or error.
11021
11022 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11023
11024         * parse.c (length_of_subexp): Make static.
11025         * parser-defs.h (length_of_subexp): Remove.
11026
11027 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11028
11029         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11030         as well.
11031
11032 2017-03-14  Pedro Alves  <palves@redhat.com>
11033
11034         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11035         (main): Use std::unique_ptr.  Remove calls to
11036         cp_demangled_name_parse_free.
11037
11038 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11039
11040         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11041         alphabsd_store_inferior_registers): Use regcache->ptid instead
11042         of inferior_ptid.
11043
11044 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11045
11046         * aix-thread.c (aix_thread_fetch_registers,
11047         aix_thread_store_registers): Use regcache->ptid instead of
11048         inferior_ptid.
11049
11050 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11051
11052         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11053         store_gregs_to_thread, fetch_fpregs_from_thread,
11054         store_fpregs_to_thread): Use regcache->ptid instead of
11055         inferior_ptid.
11056
11057 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11058
11059         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11060         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11061         instead of inferior_ptid.
11062
11063 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11064
11065         * target.c (target_fetch_registers, target_store_registers): Add
11066         assert.
11067
11068 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11069
11070         * regcache.h (regcache_get_ptid): New function.
11071         * regcache.c (regcache_get_ptid): New function.
11072
11073 2017-03-13  Mark Wielaard  <mark@klomp.org>
11074
11075         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11076
11077 2017-03-10  Keith Seitz  <keiths@redhat.com>
11078
11079         PR c++/8218
11080         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11081
11082 2017-03-08  Pedro Alves  <palves@redhat.com>
11083
11084         PR gdb/18360
11085         * infrun.c (start_step_over, do_target_resume, resume)
11086         (restart_threads): Assert we're not resuming a thread that is
11087         meant to be stopped.
11088         (infrun_thread_stop_requested_callback): Delete.
11089         (infrun_thread_stop_requested): If the thread is internally
11090         stopped, queue a pending stop event and clear the thread's
11091         inline-frame state.
11092         (handle_stop_requested): New function.
11093         (handle_syscall_event, handle_inferior_event_1): Use
11094         handle_stop_requested.
11095         (handle_stop_requested): New function.
11096         (handle_signal_stop): Set the thread's stop_signal here instead of
11097         at caller.
11098         (finish_step_over): Clear step over info unconditionally.
11099         (handle_signal_stop): If the user had interrupted the event
11100         thread, consider the stop a random signal.
11101         (handle_signal_stop) <signal arrived while stepping over
11102         breakpoint>: Don't restart threads here.
11103         (stop_waiting): Don't clear step-over info here.
11104
11105 2017-03-08  Pedro Alves  <palves@redhat.com>
11106
11107         PR 21206
11108         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11109         goes to argument 2, not 1.
11110
11111 2017-03-08  Pedro Alves  <palves@redhat.com>
11112
11113         PR cli/21218
11114         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11115         display_gdb_prompt.
11116         (command_line_input): Add comment.
11117
11118 2017-03-08  Pedro Alves  <palves@redhat.com>
11119
11120         PR tui/21216
11121         * tui/tui-file.c (tui_file::write): New.
11122         * tui/tui-file.h (tui_file): Override "write".
11123         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11124         factored out from ...
11125         (tui_puts): ... here.
11126         (tui_putc): Use them.
11127         (tui_write): New function.
11128         * tui/tui-io.h (tui_write): Declare.
11129
11130 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11131
11132         * Makefile.in (SFILES): Replace "environ.c" with
11133         "common/environ.c".
11134         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11135         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11136         to...
11137         * common/environ.c: ... here.
11138         * environ.h: Moved to...
11139         * common/environ.h: ... here.
11140
11141 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11142
11143         * gdbarch.sh (pstring_ptr): New static function.
11144         (gdbarch_disassembler_options): Use it.
11145         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11146         not valid_disassembler_option->name.
11147         * gdbarch.c: Regenerate.
11148
11149 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11150
11151         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11152
11153 2017-03-07  Pedro Alves  <palves@redhat.com>
11154
11155         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11156
11157 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11158
11159         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11160         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11161         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11162         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11163
11164 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11165
11166         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11167
11168 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11169
11170         * remote.c (remote_add_target_side_commands): Use range-based
11171         for loop.
11172
11173 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11174
11175         PR gdb/21165
11176         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11177         value is lazy.
11178         * valprint.c (common_val_print): Likewise.
11179
11180 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11181
11182         * NEWS: Mention new set/show disassembler-options commands.
11183         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11184         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11185         (prospective_options): New static variable.
11186         (gdb_disassembler::gdb_disassembler): Initialize
11187         m_di.disassembler_options.
11188         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11189         (get_disassembler_options): New function.
11190         (set_disassembler_options): Likewise.
11191         (set_disassembler_options_sfunc): Likewise.
11192         (show_disassembler_options_sfunc): Likewise.
11193         (disassembler_options_completer): Likewise.
11194         (_initialize_disasm): Likewise.
11195         * disasm.h (get_disassembler_options): New prototype.
11196         (set_disassembler_options): Likewise.
11197         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11198         (gdbarch_verify_disassembler_options): Likewise.
11199         * gdbarch.c: Regenerate.
11200         * gdbarch.h: Likewise.
11201         * arm-tdep.c (num_disassembly_options): Delete.
11202         (set_disassembly_style): Likewise.
11203         (arm_disassembler_options): New static variable.
11204         (set_disassembly_style_sfunc): Convert short style name into long
11205         option name.  Call set_disassembler_options.
11206         (show_disassembly_style_sfunc): New function.
11207         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11208         set_gdbarch_verify_disassembler_options.
11209         (_initialize_arm_tdep): Delete regnames variable and update callers.
11210         (arm_disassembler_options): Initialize.
11211         (disasm_options): New variable.
11212         (num_disassembly_options): Rename from this...
11213         (num_disassembly_styles): ...to this.  Compute by scanning through
11214         disasm_options.
11215         (valid_disassembly_styles): Initialize using disasm_options.
11216         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11217         set_arm_regname_option.
11218         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11219         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11220         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11221         set_gdbarch_verify_disassembler_options.
11222         * s390-tdep.c (s390_disassembler_options): New static variable.
11223         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11224         set_gdbarch_verify_disassembler_options.
11225
11226 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11227
11228         * remote.c (remote_add_target_side_condition): Remove "struct"
11229         keyword from range-based for loop.
11230
11231 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11232
11233         * remote.c (remote_add_target_side_condition): Use range-based
11234         for loop.  Update comment.
11235
11236 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11237
11238         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11239
11240 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11241
11242         * regcache.c (regcache_raw_update): New function.
11243         (regcache_raw_read): Move code to regcache_raw_update.
11244         * regcache.h (regcache_raw_update): New declaration.
11245         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11246
11247 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11248
11249         * dwarf2read.c (create_debug_type_hash_table): Initialize
11250         header.signature and header.type_offset_in_tu.
11251
11252 2017-02-24  Pedro Alves  <palves@redhat.com>
11253
11254         * symtab.c (make_file_symbol_completion_list_1): Use
11255         add_symtab_completions.
11256
11257 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11258
11259         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11260
11261 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11262
11263         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11264         I386_MAX_REGISTER_SIZE.
11265         (i386_pseudo_register_write): Likewise.
11266         (i386_process_record): Likewise.
11267         * i387-tdep.c (i387_supply_xsave): Likewise.
11268         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11269         (store_register): Likewise.
11270
11271 2017-02-23  Pedro Alves  <palves@redhat.com>
11272
11273         * ada-lang.c: Include "common/function-view.h".
11274         (ada_iterate_over_symbols): Adjust to use function_view as
11275         callback type.
11276         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11277         (ada_make_symbol_completion_list): Use a lambda.
11278         (ada_exc_search_name_matches): Delete.
11279         (name_matches_regex): New.
11280         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11281         * compile/compile-c-support.c: Include "common/function-view.h".
11282         (print_one_macro): Change prototype to accept a ui_file pointer.
11283         (write_macro_definitions): Use a lambda.
11284         * dwarf2read.c: Include "common/function-view.h".
11285         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11286         (dw2_expand_symtabs_matching): Adjust to use function_view as
11287         callback type.
11288         * language.h: Include "common/function-view.h".
11289         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11290         function_view as callback type.
11291         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11292         * linespec.c: Include "common/function-view.h".
11293         (collect_info::add_symbol): New method.
11294         (struct symbol_and_data_callback, iterate_inline_only, struct
11295         symbol_matcher_data, iterate_name_matcher): Delete.
11296         (iterate_over_all_matching_symtabs): Adjust to use function_view
11297         as callback type and lambdas.
11298         (iterate_over_file_blocks): Adjust to use function_view as
11299         callback type.
11300         (decode_compound_collector): Now a class with private fields.
11301         (decode_compound_collector::release_symbols): New method.
11302         (collect_one_symbol): Rename to...
11303         (decode_compound_collector::operator()): ... this and adjust.
11304         (lookup_prefix_sym): decode_compound_collector construction bits
11305         move to decode_compound_collector ctor.  Pass the
11306         decode_compound_collector object directly as callback.  Remove
11307         cleanups and use decode_compound_collector::release_symbols
11308         instead.
11309         (symtab_collector): Now a class with private fields.
11310         (symtab_collector::release_symtabs): New method.
11311         (add_symtabs_to_list): Rename to...
11312         (symtab_collector::operator()): ... this and adjust.
11313         (collect_symtabs_from_filename): symtab_collector construction
11314         bits move to symtab_collector ctor.  Pass the symtab_collector
11315         object directly as callback.  Remove cleanups and use
11316         symtab_collector::release_symtabs instead.
11317         (collect_symbols): Delete.
11318         (add_matching_symbols_to_info): Use lambdas.
11319         * macrocmd.c (print_macro_callback): Delete.
11320         (info_macro_command): Use a lambda.
11321         (info_macros_command): Pass print_macro_definition as callable
11322         directly.
11323         (print_one_macro): Remove 'ignore' parameter.
11324         (macro_list_command): Adjust.
11325         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11326         (macro_for_each_data::user_data): Delete field.
11327         (foreach_macro): Adjust to call the function_view.
11328         (macro_for_each): Adjust to use function_view as callback type.
11329         (foreach_macro_in_scope): Adjust to call the function_view.
11330         (macro_for_each_in_scope): Adjust to use function_view as callback
11331         type.
11332         * macrotab.h: Include "common/function-view.h".
11333         (macro_callback_fn): Declare a prototype instead of a pointer.
11334         Remove "user_data" parameter.
11335         (macro_for_each, macro_for_each_in_scope): Adjust to use
11336         function_view as callback type.
11337         * psymtab.c (partial_map_expand_apply)
11338         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11339         Adjust to use function_view as callback type and to return bool.
11340         (psym_expand_symtabs_matching): Adjust to use function_view as
11341         callback types.
11342         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11343         to use function_view as callback type and to return bool.
11344         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11345         callback types.
11346         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11347         as callback types.
11348         * symfile.h: Include "common/function-view.h".
11349         (expand_symtabs_file_matcher_ftype)
11350         (expand_symtabs_symbol_matcher_ftype)
11351         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11352         return bool.
11353         (quick_symbol_functions::map_symtabs_matching_filename)
11354         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11355         function_view as callback type and return bool.
11356         (expand_symtabs_matching): Adjust to use function_view as callback
11357         type.
11358         (maintenance_expand_name_matcher)
11359         (maintenance_expand_file_matcher): Delete.
11360         (maintenance_expand_symtabs): Use lambdas.
11361         * symtab.c (iterate_over_some_symtabs): Adjust to use
11362         function_view as callback types and return bool.
11363         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11364         of a cleanup.
11365         (lookup_symtab_callback): Delete.
11366         (lookup_symtab): Use a lambda.
11367         (iterate_over_symbols): Adjust to use function_view as callback
11368         type.
11369         (struct search_symbols_data, search_symbols_file_matches)
11370         (search_symbols_name_matches): Delete.
11371         (search_symbols): Use a pair of lambdas.
11372         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11373         (symtab_expansion_callback): Delete.
11374         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11375         * symtab.h: Include "common/function-view.h".
11376         (iterate_over_some_symtabs): Adjust to use function_view as
11377         callback type and return bool.
11378         (iterate_over_symtabs): Adjust to use function_view as callback
11379         type.
11380         (symbol_found_callback_ftype): Remove 'data' parameter and return
11381         bool.
11382         (iterate_over_symbols): Adjust to use function_view as callback
11383         type.
11384
11385 2017-02-23  Pedro Alves  <palves@redhat.com>
11386
11387         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11388         (%.o) <unittests/%.c>: New pattern.
11389         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11390         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11391         * common/function-view.h: New file.
11392         * unittests/function-view-selftests.c: New file.
11393         * configure: Regenerate.
11394
11395 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11398         inferior_ptid.
11399         * go32-nat.c (go32_thread_alive): Likewise.
11400
11401 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11402
11403         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11404         delete.
11405
11406 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11407
11408         * varobj.c (varobj_clear_saved_item): Use delete instead of
11409         xfree.
11410         (update_dynamic_varobj_children): Likewise.
11411
11412 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11413
11414         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11415
11416 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11417
11418         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11419         m_enum_value to 0 in default constructor.
11420
11421 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11422
11423         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11424         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11425         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11426         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11427         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11428         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11429         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11430         IS_STORE_CONDITIONAL_INSN.
11431
11432 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11433
11434         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11435
11436 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11437
11438         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11439
11440 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11441
11442         * dwarf2read.c (skip_one_die, read_attribute_value)
11443         (dwarf2_const_value_attr, dump_die_shallow)
11444         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11445         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11446
11447 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11448
11449         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11450         (dwarf_parse_macro_header): Accept DWARF version 5.
11451         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11452
11453 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11454
11455         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11456         DW_AT_GNU_*.
11457         * common/common-exceptions.h (enum errors): Likewise.
11458         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11459         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11460         (dwarf_expr_context::execute_stack_op): Likewise.
11461         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11462         Likewise.
11463         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11464         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11465         (show_entry_values_debug, call_site_to_target_addr)
11466         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11467         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11468         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11469         (value_of_dwarf_block_entry, indirect_pieced_value)
11470         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11471         (disassemble_dwarf_expression): Likewise.
11472         * dwarf2read.c (process_die, inherit_abstract_dies)
11473         (read_call_site_scope): Likewise.
11474         * gdbtypes.h (struct func_type, struct call_site_parameter)
11475         (struct call_site): Likewise.
11476         * stack.c (read_frame_arg): Likewise.
11477         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11478
11479 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11480
11481         * defs.h (read_unsigned_leb128): New declaration.
11482         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11483         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11484         (dwarf2_find_location_expression): Call also
11485         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11486         * dwarf2loc.h (dwarf2_version): New declaration.
11487         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11488         rnglists.
11489         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11490         .debug_rnglists.
11491         (struct dwop_section_names): Add loclists_dwo.
11492         (dwop_section_names): Add .debug_loclists.dwo.
11493         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11494         (struct dwarf2_per_cu_data): Add dwarf_version.
11495         (struct dwo_sections): Add loclists.
11496         (struct attr_abbrev): Add implicit_const.
11497         (read_indirect_line_string): New declaration.
11498         (read_unsigned_leb128): Delete declaration.
11499         (rcuh_kind): New definition.
11500         (read_and_check_comp_unit_head): Change parameter
11501         is_debug_types_section to section_kind.
11502         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11503         (read_comp_unit_head): Change parameter abfd to section, add parameter
11504         section_kind.  Handle DWARF-5.
11505         (error_check_comp_unit_head): Accept also DWARF version 5.
11506         (read_and_check_comp_unit_head): Change parameter
11507         is_debug_types_section to section_kind.
11508         (read_and_check_type_unit_head): Delete function.
11509         (read_abbrev_offset): Handle DWARF-5.
11510         (create_debug_type_hash_table): Add parameter section_kind.  Process
11511         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11512         comp_unit_head.
11513         (create_debug_types_hash_table): Update create_debug_type_hash_table
11514         caller.
11515         (create_all_type_units): Call create_debug_type_hash_table.
11516         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11517         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11518         caller.
11519         (skip_one_die): Handle DW_FORM_implicit_const.
11520         (dwarf2_rnglists_process): New function.
11521         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11522         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11523         (read_attribute_value): Handle DW_FORM_implicit_const,
11524         DW_FORM_line_strp.
11525         (read_attribute): Handle DW_FORM_implicit_const.
11526         (read_indirect_string_at_offset_from): New function from
11527         read_indirect_string_at_offset.
11528         (read_indirect_string_at_offset): Call
11529         read_indirect_string_at_offset_from.
11530         (read_indirect_line_string_at_offset): New function.
11531         (read_indirect_string): New function comment.
11532         (read_indirect_line_string): New function.
11533         (read_unsigned_leb128): Make it global.
11534         (dwarf2_string_attr): Handle DWARF-5.
11535         (add_include_dir_stub, read_formatted_entries): New functions.
11536         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11537         Handle DWARF-5.
11538         (per_cu_header_read_in): Update read_comp_unit_head caller.
11539         (dwarf2_version): New function.
11540         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11541         rnglists.
11542         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11543         fields.
11544
11545 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11546
11547         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11548
11549 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11550
11551         * dwarf2read.c (dwarf2_ranges_process): New function from
11552         dwarf2_ranges_read.
11553         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11554         dwarf2_ranges_process.
11555
11556 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11557
11558         * dwarf2read.c (create_debug_type_hash_table): New function from
11559         create_debug_types_hash_table.
11560         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11561         (create_all_type_units, open_and_init_dwo_file): Update
11562         create_debug_types_hash_table callers.
11563
11564 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11565
11566         PR gdb/16188
11567         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11568         refer to 'ap', not 'args'.
11569
11570 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11571             Pedro Alves  <palves@redhat.com>
11572
11573         PR gdb/16188
11574         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11575         calls succeeded.
11576         * fork-child.c (trace_start_error): New function.
11577         (trace_start_error_with_name): Likewise.
11578         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11579         * inf-ptrace.c (inf_ptrace_me): Likewise.
11580         * inferior.h (trace_start_error): New prototype.
11581         (trace_start_error_with_name): Likewise.
11582
11583 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11584
11585         PR gdb/21164
11586         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11587         NULL before using it.
11588         * symmisc.c (maintenance_print_symbols): Likewise.
11589         (maintenance_print_msymbols): Likewise.
11590
11591 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11592
11593         * NEWS: Add record Python bindings entry.
11594
11595 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11596
11597         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11598         py-record-full.o.
11599         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11600         * python/py-record-btrace.c, python/py-record-btrace.h,
11601         python/py-record-full.c, python/py-record-full.h: New file.
11602         * python/py-record.c: Add include for py-record-btrace.h and
11603         py-record-full.h.
11604         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11605         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11606         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11607         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11608         New definition.
11609         (gdbpy_initialize_btrace): New export.
11610         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11611
11612 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11613
11614         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11615         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11616         * python/py-record.c: New file.
11617         * python/python-internal.h (gdbpy_start_recording,
11618         gdbpy_current_recording, gdpy_stop_recording,
11619         gdbpy_initialize_record): New export.
11620         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11621         (python_GdbMethods): Add gdbpy_start_recording,
11622         gdbpy_current_recording and gdbpy_stop_recording.
11623
11624 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11625
11626         * record-btrace.c (record_btrace_record_method): New function.
11627         (init_record_btrace_ops): Initialize to_record_method.
11628         * record-full.c (record_full_record_method): New function.
11629         (init_record_full_ops, init_record_full_core_ops): Add
11630         record_full_record_method.
11631         * record.h (enum record_method): New enum.
11632         * target-debug.h (target_debug_print_enum_record_method: New define.
11633         * target-delegates.c: Regenerate.
11634         * target.c (target_record_method): New function.
11635         * target.h: Include record.h.
11636         (struct target_ops) <to_record_method>: New field.
11637         (target_record_method): New export.
11638
11639 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11640
11641         * record.h (record_start, record_stop): New export.
11642         * record.c (record_start, record_stop): New function.
11643
11644 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11645
11646         * btrace.c (btrace_fetch): Copy function call segments pointer
11647         into a vector.
11648         (btrace_clear): Clear the vector.
11649         (btrace_find_insn_by_number): Use binary search to find the correct
11650         function call segment.
11651         * btrace.h (brace_fun_p): New typedef.
11652         (struct btrace_thread_info) <functions>: New field.
11653
11654 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11655
11656         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11657         * btrace.c (btrace_decode_error): ... here.  New function.
11658         * btrace.h (btrace_decode_error): New export.
11659
11660 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11661
11662         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11663         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11664         btrace_find_insn_by_number): Remove special case for gaps.
11665         * btrace.h (btrace_insn_get_error): New export.
11666         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11667         * record-btrace.c (btrace_insn_history): Print number for gaps.
11668         (record_btrace_info, record_btrace_goto): Handle gaps.
11669
11670 2017-02-14  Tom Tromey  <tom@tromey.com>
11671
11672         PR python/13598:
11673         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11674         event.
11675         * python/py-evts.c (gdbpy_initialize_py_events): Add
11676         before_prompt registry.
11677         * python/py-events.h (events_object) <before_prompt>: New field.
11678
11679 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11680
11681         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11682
11683 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11684
11685         * symfile (_initialize_symfile): Add usage text to the load command's
11686         help text.
11687
11688 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11689
11690         * utils.c (defaulted_query): Don't query on secondary UIs.
11691
11692 2017-02-10  Tom Tromey  <tom@tromey.com>
11693
11694         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11695
11696 2017-02-10  Tom Tromey  <tom@tromey.com>
11697
11698         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11699         "cleanup" local.
11700         * python/py-type.c (typy_legacy_template_argument): Remove
11701         unnecessary "cleanup" local.
11702
11703 2017-02-10  Tom Tromey  <tom@tromey.com>
11704
11705         * python/python.c (do_start_initialization): New function, from
11706         _initialize_python.
11707         (_initialize_python): Call do_start_initialization.
11708         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11709         goto.
11710
11711 2017-02-10  Tom Tromey  <tom@tromey.com>
11712
11713         * python/py-prettyprint.c (pretty_print_one_value): Use
11714         gdbpy_ref.
11715
11716 2017-02-10  Tom Tromey  <tom@tromey.com>
11717
11718         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11719         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11720         gdbpy_ref.
11721         * python/py-type.c (field_new): Use gdbpy_ref.
11722         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11723         gdbpy_ref.
11724         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11725         (py_free_pspace): Likewise.
11726         (pspace_to_pspace_object): Likewise.
11727         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11728         (py_free_objfile): Likewise.
11729         (objfile_to_objfile_object): Likewise.
11730         * python/py-inferior.c (delete_thread_object): Use
11731         gdbpy_ref.
11732         (infpy_read_memory): Likewise.
11733         (py_free_inferior): Likewise.
11734         * python/py-evtregistry.c (create_eventregistry_object): Use
11735         gdbpy_ref.
11736         * python/py-event.c (create_event_object): Use gdbpy_ref.
11737
11738 2017-02-10  Tom Tromey  <tom@tromey.com>
11739
11740         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11741         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11742         used.
11743         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11744         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11745         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11746         python/py-framefilter.c, python/py-function.c,
11747         python/py-inferior.c, python/py-infevents.c,
11748         python/py-linetable.c, python/py-newobjfileevent.c,
11749         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11750         python/py-signalevent.c, python/py-stopevent.c,
11751         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11752         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11753         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11754         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11755
11756 2017-02-10  Tom Tromey  <tom@tromey.com>
11757
11758         * ui-out.h (ui_out_emit_type): New class.
11759         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11760         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11761         and ui_out_emit_tuple.
11762         (enumerate_locals): Likewise.
11763         (py_mi_print_variables, py_print_locals, py_print_args): Use
11764         ui_out_emit_list.
11765         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11766         ui_out_emit_list.
11767         * common/gdb_optional.h: New file.
11768
11769 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11770
11771         * MAINTAINERS (Write After Approval): Update my e-mail address.
11772
11773 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11774
11775         PR gdb/21122
11776         * breakpoint.c (_initialize_breakpoint): Update the help description
11777         of the 'commands' command to indicate that it takes a list argument.
11778
11779 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11780
11781         * interps.c (current_interp_set_logging): Remove "return".
11782
11783 2017-02-09  Gary Benson  <gbenson@redhat.com>
11784
11785         * symtab.c (add_symtab_completions): Prevent NULL pointer
11786         dereference.
11787
11788 2017-02-08  Pedro Alves  <palves@redhat.com>
11789
11790         * interps.c (interp::interp): Remove reference to quiet_p.
11791         (interp_set): Make static.  Remove dead "Switching to" output
11792         code.
11793         (interp_quiet_p, interp_set_quiet): Delete.
11794         (interpreter_exec_cmd): Don't set the interpreter quiet.
11795         * interps.h (interp_quiet_p): Make static.
11796         (class interp) <quiet_p>: Remove field
11797
11798 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11799
11800         * cli/cli-decode.c (find_command_name_length): Make it extern.
11801         * cli/cli-decode.h (find_command_name_length): Declare.
11802         * cli/cli-script.c (command_name_equals, line_first_arg):
11803         New functions.
11804         (process_next_line): Use cli-decode to parse command names.
11805         (build_command_line): Make args a constant pointer.
11806
11807 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11808
11809         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11810         Remove case-insensitive search.
11811
11812 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11813
11814         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11815         at the end of the line.  Avoids an ARI warning.
11816
11817 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11818
11819         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11820         rdseed instructions.
11821         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11822
11823 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11824
11825         PR tdep/20936
11826         Provide and use sparc32 and sparc64 target description XML files.
11827         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11828         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11829         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11830         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11831         * features/sparc/sparc32-solaris.xml: New file.
11832         * features/sparc/sparc64-solaris.xml: New file.
11833         * features/sparc/sparc32-solaris.c: Generated.
11834         * features/sparc/sparc64-solaris.c: Generated.
11835         * sparc-tdep.h: Account for differences in target descriptions.
11836         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11837         (sparc32_register_type): Use target provided registers.
11838         (validate_tdesc_registers): New function.
11839         (sparc32_gdbarch_init): Use tdesc_has_registers.
11840         Set pseudoregister functions.
11841         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11842         (sparc64_register_type): Use target provided registers.
11843         (sparc64_init_abi): Set pseudoregister functions.
11844
11845 2017-02-03  Tom Tromey  <tom@tromey.com>
11846
11847         PR rust/21097:
11848         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11849         with a single member.
11850
11851 2017-02-03  Pedro Alves  <palves@redhat.com>
11852
11853         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11854         (cli_interp_base::~cli_interp_base): New.
11855         (cli_interp): New struct.
11856         (as_cli_interp): Cast the interp itself to cli_interp.
11857         (cli_interpreter_pre_command_loop): Rename to ...
11858         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11859         parameter.
11860         (cli_interpreter_init): Rename to ...
11861         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11862         boolean.  Make extern.
11863         (cli_interpreter_resume): Rename to ...
11864         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11865         extern.
11866         (cli_interpreter_suspend): Rename to ...
11867         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11868         extern.
11869         (cli_interpreter_exec): Rename to ...
11870         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11871         extern.
11872         (cli_interpreter_supports_command_editing): Rename to ...
11873         (cli_interp_base::supports_command_editing): ... this.  Remove
11874         'interp' parameter.  Make extern.
11875         (cli_ui_out): Rename to ...
11876         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11877         Make extern.
11878         (cli_set_logging): Rename to ...
11879         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11880         parameter.  Make extern.
11881         (cli_interp_procs): Delete.
11882         (cli_interp_factory): Adjust to use "new".
11883         * cli/cli-interp.h: Include "interps.h".
11884         (struct cli_interp_base): New struct.
11885         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11886         (interp_new): Delete.
11887         (interp::interp, interp::~interp): New.
11888         (interp_set): Use bool, and return void.  Assume the interpreter
11889         has suspend, init and resume methods, and that the all return
11890         void.
11891         (set_top_level_interpreter): interp_set returns void.
11892         (interp_ui_out): Adapt.
11893         (current_interp_set_logging): Adapt.
11894         (interp_data): Delete.
11895         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11896         (interp_exec): Adapt.
11897         (top_level_interpreter_data): Delete.
11898         * interps.h (interp_init_ftype, interp_resume_ftype)
11899         (interp_suspend_ftype, interp_exec_ftype)
11900         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11901         (class interp): New.
11902         (interp_new): Delete.
11903         (interp_set): Now returns void.  Use bool.
11904         (interp_data, top_level_interpreter_data): Delete.
11905         * mi/mi-common.h: Include interps.h.
11906         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11907         init, resume, suspect, exec, interp_ui_out, set_logging and
11908         pre_command_loop methods.
11909         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11910         (mi_interpreter_init): Rename to ...
11911         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11912         bool, return void and make extern.  Adjust.
11913         (mi_interpreter_resume): ... Rename to ...
11914         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11915         return void and make extern.  Adjust.
11916         (mi_interpreter_suspend): ... Rename to ...
11917         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11918         return void and make extern.  Adjust.
11919         (mi_interpreter_exec): ... Rename to ...
11920         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11921         extern.  Adjust.
11922         (mi_interpreter_pre_command_loop): ... Rename to ...
11923         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11924         parameter and make extern.
11925         (mi_on_normal_stop_1): Adjust.
11926         (mi_ui_out): Rename to ...
11927         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11928         parameter and make extern.  Adjust.
11929         (mi_set_logging): Rename to ...
11930         (mi_interp::set_logging): ... this.  Remove the 'interp'
11931         parameter and make extern.  Adjust.
11932         (mi_interp_procs): Delete.
11933         (mi_interp_factory): Adjust to use 'new'.
11934         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11935         (mi_print_exception, mi_execute_command, mi_load_progress):
11936         Adjust.
11937         * tui/tui-interp.c (tui_interp): New class.
11938         (as_tui_interp): Return a tui_interp pointer.
11939         (tui_on_normal_stop, tui_on_signal_received)
11940         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11941         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11942         to use interp::interp_ui_out.
11943         (tui_init): Rename to ...
11944         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11945         bool, return void and make extern.  Adjust.
11946         (tui_resume): Rename to ...
11947         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11948         return void and make extern.  Adjust.
11949         (tui_suspend): Rename to ...
11950         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11951         return void and make extern.  Adjust.
11952         (tui_ui_out): Rename to ...
11953         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11954         parameter, and make extern.  Adjust.
11955         (tui_exec): Rename to ...
11956         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11957         make extern.
11958         (tui_interp_procs): Delete.
11959         (tui_interp_factory): Use "new".
11960
11961 2017-02-02  Tom Tromey  <tom@tromey.com>
11962
11963         * rust-exp.y (ends_raw_string, space_then_number)
11964         (rust_identifier_start_p): Return bool.
11965         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11966         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11967         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11968         (rust_chartype_p): Return bool.
11969         (val_print_struct, rust_print_struct_def, rust_print_type):
11970         Update.
11971         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11972         Return bool.
11973
11974 2017-02-02  Tom Tromey  <tom@tromey.com>
11975
11976         * rust-lang.c: Reindent.
11977
11978 2017-02-02  Tom Tromey  <tom@tromey.com>
11979
11980         * rust-lang.h (rust_crate_for_block): Update.
11981         * rust-lang.c (rust_crate_for_block): Return std::string.
11982         (rust_get_disr_info): Use std:;string, not
11983         gdb::unique_xmalloc_ptr.
11984         * rust-exp.y (crate_name): Update.
11985
11986 2017-02-02  Pedro Alves  <palves@redhat.com>
11987
11988         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11989         field out of gdb_disassembler_test and make it static.
11990
11991 2017-02-02  Pedro Alves  <palves@redhat.com>
11992
11993         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11994         mi1_interp and mi_interp fields.
11995
11996 2017-02-02  Pedro Alves  <palves@redhat.com>
11997
11998         * cli/cli-interp.c (struct saved_output_files, saved_output):
11999         Moved from cli/cli-logging.c.
12000         (cli_set_logging): New function.
12001         (cli_interp_procs): Install cli_set_logging.
12002         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12003         Declare.
12004         * cli/cli-logging.c (struct saved_output_files, saved_output):
12005         Moved to cli/cli-interp.c.
12006         (pop_output_files): Don't save outputs here.
12007         (make_logging_output): New function.
12008         (handle_redirections): Don't build tee nor save previous outputs
12009         here.
12010         * interps.c (current_interp_set_logging): Change prototype.
12011         Assume there's always a set_logging_proc method installed.
12012         * interps.h (interp_set_logging_ftype): Change prototype.
12013         (current_interp_set_logging): Change prototype and adjust comment.
12014         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12015         use make_logging_output.
12016         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12017 2017-02-02  Pedro Alves  <palves@redhat.com>
12018
12019         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12020         from ...
12021         (set_logging_overwrite): ... here.
12022         (logging_no_redirect_file): Delete.
12023         (set_logging_redirect): Don't handle redirection on the fly.
12024         Instead warn that "logging off" / "logging on" is necessary.
12025         (pop_output_files): Delete references to logging_no_redirect_file.
12026         (show_logging_command): Always speak in terms of what will happen
12027         once logging is reenabled.
12028
12029 2017-02-02  Pedro Alves  <palves@redhat.com>
12030
12031         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12032
12033 2017-02-02  Pedro Alves  <palves@redhat.com>
12034
12035         * disasm.c (gdb_pretty_print_insn): Rename to ...
12036         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12037         Remove gdbarch parameter.  Adapt to clear the object's buffers
12038         instead of allocating new buffers, and to print using the object's
12039         gdb_disassembler instead of calling gdb_print_insn.
12040         (dump_insns): Use gdb_pretty_print_disassembler.
12041         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12042         (gdb_pretty_print_disassembler): New class.
12043         * record-btrace.c (btrace_insn_history): Use
12044         gdb_pretty_print_disassembler.
12045
12046 2017-02-02  Pedro Alves  <palves@redhat.com>
12047
12048         * ada-lang.c (type_as_string): Use string_file.
12049         * ada-valprint.c (ada_print_floating): Use string_file.
12050         * ada-varobj.c (ada_varobj_scalar_image)
12051         (ada_varobj_get_value_image): Use string_file.
12052         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12053         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12054         * breakpoint.c (update_inserted_breakpoint_locations)
12055         (insert_breakpoint_locations, reattach_breakpoints)
12056         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12057         (print_it_watchpoint): Use string_file.
12058         (save_breakpoints): Use stdio_file.
12059         * c-exp.y (oper): Use string_file.
12060         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12061         tee_file.
12062         (pop_output_files): Use delete.
12063         (handle_redirections): Use stdio_file and tee_file.
12064         * cli/cli-setshow.c (do_show_command): Use string_file.
12065         * compile/compile-c-support.c (c_compute_program): Use
12066         string_file.
12067         * compile/compile-c-symbols.c (generate_vla_size): Take a
12068         'string_file &' instead of a 'ui_file *'.
12069         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12070         of a 'ui_file *'.  Use string_file.
12071         (generate_c_for_variable_locations): Take a 'string_file &'
12072         instead of a 'ui_file *'.
12073         * compile/compile-internal.h (generate_c_for_for_one_variable):
12074         Take a 'string_file &' instead of a 'ui_file *'.
12075         * compile/compile-loc2c.c (push, pushf, unary, binary)
12076         (print_label, pushf_register_address, pushf_register)
12077         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12078         'ui_file *'.  Adjust.
12079         * compile/compile.c (compile_to_object): Use string_file.
12080         * compile/compile.h (compile_dwarf_expr_to_c)
12081         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12082         'ui_file *'.
12083         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12084         (replace_typedefs_qualified_name): Use string_file and
12085         obstack_copy0.
12086         * disasm.c (gdb_pretty_print_insn): Use string_file.
12087         (gdb_disassembly): Adjust reference the null_stream global.
12088         (do_ui_file_delete): Delete.
12089         (gdb_insn_length): Use null_stream.
12090         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12091         * dwarf2loc.c (dwarf2_compile_property_to_c)
12092         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12093         'string_file &' instead of a 'ui_file *'.
12094         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12095         * dwarf2read.c (do_ui_file_peek_last): Delete.
12096         (dwarf2_compute_name): Use string_file.
12097         * event-top.c (gdb_setup_readline): Use stdio_file.
12098         * gdbarch.sh (verify_gdbarch): Use string_file.
12099         * gdbtypes.c (safe_parse_type): Use null_stream.
12100         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12101         string_file.
12102         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12103         'string_file *' instead of a 'ui_file *'.
12104         (gdbscm_arch_disassemble): Use string_file.
12105         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12106         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12107         inherits from ui_file.
12108         (ioscm_file_port_delete, ioscm_file_port_rewind)
12109         (ioscm_file_port_put): Delete.
12110         (ioscm_file_port_write): Rename to ...
12111         (ioscm_file_port::write): ... this.  Remove file_port_magic
12112         checks.
12113         (ioscm_file_port_new): Delete.
12114         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12115         ui_file_up.
12116         * guile/scm-type.c (tyscm_type_name): Use string_file.
12117         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12118         Use string_file.
12119         * infcmd.c (print_return_value_1): Use string_file.
12120         * infrun.c (print_target_wait_results): Use string_file.
12121         * language.c (add_language): Use string_file.
12122         * location.c (explicit_to_string_internal): Use string_file.
12123         * main.c (captured_main_1): Use null_file.
12124         * maint.c (maintenance_print_architecture): Use stdio_file.
12125         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12126         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12127         event_channel>: Change type to mi_console_file pointer.
12128         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12129         (mi_console_file_delete): Delete.
12130         (struct mi_console_file): Delete.
12131         (mi_console_file_magic): Delete.
12132         (mi_console_file_new): Delete.
12133         (mi_console_file::mi_console_file): New.
12134         (mi_console_file_delete): Delete.
12135         (mi_console_file_fputs): Delete.
12136         (mi_console_file::write): New.
12137         (mi_console_raw_packet): Delete.
12138         (mi_console_file::flush): New.
12139         (mi_console_file_flush): Delete.
12140         (mi_console_set_raw): Rename to ...
12141         (mi_console_file::set_raw): ... this.
12142         * mi/mi-console.h (class mi_console_file): New class.
12143         (mi_console_file_new, mi_console_set_raw): Delete.
12144         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12145         (mi_set_logging): Use delete and tee_file.  Adjust.
12146         * mi/mi-main.c (output_register): Use string_file.
12147         (mi_cmd_data_evaluate_expression): Use string_file.
12148         (mi_cmd_data_read_memory): Use string_file.
12149         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12150         * mi/mi-out.c (mi_ui_out::main_stream): New.
12151         (mi_ui_out::rewind): Use main_stream and
12152         string_file.
12153         (mi_ui_out::put): Use main_stream and string_file.
12154         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12155         Allocate a 'string_file' instead.
12156         (mi_out_new): Don't allocate a mem_fileopen stream here.
12157         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12158         (mi_ui_out::main_stream): Declare method.
12159         * printcmd.c (eval_command): Use string_file.
12160         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12161         * python/py-arch.c (archpy_disassemble): Use string_file.
12162         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12163         * python/py-frame.c (frapy_str): Use string_file.
12164         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12165         Use string_file.
12166         * python/py-type.c (typy_str): Use string_file.
12167         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12168         * python/py-value.c (valpy_str): Use string_file.
12169         * record-btrace.c (btrace_insn_history): Use string_file.
12170         * regcache.c (regcache_print): Use stdio_file.
12171         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12172         * remote.c (escape_buffer): Use string_file.
12173         * rust-lang.c (rust_get_disr_info): Use string_file.
12174         * serial.c (serial_open_ops_1): Use stdio_file.
12175         (do_serial_close): Use delete.
12176         * stack.c (print_frame_arg): Use string_file.
12177         (print_frame_args): Remove local mem_fileopen stream, not used.
12178         (print_frame): Use string_file.
12179         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12180         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12181         Take a 'string_file *' instead of a 'ui_file *'.
12182         * top.c (new_ui): Use stdio_file and stderr_file.
12183         (free_ui): Use delete.
12184         (execute_command_to_string): Use string_file.
12185         (quit_confirm): Use string_file.
12186         * tracepoint.c (collection_list::append_exp): Use string_file.
12187         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12188         * tui/tui-file.c: Don't include "ui-file.h".
12189         (enum streamtype, struct tui_stream): Delete.
12190         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12191         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12192         (tui_file::tui_file): New method.
12193         (tui_file_fputs): Delete.
12194         (tui_file_get_strbuf): Delete.
12195         (tui_file::puts): New method.
12196         (tui_file_adjust_strbuf): Delete.
12197         (tui_file_flush): Delete.
12198         (tui_file::flush): New method.
12199         * tui/tui-file.h: Tweak intro comment.
12200         Include ui-file.h.
12201         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12202         (tui_file_adjust_strbuf): Delete declarations.
12203         (class tui_file): New class.
12204         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12205         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12206         (tui_register_format): Use string_stream.
12207         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12208         (tui_get_function_from_frame): Use string_file.
12209         * typeprint.c (type_to_string): Use string_file.
12210         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12211         (null_stream): New global.
12212         (ui_file_delete): Delete.
12213         (ui_file::ui_file): New.
12214         (null_file_isatty): Delete.
12215         (ui_file::~ui_file): New.
12216         (null_file_rewind): Delete.
12217         (ui_file::printf): New.
12218         (null_file_put): Delete.
12219         (null_file_flush): Delete.
12220         (ui_file::putstr): New.
12221         (null_file_write): Delete.
12222         (ui_file::putstrn): New.
12223         (null_file_read): Delete.
12224         (ui_file::putc): New.
12225         (null_file_fputs): Delete.
12226         (null_file_write_async_safe): Delete.
12227         (ui_file::vprintf): New.
12228         (null_file_delete): Delete.
12229         (null_file::write): New.
12230         (null_file_fseek): Delete.
12231         (null_file::puts): New.
12232         (ui_file_data): Delete.
12233         (null_file::write_async_safe): New.
12234         (gdb_flush, ui_file_isatty): Adjust.
12235         (ui_file_put, ui_file_rewind): Delete.
12236         (ui_file_write): Adjust.
12237         (ui_file_write_for_put): Delete.
12238         (ui_file_write_async_safe, ui_file_read): Adjust.
12239         (ui_file_fseek): Delete.
12240         (fputs_unfiltered): Adjust.
12241         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12242         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12243         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12244         (set_ui_file_data): Delete.
12245         (string_file::~string_file, string_file::write)
12246         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12247         (do_ui_file_as_string, ui_file_as_string): Delete.
12248         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12249         (struct mem_file): Delete.
12250         (mem_file_new): Delete.
12251         (stdio_file::stdio_file): New.
12252         (mem_file_delete): Delete.
12253         (stdio_file::stdio_file): New.
12254         (mem_fileopen): Delete.
12255         (stdio_file::~stdio_file): New.
12256         (mem_file_rewind): Delete.
12257         (stdio_file::set_stream): New.
12258         (mem_file_put): Delete.
12259         (stdio_file::open): New.
12260         (mem_file_write): Delete.
12261         (stdio_file_magic, struct stdio_file): Delete.
12262         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12263         (stdio_file::flush): New.
12264         (stdio_file_read): Rename to ...
12265         (stdio_file::read): ... this.  Adjust.
12266         (stdio_file_write): Rename to ...
12267         (stdio_file::write): ... this.  Adjust.
12268         (stdio_file_write_async_safe): Rename to ...
12269         (stdio_file::write_async_safe) ... this.  Adjust.
12270         (stdio_file_fputs): Rename to ...
12271         (stdio_file::puts) ... this.  Adjust.
12272         (stdio_file_isatty): Delete.
12273         (stdio_file_fseek): Delete.
12274         (stdio_file::isatty): New.
12275         (stderr_file_write): Rename to ...
12276         (stderr_file::write) ... this.  Adjust.
12277         (stderr_file_fputs): Rename to ...
12278         (stderr_file::puts) ... this.  Adjust.
12279         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12280         (stderr_file::stderr_file): New.
12281         (tee_file_magic): Delete.
12282         (struct tee_file): Delete.
12283         (tee_file::tee_file): New.
12284         (tee_file_new): Delete.
12285         (tee_file::~tee_file): New.
12286         (tee_file_delete): Delete.
12287         (tee_file_flush): Rename to ...
12288         (tee_file::flush): ... this.  Adjust.
12289         (tee_file_write): Rename to ...
12290         (tee_file::write): ... this.  Adjust.
12291         (tee_file::write_async_safe): New.
12292         (tee_file_fputs): Rename to ...
12293         (tee_file::puts): ... this.  Adjust.
12294         (tee_file_isatty): Rename to ...
12295         (tee_file::isatty): ... this.  Adjust.
12296         * ui-file.h (struct obstack, struct ui_file): Don't
12297         forward-declare.
12298         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12299         (ui_file_write_ftype)
12300         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12301         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12302         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12303         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12304         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12305         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12306         (set_ui_file_fseek): Delete.
12307         (ui_file_data, ui_file_delete, ui_file_rewind)
12308         (struct ui_file): New.
12309         (ui_file_up): New.
12310         (class null_file): New.
12311         (null_stream): Declare.
12312         (ui_file_write_for_put, ui_file_put): Delete.
12313         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12314         Delete.
12315         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12316         (gdb_fopen, tee_file_new): Delete.
12317         (struct string_file): New.
12318         (struct stdio_file): New.
12319         (stdio_file_up): New.
12320         (struct stderr_file): New.
12321         (class tee_file): New.
12322         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12323         of a 'ui_file *'.  Adjust.
12324         * ui-out.h (class ui_out) <field_stream>: Likewise.
12325         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12326         (null_stream): Delete.
12327         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12328         Adjust.
12329         * utils.h (struct ui_file): Delete forward declaration..
12330         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12331         (error_stream): Take a 'string_file &' instead of a
12332         'ui_file *'.
12333         * varobj.c (varobj_value_get_print_value): Use string_file.
12334         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12335         * gdbarch.c: Regenerate.
12336
12337 2017-02-02  Pedro Alves  <palves@redhat.com>
12338
12339         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12340         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12341         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12342         Adjust to call gdb_print_insn instead of
12343         gdb_disassembler::print_insn.
12344         (dump_insns, do_mixed_source_and_assembly_deprecated)
12345         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12346         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12347         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12348         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12349         declaration.
12350         (gdb_pretty_print_insn): Re-add declaration.
12351         * record-btrace.c (btrace_insn_history): Don't allocate a
12352         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12353
12354 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12355
12356         * disasm.h (gdb_disassembly): Remove file_string parameter.
12357         * disasm.c (gdb_disassembly): Likewise.
12358         * cli/cli-cmds.c (print_disassembly): Adapt.
12359         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12360         * stack.c (do_gdb_disassembly): Likewise.
12361
12362 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12363
12364         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12365         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12366         targets.  And if the implicit value is longer than needed, extract
12367         the first bytes instead of the "least significant" ones.
12368
12369 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12370
12371         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12372         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12373         (btrace_fetch): Assert can_access_registers_ptid.
12374         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12375         validate_registers_access.
12376
12377 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12378
12379         * gdbthread.h (can_access_registers_ptid): New.
12380         * thread.c (can_access_registers_ptid): New.
12381
12382 2017-02-01  Pedro Alves  <palves@redhat.com>
12383
12384         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12385
12386 2017-01-31  Pedro Alves  <palves@redhat.com>
12387
12388         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12389         Fix typos.
12390
12391 2017-01-31  Pedro Alves  <palves@redhat.com>
12392
12393         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12394         not used.
12395
12396 2017-01-31  Pedro Alves  <palves@redhat.com>
12397
12398         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12399
12400 2017-01-31  Pedro Alves  <palves@redhat.com>
12401
12402         * common/scoped_restore.h
12403         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12404         change the value's parameter type to T2.
12405         (make_scoped_restore): Likewise.
12406
12407 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12408             Richard Henderson  <rth@redhat.com>
12409
12410         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12411         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12412         GS_BASE for older kernels.
12413         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12414         GS_BASE for older kernels.
12415         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12416         and GS_BASE to the offset table.
12417         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12418         system register group.
12419         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12420         for older kernels.
12421         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12422         amd64 ABI.
12423         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12424         AMD64_GSBASE_REGNUM.
12425         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12426         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12427         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12428         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12429         i386/64bit-segments.xml in those rules.
12430         * features/i386/64bit-segments.xml: New file.
12431         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12432         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12433         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12434         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12435         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12436         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12437         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12438         * features/i386/amd64-avx-linux.c: Regenerated.
12439         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12440         * features/i386/amd64-avx-mpx.c: Regenerated.
12441         * features/i386/amd64-avx512-linux.c: Regenerated.
12442         * features/i386/amd64-linux.c: Regenerated.
12443         * features/i386/amd64-mpx-linux.c: Regenerated.
12444         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12445         * features/i386/i386-avx-mpx.c: Regenerated.
12446         * features/i386/x32-avx-linux.c: Regenerated.
12447         * features/i386/x32-avx512-linux.c: Regenerated.
12448         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12449         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12450         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12451         * regformats/i386/amd64-linux.dat: Regenerated.
12452         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12453         * regformats/i386/x32-avx-linux.dat: Regenerated.
12454         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12455         * regformats/i386/x32-linux.dat: Regenerated.
12456
12457 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12458
12459         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12460         Set to AMD64_NUM_REGS.
12461
12462 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12463
12464         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12465         that checks validity of a register number.
12466
12467 2017-01-27  Kees Cook  <keescook@google.com>
12468
12469         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12470         fetch_fpregs if target has fpa registers.
12471         (arm_linux_store_inferior_registers): Call store_fpregs if target
12472         has fpa registers.
12473
12474 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12475
12476         * cris-tdep.c (cris_gdbarch_init): Remove check for
12477         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12478
12479 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12480
12481         * corelow.c (get_core_register_section): Check for regset
12482         existence before checking for REGSET_VARIABLE_SIZE.
12483
12484 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12485             Pedro Alves  <palves@redhat.com>
12486
12487         PR gdb/20939
12488         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12489         call memory_error, save memaddr instead.
12490         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12491         negative, cal memory_error.
12492         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12493
12494 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12495
12496         * disasm-selftests.c (memory_error_test): New function.
12497         (_initialize_disasm_selftests): Register memory_error_test.
12498
12499 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12500
12501         * Makefile.in (SFILES): Add disasm-selftests.c and
12502         selftest-arch.c.
12503         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12504         * disasm-selftests.c: New file.
12505         * selftest-arch.c: New file.
12506         * selftest-arch.h: New file.
12507
12508 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12509
12510         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12511         to bfd_arch_mep.  Don't return 0 if section is not
12512         found.  Call print_insn_mep.
12513
12514 2017-01-26  Pedro Alves  <palves@redhat.com>
12515             Yao Qi  <yao.qi@linaro.org>
12516
12517         * arm-tdep.c: Include "disasm.h".
12518         (gdb_print_insn_arm): Update code to get gdbarch.
12519         * disasm.c (dis_asm_read_memory): Change it to
12520         gdb_disassembler::dis_asm_read_memory.
12521         (dis_asm_memory_error): Likewise.
12522         (dis_asm_print_address): Likewise.
12523         (gdb_pretty_print_insn): Change it to
12524         gdb_disassembler::pretty_print_insn.
12525         (dump_insns): Add one argument gdb_disassemlber.  All
12526         callers updated.
12527         (do_mixed_source_and_assembly_deprecated): Likewise.
12528         (do_mixed_source_and_assembly): Likewise.
12529         (do_assembly_only): Likewise.
12530         (gdb_disassembler::gdb_disassembler): New.
12531         (gdb_disassembler::print_insn): New.
12532         * disasm.h (class gdb_disassembler): New.
12533         (gdb_pretty_print_insn): Remove declaration.
12534         (gdb_disassemble_info): Likewise.
12535         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12536         (gdbscm_disasm_read_memory_worker): Update.
12537         (gdbscm_disasm_read_memory): Update.
12538         (gdbscm_disasm_memory_error): Remove.
12539         (gdbscm_disasm_print_address): Remove.
12540         (gdbscm_disassembler::gdbscm_disassembler): New.
12541         (gdbscm_print_insn_from_port): Update.
12542         * mips-tdep.c: Include disasm.h.
12543         (gdb_print_insn_mips): Update code to get gdbarch.
12544         * record-btrace.c (btrace_insn_history): Update.
12545         * spu-tdep.c: Include disasm.h.
12546         (struct spu_dis_asm_data): Remove.
12547         (struct spu_dis_asm_info): New.
12548         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12549         SPU id.
12550         (gdb_print_insn_spu): Cast disassemble_info to
12551         spu_dis_asm_info.
12552
12553 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12554
12555         * disasm.c (do_ui_file_delete): Delete.
12556         (gdb_insn_length): Move code creating stream to ...
12557         * utils.c (null_stream): ... here.  New function.
12558         * utils.h (null_stream): Declare.
12559
12560 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12561
12562         * python/py-inferior.c (find_thread_object): Return directly
12563         from the loop.  Remove "found" variable.
12564
12565 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12566
12567         GDB 7.12.1 released.
12568
12569 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12570
12571         * python/py-function.c (fnpy_call): Reorder declarations to have
12572         the gdbpy_enter object declared first.
12573         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12574
12575 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12576
12577         PR python/21068
12578         * python/python-internal.h (PyMem_RawMalloc): Define for
12579         Python < 3.4.
12580         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12581         PyMem_RawMalloc instead of PyMem_Malloc.
12582
12583 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12584             Luis Machado  <lgustavo@codesourcery.com>
12585
12586         * NEWS (New commands): Mention flash-erase.
12587         (New MI commands): Mention target-flash-erase.
12588         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12589         command.
12590         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12591         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12592         * target.c (flash_erase_command): New function.
12593         (initialize_targets): Add new flash-erase command.
12594         * target.h (flash_erase_command): New declaration.
12595
12596 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12597
12598         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12599         HAVE_SYS_PROCFS_H is defined.
12600
12601 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12602
12603         * remote.c (struct cached_reg): Change data into a pointer.
12604         * (stop_reply_dtr): Free data pointers before deleting vector.
12605         (process_stop_reply): Likewise.
12606         (remote_parse_stop_reply): Allocate space for data
12607
12608 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12609
12610         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12611         MAX_REGISTER_SIZE.
12612         (amd64_pseudo_register_read_value): Likewise.
12613         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12614         (store_register_using_P): Likewise.
12615         * regcache.c (regcache_xfer_part): Likewise.
12616
12617 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12618
12619         Split real and pseudo registers.
12620         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12621         (sparc32_pseudo_regnum): New enum.
12622         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12623         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12624         (SPARC32_CP0_REGISTERS): New macro.
12625         (sparc32_pseudo_register_name): New function.
12626         (sparc32_register_name): Use sparc32_pseudo_register_name.
12627         (sparc32_pseudo_register_type): New function.
12628         (sparc32_register_type): Use sparc32_pseudo_register_type.
12629         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12630         pseudo register numbers.
12631         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12632         (SPARC64_CP0_REGISTERS): New macro.
12633         (sparc64_pseudo_register_name): New function.
12634         (sparc64_register_name): Use sparc64_pseudo_register_name.
12635         (sparc64_pseudo_register_type): New function.
12636         (sparc64_register_type): Use sparc64_pseudo_register_type.
12637         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12638         pseudo register numbers.
12639         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12640         sparc64_store_arguments): Handle pseudo register numbers.
12641
12642 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12643
12644         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12645         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12646         output.
12647         (getpkt_or_notif_sane_1): Likewise.
12648
12649 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12650
12651         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12652         of CC.  Pass "-x c++-header" instead of "-x c".
12653
12654 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12655
12656         * remote.c (remote_can_async_p): Update comment.
12657
12658 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12659
12660         * linux-nat.c (linux_nat_can_async_p): Update comment.
12661
12662 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12663
12664         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12665
12666 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12667
12668         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12669
12670 2017-01-10  Tom Tromey  <tom@tromey.com>
12671
12672         * python/py-type.c (typy_legacy_template_argument): Update.
12673         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12674         ~demangle_parse_info): Declare new members.
12675         (cp_demangled_name_to_comp): Return unique_ptr.
12676         (cp_demangled_name_parse_free)
12677         (make_cleanup_cp_demangled_name_parse_free)
12678         (cp_new_demangle_parse_info): Remove.
12679         * cp-support.c (do_demangled_name_parse_free_cleanup)
12680         (make_cleanup_cp_demangled_name_parse_free): Remove.
12681         (inspect_type, cp_canonicalize_string_full)
12682         (cp_canonicalize_string): Update.
12683         (mangled_name_to_comp): Change return type.
12684         (cp_class_name_from_physname, method_name_from_physname)
12685         (cp_func_name, cp_remove_params): Update.
12686         * cp-name-parser.y (demangle_parse_info): New constructor, from
12687         cp_new_demangle_parse_info.
12688         (~demangle_parse_info): New destructor, from
12689         cp_demangled_name_parse_free.
12690         (cp_merge_demangle_parse_infos): Update.
12691         (cp_demangled_name_to_comp): Change return type.
12692
12693 2017-01-10  Tom Tromey  <tom@tromey.com>
12694
12695         * top.c (prevent_dont_repeat): Change return type.
12696         * python/python.c (execute_gdb_command): Use std::string.
12697         Update.
12698         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12699         * command.h (prevent_dont_repeat): Change return type.
12700         * breakpoint.c (bpstat_do_actions_1): Update.
12701
12702 2017-01-10  Tom Tromey  <tom@tromey.com>
12703
12704         * value.h (scoped_value_mark::~scoped_value_mark): Call
12705         free_to_mark.
12706         (scoped_value_mark::free_to_mark): New method.
12707         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12708         scoped_value_mark.
12709
12710 2017-01-10  Tom Tromey  <tom@tromey.com>
12711
12712         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12713         (valpy_reference_value, valpy_const_value, valpy_get_address)
12714         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12715         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12716         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12717         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12718         scoped_value_mark.
12719         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12720         * value.h (scoped_value_mark): New class.
12721
12722 2017-01-10  Tom Tromey  <tom@tromey.com>
12723
12724         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12725         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12726         * psymtab.c (discard_psymtabs_upto): Remove.
12727         (make_cleanup_discard_psymtabs): Remove.
12728         (struct psymtab_state): Remove.
12729
12730 2017-01-10  Tom Tromey  <tom@tromey.com>
12731
12732         * record-full.c (record_full_save_cleanups): Remove.
12733         (record_full_save): Use gdb::unlinker.
12734         * gcore.c (do_bfd_delete_cleanup): Remove.
12735         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12736         cleanups.
12737         * dwarf2read.c (unlink_if_set): Remove.
12738         (write_psymtabs_to_index): Use gdb::unlinker.
12739         * common/gdb_unlinker.h: New file.
12740
12741 2017-01-10  Tom Tromey  <tom@tromey.com>
12742
12743         * windows-tdep.c (windows_xfer_shared_library): Update.
12744         * windows-nat.c (windows_make_so): Update.
12745         * utils.h (make_cleanup_bfd_unref): Remove.
12746         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12747         * symfile.h (symfile_bfd_open)
12748         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12749         * symfile.c (read_symbols, symbol_file_add)
12750         (separate_debug_file_exists): Update.
12751         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12752         (generic_load, reread_symbols): Update.
12753         * symfile-mem.c (symbol_file_add_from_memory): Update.
12754         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12755         (spu_symbol_file_add_from_memory): Update.
12756         * solist.h (struct target_so_ops) <bfd_open>: Return
12757         gdb_bfd_ref_ptr.
12758         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12759         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12760         gdb_bfd_ref_ptr.
12761         (solib_map_sections, reload_shared_libraries_1): Update.
12762         * solib-svr4.c (enable_break): Update.
12763         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12764         * solib-frv.c (enable_break2): Update.
12765         * solib-dsbt.c (enable_break): Update.
12766         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12767         gdb_bfd_ref_ptr.
12768         (darwin_solib_get_all_image_info_addr_at_init): Update.
12769         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12770         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12771         * record-full.c (record_full_save): Update.
12772         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12773         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12774         * minidebug.c (find_separate_debug_file_in_section): Return
12775         gdb_bfd_ref_ptr.
12776         * machoread.c (macho_add_oso_symfile): Change abfd to
12777         gdb_bfd_ref_ptr.
12778         (macho_symfile_read_all_oso): Update.
12779         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12780         (macho_symfile_read): Update.
12781         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12782         (jit_bfd_try_read_symtab): Update.
12783         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12784         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12785         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12786         gdb_bfd_ref_ptr.
12787         (gdb_bfd_ref_policy): New struct.
12788         (gdb_bfd_ref_ptr): New typedef.
12789         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12790         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12791         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12792         gdb_bfd_ref_ptr.
12793         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12794         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12795         (gcore_command): Update.
12796         * exec.c (exec_file_attach): Update.
12797         * elfread.c (elf_symfile_read): Update.
12798         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12799         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12800         (open_and_init_dwo_file): Update.
12801         (open_dwp_file): Return gdb_bfd_ref_ptr.
12802         (open_and_init_dwp_file): Update.
12803         * corelow.c (core_open): Update.
12804         * compile/compile-object-load.c (compile_object_load): Update.
12805         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12806         * coffread.c (coff_symfile_read): Update.
12807         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12808         gdb_bfd_ref_ptr.  Rename.
12809         (dump_bfd_file, restore_command): Update.
12810         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12811         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12812         (find_separate_debug_file_by_buildid): Update.
12813
12814 2017-01-10  Tom Tromey  <tom@tromey.com>
12815
12816         * common/gdb_ref_ptr.h: New file.
12817         * python/py-ref.h (struct gdbpy_ref_policy): New.
12818         (gdbpy_ref): Now a typedef.
12819
12820 2017-01-10  Tom Tromey  <tom@tromey.com>
12821
12822         * utils.h (make_cleanup_htab_delete): Don't declare.
12823         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12824         Remove.
12825         * linespec.c (decode_compound_collector): Add constructor,
12826         destructor.
12827         (lookup_prefix_sym): Remove cleanup.
12828         (symtab_collector): Add constructor, destructor.
12829         (collect_symtabs_from_filename): Remove cleanup.
12830         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12831         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12832         Use htab_up.
12833         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12834         * dwarf2read.c (dw2_expand_symtabs_matching)
12835         (dw2_map_symbol_filenames, dwarf_decode_macros)
12836         (write_psymtabs_to_index): Use htab_up.
12837         * dwarf2loc.c (func_verify_no_selftailcall)
12838         (call_site_find_chain_1, func_verify_no_selftailcall)
12839         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12840         std::vector, gdb::unique_xmalloc_ptr.
12841         (call_sitep): Remove typedef.
12842         (dwarf2_locexpr_baton_eval): Remove unused variable.
12843
12844 2017-01-10  Tom Tromey  <tom@tromey.com>
12845
12846         * python/python-internal.h (make_cleanup_py_decref)
12847         (make_cleanup_py_xdecref): Don't declare.
12848         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12849         (py_xdecref, make_cleanup_py_xdecref): Remove.
12850
12851 2017-01-10  Tom Tromey  <tom@tromey.com>
12852
12853         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12854         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12855
12856 2017-01-10  Tom Tromey  <tom@tromey.com>
12857
12858         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12859
12860 2017-01-10  Tom Tromey  <tom@tromey.com>
12861
12862         * python/py-utils.c (unicode_to_encoded_string)
12863         (python_string_to_target_string)
12864         (python_string_to_target_python_string)
12865         (python_string_to_host_string, gdbpy_obj_to_string)
12866         (get_addr_from_python): Use gdbpy_ref.
12867
12868 2017-01-10  Tom Tromey  <tom@tromey.com>
12869
12870         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12871         gdbpy_ref.
12872
12873 2017-01-10  Tom Tromey  <tom@tromey.com>
12874
12875         * python/python.c (eval_python_command, gdbpy_decode_line)
12876         (gdbpy_run_events, gdbpy_start_type_printers)
12877         (gdbpy_apply_type_printers): Use gdbpy_ref.
12878
12879 2017-01-10  Tom Tromey  <tom@tromey.com>
12880
12881         * python/py-param.c (get_doc_string, compute_enum_values): Use
12882         gdbpy_ref.
12883
12884 2017-01-10  Tom Tromey  <tom@tromey.com>
12885
12886         * python/py-inferior.c (find_thread_object, build_inferior_list):
12887         Use gdbpy_ref.
12888
12889 2017-01-10  Tom Tromey  <tom@tromey.com>
12890
12891         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12892
12893 2017-01-10  Tom Tromey  <tom@tromey.com>
12894
12895         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12896         gdbpy_ref.
12897
12898 2017-01-10  Tom Tromey  <tom@tromey.com>
12899
12900         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12901         extra incref.
12902         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12903         Use gdbpy_ref.
12904
12905 2017-01-10  Tom Tromey  <tom@tromey.com>
12906
12907         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12908         gdbpy_ref.
12909
12910 2017-01-10  Tom Tromey  <tom@tromey.com>
12911
12912         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12913         decref results of PyArg_ParseTupleAndKeywords.
12914
12915 2017-01-10  Tom Tromey  <tom@tromey.com>
12916
12917         * python/python.c (python_run_simple_file): Use
12918         unique_xmalloc_ptr, gdbpy_ref.
12919
12920 2017-01-10  Tom Tromey  <tom@tromey.com>
12921
12922         * python/py-prettyprint.c (print_stack_unless_memory_error)
12923         (print_string_repr, print_children): Use gdbpy_ref.
12924         (dummy_python_frame): New class.
12925         (dummy_python_frame::dummy_python_frame): Rename from
12926         push_dummy_python_frame.
12927         (py_restore_tstate): Remove.
12928
12929 2017-01-10  Tom Tromey  <tom@tromey.com>
12930
12931         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12932
12933 2017-01-10  Tom Tromey  <tom@tromey.com>
12934
12935         * python/python.c (ensure_python_env, restore_python_env):
12936         Remove.
12937         * python/python-internal.h (ensure_python_env): Don't declare.
12938         * varobj.h (varobj_ensure_python_env): Don't declare.
12939         * varobj.c (varobj_ensure_python_env): Remove.
12940
12941 2017-01-10  Tom Tromey  <tom@tromey.com>
12942
12943         * varobj.c (varobj_value_get_print_value): Use
12944         gdbpy_enter_varobj.
12945
12946 2017-01-10  Tom Tromey  <tom@tromey.com>
12947
12948         * python/py-prettyprint.c (print_string_repr, print_children):
12949         Update.
12950         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12951         of "encoding".
12952         * varobj.c (varobj_value_get_print_value): Update.
12953         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12954
12955 2017-01-10  Tom Tromey  <tom@tromey.com>
12956
12957         * varobj.c (varobj_get_display_hint)
12958         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12959         (varobj_set_visualizer, free_variable): Use
12960         gdbpy_enter_varobj.
12961
12962 2017-01-10  Tom Tromey  <tom@tromey.com>
12963
12964         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12965         (do_finish_initialization): New function.  Use gdbpy_ref.
12966         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12967         do_finish_initialization.
12968
12969 2017-01-10  Tom Tromey  <tom@tromey.com>
12970
12971         * python/py-param.c (get_set_value, get_show_value): Use
12972         gdbpy_enter, gdbpy_ref.
12973
12974 2017-01-10  Tom Tromey  <tom@tromey.com>
12975
12976         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12977
12978 2017-01-10  Tom Tromey  <tom@tromey.com>
12979
12980         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12981
12982 2017-01-10  Tom Tromey  <tom@tromey.com>
12983
12984         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12985         Use gdbpy_enter_varobj.
12986
12987 2017-01-10  Tom Tromey  <tom@tromey.com>
12988
12989         * varobj.c (gdbpy_enter_varobj): New constructor.
12990         * python/python-internal.h (gdbpy_enter_varobj): New class.
12991         * python/py-varobj.c (py_varobj_get_iterator): Use
12992         gdbpy_enter_varobj.
12993
12994 2017-01-10  Tom Tromey  <tom@tromey.com>
12995
12996         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12997         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12998         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12999         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13000         unique_xmalloc_ptr.
13001         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13002
13003 2017-01-10  Tom Tromey  <tom@tromey.com>
13004
13005         * python/py-xmethods.c (invoke_match_method): Use
13006         gdbpy_ref.
13007
13008 2017-01-10  Tom Tromey  <tom@tromey.com>
13009
13010         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13011         gdbpy_enter, gdbpy_ref.
13012
13013 2017-01-10  Tom Tromey  <tom@tromey.com>
13014
13015         * python/python.c (python_interactive_command): Use gdbpy_enter.
13016
13017 2017-01-10  Tom Tromey  <tom@tromey.com>
13018
13019         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13020         gdbpy_ref.
13021
13022 2017-01-10  Tom Tromey  <tom@tromey.com>
13023
13024         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13025         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13026
13027 2017-01-10  Tom Tromey  <tom@tromey.com>
13028
13029         * utils.h (htab_deleter): New struct.
13030         (htab_up): New typedef.
13031         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13032         gdbpy_enter, gdbpy_ref, htab_up.
13033
13034 2017-01-10  Tom Tromey  <tom@tromey.com>
13035
13036         * python/py-unwind.c (pending_frame_invalidate): Remove.
13037         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13038
13039 2017-01-10  Tom Tromey  <tom@tromey.com>
13040
13041         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13042         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13043
13044 2017-01-10  Tom Tromey  <tom@tromey.com>
13045
13046         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13047
13048 2017-01-10  Tom Tromey  <tom@tromey.com>
13049
13050         * python/python.c (gdbpy_eval_from_control_command)
13051         (gdbpy_source_script, gdbpy_run_events)
13052         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13053         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13054         gdbpy_enter.
13055
13056 2017-01-10  Tom Tromey  <tom@tromey.com>
13057
13058         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13059
13060 2017-01-10  Tom Tromey  <tom@tromey.com>
13061
13062         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13063
13064 2017-01-10  Tom Tromey  <tom@tromey.com>
13065
13066         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13067         (python_on_inferior_call_pre, python_on_inferior_call_post)
13068         (python_on_memory_change, python_on_register_change)
13069         (python_inferior_exit, python_new_objfile, add_thread_object)
13070         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13071
13072 2017-01-10  Tom Tromey  <tom@tromey.com>
13073
13074         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13075         (bpfinishpy_handle_exit): Use gdbpy_enter.
13076
13077 2017-01-10  Tom Tromey  <tom@tromey.com>
13078
13079         * python/py-cmd.c (cmdpy_destroyer)
13080         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13081         gdbpy_enter.
13082
13083 2017-01-10  Tom Tromey  <tom@tromey.com>
13084
13085         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13086         gdbpy_enter.
13087         (gdbpy_breakpoint_has_cond): Likewise.
13088
13089 2017-01-10  Tom Tromey  <tom@tromey.com>
13090
13091         * python/python.c (gdbpy_enter): New constructor.
13092         (~gdbpy_enter): New destructor.
13093         (restore_python_env, ensure_python_env): Rewrite.
13094         * python/python-internal.h (gdbpy_enter): New class.
13095
13096 2017-01-10  Tom Tromey  <tom@tromey.com>
13097
13098         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13099
13100 2017-01-10  Tom Tromey  <tom@tromey.com>
13101
13102         * python/py-value.c (value_has_field, get_field_flag)
13103         (get_field_type, valpy_getitem, convert_value_from_python): Use
13104         gdbpy_ref.
13105
13106 2017-01-10  Tom Tromey  <tom@tromey.com>
13107
13108         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13109         gdbpy_ref.
13110
13111 2017-01-10  Tom Tromey  <tom@tromey.com>
13112
13113         * python/py-prettyprint.c (search_pp_list)
13114         (find_pretty_printer_from_objfiles)
13115         (find_pretty_printer_from_progspace)
13116         (find_pretty_printer_from_gdb, find_pretty_printer)
13117         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13118         gdbpy_ref.
13119
13120 2017-01-10  Tom Tromey  <tom@tromey.com>
13121
13122         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13123
13124 2017-01-10  Tom Tromey  <tom@tromey.com>
13125
13126         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13127         (ltpy_get_all_source_lines): Use gdbpy_ref.
13128
13129 2017-01-10  Tom Tromey  <tom@tromey.com>
13130
13131         * python/py-framefilter.c (extract_sym, extract_value)
13132         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13133         gdbpy_ref.
13134
13135 2017-01-10  Tom Tromey  <tom@tromey.com>
13136
13137         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13138
13139 2017-01-10  Tom Tromey  <tom@tromey.com>
13140
13141         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13142
13143 2017-01-10  Tom Tromey  <tom@tromey.com>
13144
13145         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13146         gdbpy_ref.
13147
13148 2017-01-10  Tom Tromey  <tom@tromey.com>
13149
13150         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13151
13152 2017-01-10  Tom Tromey  <tom@tromey.com>
13153
13154         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13155         (typy_range): Use gdbpy_ref.
13156
13157 2017-01-10  Tom Tromey  <tom@tromey.com>
13158
13159         * python/py-threadevent.c (create_thread_event_object): Use
13160         gdbpy_ref.
13161         * python/py-stopevent.c (create_stop_event_object): Simplify.
13162         (emit_stop_event): Use gdbpy_ref.
13163         * python/py-signalevent.c (create_signal_event_object): Use
13164         gdbpy_ref.
13165         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13166         (emit_new_objfile_event, create_clear_objfiles_event_object)
13167         (emit_clear_objfiles_event): Use gdbpy_ref.
13168         * python/py-infevents.c (create_inferior_call_event_object)
13169         (create_register_changed_event_object)
13170         (create_memory_changed_event_object, emit_inferior_call_event)
13171         (emit_memory_changed_event, emit_register_changed_event): Use
13172         gdbpy_ref.
13173         * python/py-exitedevent.c (create_exited_event_object)
13174         (emit_exited_event): Use gdbpy_ref.
13175         * python/py-event.h (evpy_emit_event): Remove
13176         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13177         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13178         * python/py-continueevent.c (emit_continue_event): Use
13179         gdbpy_ref.
13180         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13181         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13182         gdbpy_ref.
13183         * python/py-bpevent.c (create_breakpoint_event_object): Use
13184         gdbpy_ref.
13185
13186 2017-01-10  Tom Tromey  <tom@tromey.com>
13187
13188         * python/py-ref.h: New file.
13189
13190 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13191
13192         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13193         void.
13194         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13195         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13196         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13197         * ui-out.c (ui_out::redirect): Likewise.
13198         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13199         * cli/cli-logging.c (set_logging_redirect): Update call site of
13200         ui_out::redirect.
13201         (handle_redirections): Likewise.
13202         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13203         * top.c (execute_command_to_string): Likewise.
13204         * utils.c (do_ui_out_redirect_pop): Likewise.
13205
13206 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13207
13208         * stack.c (_initialize_stack): Update "frame" command help message.
13209
13210 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13211
13212         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13213
13214 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13215
13216         * x86-linux-nat.h: Include gdb_proc_service.h.
13217
13218 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13219
13220         * ser-base.h: Include serial.h.
13221
13222 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13223
13224         * ppc-linux-tdep.h: Include ppc-tdep.h.
13225
13226 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13227
13228         * nat/amd64-linux-siginfo.h: Include signal.h.
13229
13230 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13231
13232         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13233
13234 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13235
13236         * mi/mi-parse.h: Include mi-cmds.h.
13237
13238 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13239
13240         * inf-loop.c: Don't include "target.h".
13241         * inf-loop.h: Include it here.
13242
13243 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13244
13245         * dfp.h: Include "dboulest.h" and "expression.h".
13246
13247 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13248
13249         * ax-gdb.h: Include "ax.h".
13250
13251 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13252
13253         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13254         with nat/gdb_ptrace.h.
13255
13256 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13257
13258         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13259         new line.
13260         (mips64_fbsd_sigframe_init): Likewise.
13261
13262 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13263
13264         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13265         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13266
13267 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13268
13269         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13270         * NEWS: Mention new FreeBSD/mips native configuration.
13271         * config/mips/fbsd.mh: New file.
13272         * configure.host: Add mips*-*-freebsd*.
13273         * mips-fbsd-nat.c: New file.
13274
13275 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13276
13277         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13278         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13279         * NEWS: Mention new FreeBSD/mips target.
13280         * configure.tgt: Add mips*-*-freebsd*.
13281         * mips-fbsd-tdep.c: New file.
13282         * mips-fbsd-tdep.h: New file.
13283
13284 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13285
13286         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13287         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13288
13289 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13290
13291         Update copyright year range in all GDB files.
13292
13293 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13294
13295         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13296
13297 For older changes see ChangeLog-2016.
13298 \f
13299 Local Variables:
13300 mode: change-log
13301 left-margin: 8
13302 fill-column: 74
13303 version-control: never
13304 coding: utf-8
13305 End: