Replace psymbol_allocation_list with std::vector
[external/binutils.git] / gdb / ChangeLog
1 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * objfiles.h: Don't include symfile.h.
4         (struct partial_symbol): Remove forward-declaration.
5         (struct objfile) <global_psymbols, static_psymbols>: Change type
6         to std::vector<partial_symbol *>.
7         * objfiles.c (objfile::objfile): Don't memset those fields.
8         (objfile::~objfile): Don't free those fields.
9         * psympriv.h (struct psymbol_allocation_list): Remove
10         forward-declaration.
11         (add_psymbol_to_list): Change psymbol_allocation_list parameter
12         to std::vector.
13         (start_psymtab_common): Change parameters to std::vector.
14         * psymtab.c: Include algorithm.
15         (require_partial_symbols): Call shrink_to_fit.
16         (find_pc_sect_psymbol): Adjust to vector change.
17         (match_partial_symbol): Likewise.
18         (lookup_partial_symbol): Likewise.
19         (psym_relocate): Likewise.
20         (dump_psymtab): Likewise.
21         (recursively_search_psymtabs): Likewise.
22         (compare_psymbols): Remove.
23         (sort_pst_symbols): Adjust to vector change.
24         (start_psymtab_common): Likewise.
25         (end_psymtab_common): Likewise.
26         (psymbol_bcache_full): De-constify return value.
27         (add_psymbol_to_bcache): Likewise.
28         (extend_psymbol_list): Remove.
29         (append_psymbol_to_list): Adjust to vector change.
30         (add_psymbol_to_list): Likewise.
31         (init_psymbol_list): Likewise.
32         (maintenance_info_psymtabs): Likewise.
33         (maintenance_check_psymtabs): Likewise.
34         * symfile.h (struct psymbol_allocation_list): Remove.
35         * symfile.c (reread_symbols): Adjust to vector change.
36         * dbxread.c (start_psymtab): Change type of parameters.
37         (dbx_symfile_read): Adjust to vector change.
38         (read_dbx_symtab): Likewise.
39         (start_psymtab): Change type of parameters.
40         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
41         (create_partial_symtab): Likewise.
42         (add_partial_symbol): Likewise.
43         (write_one_signatured_type): Likewise.
44         (recursively_write_psymbols): Likewise.
45         * mdebugread.c (parse_partial_symbols): Likewise.
46         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
47         (scan_xcoff_symtab): Adjust to vector change.
48         (xcoff_initial_scan): Likewise.
49
50 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
51
52         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
53
54 2017-10-13  Yao Qi  <yao.qi@linaro.org>
55
56         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
57         Remove s390x-*-expedite, add s390x-expedite.
58
59 2017-10-13  Yao Qi  <yao.qi@linaro.org>
60
61         * features/s390-gs-linux64.c: Regenerated.
62         * features/s390x-gs-linux64.c: Regenerated.
63
64 2017-10-13  Tom Tromey  <tom@tromey.com>
65
66         * compile/compile-object-run.c (do_module_cleanup): Use delete.
67         * solib.c (update_solib_list, reload_shared_libraries_1): Use
68         delete.
69         * symfile.c (symbol_file_add_with_addrs): Use new.
70         (symbol_file_add_separate): Update comment.
71         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
72         * jit.c (jit_object_close_impl): Use new.
73         (jit_unregister_code): Use delete.
74         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
75         (~objfile): Rename from free_objfile.
76         (free_objfile_separate_debug, do_free_objfile_cleanup)
77         (free_all_objfiles, objfile_purge_solibs): Use delete.
78         * objfiles.h (struct objfile): Add constructor and destructor.
79         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
80         (allocate_objfile, free_objfile): Don't declare.
81         (struct objstats): Add initializers.
82
83 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
84
85         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
86         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
87         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
88         * gdbarch.h: Regenerate.
89         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
90         Adjust comment.
91         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
92         (i386_displaced_step_fixup): Adjust comment.
93         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
94
95 2017-10-12  Tom Tromey  <tom@tromey.com>
96
97         * prologue-value.h (pv_area::store_would_trash): Return bool.
98         (pv_area::find_reg): Likewise.
99         * prologue-value.c (pv_area::store_would_trash): Return bool.
100         (pv_area::find_reg): Likewise.
101
102 2017-10-12  Tom Tromey  <tom@tromey.com>
103
104         * s390-linux-tdep.c (s390_store, s390_load)
105         (s390_check_for_saved, s390_analyze_prologue): Update.
106         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
107         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
108         * prologue-value.h (class pv_area): Move from prologue-value.c.
109         Change names of members.  Add constructor, destructor, member
110         functions.
111         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
112         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
113         (pv_area_fetch, pv_area_scan): Don't declare.
114         * prologue-value.c (struct pv_area::area_entry): Now member of
115         pv_area.
116         (struct pv_area): Move to prologue-value.h.
117         (pv_area::pv_area): Rename from make_pv_area.
118         (pv_area::~pv_area): Rename from free_pv_area.
119         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
120         (clear_entries, find_entry, overlaps, store_would_trash, store)
121         (fetch, find_reg, scan): Now member of pv_area.
122         Remove "area" argument.  Update.
123         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
124         Update.
125         * mn10300-tdep.c (push_reg, check_for_saved)
126         (mn10300_analyze_prologue): Update.
127         * mep-tdep.c (is_arg_spill, check_for_saved)
128         (mep_analyze_prologue): Update.
129         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
130         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
131         (m32c_is_struct_return, m32c_analyze_prologue): Update.
132         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
133         Update.
134         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
135         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
136
137 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
138
139         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
140         * linux-nat.c (linux_nat_delete_thread): New variable.
141         (lwp_free): Invoke linux_nat_delete_thread if set.
142         (linux_nat_set_delete_thread): New function.
143         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
144         thread delete callback.
145         * arm-linux-nat.c (arm_linux_delete_thread): New function.
146         (_initialize_arm_linux_nat): Assign thread delete callback.
147         * s390-linux-nat.c (s390_delete_thread): New function.
148         (_initialize_s390_nat): Assign thread delete callback.
149         * x86-linux-nat.c (x86_linux_add_target): Likewise.
150         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
151         function.
152         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
153         declaration.
154         * nat/x86-linux.c (x86_linux_delete_thread): New function.
155         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
156
157 2017-10-09  Tom Tromey  <tom@tromey.com>
158
159         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
160         std::string.
161         * tui/tui-layout.c (enum tui_status): Use std::string.
162
163 2017-10-11  Tom Tromey  <tom@tromey.com>
164
165         * gdbthread.h (thread_command): Constify.
166         * inferior.h (detach_command): Constify.
167         * top.h (set_history, show_history): Constify.
168         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
169         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
170         * bsd-kvm.c (bsd_kvm_cmd): Constify.
171         * printcmd.c (set_command): Constify.
172         (non_const_set_command): New function.
173         * dcache.c (set_dcache_command, show_dcache_command): Constify.
174         * breakpoint.c (enable_command, disable_command, delete_command)
175         (catch_command, tcatch_command, set_breakpoint_cmd)
176         (show_breakpoint_cmd): Constify.
177         * macrocmd.c (macro_command): Constify.
178         * infcmd.c (unset_command, kill_command, detach_command)
179         (info_proc_cmd): Constify.
180         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
181         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
182         (info_auto_load_cmd): Constify.
183         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
184         (unset_tdesc_cmd): Constify.
185         * ada-lang.c (set_ada_command, show_ada_command)
186         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
187         * guile/guile.c (set_guile_command, show_guile_command)
188         (info_guile_command): Constify.
189         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
190         Constify.
191         * skip.c (skip_command): Constify.
192         * compile/compile.c (_initialize_compile): Constify.
193         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
194         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
195         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
196         (maint_btrace_pt_show_cmd): Constify.
197         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
198         Constify.
199         * python/python.c (user_show_python, user_set_python): Constify.
200         * mips-tdep.c (set_mips_command, show_mips_command)
201         (set_mipsfpu_command): Constify.
202         * record-btrace.c (cmd_record_btrace_start)
203         (cmd_set_record_btrace, cmd_show_record_btrace)
204         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
205         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
206         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
207         Constify.
208         * symfile.c (overlay_command): Constify.
209         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
210         * cli/cli-logging.c (set_logging_command, show_logging_command):
211         Constify.
212         * cli/cli-dump.c (dump_command, append_command)
213         (srec_dump_command, ihex_dump_command, verilog_dump_command)
214         (tekhex_dump_command, binary_dump_command)
215         (binary_append_command): Constify.
216         * cli/cli-decode.c (struct cmd_list_element): Change type of
217         "fun".
218         * cli/cli-cmds.c (info_command, show_command, set_debug)
219         (show_debug): Constify.
220         (show_command): Add non-const overload.
221         * top.c (set_history, show_history): Constify.
222         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
223         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
224         * target.c (target_command): Constify.
225         * sparc64-tdep.c (info_adi_command): Constify.
226         * record-full.c (cmd_record_full_start): Constify.
227         (set_record_full_command): Constify.  Fix typo.
228         (show_record_full_command): Constify.
229         * thread.c (thread_command, thread_apply_command): Constify.
230         * memattr.c (dummy_cmd): Constify.
231         * value.c (function_command): Constify.
232         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
233         * probe.c (info_probes_command): Constify.
234         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
235         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
236         (show_thread_cmd, set_thread_default_cmd)
237         (show_thread_default_cmd): Constify.
238         (check_empty): Constify.
239         * tracepoint.c (tfind_command): Constify.
240         * cp-support.c (maint_cplus_command): Constify.
241         * windows-tdep.c (info_w32_command): Constify.
242         * record.c (cmd_record_start, set_record_command)
243         (show_record_command, info_record_command, cmd_record_goto):
244         Constify.
245         * ravenscar-thread.c (set_ravenscar_command)
246         (show_ravenscar_command): Constify.
247         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
248         Constify.
249         (add_internal_problem_command): Remove casts.
250         * arc-tdep.c (maintenance_print_arc_command): Constify.
251         * valprint.c (set_print, show_print, set_print_raw)
252         (show_print_raw): Constify.
253         * maint.c (maintenance_command, maintenance_info_command)
254         (maintenance_print_command, maintenance_set_cmd)
255         (maintenance_show_cmd, set_per_command_cmd)
256         (show_per_command_cmd, maintenance_check_command): Constify.
257         * language.c (set_check, show_check): Constify.
258         * typeprint.c (show_print_type, set_print_type): Constify.
259         * go32-nat.c (go32_info_dos_command): Constify.
260
261 2017-10-11  Tom Tromey  <tom@tromey.com>
262
263         * breakpoint.c (prepare_re_set_context): Remove.
264         (breakpoint_re_set_one): Update.  Don't use cleanups.
265         (breakpoint_re_set): Use scoped_restore, std::string, and
266         scoped_restore_current_language.
267
268 2017-10-11  Tom Tromey  <tom@tromey.com>
269
270         * breakpoint.c (commands_command_1): Use std::string.
271         (cleanup_executing_breakpoints): Remove.
272         (bpstat_do_actions_1): Use scoped_restore.
273         (bpstat_check_watchpoint): Use std::string.
274         (decode_static_tracepoint_spec): Likewise.
275         (break_range_command): Likewise.
276         (watch_command_1): Likewise.
277         (compare_breakpoints): Change argument types.
278         (clear_command): Use std::vector.
279         (cleanup_executing_breakpoints): Remove.
280         (update_global_location_list): Use unique_xmalloc_ptr.
281         (strace_command): Remove unused declaration.
282
283 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
284
285         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
286         * NEWS: Mention new FreeBSD/arm native configuration.
287         * configure.host: Add arm*-*-freebsd*.
288         * configure.nat: Likewise.
289         * arm-fbsd-nat.c: New file.
290
291 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
292
293         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
294         (ALLDEPFILES): Add arm-fbsd-tdep.c.
295         * NEWS: Mention new FreeBSD/arm target.
296         * configure.tgt: Add arm*-*-freebsd*.
297         * arm-fbsd-tdep.c: New file.
298         * arm-fbsd-tdep.h: New file.
299
300 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
301
302         * linux-tdep.c (linux_make_corefile_notes): Remove call to
303         `gdbarch_elfcore_write_linux_prpsinfo'.
304         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
305         method.
306         (elf_internal_linux_prpsinfo): Remove declaration.
307         * gdbarch.h: Regenerate.
308         * gdbarch.c: Regenerate.
309
310 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
311
312         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
313         `set_gdbarch_elfcore_write_linux_prpsinfo'.
314
315 2017-10-11  Pedro Alves  <palves@redhat.com>
316
317         * breakpoint.c (reattach_breakpoints): Delete.
318         * breakpoint.h (reattach_breakpoints): Delete.
319
320 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
321
322         * symfile.c (registered_sym_fns): Make struct, not typedef.
323         (DEF_VEC_O (registered_sym_fns)): Remove.
324         (symtab_fns): Change type to std::vector.
325         (add_symtab_fns): Adjust.
326         (find_sym_fns): Adjust.
327
328 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
329
330         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
331         * arc-tdep.h (arc_arch_is_em): New function.
332         (arc_arch_is_hs): Likewise.
333
334 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
335
336         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
337         parentheses in the declaration.
338         (macro_lookup_inclusion): Likewise.
339         (macro_lookup_definition): Likewise.
340         * p-lang.h (pascal_builtin_types): Likewise.
341         * tui/tui-data.c (tui_win_list): Likewise.
342         * tui/tui-data.h (tui_win_list): Likewise.
343         * utils.h (make_cleanup_free_section_addr_info): Likewise.
344
345 2017-10-11  Mark Rages  <markrages@gmail.com>
346
347         * target-memory.c (block_boundaries): Fix for block address not
348         aligned on block size.
349
350 2017-10-10  Pedro Alves <palves@redhat.com>
351             Tom Tromey  <tom@tromey.com>
352
353         * breakpoint.c (struct captured_breakpoint_query_args)
354         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
355         (print_breakpoint): New.
356         * breakpoint.h (print_breakpoint): Declare.
357         * common/common-exceptions.h (enum return_reason): Remove
358         references to catch_exceptions.
359         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
360         Delete.
361         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
362         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
363         * gdb.h: Delete.
364         * gdbthread.h (thread_select): Declare.
365         * mi/mi-cmd-break.c: Don't include gdb.h.
366         (breakpoint_notify): Use print_breakpoint.
367         * mi/mi-cmd-catch.c: Don't include gdb.h.
368         * mi/mi-interp.c: Don't include gdb.h.
369         (mi_print_breakpoint_for_event): New.
370         (mi_breakpoint_created, mi_breakpoint_modified): Use
371         mi_print_breakpoint_for_event.
372         * mi/mi-main.c: Don't include gdb.h.
373         (mi_cmd_thread_select): Parse the global thread ID here.  Use
374         thread_select instead of gdb_thread_select.
375         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
376         of using gdb_list_thread_ids.
377         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
378         FILEIO_ENOSYS here.
379         (remote_fileio_request): Use TRY/CATCH instead of
380         catch_exceptions.
381         * symfile-mem.c (struct symbol_file_add_from_memory_args)
382         (symbol_file_add_from_memory_wrapper): Delete.
383         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
384         * thread.c: Don't include gdb.h.
385         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
386         (thread_alive): Use thread_select.
387         (do_captured_thread_select): Delete, parts salvaged as ...
388         (thread_select): ... this new function.
389         (gdb_thread_select): Delete.
390
391 2017-10-10  Pedro Alves  <palves@redhat.com>
392             Tom Tromey  <tom@tromey.com>
393
394         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
395         and reverse logic.
396         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
397         No longer macros.  Instead ...
398         (enum wp_check_result): They're now values of this new
399         enumeration.
400         (watchpoint_check): Change return type to wp_check_result and
401         parameter type to bpstat.
402         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
403         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
404         catch_errors.  Reverse logic of watchpoint_check call.
405         (breakpoint_re_set_one): Now returns void and takes a breakpoint
406         pointer as parameter.
407         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
408         * common/common-exceptions.c (throw_exception_sjlj): Update
409         comments to avoid mentioning catch_errors.
410         * exceptions.c (catch_errors): Delete.
411         * exceptions.h: Update comments to avoid mentioning catch_errors.
412         (catch_errors_ftype, catch_errors): Delete.
413         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
414         (hook_stop_stub): Delete.
415         (restore_selected_frame): Change return type to void, and
416         parameter type to const frame_id &.
417         (restore_infcall_control_state): Use TRY/CATCH instead of
418         catch_errors.
419         * main.c (captured_command_loop): Return void and remove
420         parameter.  Remove references to catch_errors.
421         (captured_main): Use TRY/CATCH instead of catch_errors.
422         * objc-lang.c (objc_submethod_helper_data)
423         (find_objc_msgcall_submethod_helper): Delete.
424         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
425         catch_errors.
426         * record-full.c (record_full_message): Return void.
427         (record_full_message_args, record_full_message_wrapper): Delete.
428         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
429         instead of catch_errors.
430         * solib-aix.c (solib_aix_open_symbol_file_object): Change
431         parameter type to int.
432         * solib-darwin.c (open_symbol_file_object): Ditto.
433         * solib-dsbt.c (open_symbol_file_object): Ditto.
434         * solib-frv.c (open_symbol_file_object): Ditto.
435         * solib-svr4.c (open_symbol_file_object): Ditto.
436         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
437         * solib.c (update_solib_list): Use TRY/CATCH instead of
438         catch_errors.
439         * solist.h (struct target_so_ops) <open_symbol_file_object>:
440         Change type.
441         * symmisc.c (struct print_symbol_args): Remove.
442         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
443         (print_symbol): Change type.
444         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
445         and remove parameters.
446         (catch_errors): New.
447         (get_windows_debug_event): Adjust.
448
449 2017-10-09  Tom Tromey  <tom@tromey.com>
450
451         * mi/mi-main.c (free_splay_tree): Remove.
452         (list_available_thread_groups): Use splay_tree_up.
453         * common/gdb_splay_tree.h: New file.
454
455 2017-10-09  Tom Tromey  <tom@tromey.com>
456
457         * mi/mi-main.c (do_nothing): Remove.
458         (list_available_thread_groups): Update.
459
460 2017-10-09  Pedro Alves  <palves@redhat.com>
461
462         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
463         reading registers when switching context.
464
465 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
466
467         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
468         (fbsd_convert_siginfo): Likewise.
469         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
470
471 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
472
473         * configure.ac (try_guile_versions): Remove guile-2.2.
474         * configure: Regenerate.
475
476 2017-10-09  Tom Tromey  <tom@tromey.com>
477
478         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
479         (COMPILE.pre): Use $(CXX).
480
481 2017-10-09  Pedro Alves  <palves@redhat.com>
482
483         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
484         Use bool.
485         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
486         * cp-support.h (cp_remove_params): Now returns a
487         gdb::unique_xmalloc_ptr.
488         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
489         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
490         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
491         returning a gdb::unique_xmalloc_ptr.
492         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
493         * stack.c (find_frame_funname): Adjust to cp_remove_params
494         returning a gdb::unique_xmalloc_ptr.
495
496 2017-10-08  Tom Tromey  <tom@tromey.com>
497
498         * dwarf2read.c (dwarf2_get_dwz_file): Use
499         gdb::unique_xmalloc_ptr.
500         (find_slot_in_mapped_hash): Likewise.
501         (dwarf2_physname): Likewise.
502         (create_dwo_unit_in_dwp_v1): Use std::string.
503         (create_dwo_unit_in_dwp_v2): Likewise.
504         (lookup_dwo_cutu): Likewise.
505         (inherit_abstract_dies): Use std::vector.
506         (read_array_type): Likewise.
507         (dwarf_decode_macros): Remove unused declaration.
508         (unsigned_int_compar): Remove.
509         (dwarf2_build_psymtabs_hard): Use scoped_restore.
510         (psymtabs_addrmap_cleanup): Remove.
511
512 2017-10-08  Tom Tromey  <tom@tromey.com>
513
514         * frame-unwind.c (frame_unwind_try_unwinder): Update.
515         * frame.h (frame_cleanup_after_sniffer): Declare.
516         (frame_prepare_for_sniffer): Return void.
517         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
518         type of argument.
519         (frame_prepare_for_sniffer): Return void.
520
521 2017-10-08  Tom Tromey  <tom@tromey.com>
522
523         * utils.h (make_cleanup_value_free): Remove.
524         * utils.c (do_value_free, struct cleanup): Remove.
525         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
526         Use gdb_value_up.
527         * value.h (struct value_deleter): New.
528         (gdb_value_up): New typedef.
529
530 2017-10-08  Tom Tromey  <tom@tromey.com>
531
532         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
533         (make_cleanup_free_search_symbols): Remove.
534         (search_symbols): Return std::vector.
535         (symbol_search::compare_search_syms): Now member of
536         symbol_search.  Change arguments.
537         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
538         (symtab_symbol_info, rbreak_command): Update.
539         * symtab.h (struct symbol_search) <next>: Remove.
540         Add constructors.
541         (symbol_search::operator<): New function.
542         (symbol_search::operator==): New function.
543         (search_symbols): Remove std::vector.
544         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
545         (symbol_search::compare_search_syms): Declare.
546
547 2017-10-06  Yao Qi  <yao.qi@linaro.org>
548
549         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
550         arch/aarch64-insn.o.
551         Remove one rule.
552         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
553
554 2017-10-06  Yao Qi  <yao.qi@linaro.org>
555
556         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
557         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
558         arch/arm-linux.o respectively.
559         * configure.tgt: Likewise.
560
561 2017-10-06  Yao Qi  <yao.qi@linaro.org>
562
563         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
564         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
565
566 2017-10-06  Pedro Alves  <palves@redhat.com>
567
568         * windows-nat.c: Include <algorithm>.
569
570 2017-10-06  Yao Qi  <yao.qi@linaro.org>
571
572         * configure.tgt (i386_tobjs): New variable.
573         (amd64_tobjs): New variable.
574         Set $cpu_obs and $os_obs.
575
576 2017-10-06  Yao Qi  <yao.qi@linaro.org>
577
578         * Makefile.in (CONFIG_SRC_SUBDIR): New.
579         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
580         (clean): Remove object files and dependency files.
581         (distclean): Remove the directory.
582         * configure.ac: Invoke AC_CONFIG_COMMANDS.
583         * configure: Re-generated.
584         * configure.tgt: Replace amd64.o with arch/amd64.o.
585
586 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
587
588         PR build/22188
589         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
590         and SETEND.
591
592 2017-10-05  Pedro Alves  <palves@redhat.com>
593
594         * linux-nat.c (linux_child_follow_fork): When following the parent
595         and detaching the child, consult the parent thread's architecture
596         instead of the child's.
597
598 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
599
600         * ax.h: Do not include "doublest.h".
601         (union agent_val): Remove.
602
603 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
604
605         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
606         (decimal_to_string): Return std::string object.
607         (decimal_from_string): Accept std::string object.  Return bool.
608         (decimal_from_integral, decimal_from_doublest): Remove.
609         (decimal_from_longest): Add prototype.
610         (decimal_from_ulongest): Likewise.
611         (decimal_to_longest): Likewise.
612         (decimal_from_doublest): Likewise.
613         * dfp.c: Do not include "gdbtypes.h" or "value.h".
614         (MAX_DECIMAL_STRING): Move here.
615         (decimal_to_string): Return std::string object.
616         (decimal_from_string): Accept std::string object.  Return bool.
617         (decimal_from_integral): Remove, replace by ...
618         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
619         (decimal_to_longest): New function.
620         (decimal_from_floating): Remove, replace by ...
621         (decimal_from_doublest): ... this new function.
622         (decimal_to_doublest): Update to new decimal_to_string interface.
623
624         * value.c (unpack_long): Use decimal_to_longest.
625         * valops.c (value_cast): Use decimal_from_doublest instead of
626         decimal_from_floating.  Use decimal_from_[u]longest isntead of
627         decimal_from_integral.
628         * valarith.c (value_args_as_decimal): Likewise.
629         * valprint.c (print_decimal_floating): Update to new
630         decimal_to_string interface.
631         * printcmd.c (printf_decfloat): Likewise.
632         * c-exp.y (parse_number): Update to new decimal_from_string interface.
633
634 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
635
636         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
637         * gdbtypes.c: Include "floatformat.h".
638         * value.c: Likewise.
639         * m68k-tdep.c: Likewise.
640
641         * findvar.c: Do not include "floatformat.h".
642         * amd64-darwin-tdep.c: Likewise.
643         * arm-linux-tdep.c: Likewise.
644         * i386-darwin-tdep.c: Likewise.
645         * i387-tdep.c: Likewise.
646         * m68k-linux-tdep.c: Likewise.
647         * mep-tdep.c: Likewise.
648         * mips-tdep.c: Likewise.
649         * nios2-tdep.c: Likewise.
650         * s390-linux-tdep.c: Likewise.
651         * sparc-obsd-tdep.c: Likewise.
652         * sparc-tdep.c: Likewise.
653         * sparc64-tdep.c: Likewise.
654         * spu-tdep.c: Likewise.
655         * tic6x-tdep.c: Likewise.
656         * tilegx-tdep.c: Likewise.
657         * vax-tdep.c: Likewise.
658         * xstormy16-tdep.c: Likewise.
659         * xtensa-tdep.c: Likewise.
660
661         * top.c: Do not include "doublest.h".
662         * aarch64-tdep.c: Likewise.
663         * alpha-tdep.c: Likewise.
664         * arm-linux-tdep.c: Likewise.
665         * m68k-linux-tdep.c: Likewise.
666         * tilegx-tdep.c: Likewise.
667         * xstormy16-tdep.c: Likewise.
668
669 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
670
671         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
672         (mipsn32_fbsd_sigframe): Define.
673         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
674         for FreeBSD/mipsn32.
675
676 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
677
678         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
679         AT_HWCAP.
680
681 2017-10-05  Tristan Gingold  <tgingold@free.fr>
682
683         * MAINTAINERS (Misc): Update my email address.
684
685 2017-10-04  Pedro Alves  <palves@redhat.com>
686
687         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
688         it instead of target_gdbarch.
689         (get_remote_state, get_remote_packet_size): Adjust
690         get_remote_arch_state calls, passing down target_gdbarch
691         explicitly.
692         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
693         'gdbarch' and use it instead of target_gdbarch.
694         (get_memory_packet_size): Adjust get_remote_arch_state calls,
695         passing down target_gdbarch explicitly.
696         (struct stop_reply) <arch>: New field.
697         (remote_parse_stop_reply): Use the stopped thread's architecture,
698         not the current inferior's.  Save the architecture in the
699         stop_reply.
700         (process_stop_reply): Use the stop reply's architecture.
701         (process_g_packet, remote_fetch_registers)
702         (remote_prepare_to_store, store_registers_using_G)
703         (remote_store_registers): Adjust get_remote_arch_state calls,
704         using the regcache's architecture.
705         (remote_get_trace_status): Adjust get_remote_arch_state calls,
706         passing down target_gdbarch explicitly.
707         * spu-multiarch.c (spu_thread_architecture): Defer to the target
708         beneath instead of calling target_gdbarch.
709         * target.c (default_thread_architecture): Use the specified
710         inferior's architecture, instead of the current inferior's
711         architecture (via target_gdbarch).
712
713 2017-10-04  Pedro Alves  <palves@redhat.com>
714
715         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
716         case.
717         (regcache_print): Handle !target_has_registers here instead.
718
719 2017-10-04  Pedro Alves  <palves@redhat.com>
720
721         * frame.c (create_test_frame): Delete.
722         * frame.h (create_test_frame): Delete.
723         * gdbarch-selftests.c: Include gdbthread.h and target.h.
724         (class regcache_test): Delete.
725         (test_target_has_registers, test_target_has_stack)
726         (test_target_has_memory, test_target_prepare_to_store)
727         (test_target_store_registers): New functions.
728         (test_target_ops): New class.
729         (register_to_value_test): Error out if there's already a
730         process_stratum (or higher) target pushed.  Create a fuller mock
731         environment, with mock target_ops, inferior, address space, thread
732         and inferior_ptid.
733         * progspace.c (struct address_space): Move to ...
734         * progspace.h (struct address_space): ... here.
735         * regcache.h (regcache::~regcache, regcache::raw_write)
736         [GDB_SELF_TEST]: No longer virtual.
737
738 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
739
740         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
741
742 2017-10-04  Pedro Alves  <palves@redhat.com>
743
744         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
745         out of 'between TRY and CATCH'.
746
747 2017-10-04  Pedro Alves  <palves@redhat.com>
748
749         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
750         * common/common-exceptions.h (TRY): Open an outermost scope.
751         Expand intro comment.
752         (CATCH): Reindent.
753         (END_CATCH): Close the outermost scope.
754         * completer.c (complete_line_internal): Add missing END_CATCH.
755
756 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
757
758         * NEWS (Changes since GDB 8.0): Add entry about new
759         'set-cwd-on-gdbserver' feature.
760         (New remote packets): Add entry for QSetWorkingDir.
761         * common/common-inferior.h (set_inferior_cwd): New prototype.
762         * infcmd.c (set_inferior_cwd): Remove "static".
763         (show_cwd_command): Expand text to include remote debugging.
764         * remote.c: Add PACKET_QSetWorkingDir.
765         (remote_protocol_features) <QSetWorkingDir>: New entry for
766         PACKET_QSetWorkingDir.
767         (extended_remote_set_inferior_cwd): New function.
768         (extended_remote_create_inferior): Call
769         "extended_remote_set_inferior_cwd".
770         (_initialize_remote): Call "add_packet_config_cmd" for
771         QSetWorkingDir.
772
773 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
774
775         * NEWS (New commands): Mention "set/show cwd".
776         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
777         "cd" command's help text.
778         * common/common-inferior.h (get_inferior_cwd): New prototype.
779         * infcmd.c (inferior_cwd_scratch): New global variable.
780         (set_inferior_cwd): New function.
781         (get_inferior_cwd): Likewise.
782         (set_cwd_command): Likewise.
783         (show_cwd_command): Likewise.
784         (_initialize_infcmd): Add "set/show cwd" commands.
785         * inferior.h (class inferior) <cwd>: New field.
786         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
787         (fork_inferior): Change inferior's cwd before its execution.
788         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
789         to CreateProcess.
790
791 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
792
793         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
794         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
795         (COMMON_OBS): Add gdb_tilde_expand.o.
796         * common/gdb_tilde_expand.c: New file.
797         * common/gdb_tilde_expand.h: Likewise.
798
799 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
800
801         * gdbarch.sh (objfile): Remove duplicate declaration.
802         * gdbarch.h: Regenerate.
803
804 2017-10-03  Tom Tromey  <tom@tromey.com>
805
806         * utils.c (internal_vproblem): Use string_vprintf.
807
808 2017-10-03  Tom Tromey  <tom@tromey.com>
809
810         * printcmd.c (info_symbol_command): Use std::string.
811
812 2017-10-03  Tom Tromey  <tom@tromey.com>
813
814         * top.c (gdb_safe_append_history): Use std::string.
815
816 2017-10-03  Tom Tromey  <tom@tromey.com>
817
818         * event-top.c (stdin_event_handler): Update.
819         * main.c (captured_main_1): Update.
820         * top.h (make_delete_ui_cleanup): Remove.
821         (struct ui): Add constructor and destructor.
822         (new_ui, delete_ui): Remove.
823         * top.c (make_delete_ui_cleanup): Remove.
824         (new_ui_command): Use std::unique_ptr.
825         (delete_ui_cleanup): Remove.
826         (ui::ui): Rename from new_ui.  Update.
827         (free_ui): Remove.
828         (ui::~ui): Rename from delete_ui.  Update.
829
830 2017-10-03  Tom Tromey  <tom@tromey.com>
831
832         * symfile.c (load_progress): Use gdb::byte_vector.
833
834 2017-10-03  Tom Tromey  <tom@tromey.com>
835
836         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
837         declaration.
838         * printcmd.c (x_command): Remove unused declaration.
839         * symfile.c (symbol_file_command): Remove unused declaration.
840
841 2017-10-03  Tom Tromey  <tom@tromey.com>
842
843         * utils.c (internal_vproblem): Use std::string.
844         (defaulted_query): Likewise.
845
846 2017-10-03  Tom Tromey  <tom@tromey.com>
847
848         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
849         * top.c (execute_command_to_string): Update.
850         * utils.c (make_cleanup_restore_page_info): Remove.
851         (do_restore_page_info_cleanup): Remove.
852         (set_batch_flag_and_restore_page_info):
853         New.
854         (make_cleanup_restore_page_info): Remove.
855         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
856         (~set_batch_flag_and_restore_page_info): New
857         (make_cleanup_restore_uinteger): Remove.
858         (make_cleanup_restore_integer): Remove.
859         (struct restore_integer_closure): Remove.
860         (restore_integer): Remove.
861         * utils.h (struct set_batch_flag_and_restore_page_info): New
862         class.
863         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
864         (make_cleanup_restore_page_info): Remove.
865         (make_cleanup_restore_uinteger) Remove.
866         (make_cleanup_restore_integer) Remove.
867
868 2017-10-03  Tom Tromey  <tom@tromey.com>
869
870         * record-full.h (record_full_gdb_operation_disable_set): Return
871         scoped_restore_tmpl<int>.
872         * infrun.c (adjust_pc_after_break): Update.
873         (handle_signal_stop): Update.
874         * record-full.c (record_full_gdb_operation_disable_set): Return
875         scoped_restore_tmpl<int>.
876         (record_full_wait_1, record_full_insert_breakpoint)
877         (record_full_remove_breakpoint, record_full_save)
878         (record_full_goto_insn): Update.
879
880 2017-10-02  Tom Tromey  <tom@tromey.com>
881
882         PR rust/22236:
883         * rust-lang.c (rust_val_print_str): New function.
884         (val_print_struct): Call it.
885         (rust_subscript): Preserve name of slice type.
886
887 2017-10-02  Tom Tromey  <tom@tromey.com>
888
889         * rust-lang.c (rust_subscript): Handle slices in
890         EVAL_AVOID_SIDE_EFFECTS case.
891
892 2017-10-02  Tom Tromey  <tom@tromey.com>
893
894         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
895
896 2017-10-02  Tom Tromey  <tom@tromey.com>
897
898         * rust-lang.h (rust_slice_type): Add "extern".
899
900 2017-10-02  Tom Tromey  <tom@tromey.com>
901             Pedro Alves  <palves@redhat.com>
902
903         * ada-lang.h (ada_exc_info::operator<): Make const.
904         (ada_exc_info::operator==): Make const.
905         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
906         Make const.
907
908 2017-09-29  Tom Tromey  <tom@tromey.com>
909
910         * target.c (read_whatever_is_readable): Change type of "result".
911         Update.
912         (free_memory_read_result_vector): Remove.
913         (read_memory_robust): Change return type.  Update.
914         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
915         bin2hex, std::string.
916         * target.h (memory_read_result_s): Remove typedef.
917         (free_memory_read_result_vector): Remove.
918         (read_memory_robust): Return std::vector.
919
920 2017-09-29  Tom Tromey  <tom@tromey.com>
921
922         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
923
924 2017-09-29  Tom Tromey  <tom@tromey.com>
925
926         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
927         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
928         operator< and operator==.
929         (ada_exceptions_list): Return a std::vector.
930         * ada-lang.c (ada_exc_info::operator<): Rename from
931         compare_ada_exception_info.
932         (ada_exc_info::operator==): New.
933         (sort_remove_dups_ada_exceptions_list): Change type of
934         "exceptions".
935         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
936         (ada_add_global_exceptions): Likewise.
937         (ada_exceptions_list_1): Return a std::vector.
938         (ada_exceptions_list): Likewise.
939
940 2017-09-29  Tom Tromey  <tom@tromey.com>
941
942         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
943         'std::set *'.
944         (print_one_inferior): Update.
945         (free_vector_of_ints): Remove.
946         (list_available_thread_groups): Change "ids" to std::set.
947         (mi_cmd_list_thread_groups): Update.
948         (struct collect_cores_data) <core>: Now a std::set.
949         (collect_cores): Update.
950         (unique): Remove.
951         (print_one_inferior): Update.
952
953 2017-09-29  Tom Tromey  <tom@tromey.com>
954
955         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
956         (mi_execute_async_cli_command): Likewise.
957         (mi_cmd_trace_frame_collected): Use field_fmt.
958
959 2017-09-29  Tom Tromey  <tom@tromey.com>
960
961         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
962         gdb::byte_vector.
963
964 2017-09-29  Tom Tromey  <tom@tromey.com>
965
966         * mi/mi-parse.c (mi_parse): Remove unused declaration.
967
968 2017-09-29  Tom Tromey  <tom@tromey.com>
969
970         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
971
972 2017-09-29  Tom Tromey  <tom@tromey.com>
973
974         * varobj.h (varobj_gen_name): Return std::string.
975         * varobj.c (varobj_gen_name): Return std::string.
976         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
977         (mi_cmd_var_delete): Don't copy "name".
978
979 2017-09-29  Tom Tromey  <tom@tromey.com>
980
981         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
982         (mi_cmd_break_insert_1): Update.
983
984 2017-09-29  Tom Tromey  <tom@tromey.com>
985
986         * target.h (make_scoped_defer_target_commit_resume): Update.
987         * target.c (make_scoped_defer_target_commit_resume): Rename from
988         make_cleanup_defer_target_commit_resume.  Return a
989         scoped_restore.
990         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
991
992 2017-09-29  Tom Tromey  <tom@tromey.com>
993
994         * main.c (captured_main_1): Remove unused declaration.
995         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
996
997 2017-09-29  Tom Tromey  <tom@tromey.com>
998
999         * symtab.c (search_symbols): Remove unused outer cleanup.
1000         (make_source_files_completion_list): Remove unused declaration.
1001
1002 2017-09-29  Tom Tromey  <tom@tromey.com>
1003
1004         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1005
1006 2017-09-29  Tom Tromey  <tom@tromey.com>
1007
1008         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1009         gdb::byte_vector.
1010
1011 2017-09-29  Tom Tromey  <tom@tromey.com>
1012
1013         * complaints.c (vcomplaint): Use std::string.
1014
1015 2017-09-29  Tom Tromey  <tom@tromey.com>
1016
1017         * tracepoint.c (trace_variable_command): Use std::string.
1018         (encode_actions_1): Remove unused declarations.
1019         (create_tsv_from_upload): Use std::string.
1020
1021 2017-09-29  Tom Tromey  <tom@tromey.com>
1022
1023         * cp-support.c (gdb_demangle): Use std::string.
1024
1025 2017-09-29  Tom Tromey  <tom@tromey.com>
1026
1027         * stack.c (parse_frame_specification): Use std::string
1028         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1029
1030 2017-09-29  Tom Tromey  <tom@tromey.com>
1031
1032         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1033
1034 2017-09-29  Tom Tromey  <tom@tromey.com>
1035
1036         * utils.c (vfprintf_maybe_filtered): Use std::string.
1037         (vfprintf_unfiltered): Likewise.
1038
1039 2017-09-29  Tom Tromey  <tom@tromey.com>
1040
1041         * event-top.c (top_level_prompt): Return std::string.
1042         (display_gdb_prompt): Update.
1043
1044 2017-09-29  Tom Tromey  <tom@tromey.com>
1045
1046         * unittests/common-utils-selftests.c (format): New function.
1047         (string_vprintf_tests): New function.
1048         (_initialize_common_utils_selftests): Register new tests.
1049         * common/common-utils.c (string_vprintf): New function.
1050         * common/common-utils.h (string_vprintf): Declare.
1051
1052 2017-09-29  Pedro Alves  <palves@redhat.com>
1053
1054         * common/rsp-low.c (unpack_varlen_hex): Constify.
1055         * common/rsp-low.h (unpack_varlen_hex): Constify.
1056         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1057         Constify.
1058         * remote.c (remote_set_permissions, read_ptid)
1059         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1060         (remote_static_tracepoint_marker_at)
1061         (remote_static_tracepoint_markers_by_strid)
1062         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1063         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1064         (parse_tracepoint_definition, parse_tsv_definition)
1065         (parse_static_tracepoint_marker_definition): Constify.
1066         * tracepoint.h (parse_static_tracepoint_marker_definition)
1067         (parse_trace_status, parse_tracepoint_status)
1068         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1069
1070 2017-09-29  Pedro Alves  <palves@redhat.com>
1071
1072         * remote.c (target_buf, target_buf_size): Delete.
1073         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1074         Use the connection's packet buffer instead.
1075         All callers adjusted.
1076         (_initialize_remote): Remove references to target_buf and
1077         target_buf_size.
1078
1079 2017-09-28  Pedro Alves  <palves@redhat.com>
1080
1081         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1082         unittests/common-utils-selftests.c.
1083         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1084         (COMMON_OBS): Remove utils-selftests.o.
1085         * utils-selftests.c: Move to ...
1086         * unittests/common-utils-selftests.c: ... here and rename self
1087         test to "string_printf".
1088
1089 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1090
1091         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1092         having NULL cus or tus.
1093
1094 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1095
1096         * arm-tdep.c: (convert_from_extended): Remove.
1097         (convert_to_extended): Likewise.
1098         (arm_extract_return_value): Use convert_typed_floating.
1099         (arm_store_return_value): Likewise.
1100
1101         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1102         * sh-tdep.c: Do not include "floatformat.h".
1103         (sh_littlebyte_bigword_type): New function.
1104         (sh_register_convert_to_virtual): Use convert_typed_floating.
1105         (sh_register_convert_to_raw): Likewise.
1106         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1107         (sh64_littlebyte_bigword_type): New function.
1108         (sh64_extract_return_value): Use convert_typed_floating.
1109         (sh64_register_convert_to_virtual): Likewise.
1110         (sh64_register_convert_to_raw): Likewise.
1111
1112 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1113
1114         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1115         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1116
1117         * gdbtypes.h (union type_specific): Make field floatformat hold
1118         just a single struct floatformat, not an array.
1119         (floatformat_from_type): Move here.
1120         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1121         changed TYPE_FLOATFORMAT definition.
1122         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1123         (recursive_dump_type): Likewise.
1124         (init_float_type): Install correct floatformat for byte order.
1125         (arch_float_type): Likewise.
1126
1127 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1128
1129         * gdbtypes.c (init_type): Change incoming argument from
1130         length-in-bytes to length-in-bits.  Assert length is a
1131         multiple of TARGET_CHAR_BITS.
1132         (arch_type, arch_flags_type): Likewise.
1133         (init_integer_type): Update call to init_type.
1134         (init_character_type): Likewise.
1135         (init_boolean_type): Likewise.
1136         (init_float_type): Likewise.
1137         (init_decfloat_type): Likewise.
1138         (init_complex_type): Likewise.
1139         (init_pointer_type): Likewise.
1140         (objfile_type): Likewise.
1141         (arch_integer_type): Update call to arch_type.
1142         (arch_character_type): Likewise.
1143         (arch_boolean_type): Likewise.
1144         (arch_float_type): Likewise.
1145         (arch_decfloat_type): Likewise.
1146         (arch_complex_type): Likewise.
1147         (arch_pointer_type): Likewise.
1148         (gdbtypes_post_init): Likewise.
1149
1150         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1151         (read_base_type): Likewise.
1152         * mdebugread.c (basic_type): Likewise.
1153         * stabsread.c (dbx_init_float_type): Likewise.
1154         (rs6000_builtin_type): Likewise.
1155         (read_range_type): Likewise.  Also, fix call to init_integer_type
1156         with erroneous length argument.
1157
1158         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1159         * d-lang.c (build_d_types): Likewise.
1160         * f-lang.c (build_fortran_types): Likewise.
1161         * go-lang.c (build_go_types): Likewise.
1162         * opencl-lang.c (build_opencl_types): Likewise.
1163         * jit.c (finalize_symtab): Likewise.
1164         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1165         (build_std_type_info_type): Likewise.
1166         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1167         update call to arch_flags_type.
1168
1169         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1170         arch_type.
1171         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1172         * windows-tdep.c (windows_get_tlb_type): Likewise.
1173
1174         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1175         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1176         * m32c-tdep.c (make_types): Likewise.
1177         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1178         (rl78_psw_type): Update call to arch_flags_type.
1179         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1180         * rx-tdep.c (rx_psw_type): Likewise.
1181         (rx_fpsw_type): Likewise.
1182         * sparc-tdep.c (sparc_psr_type): Likewise.
1183         (sparc_fsr_type): Likewise.
1184         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1185         (sparc64_ccr_type): Likewise.
1186         (sparc64_fsr_type): Likewise.
1187         (sparc64_fprs_type): Likewise.
1188
1189 2017-09-27  Tom Tromey  <tom@tromey.com>
1190
1191         * findcmd.c (find_command): Constify.
1192
1193 2017-09-27  Tom Tromey  <tom@tromey.com>
1194
1195         * ada-tasks.c (task_command_1, task_command): Constify.
1196
1197 2017-09-27  Tom Tromey  <tom@tromey.com>
1198
1199         * symtab.c (maintenance_print_symbol_cache)
1200         (maintenance_flush_symbol_cache)
1201         (maintenance_print_symbol_cache_statistics): Constify.
1202
1203 2017-09-27  Tom Tromey  <tom@tromey.com>
1204
1205         * inferior.c (detach_inferior_command, kill_inferior_command)
1206         (inferior_command): Constify.
1207
1208 2017-09-27  Tom Tromey  <tom@tromey.com>
1209
1210         * regcache.c (regcache_print, maintenance_print_registers)
1211         (maintenance_print_raw_registers)
1212         (maintenance_print_cooked_registers)
1213         (maintenance_print_register_groups)
1214         (maintenance_print_remote_registers): Constify.
1215
1216 2017-09-27  Tom Tromey  <tom@tromey.com>
1217
1218         * printcmd.c (map_display_numbers, undisplay_command)
1219         (enable_disable_display_command, enable_display_command)
1220         (disable_display_command): Constify.
1221
1222 2017-09-27  Tom Tromey  <tom@tromey.com>
1223
1224         * breakpoint.h (delete_command): Don't declare.
1225         * breakpoint.c (delete_command, enable_once_command)
1226         (enable_count_command, enable_delete_command, breakpoint_1)
1227         (maintenance_info_breakpoints, stopin_command, stopat_command)
1228         (delete_command, delete_trace_command, save_breakpoints)
1229         (save_breakpoints_command, save_tracepoints_command): Constify.
1230
1231 2017-09-27  Tom Tromey  <tom@tromey.com>
1232
1233         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1234         (skip_ws, extract_identifier, macro_define_command)
1235         (macro_undef_command, macro_list_command): Constify.
1236
1237 2017-09-27  Tom Tromey  <tom@tromey.com>
1238
1239         * infcmd.c (environment_info, set_environment_command)
1240         (unset_environment_command, path_info, info_proc_cmd_1)
1241         (info_proc_cmd_mappings, info_proc_cmd_stat)
1242         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1243         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1244
1245 2017-09-27  Tom Tromey  <tom@tromey.com>
1246
1247         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1248         Constify.
1249
1250 2017-09-27  Tom Tromey  <tom@tromey.com>
1251
1252         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1253
1254 2017-09-27  Tom Tromey  <tom@tromey.com>
1255
1256         * demangle.c (demangle_command): Constify.
1257
1258 2017-09-27  Tom Tromey  <tom@tromey.com>
1259
1260         * progspace.c (maintenance_info_program_spaces_command):
1261         Constify.
1262
1263 2017-09-27  Tom Tromey  <tom@tromey.com>
1264
1265         * compile/compile.c (check_raw_argument, compile_file_command)
1266         (compile_code_command, compile_print_command): Constify.
1267
1268 2017-09-27  Tom Tromey  <tom@tromey.com>
1269
1270         * reggroups.c (maintenance_print_reggroups): Constify.
1271
1272 2017-09-27  Tom Tromey  <tom@tromey.com>
1273
1274         * dwarf2read.c (save_gdb_index_command): Constify.
1275
1276 2017-09-27  Tom Tromey  <tom@tromey.com>
1277
1278         * stap-probe.c (info_probes_stap_command): Constify.
1279
1280 2017-09-27  Tom Tromey  <tom@tromey.com>
1281
1282         * fork-child.c (unset_exec_wrapper_command): Constify.
1283
1284 2017-09-27  Tom Tromey  <tom@tromey.com>
1285
1286         * btrace.c (get_uint, get_context_size, no_chunk)
1287         (maint_btrace_packet_history_cmd)
1288         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1289         (maint_info_btrace_cmd): Constify.
1290
1291 2017-09-27  Tom Tromey  <tom@tromey.com>
1292
1293         * reverse.c (delete_bookmark_command): Constify.
1294
1295 2017-09-27  Tom Tromey  <tom@tromey.com>
1296
1297         * remote.c (set_memory_packet_size)
1298         (set_memory_write_packet_size, show_memory_write_packet_size)
1299         (set_memory_read_packet_size, show_memory_read_packet_size)
1300         (compare_sections_command, packet_command, remote_put_command)
1301         (remote_get_command, remote_delete_command): Constify.
1302
1303 2017-09-27  Tom Tromey  <tom@tromey.com>
1304
1305         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1306         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1307         (set_mipsfpu_auto_command): Constify.
1308
1309 2017-09-27  Tom Tromey  <tom@tromey.com>
1310
1311         * cli/cli-cmds.h (cd_command): Constify.
1312         * cli/cli-cmds.c (cd_command): Constify.
1313
1314 2017-09-27  Tom Tromey  <tom@tromey.com>
1315
1316         * thread.c (thread_name_command, thread_find_command): Constify.
1317
1318 2017-09-27  Tom Tromey  <tom@tromey.com>
1319
1320         * probe.c (enable_probes_command, disable_probes_command):
1321         Constify.
1322
1323 2017-09-27  Tom Tromey  <tom@tromey.com>
1324
1325         * symfile.c (symbol_file_command): Constify.
1326         * gdbcore.h (deprecated_file_changed_hook): Constify.
1327         * exec.c (deprecated_file_changed_hook, exec_file_command)
1328         (file_command): Constify.
1329         * defs.h (symbol_file_command): Constify.
1330
1331 2017-09-27  Tom Tromey  <tom@tromey.com>
1332
1333         * remote-fileio.c (set_system_call_allowed)
1334         (show_system_call_allowed): Constify.
1335
1336 2017-09-27  Tom Tromey  <tom@tromey.com>
1337
1338         * tracepoint.c (delete_trace_variable_command)
1339         (tfind_end_command, tfind_start_command, tfind_pc_command)
1340         (tfind_tracepoint_command, tfind_line_command)
1341         (tfind_range_command, tfind_outside_command): Constify.
1342
1343 2017-09-27  Tom Tromey  <tom@tromey.com>
1344
1345         * ax-gdb.c (maint_agent_printf_command, agent_command)
1346         (agent_eval_command): Constify.
1347
1348 2017-09-27  Tom Tromey  <tom@tromey.com>
1349
1350         * tracepoint.c (info_scope_command): Constify.
1351         * python/python.c (gdbpy_decode_line): Constify.
1352         * python/py-breakpoint.c (bppy_init): Constify.
1353         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1354         * location.h: (new_linespec_location)
1355         (string_to_event_location_basic, string_to_event_location):
1356         Constify.
1357         * location.c (new_linespec_location)
1358         (string_to_event_location_basic, string_to_event_location):
1359         Constify.
1360         * linespec.h (decode_line_with_current_source)
1361         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1362         * linespec.c (linespec_lex_to_end)
1363         (decode_line_with_current_source)
1364         (decode_line_with_last_displayed): Constify.
1365         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1366         Constify.
1367         * cli/cli-cmds.c (edit_command, list_command): Constify.
1368         * breakpoint.h (until_break_command, watch_command_wrapper)
1369         (awatch_command_wrapper, rwatch_command_wrapper)
1370         (init_ada_exception_breakpoint): Constify.
1371         * breakpoint.c (break_command_1, dprintf_command)
1372         (break_range_command, watch_command_wrapper)
1373         (rwatch_command_wrapper, awatch_command_wrapper)
1374         (until_break_command, init_ada_exception_breakpoint)
1375         (strace_marker_create_sals_from_location, trace_command)
1376         (ftrace_command, strace_command, struct tracepoint): Constify.
1377         * ax-gdb.c (agent_command_1): Constify.
1378         * ada-lang.c (ada_exception_sal): Constify.
1379
1380 2017-09-27  Tom Tromey  <tom@tromey.com>
1381
1382         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1383         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1384         (get_context_size, no_chunk, get_insn_history_modifiers)
1385         (cmd_record_insn_history, get_call_history_modifiers)
1386         (cmd_record_call_history): Constify.
1387
1388 2017-09-27  Tom Tromey  <tom@tromey.com>
1389
1390         * source.c (show_substitute_path_command)
1391         (unset_substitute_path_command, set_substitute_path_command):
1392         Constify.
1393
1394 2017-09-27  Tom Tromey  <tom@tromey.com>
1395
1396         * typeprint.c (maintenance_print_type): Constify.
1397         * maint.c (maintenance_dump_me, maintenance_demangle)
1398         (maintenance_time_display, maintenance_info_sections)
1399         (maintenance_print_statistics, maintenance_deprecate)
1400         (maintenance_undeprecate): Constify.
1401         (maintenance_do_deprecate): Constify.  Use std::string.
1402         (maintenance_selftest): Constify.
1403         * gdbtypes.h (maintenance_print_type): Constify.
1404
1405 2017-09-27  Tom Tromey  <tom@tromey.com>
1406
1407         * hppa-tdep.c (unwind_command): Constify.
1408
1409 2017-09-27  Tom Tromey  <tom@tromey.com>
1410
1411         * target-descriptions.c (unset_tdesc_filename_cmd)
1412         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1413         Constify.
1414
1415 2017-09-27  Tom Tromey  <tom@tromey.com>
1416
1417         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1418
1419 2017-09-27  Tom Tromey  <tom@tromey.com>
1420
1421         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1422
1423 2017-09-27  Tom Tromey  <tom@tromey.com>
1424
1425         * tui/tui-regs.c (tui_reg_command): Constify.
1426
1427 2017-09-27  Tom Tromey  <tom@tromey.com>
1428
1429         * skip.c (skip_file_command, skip_function_command)
1430         (skip_enable_command, skip_disable_command, skip_delete_command):
1431         Constify.
1432
1433 2017-09-27  Tom Tromey  <tom@tromey.com>
1434
1435         * record-btrace.c (cmd_record_btrace_bts_start)
1436         (cmd_record_btrace_pt_start): Constify.
1437
1438 2017-09-27  Tom Tromey  <tom@tromey.com>
1439
1440         * symmisc.c (maintenance_print_symbols)
1441         (maintenance_print_msymbols, maintenance_print_objfiles)
1442         (maintenance_info_symtabs, maintenance_check_symtabs)
1443         (maintenance_expand_symtabs, maintenance_info_line_tables):
1444         Constify.
1445
1446 2017-09-27  Tom Tromey  <tom@tromey.com>
1447
1448         * top.c (new_ui_command): Constify.
1449
1450 2017-09-27  Tom Tromey  <tom@tromey.com>
1451
1452         * symfile.c (add_symbol_file_command)
1453         (remove_symbol_file_command, list_overlays_command)
1454         (map_overlay_command, unmap_overlay_command)
1455         (overlay_auto_command, overlay_manual_command)
1456         (overlay_off_command, overlay_load_command): Constify.
1457
1458 2017-09-27  Tom Tromey  <tom@tromey.com>
1459
1460         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1461         (info_spu_mailbox_command, info_spu_dma_command)
1462         (info_spu_proxydma_command): Constify.
1463
1464 2017-09-27  Tom Tromey  <tom@tromey.com>
1465
1466         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1467
1468 2017-09-27  Tom Tromey  <tom@tromey.com>
1469
1470         * cli/cli-script.c (user_defined_command): Constify.
1471
1472 2017-09-27  Tom Tromey  <tom@tromey.com>
1473
1474         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1475         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1476         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1477         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1478         (dump_binary_value, append_binary_memory, append_binary_value):
1479         Constify.
1480         (struct dump_context) <func>: Constify.
1481         (add_dump_command): Update.
1482
1483 2017-09-27  Tom Tromey  <tom@tromey.com>
1484
1485         * cli/cli-cmds.c (show_version, show_configuration)
1486         (source_command, show_user): Constify.
1487
1488 2017-09-27  Tom Tromey  <tom@tromey.com>
1489
1490         * target.c (maintenance_print_target_stack): Constify.
1491
1492 2017-09-27  Tom Tromey  <tom@tromey.com>
1493
1494         * interps.c (interpreter_exec_cmd): Constify.
1495
1496 2017-09-27  Tom Tromey  <tom@tromey.com>
1497
1498         * record-full.c (cmd_record_full_restore): Constify.
1499
1500 2017-09-27  Tom Tromey  <tom@tromey.com>
1501
1502         * memattr.c (enable_mem_command, disable_mem_command)
1503         (delete_mem_command): Constify.
1504
1505 2017-09-27  Tom Tromey  <tom@tromey.com>
1506
1507         * value.c (show_convenience): Constify.
1508
1509 2017-09-27  Tom Tromey  <tom@tromey.com>
1510
1511         * gdbcore.h (core_file_command): Update.
1512         * corefile.c (core_file_command): Constify.
1513
1514 2017-09-27  Tom Tromey  <tom@tromey.com>
1515
1516         * user-regs.c (maintenance_print_user_registers): Constify.
1517
1518 2017-09-27  Tom Tromey  <tom@tromey.com>
1519
1520         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1521
1522 2017-09-27  Tom Tromey  <tom@tromey.com>
1523
1524         * cp-support.c (first_component_command): Constify.
1525
1526 2017-09-27  Tom Tromey  <tom@tromey.com>
1527
1528         * psymtab.c (maintenance_print_psymbols)
1529         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1530         Constify.
1531
1532 2017-09-27  Tom Tromey  <tom@tromey.com>
1533
1534         * windows-tdep.c (display_tib): Constify.
1535
1536 2017-09-27  Tom Tromey  <tom@tromey.com>
1537
1538         * linux-fork.c (delete_checkpoint_command)
1539         (detach_checkpoint_command): Constify.
1540
1541 2017-09-27  Tom Tromey  <tom@tromey.com>
1542
1543         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1544
1545 2017-09-27  Tom Tromey  <tom@tromey.com>
1546
1547         * arc-tdep.c (dump_arc_instruction_command): Constify.
1548
1549 2017-09-27  Tom Tromey  <tom@tromey.com>
1550
1551         * valprint.c (set_radix, show_radix): Constify.
1552
1553 2017-09-27  Tom Tromey  <tom@tromey.com>
1554
1555         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1556
1557 2017-09-27  Tom Tromey  <tom@tromey.com>
1558
1559         * command.h (not_just_help_class_command): Update.
1560         * cli/cli-decode.h (not_just_help_class_command): Update.
1561         * cli/cli-decode.c (not_just_help_class_command): Constify.
1562
1563 2017-09-27  Tom Tromey  <tom@tromey.com>
1564
1565         * gdb_bfd.c (maintenance_info_bfds): Constify.
1566
1567 2017-09-27  Tom Tromey  <tom@tromey.com>
1568
1569         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1570         overloads.
1571         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1572         (do_const_cfunc): New function.
1573         (cmd_cfunc_eq): New overload.
1574         (cli_user_command_p): Check do_const_cfunc.
1575         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1576         const_cfunc.
1577         * command.h (add_cmd): Add const overload and no-function
1578         overload.
1579         (set_cmd_cfunc): Add const overload.
1580         (cmd_const_cfunc_ftype): Declare.
1581         (cmd_cfunc_eq): Add const overload.
1582         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1583         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1584         overload.
1585
1586 2017-09-27  Tom Tromey  <tom@tromey.com>
1587
1588         * macroexp.c (get_next_token_for_substitution): New function.
1589         (substitute_args): Call it.  Check for __VA_OPT__.
1590
1591 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1592             Pedro Alves <palves@redhat.com>
1593
1594         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1595         producer_is_icc_lt_14.
1596         (producer_is_icc_lt_14): New function.
1597         (check_producer): Add code for checking version of ICC.
1598         (producer_is_icc): Move to producer.c.
1599         (read_structure_type): Restrict ICC workaround to ICC<14.
1600         * producer.c: Include selftest.h.
1601         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1602         New functions.
1603         * producer.h (producer_is_icc): New declaration.
1604
1605 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1606
1607         * Makefile.in (SFILES): Add producer.c.
1608         (COMMON_OBS): Add producer.o
1609         * amd64-tdep.c (producer.h): Add new include.
1610         * dwarf2read.c (producer.h): Add new include.
1611         * producer.c: New file.
1612         * producer.h: New file.
1613         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1614         producer.c.
1615         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1616         producer.h.
1617
1618 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1619
1620         * configure.ac: Search ncursesw before ncurses.
1621         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1622         * gdb_curses.h: Include <ncursesw/ncurses.h>
1623         * config.in, configure: Regenerate.
1624
1625 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1626
1627         PR gdb/22185
1628         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1629         obsolete.
1630         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1631         Remove i386sol2 support.
1632         * configure.nat <i386sol2>: Remove.
1633         <sol2-64>: Fold into ...
1634         <sol2>: ... this.
1635         Move common settings to default section.
1636         Add sol-thread.o.
1637         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1638         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1639         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1640         <i[34567]86-*-solaris*>: Remove.
1641         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1642
1643         * configure.ac: Remove wctype in libw check.
1644         (_MSE_INT_H): Don't define on Solaris 7-9.
1645         <solaris*>: Remove libthread_db.so.1 check.
1646         * configure: Regenerate.
1647         * config.in: Regenerate.
1648
1649         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1650         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1651         (gdb_ps_size_t): Remove.
1652         Use base types in users.
1653         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1654
1655         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1656
1657 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1658
1659         PR build/22206
1660         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1661         (adi_is_addr_mapped): Likewise.
1662         (PSR_ICC): Don't redefine.
1663         (PSR_IMPL): Likewise.
1664
1665 2017-09-25  Tom Tromey  <tom@tromey.com>
1666
1667         * regcache.c (regcache::dump): Use string_printf.
1668
1669 2017-09-25  Tom Tromey  <tom@tromey.com>
1670
1671         * regcache.c (class regcache_invalidator): New.
1672         (struct register_to_invalidate): Remove.
1673         (make_cleanup_regcache_invalidate): Remove.
1674         (regcache::raw_write): Use regcache_invalidator.
1675
1676 2017-09-25  Tom Tromey  <tom@tromey.com>
1677
1678         * spu-tdep.c (spu2ppu_sniffer): Update.
1679         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1680         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1681         Remove.
1682         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1683         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1684         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1685         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1686         (frame_pop): Update.
1687
1688 2017-09-25  Tom Tromey  <tom@tromey.com>
1689
1690         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1691         * regcache.h (regcache_xfree): Don't declare.
1692         * regcache.c (regcache_xfree): Remove.
1693         (do_regcache_xfree): Use delete.
1694         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1695         * linux-fork.c (free_fork): Use delete.
1696         (fork_save_infrun_state): Likewise.
1697         * jit.c (jit_dealloc_cache): Use delete.
1698         * infrun.c (discard_infcall_suspend_state): Use delete.
1699
1700 2017-09-25  Tom Tromey  <tom@tromey.com>
1701
1702         * regcache.h (regcache_xmalloc): Don't declare.
1703         (regcache_raw_set_cached_value): Update comment.
1704         * regcache.c (regcache_xmalloc): Remove.
1705         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1706         * jit.c (jit_frame_sniffer): Use new.
1707         * frame.c (frame_save_as_regcache): Use new.
1708
1709 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1710
1711         * NEWS: Advertise support for guarded-storage registers on IBM z.
1712
1713 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1714
1715         * s390-linux-nat.c (have_regset_gs): New static variable.
1716         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1717         control block and guarded-storage broadcast control regsets.
1718         (s390_read_description): Detect whether the target has
1719         guarded-storage support, return appropriate tdesc.
1720         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1721         (features/s390x-gs-linux64.c): Likewise.
1722         (struct gdbarch_tdep) <have_gs>: New field.
1723         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1724         (s390_gsbc_regset): New variables.
1725         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1726         and s390_gsbc_regset, if applicable.
1727         (s390_core_read_description): Check whether core file was from a
1728         target with guarded-storage support; include appropriate regsets.
1729         (s390_gdbarch_init): Add registers for guarded-storage support.
1730         (_initialize_s390_tdep): Initialize new target descriptions that
1731         include registers for guarded-storage support.
1732         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1733         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1734         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1735         (S390_NUM_REGS): Adjust macro definition.
1736         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1737         (tdesc_s390x_gs_linux64): New declarations.
1738
1739 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1740
1741         * features/s390-gs-linux64.xml: New file.
1742         * features/s390-gs.xml: New file.
1743         * features/s390-gsbc.xml: New file.
1744         * features/s390x-gs-linux64.xml: New file.
1745         * features/Makefile (WHICH): Add s390-gs-linux64 and
1746         s390x-gs-linux64.
1747         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1748         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1749         * features/s390-gs-linux64.c: New generated file.
1750         * features/s390x-gs-linux64.c: New file.
1751         * regformats/s390-gs-linux64.dat: New file.
1752         * regformats/s390x-gs-linux64.dat: New file.
1753
1754 2017-09-23  Tom Tromey  <tom@tromey.com>
1755
1756         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1757
1758 2017-09-22  Tom Tromey  <tom@tromey.com>
1759
1760         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1761         type to scoped_restore_tmpl.
1762         <scoped_input_handler>: Initialize m_quit_handler directly.
1763
1764 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1765
1766         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1767         (cd_command): Likewise.  Free "current_directory" before
1768         assigning to it.
1769         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1770         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1771         * top.c (gdb_dirbuf): Remove global declaration.
1772         * top.h (gdb_dirbuf): Likewise.
1773
1774 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1775
1776         * gnulib/aclocal.m4: Regenerate.
1777         * gnulib/config.in: Regenerate.
1778         * gnulib/configure: Regenerate.
1779         * gnulib/import/Makefile.am: Regenerate.
1780         * gnulib/import/Makefile.in: Regenerate.
1781         * gnulib/import/assure.h: New file.
1782         * gnulib/import/at-func.c: Likewise
1783         * gnulib/import/chdir-long.c: New file.
1784         * gnulib/import/chdir-long.h: New file.
1785         * gnulib/import/cloexec.c: New file.
1786         * gnulib/import/cloexec.h: New file.
1787         * gnulib/import/close.c: New file.
1788         * gnulib/import/closedir.c: New file.
1789         * gnulib/import/dirent-private.h: New file.
1790         * gnulib/import/dup-safer.c: New file.
1791         * gnulib/import/dup.c: New file.
1792         * gnulib/import/dup2.c: New file.
1793         * gnulib/import/error.c: New file.
1794         * gnulib/import/error.h: New file.
1795         * gnulib/import/exitfail.c: New file.
1796         * gnulib/import/exitfail.h: New file.
1797         * gnulib/import/fchdir.c: New file.
1798         * gnulib/import/fcntl.c: New file.
1799         * gnulib/import/fcntl.in.h: New file.
1800         * gnulib/import/fd-hook.c: New file.
1801         * gnulib/import/fd-hook.h: New file.
1802         * gnulib/import/fd-safer.c: New file.
1803         * gnulib/import/fdopendir.c: New file.
1804         * gnulib/import/filename.h: New file.
1805         * gnulib/import/filenamecat-lgpl.c: New file.
1806         * gnulib/import/filenamecat.h: New file.
1807         * gnulib/import/fstat.c: New file.
1808         * gnulib/import/fstatat.c: New file.
1809         * gnulib/import/getcwd-lgpl.c: New file.
1810         * gnulib/import/getcwd.c: New file.
1811         * gnulib/import/getdtablesize.c: New file.
1812         * gnulib/import/getlogin_r.c: New file.
1813         * gnulib/import/getprogname.c: New file.
1814         * gnulib/import/getprogname.h: New file.
1815         * gnulib/import/gettext.h: New file.
1816         * gnulib/import/glob-libc.h: New file.
1817         * gnulib/import/glob.c: New file.
1818         * gnulib/import/glob.in.h: New file.
1819         * gnulib/import/intprops.h: New file.
1820         * gnulib/import/m4/chdir-long.m4: New file.
1821         * gnulib/import/m4/close.m4: New file.
1822         * gnulib/import/m4/closedir.m4: New file.
1823         * gnulib/import/m4/d-ino.m4: New file.
1824         * gnulib/import/m4/d-type.m4: New file.
1825         * gnulib/import/m4/dup.m4: New file.
1826         * gnulib/import/m4/dup2.m4: New file.
1827         * gnulib/import/m4/error.m4: New file.
1828         * gnulib/import/m4/fchdir.m4: New file.
1829         * gnulib/import/m4/fcntl.m4: New file.
1830         * gnulib/import/m4/fcntl_h.m4: New file.
1831         * gnulib/import/m4/fdopendir.m4: New file.
1832         * gnulib/import/m4/filenamecat.m4: New file.
1833         * gnulib/import/m4/fstat.m4: New file.
1834         * gnulib/import/m4/fstatat.m4: New file.
1835         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1836         * gnulib/import/m4/getcwd-path-max.m4: New file.
1837         * gnulib/import/m4/getcwd.m4: New file.
1838         * gnulib/import/m4/getdtablesize.m4: New file.
1839         * gnulib/import/m4/getlogin_r.m4: New file.
1840         * gnulib/import/m4/getprogname.m4: New file.
1841         * gnulib/import/m4/glob.m4: New file.
1842         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1843         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1844         * gnulib/import/m4/mempcpy.m4: New file.
1845         * gnulib/import/m4/memrchr.m4: New file.
1846         * gnulib/import/m4/mode_t.m4: New file.
1847         * gnulib/import/m4/msvc-inval.m4: New file.
1848         * gnulib/import/m4/msvc-nothrow.m4: New file.
1849         * gnulib/import/m4/open.m4: New file.
1850         * gnulib/import/m4/openat.m4: New file.
1851         * gnulib/import/m4/opendir.m4: New file.
1852         * gnulib/import/m4/readdir.m4: New file.
1853         * gnulib/import/m4/realloc.m4: New file.
1854         * gnulib/import/m4/rewinddir.m4: New file.
1855         * gnulib/import/m4/save-cwd.m4: New file.
1856         * gnulib/import/m4/strdup.m4: New file.
1857         * gnulib/import/m4/strerror.m4: New file.
1858         * gnulib/import/m4/unistd-safer.m4: New file.
1859         * gnulib/import/mempcpy.c: New file.
1860         * gnulib/import/memrchr.c: New file.
1861         * gnulib/import/msvc-inval.c: New file.
1862         * gnulib/import/msvc-inval.h: New file.
1863         * gnulib/import/msvc-nothrow.c: New file.
1864         * gnulib/import/msvc-nothrow.h: New file.
1865         * gnulib/import/open.c: New file.
1866         * gnulib/import/openat-die.c: New file.
1867         * gnulib/import/openat-priv.h: New file.
1868         * gnulib/import/openat-proc.c: New file.
1869         * gnulib/import/openat.c: New file.
1870         * gnulib/import/openat.h: New file.
1871         * gnulib/import/opendir.c: New file.
1872         * gnulib/import/pipe-safer.c: New file.
1873         * gnulib/import/readdir.c: New file.
1874         * gnulib/import/realloc.c: New file.
1875         * gnulib/import/rewinddir.c: New file.
1876         * gnulib/import/save-cwd.c: New file.
1877         * gnulib/import/save-cwd.h: New file.
1878         * gnulib/import/strdup.c: New file.
1879         * gnulib/import/strerror-override.c: New file.
1880         * gnulib/import/strerror-override.h: New file.
1881         * gnulib/import/strerror.c: New file.
1882         * gnulib/import/unistd--.h: New file.
1883         * gnulib/import/unistd-safer.h: New file.
1884         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1885         "getcwd" and "glob".
1886         * ser-tcp.c: Undefine "close" before redefining it.
1887
1888 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1889
1890         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1891         get rid of res_val.
1892
1893 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1894
1895         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1896         <sol2,sparc>: Likewise.
1897         <sol2-64,i386>: Likewise.
1898
1899         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1900         -Wdeprecated-declarations on *-*-solaris*.
1901         * configure: Regenerate.
1902
1903         * procfs.c: Include "nat/inferior.h".
1904         (procfs_info_proc): Fix typo.
1905
1906 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1907
1908         * remote.c (vector): Include.
1909         (struct private_thread_info): Add field, thread_handle.
1910         (free_private_thread_info): Deallocate storage associated with
1911         thread handle.
1912         (get_private_info_thread): Initialize `thread_handle' field.
1913         (struct thread_item): Add field, thread_handle.
1914         (clear_threads_listing_context): Deallocate storage associated
1915         with thread handle.
1916         (start_thread): Add support for "handle" attribute.
1917         (thread_attributes): Add "handle".
1918         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1919         field.
1920         (remote_update_thread_list): Update thread_handle.
1921         (remote_thread_handle_to_thread_info): New function.
1922         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1923
1924 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1925
1926         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1927         function.
1928         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1929         * python/python-internal.h (thread_object_type): Declare.
1930
1931 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1932
1933         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1934         (target_thread_handle_to_thread_info): Declare.
1935         * target.c (target_thread_handle_to_thread_info): New function.
1936         * target-delegates.c: Regenerate.
1937         * gdbthread.h (find_thread_by_handle): Declare.
1938         * thread.c (find_thread_by_handle): New function.
1939         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1940         function.
1941         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1942
1943 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1944
1945         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1946
1947 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1948
1949         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1950
1951 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1952
1953         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1954         to gdb_target_obs.
1955
1956 2017-09-20  Tom Tromey  <tom@tromey.com>
1957
1958         * breakpoint.c (struct counted_command_line): Remove.
1959         (breakpoint_commands): Update.
1960         (alloc_counted_command_line, incref_counted_command_line)
1961         (decref_counted_command_line, do_cleanup_counted_command_line)
1962         (make_cleanup_decref_counted_command_line): Remove.
1963         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1964         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1965         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1966         (save_breakpoints): Update.
1967         * breakpoint.h (counted_command_line): Now a typedef to
1968         shared_ptr.
1969         (struct breakpoint) <commands>: Now a counted_command_line.
1970         (struct bpstats) <command>: Likewise.
1971
1972 2017-09-20  Tom Tromey  <tom@tromey.com>
1973
1974         * breakpoint.c (struct commands_info, do_map_commands_command):
1975         Remove.
1976         (commands_command_1): Update.
1977         (iterate_over_related_breakpoints): Take a function_view.
1978         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1979         (delete_command): Update.
1980         (map_breakpoint_numbers): Take a function_view.
1981         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1982         (disable_command): Update.
1983         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1984         (enable_command): Update.
1985         (struct disp_data, do_enable_breakpoint_disp)
1986         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1987         (do_map_enable_delete_breakpoint): Remove.
1988         (enable_once_command, enable_count_command, enable_delete_command)
1989         (delete_trace_variable_command): Update.
1990
1991 2017-09-20  Tom Tromey  <tom@tromey.com>
1992
1993         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1994         (bpstat_clear): Use delete.
1995         (bpstats): New constructors.
1996         (bpstat_copy, bpstat_stop_status): Use new.
1997         (dprintf_after_condition_true): Update.
1998         * breakpoint.h (bpstats::bpstats): Add constructors.
1999         (bpstats::~bpstats): Add destructor.
2000
2001 2017-09-20  Pedro Alves  <palves@redhat.com>
2002
2003         * eval.c (make_params): Delete, refactored as ...
2004         (class fake_method): ... this new type's ctor.
2005         (fake_method::~fake_method): New.
2006         (evaluate_subexp_standard): Use 'fake_method'.
2007
2008 2017-09-20  Tom Tromey  <tom@tromey.com>
2009
2010         * windows-nat.c (get_windows_debug_event, windows_wait)
2011         (do_initial_windows_stuff, windows_attach): Update.
2012         * utils.c (vwarning, internal_vproblem): Update.
2013         (ui_unregister_input_event_handler_cleanup)
2014         (prepare_to_handle_input): Remove.
2015         (class scoped_input_handler): New.
2016         (defaulted_query, prompt_for_continue): Update.
2017         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2018         Update.
2019         * top.c (undo_terminal_modifications_before_exit): Update.
2020         * target/target.h (target_terminal_init, target_terminal_inferior)
2021         (target_terminal_ours): Don't declare.
2022         (class target_terminal): New.
2023         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2024         (target_terminal_ours_for_output)
2025         (make_cleanup_restore_target_terminal): Don't declare.
2026         (target_terminal_info): Remove.
2027         * target.c (enum terminal_state, terminal_state): Remove.
2028         (target_terminal::terminal_state): Define.
2029         (target_terminal::init): Rename from target_terminal_init.
2030         (target_terminal::inferior): Rename from
2031         target_terminal_inferior.
2032         (target_terminal::ours): Rename from target_terminal_ours.
2033         (target_terminal::ours_for_output): Rename from
2034         target_terminal_ours_for_output.
2035         (target_terminal::info): New method.
2036         (cleanup_restore_target_terminal)
2037         (make_cleanup_restore_target_terminal): Remove.
2038         * solib.c (handle_solib_event): Update.
2039         * remote.c (remote_serial_quit_handler): Update.
2040         (remote_terminal_inferior, remote_wait_as): Update.
2041         * record-full.c (record_full_wait_1): Update.
2042         * nto-procfs.c (procfs_create_inferior): Update.
2043         * nat/fork-inferior.c (startup_inferior): Update.
2044         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2045         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2046         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2047         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2048         (mi_breakpoint_created, mi_breakpoint_deleted)
2049         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2050         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2051         (mi_user_selected_context_changed, report_initial_inferior):
2052         Update.
2053         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2054         (linux_nat_terminal_inferior): Update.
2055         * infrun.c (follow_fork_inferior)
2056         (handle_vfork_child_exec_or_exit, do_target_resume)
2057         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2058         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2059         Update.
2060         * inflow.c (child_terminal_init, info_terminal_command): Update.
2061         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2062         (attach_command): Update.
2063         * infcall.c (call_thread_fsm_should_stop): Update.
2064         * gnu-nat.c (gnu_attach): Update.
2065         * extension.c (struct active_ext_lang_state)
2066         (restore_active_ext_lang): Update.
2067         * exceptions.c (print_flush): Update.
2068         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2069         (struct quit_handler_cleanup_data, restore_quit_handler)
2070         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2071         Remove.
2072         * cp-support.c (gdb_demangle): Update.
2073         * breakpoint.c (update_inserted_breakpoint_locations)
2074         (insert_breakpoint_locations, handle_jit_event)
2075         (disable_breakpoints_in_unloaded_shlib): Update.
2076         * annotate.c (annotate_breakpoints_invalid)
2077         (annotate_frames_invalid): Update.
2078
2079 2017-09-20  Tom Tromey  <tom@tromey.com>
2080
2081         * main.c (catch_command_errors): Rename from
2082         catch_command_errors_const.
2083         (captured_main_1): Update.
2084
2085 2017-09-20  Pedro Alves  <palves@redhat.com>
2086
2087         * cli/cli-cmds.c (list_command): Use print_sal_location.
2088         (print_sal_location): New function.
2089         (ambiguous_line_spec): Use print_sal_location.
2090         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2091         * symtab.c (find_function_start_sal): Likewise.
2092         * symtab.h (symtab_and_line::symbol): New field.
2093
2094 2017-09-20  Pedro Alves  <palves@redhat.com>
2095
2096         * linespec.c (minsym_found): Handle non-text minsyms.
2097         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2098
2099 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2100
2101         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2102         backslash.
2103
2104 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2105
2106         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2107         vmovups instead vmovaps.
2108         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2109
2110 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2111
2112         * NEWS (Changes since GDB 8.0): Add starti.
2113         * infcmd.c (enum run_break): New.
2114         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2115         case.
2116         (run_command): Use enum run_how.
2117         (start_command): Likewise.
2118         (starti_command): New function.
2119         (RUN_ARGS_HELP): New macro.
2120         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2121         commands.  Add starti command.
2122
2123 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2124
2125         * Makefile.in (monitor.o): Remove the rule.
2126
2127 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2128
2129         * annotate.h (struct annotate_arg_emitter): Use
2130         DISABLE_COPY_AND_ASSIGN.
2131         * common/refcounted-object.h (refcounted_object): Likewise.
2132         * completer.h (struct completion_result): Likewise.
2133         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2134         * filename-seen-cache.h (filename_seen_cache): Likewise.
2135         * gdbcore.h (thread_section_name): Likewise.
2136         * gdb_regex.h (compiled_regex): Likewise.
2137         * gdbthread.h (scoped_restore_current_thread): Likewise.
2138         * inferior.h (scoped_restore_current_inferior): Likewise.
2139         * jit.c (jit_reader): Likewise.
2140         * linespec.h (struct linespec_result): Likewise.
2141         * mi/mi-parse.h (struct mi_parse): Likewise.
2142         * nat/fork-inferior.c (execv_argv): Likewise.
2143         * progspace.h (scoped_restore_current_program_space): Likewise.
2144         * python/python-internal.h (class gdbpy_enter): Likewise.
2145         * regcache.h (regcache): Likewise.
2146         * target-descriptions.c (struct tdesc_reg): Likewise.
2147         (struct tdesc_type): Likewise.
2148         (struct tdesc_feature): Likewise.
2149         * ui-out.h (ui_out_emit_type): Likewise.
2150
2151 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2152
2153         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2154         label abort_expression.
2155
2156 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2157
2158         * common/buffer.c (buffer_xml_printf): Adjust.
2159         * common/xml-utils.c (xml_escape_text): Change return type to
2160         std::string, update code accordingly.
2161         * common/xml-utils.h (xml_escape_text): Change return type to
2162         std::string.
2163         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2164         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2165         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2166         Adjust.
2167
2168 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2169
2170         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2171         (SUBDIR_UNITTESTS_OBS): Add new object file.
2172         * unittests/xml-utils-selftests.c: New file.
2173
2174 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2175
2176         * common/selftest.h (selftest): New struct/interface.
2177         (register_test): Add name parameter, add new overload.
2178         (run_tests): Add filter parameter.
2179         (for_each_selftest_ftype): New typedef.
2180         (for_each_selftest): New declaration.
2181         * common/selftest.c (tests): Change type to
2182         map<string, unique_ptr<selftest>>.
2183         (simple_selftest): New struct.
2184         (register_test): New function.
2185         (register_test): Add name parameter and use it.
2186         (run_tests): Add filter parameter and use it.  Add prints.
2187         Adjust to vector -> map change.
2188         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2189         registering selftests.
2190         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2191         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2192         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2193         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2194         * findvar.c (_initialize_findvar): Likewise.
2195         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2196         * maint.c (maintenance_selftest): Update call to run_tests.
2197         (maintenance_info_selftests): New function.
2198         (_initialize_maint_cmds): Register "maintenance info selftests"
2199         command.  Update "maintenance selftest" doc.
2200         * regcache.c (_initialize_regcache): Add names when registering
2201         selftests.
2202         * rust-exp.y (_initialize_rust_exp): Likewise.
2203         * selftest-arch.c (gdbarch_selftest): New struct.
2204         (gdbarch_tests): Remove.
2205         (register_test_foreach_arch): Add name parameter.  Call
2206         register_test.
2207         (tests_with_arch): Remove, move most content to
2208         gdbarch_selftest::operator().
2209         (_initialize_selftests_foreach_arch): Remove.
2210         * selftest-arch.h (register_test_foreach_arch): Add name
2211         parameter.
2212         (run_tests_with_arch): New declaration.
2213         * utils-selftests.c (_initialize_utils_selftests): Add names
2214         when registering selftests.
2215         * utils.c (_initialize_utils): Likewise.
2216         * unittests/array-view-selftests.c
2217         (_initialize_array_view_selftests): Likewise.
2218         * unittests/environ-selftests.c (_initialize_environ_selftests):
2219         Likewise.
2220         * unittests/function-view-selftests.c
2221         (_initialize_function_view_selftests): Likewise.
2222         * unittests/offset-type-selftests.c
2223         (_initialize_offset_type_selftests): Likewise.
2224         * unittests/optional-selftests.c
2225         (_initialize_optional_selftests): Likewise.
2226         * unittests/scoped_restore-selftests.c
2227         (_initialize_scoped_restore_selftests): Likewise.
2228         * NEWS: Document "maintenance selftest" and "maint info
2229         selftests".
2230
2231 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2232
2233         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2234         scoped_restore.
2235
2236 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2237
2238         * mi/mi-main.c (mi_load_progress): Make uiout variable
2239         a unique_ptr.
2240
2241 2017-09-15  Pedro Alves  <palves@redhat.com>
2242
2243         * compile/compile-c-types.c (convert_enum, convert_int)
2244         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2245
2246 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * dwarf2read.c (copy_string): Remove.
2249         (parse_macro_definition): Replace copy_string with savestring.
2250
2251 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2252
2253         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2254         gdb_target_obs.
2255         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2256         Likewise.
2257         (i[34567]86-*-linux*): Likewise.
2258
2259 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2260
2261         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2262         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2263         <stack>: Change type to std::vector.
2264         <stack_len, stack_allocated>: Remove.
2265         <grow_stack>: Remove.
2266         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2267         (dwarf_expr_context::~dwarf_expr_context): Remove.
2268         (dwarf_expr_context::grow_stack): Remove.
2269         (dwarf_expr_context::push): Adjust.
2270         (dwarf_expr_context::pop): Adjust.
2271         (dwarf_expr_context::fetch): Adjust.
2272         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2273         (dwarf_expr_context::stack_empty_p): Adjust.
2274         (dwarf_expr_context::execute_stack_op): Adjust.
2275
2276 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2277
2278         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2279         return type to bool.
2280         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2281
2282 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2283
2284         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2285         Change type to bool.
2286         (dwarf_stack_value) <in_stack_memory>: Likewise.
2287         (dwarf_expr_context) <push_address>: Change parameter type to
2288         bool.
2289         <fetch_in_stack_memory>: Change return type to bool.
2290         <push>: Change parameter type to bool.
2291         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2292         to bool.
2293         (dwarf_expr_context::push_address): Likewise.
2294         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2295         to bool.
2296         (dwarf_expr_context::execute_stack_op): Adjust.
2297         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2298
2299 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2300
2301         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2302         (struct dwarf_expr_context) <n_pieces>: Remove.
2303         <pieces>: Change type to std::vector.
2304         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2305         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2306         pieces.
2307         (dwarf_expr_context::add_piece): Adjust.
2308         * dwarf2loc.c (struct piece_closure): Initialize fields.
2309         <n_pieces>: Remove.
2310         <pieces>: Change type to std::vector.
2311         (allocate_piece_closure): Adjust, change parameter to
2312         std::vector rvalue and std::move it to piece_closure.
2313         (rw_pieced_value): Adjust.
2314         (check_pieced_synthetic_pointer): Adjust.
2315         (indirect_synthetic_pointer): Adjust.
2316         (coerce_pieced_ref): Adjust.
2317         (free_pieced_value_closure):  Adjust.  Use delete to free
2318         piece_closure.
2319         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2320         to allocate_piece_closure.
2321         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2322
2323 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2324
2325         * probe.h (probe_ops_cp): Remove typedef.
2326         (DEF_VEC_P (probe_ops_cp)): Remove.
2327         (all_probe_ops): Change type to std::vector.
2328         * probe.c (info_probes_for_ops): Adjust to vector change.
2329         (probe_linespec_to_ops): Likewise.
2330         (all_probe_ops): Change type to std::vector.
2331         (_initialize_probe): Adjust to vector change.
2332         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2333         * elfread.c (elf_get_probes): Likewise.
2334         * stap-probe.c (_initialize_stap_probe): Likewise.
2335
2336 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2337
2338         * probe.h (struct bound_probe): Define constructors.
2339         * probe.c (bound_probe_s): Remove typedef.
2340         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2341         (collect_probes): Change return type to std::vector, remove
2342         cleanup.
2343         (compare_probes): Return bool, change parameter type.  Change
2344         semantic to "less than".
2345         (gen_ui_out_table_header_info): Change parameter to std::vector
2346         and update.
2347         (exists_probe_with_pops): Likewise.
2348         (info_probes_for_ops): Update to std::vector change.
2349         (enable_probes_command): Likewise.
2350         (disable_probes_command): Likewise.
2351
2352 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2353
2354         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2355         vec to std::vector.
2356         * probe.c (parse_probes_in_pspace): Update.
2357         (find_probes_in_objfile): Update.
2358         (find_probe_by_pc): Update.
2359         (collect_probes): Update.
2360         (probe_any_get_probes): Update.
2361         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2362         return type to reference to std::vector.
2363         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2364         std::vector and update.
2365         (dtrace_process_dof): Likewise.
2366         (dtrace_get_probes): Likewise.
2367         * elfread.c (elf_get_probes): Change return type to std::vector,
2368         store an std::vector in bfd_data.
2369         (probe_key_free): Update to std::vector.
2370         * stap-probe.c (handle_stap_probe): Change parameter to
2371         std::vector and update.
2372         (stap_get_probes): Likewise.
2373         * symfile-debug.c (debug_sym_get_probes): Change return type to
2374         std::vector and update.
2375
2376 2017-09-11  Tom Tromey  <tom@tromey.com>
2377
2378         * breakpoint.c (program_breakpoint_here_p): Update.
2379         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2380         from make_show_memory_breakpoints_cleanup.  Return a
2381         scoped_restore_tmpl<int>.
2382         (restore_show_memory_breakpoints): Remove.
2383         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2384         * mem-break.c (memory_validate_breakpoint): Update.
2385         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2386         (ia64_memory_remove_breakpoint): Update.
2387         (ia64_breakpoint_from_pc): Update.
2388         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2389         from make_show_memory_breakpoints_cleanup.
2390
2391 2017-09-11  Tom Tromey  <tom@tromey.com>
2392
2393         * d-namespace.c (d_lookup_symbol): Use std::string.
2394         (find_symbol_in_baseclass): Likewise.
2395
2396 2017-09-11  Tom Tromey  <tom@tromey.com>
2397
2398         * ctf.c (ctf_start): Use std::string.
2399
2400 2017-09-11  Tom Tromey  <tom@tromey.com>
2401
2402         * ada-lang.c (is_known_support_routine): Update.
2403         (ada_unhandled_exception_name_addr_from_raise): Update.
2404         * guile/scm-frame.c (gdbscm_frame_name): Update.
2405         * python/py-frame.c (frapy_name): Update.
2406         (frapy_function): Update.
2407         * stack.h (find_frame_funname): Update.
2408         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2409         (print_frame): Update.
2410
2411 2017-09-11  Tom Tromey  <tom@tromey.com>
2412
2413         * findcmd.c (put_bits): Take a gdb::byte_vector.
2414         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2415         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2416         cleanups.
2417         (find_command): Update.
2418
2419 2017-09-11  Tom Tromey  <tom@tromey.com>
2420
2421         * cli/cli-script.c (class scoped_restore_hook_in): New.
2422         (clear_hook_in_cleanup): Remove.
2423         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2424         scoped_restore_hook_in.
2425
2426 2017-09-11  Tom Tromey  <tom@tromey.com>
2427
2428         * cli/cli-script.c (restore_interp): Remove.
2429         (read_command_lines): Use scoped_restore_interp.
2430         * interps.c (scoped_restore_interp::set_temp): Rename from
2431         interp_set_temp.
2432         * interps.h (class scoped_restore_interp): New.
2433         (interp_set_temp): Remove.
2434
2435 2017-09-11  Tom Tromey  <tom@tromey.com>
2436
2437         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2438         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2439         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2440         scoped_restore.
2441         (mi_cmd_break_insert_1): Update.
2442         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2443         scoped_restore.
2444
2445 2017-09-11  Tom Tromey  <tom@tromey.com>
2446
2447         * demangle.c (demangle_command): Update.
2448         * breakpoint.c (disable_command): Update.
2449         (enable_command): Update.
2450         (find_location_by_number): Make "number" const.  Use
2451         get_number_trailer.
2452         * cli/cli-utils.c (extract_arg): Return std::string.
2453         * probe.c (parse_probe_linespec): Update.  Change types.
2454         (collect_probes): Take string arguments.
2455         (parse_probe_linespec): Likewise.
2456         (info_probes_for_ops): Update.
2457         (enable_probes_command): Update.
2458         (disable_probes_command): Update.
2459         * break-catch-sig.c (catch_signal_split_args): Update.
2460         * mi/mi-parse.c (mi_parse): Update.
2461
2462 2017-09-11  Tom Tromey  <tom@tromey.com>
2463
2464         * language.h (language_enum): Make argument const.
2465         * language.c (language_enum): Make argument const.
2466
2467 2017-09-11  Tom Tromey  <tom@tromey.com>
2468
2469         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2470         as function.
2471         (skip_to_space): Rename from skip_to_space_const.
2472         * common/common-utils.c (skip_to_space): New function.
2473         (skip_to_space): Rename from skip_to_space_const.
2474         * cli/cli-utils.h (get_number): Rename from get_number_const.
2475         (extract_arg): Rename from extract_arg_const.
2476         * cli/cli-utils.c (get_number): Rename from get_number_const.
2477         (extract_arg): Rename from extract_arg_const.
2478         (number_or_range_parser::get_number): Use ::get_number.
2479         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2480         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2481         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2482         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2483         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2484         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2485         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2486         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2487
2488 2017-09-11  Tom Tromey  <tom@tromey.com>
2489
2490         * python/python.c (do_start_initialization): Use
2491         py-event-types.def to initialize types.
2492         Define all object type structures.
2493         * python/python-internal.h: Don't declare event initialization
2494         functions.
2495         * python/py-threadevent.c (thread_event_object_type): Don't
2496         define.
2497         * python/py-stopevent.c (stop_event_object_type): Don't define.
2498         * python/py-signalevent.c (signal_event_object_type): Don't
2499         declare or define.
2500         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2501         (clear_objfiles_event_object_type): Don't declare or define.
2502         * python/py-infevents.c (inferior_call_pre_event_object_type)
2503         (inferior_call_post_event_object_type)
2504         (register_changed_event_object_type)
2505         (memory_changed_event_object_type): Don't declare or define.
2506         * python/py-inferior.c (new_thread_event_object_type)
2507         (new_inferior_event_object_type)
2508         (inferior_deleted_event_object_type): Don't declare or define.
2509         * python/py-exitedevent.c (exited_event_object_type): Don't
2510         declare or define.
2511         * python/py-evts.c (gdbpy_initialize_py_events): Use
2512         py-all-events.def.
2513         * python/py-events.h (thread_event_object_type): Don't declare.
2514         (events_object): Use py-all-events.def.
2515         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2516         py-event-types.def.
2517         * python/py-event-types.def: New file.
2518         * python/py-continueevent.c (create_continue_event_object): Don't
2519         declare or define.
2520         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2521         declare or define.
2522         * python/py-all-events.def: New file.
2523
2524 2017-09-11  Tom Tromey  <tom@tromey.com>
2525
2526         * python/py-threadevent.c (create_thread_event_object): Return
2527         gdbpy_ref.
2528         * python/py-stopevent.h (create_stop_event_object)
2529         (create_breakpoint_event_object, create_signal_event_object):
2530         Update.
2531         * python/py-stopevent.c (create_stop_event_object): Return
2532         gdbpy_ref.
2533         (emit_stop_event): Update.
2534         * python/py-signalevent.c (create_signal_event_object): Return
2535         gdbpy_ref.
2536         * python/py-infevents.c (create_inferior_call_event_object):
2537         Update.
2538         * python/py-event.h (create_event_object)
2539         (create_thread_event_object): Update.
2540         * python/py-event.c (create_event_object): Return gdbpy_ref.
2541         * python/py-continueevent.c: Return gdbpy_ref.
2542         * python/py-bpevent.c (create_breakpoint_event_object): Return
2543         gdbpy_ref.
2544
2545 2017-09-11  Tom Tromey  <tom@tromey.com>
2546
2547         PR python/15622:
2548         * NEWS: Add entry.
2549         * python/python.c (do_start_initialization): Initialize new event
2550         types.
2551         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2552         (gdbpy_initialize_inferior_deleted_event)
2553         (gdbpy_initialize_new_thread_event): Declare.
2554         * python/py-threadevent.c (create_thread_event_object): Add option
2555         "thread" parameter.
2556         * python/py-inferior.c (new_thread_event_object_type)
2557         (new_inferior_event_object_type)
2558         (inferior_deleted_event_object_type): Declare.
2559         (python_new_inferior, python_inferior_deleted): New functions.
2560         (add_thread_object): Emit new_thread event.
2561         (gdbpy_initialize_inferior): Attach new functions to corresponding
2562         observers.
2563         (new_thread, new_inferior, inferior_deleted): Define new event
2564         types.
2565         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2566         registries.
2567         * python/py-events.h (events_object) <new_inferior,
2568         inferior_deleted, new_thread>: New fields.
2569         * python/py-event.h (create_thread_event_breakpoint): Add optional
2570         "thread" parameter.
2571
2572 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2573
2574         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2575         check current_ui instead.
2576         (internal_vproblem): Likewise.
2577
2578 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2579
2580         * thread.c (print_thread_info_1): Remove unnecessary calls to
2581         uiout->is_mi_like_p.
2582
2583 2017-09-09  Tom Tromey  <tom@tromey.com>
2584
2585         * namespace.h (add_using_directive): Update.
2586         * namespace.c (add_using_directive): Change type of excludes to
2587         std::vector.
2588         * dwarf2read.c (read_import_statement): Use std::vector.
2589         (read_namespace): Update.
2590         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2591
2592 2017-09-09  Tom Tromey  <tom@tromey.com>
2593
2594         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2595
2596 2017-09-09  Tom Tromey  <tom@tromey.com>
2597
2598         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2599
2600 2017-09-09  Tom Tromey  <tom@tromey.com>
2601
2602         * stack.c (func_command): Use gdb::def_vector.
2603
2604 2017-09-09  Tom Tromey  <tom@tromey.com>
2605
2606         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2607         ui_out_emit_list, ui_out_emit_tuple.
2608         (mi_cmd_var_update): Likewise.
2609
2610 2017-09-09  Tom Tromey  <tom@tromey.com>
2611
2612         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2613         ui_out_redirect_pop.
2614         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2615         ui_out_redirect_pop.
2616         * utils.c (do_ui_out_redirect_pop)
2617         (make_cleanup_ui_out_redirect_pop): Remove.
2618         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2619         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2620         * ui-out.h (ui_out_redirect_pop): New class.
2621
2622 2017-09-09  Tom Tromey  <tom@tromey.com>
2623
2624         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2625         (list_available_thread_groups, mi_cmd_list_thread_groups)
2626         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2627         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2628         Likewise.
2629
2630 2017-09-09  Tom Tromey  <tom@tromey.com>
2631
2632         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2633         ui_out_emit_tuple.
2634
2635 2017-09-09  Tom Tromey  <tom@tromey.com>
2636
2637         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2638         * stack.c (print_frame): Use ui_out_emit_tuple.
2639         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2640         (info_spu_mailbox_command, info_spu_dma_command)
2641         (info_spu_proxydma_command): Likewise.
2642         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2643         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2644         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2645         ui_out_emit_tuple.
2646         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2647
2648 2017-09-09  Tom Tromey  <tom@tromey.com>
2649
2650         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2651         (class ui_out_emit_table): Update comment.
2652         * ui-out.c (do_cleanup_table_end)
2653         (make_cleanup_ui_out_table_begin_end): Remove.
2654         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2655         (info_spu_dma_cmdlist): Likewise.
2656         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2657         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2658         ui_out_emit_table.
2659
2660 2017-09-09  Tom Tromey  <tom@tromey.com>
2661
2662         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2663         ui_out_emit_list, gdb::optional.
2664
2665 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2666
2667         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2668         prototype.
2669         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2670         prototype.
2671         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2672         prototype.
2673         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2674         * ada-exp.y: Remove _initialize_ada_exp prototype.
2675         * ada-lang.c: Remove _initialize_ada_language prototype.
2676         * ada-tasks.c: Remove _initialize_tasks prototype.
2677         * addrmap.c: Remove _initialize_addrmap prototype.
2678         * agent.c: Remove _initialize_agent prototype.
2679         * aix-thread.c: Remove _initialize_aix_thread prototype.
2680         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2681         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2682         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2683         prototype.
2684         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2685         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2686         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2687         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2688         prototype.
2689         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2690         prototype.
2691         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2692         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2693         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2694         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2695         prototype.
2696         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2697         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2698         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2699         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2700         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2701         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2702         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2703         prototype.
2704         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2705         prototype.
2706         * annotate.c: Remove _initialize_annotate prototype.
2707         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2708         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2709         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2710         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2711         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2712         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2713         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2714         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2715         prototype.
2716         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2717         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2718         * auto-load.c: Remove _initialize_auto_load prototype.
2719         * auxv.c: Remove _initialize_auxv prototype.
2720         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2721         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2722         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2723         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2724         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2725         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2726         prototype.
2727         * break-catch-throw.c: Remove _initialize_break_catch_throw
2728         prototype.
2729         * breakpoint.c: Remove _initialize_breakpoint prototype.
2730         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2731         * btrace.c: Remove _initialize_btrace prototype.
2732         * charset.c: Remove _initialize_charset prototype.
2733         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2734         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2735         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2736         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2737         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2738         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2739         * coffread.c: Remove _initialize_coffread prototype.
2740         * compile/compile.c: Remove _initialize_compile prototype.
2741         * complaints.c: Remove _initialize_complaints prototype.
2742         * completer.c: Remove _initialize_completer prototype.
2743         * copying.awk: Remove _initialize_copying prototype.
2744         * copying.c: Regenerate.
2745         * core-regset.c: Remove _initialize_core_regset prototype.
2746         * corefile.c: Remove _initialize_core prototype.
2747         * corelow.c: Remove _initialize_corelow prototype.
2748         * cp-abi.c: Remove _initialize_cp_abi prototype.
2749         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2750         * cp-support.c: Remove _initialize_cp_support prototype.
2751         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2752         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2753         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2754         * ctf.c: Remove _initialize_ctf prototype.
2755         * d-lang.c: Remove _initialize_d_language prototype.
2756         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2757         prototype.
2758         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2759         * dbxread.c: Remove _initialize_dbxread prototype.
2760         * dcache.c: Remove _initialize_dcache prototype.
2761         * demangle.c: Remove _initialize_demangler prototype.
2762         * disasm-selftests.c: Remove _initialize_disasm_selftests
2763         prototype.
2764         * disasm.c: Remove _initialize_disasm prototype.
2765         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2766         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2767         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2768         prototype.
2769         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2770         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2771         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2772         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2773         * elfread.c: Remove _initialize_elfread prototype.
2774         * exec.c: Remove _initialize_exec prototype.
2775         * extension.c: Remove _initialize_extension prototype.
2776         * f-lang.c: Remove _initialize_f_language prototype.
2777         * f-valprint.c: Remove _initialize_f_valprint prototype.
2778         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2779         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2780         * filesystem.c: Remove _initialize_filesystem prototype.
2781         * findcmd.c: Remove _initialize_mem_search prototype.
2782         * fork-child.c: Remove _initialize_fork_child prototype.
2783         * frame-base.c: Remove _initialize_frame_base prototype.
2784         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2785         * frame.c: Remove _initialize_frame prototype.
2786         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2787         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2788         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2789         * gcore.c: Remove _initialize_gcore prototype.
2790         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2791         * gdbarch.c: Regenerate.
2792         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2793         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2794         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2795         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2796         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2797         * go-lang.c: Remove _initialize_go_language prototype.
2798         * go32-nat.c: Remove _initialize_go32_nat prototype.
2799         * guile/guile.c: Remove _initialize_guile prototype.
2800         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2801         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2802         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2803         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2804         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2805         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2806         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2807         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2808         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2809         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2810         prototype.
2811         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2812         prototype.
2813         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2814         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2815         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2816         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2817         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2818         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2819         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2820         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2821         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2822         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2823         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2824         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2825         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2826         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2827         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2828         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2829         prototype.
2830         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2831         prototype.
2832         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2833         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2834         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2835         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2836         * infcall.c: Remove _initialize_infcall prototype.
2837         * infcmd.c: Remove _initialize_infcmd prototype.
2838         * inferior.c: Remove _initialize_inferiors prototype.
2839         * inflow.c: Remove _initialize_inflow prototype.
2840         * infrun.c: Remove _initialize_infrun prototype.
2841         * interps.c: Remove _initialize_interpreter prototype.
2842         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2843         * jit.c: Remove _initialize_jit prototype.
2844         * language.c: Remove _initialize_language prototype.
2845         * linux-fork.c: Remove _initialize_linux_fork prototype.
2846         * linux-nat.c: Remove _initialize_linux_nat prototype.
2847         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2848         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2849         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2850         * m2-lang.c: Remove _initialize_m2_language prototype.
2851         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2852         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2853         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2854         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2855         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2856         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2857         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2858         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2859         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2860         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2861         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2862         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2863         * machoread.c: Remove _initialize_machoread prototype.
2864         * macrocmd.c: Remove _initialize_macrocmd prototype.
2865         * macroscope.c: Remove _initialize_macroscope prototype.
2866         * maint.c: Remove _initialize_maint_cmds prototype.
2867         * mdebugread.c: Remove _initialize_mdebugread prototype.
2868         * memattr.c: Remove _initialize_mem prototype.
2869         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2870         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2871         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2872         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2873         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2874         * microblaze-linux-tdep.c: Remove
2875         _initialize_microblaze_linux_tdep prototype.
2876         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2877         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2878         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2879         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2880         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2881         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2882         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2883         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2884         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2885         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2886         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2887         prototype.
2888         * mipsread.c: Remove _initialize_mipsread prototype.
2889         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2890         prototype.
2891         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2892         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2893         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2894         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2895         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2896         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2897         prototype.
2898         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2899         * nto-procfs.c: Remove _initialize_procfs prototype.
2900         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2901         * objc-lang.c: Remove _initialize_objc_language prototype.
2902         * objfiles.c: Remove _initialize_objfiles prototype.
2903         * observer.c: Remove observer_test_first_notification_function,
2904         observer_test_second_notification_function,
2905         observer_test_third_notification_function, and
2906         _initialize_observer prototypes.
2907         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2908         * osabi.c: Remove _initialize_gdb_osabi prototype.
2909         * osdata.c: Remove _initialize_osdata prototype.
2910         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2911         * parse.c: Remove _initialize_parse prototype.
2912         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2913         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2914         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2915         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2916         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2917         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2918         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2919         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2920         * printcmd.c: Remove _initialize_printcmd prototype.
2921         * probe.c: Remove _initialize_probe prototype.
2922         * proc-api.c: Remove _initialize_proc_api prototype.
2923         * proc-events.c: Remove _initialize_proc_events prototype.
2924         * proc-service.c: Remove _initialize_proc_service prototype.
2925         * procfs.c: Remove _initialize_procfs prototype.
2926         * psymtab.c: Remove _initialize_psymtab prototype.
2927         * python/python.c: Remove _initialize_python prototype.
2928         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2929         * record-btrace.c: Remove _initialize_record_btrace prototype.
2930         * record-full.c: Remove _initialize_record_full prototype.
2931         * record.c: Remove _initialize_record prototype.
2932         * regcache.c: Remove _initialize_regcache prototype.
2933         * reggroups.c: Remove _initialize_reggroup prototype.
2934         * remote-notif.c: Remove _initialize_notif prototype.
2935         * remote-sim.c: Remove _initialize_remote_sim prototype.
2936         * remote.c: Remove _initialize_remote prototype.
2937         * reverse.c: Remove _initialize_reverse prototype.
2938         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2939         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2940         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2941         prototype.
2942         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2943         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2944         * rust-exp.y: Remove _initialize_rust_exp prototype.
2945         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2946         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2947         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2948         * score-tdep.c: Remove _initialize_score_tdep prototype.
2949         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2950         prototype.
2951         * ser-go32.c: Remove _initialize_ser_dos prototype.
2952         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2953         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2954         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2955         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2956         * serial.c: Remove _initialize_serial prototype.
2957         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2958         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2959         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2960         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2961         * skip.c: Remove _initialize_step_skip prototype.
2962         * sol-thread.c: Remove _initialize_sol_thread prototype.
2963         * solib-aix.c: Remove _initialize_solib_aix prototype.
2964         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2965         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2966         * solib-frv.c: Remove _initialize_frv_solib prototype.
2967         * solib-spu.c: Remove _initialize_spu_solib prototype.
2968         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2969         * solib-target.c: Remove _initialize_solib_target prototype.
2970         * solib.c: Remove _initialize_solib prototype.
2971         * source.c: Remove _initialize_source prototype.
2972         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2973         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2974         prototype.
2975         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2976         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2977         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2978         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2979         prototype.
2980         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2981         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2982         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2983         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2984         prototype.
2985         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2986         prototype.
2987         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2988         prototype.
2989         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2990         prototype.
2991         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2992         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2993         prototype.
2994         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2995         prototype.
2996         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2997         prototype.
2998         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2999         prototype.
3000         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3001         prototype.
3002         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3003         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3004         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3005         * stabsread.c: Remove _initialize_stabsread prototype.
3006         * stack.c: Remove _initialize_stack prototype.
3007         * stap-probe.c: Remove _initialize_stap_probe prototype.
3008         * std-regs.c: Remove _initialize_frame_reg prototype.
3009         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3010         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3011         * symfile.c: Remove _initialize_symfile prototype.
3012         * symmisc.c: Remove _initialize_symmisc prototype.
3013         * symtab.c: Remove _initialize_symtab prototype.
3014         * target-dcache.c: Remove _initialize_target_dcache prototype.
3015         * target-descriptions.c: Remove _initialize_target_descriptions
3016         prototype.
3017         * thread.c: Remove _initialize_thread prototype.
3018         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3019         prototype.
3020         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3021         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3022         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3023         prototype.
3024         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3025         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3026         * tracefile.c: Remove _initialize_tracefile prototype.
3027         * tracepoint.c: Remove _initialize_tracepoint prototype.
3028         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3029         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3030         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3031         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3032         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3033         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3034         * tui/tui.c: Remove _initialize_tui prototype.
3035         * typeprint.c: Remove _initialize_typeprint prototype.
3036         * user-regs.c: Remove _initialize_user_regs prototype.
3037         * utils.c: Remove _initialize_utils prototype.
3038         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3039         * valarith.c: Remove _initialize_valarith prototype.
3040         * valops.c: Remove _initialize_valops prototype.
3041         * valprint.c: Remove _initialize_valprint prototype.
3042         * value.c: Remove _initialize_values prototype.
3043         * varobj.c: Remove _initialize_varobj prototype.
3044         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3045         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3046         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3047         * windows-nat.c: Remove _initialize_windows_nat,
3048         _initialize_check_for_gdb_ini, and _initialize_loadable
3049         prototypes.
3050         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3051         * xcoffread.c: Remove _initialize_xcoffread prototype.
3052         * xml-support.c: Remove _initialize_xml_support prototype.
3053         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3054         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3055         prototype.
3056         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3057         prototype.
3058         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3059
3060 2017-09-08  Keith Seitz  <keiths@redhat.com>
3061
3062         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3063         field.
3064
3065 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3066
3067         * f-valprint.c (f_val_print): Remove check for one byte
3068         sized integers. Remove printing of character type.
3069
3070 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3071             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3072             Bernhard Heckel  <bernhard.heckel@intel.com>
3073
3074         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3075         to maintain proper indentation when printing pointers/refs.
3076
3077 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3078
3079         GDB 8.0.1 released.
3080
3081 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3082
3083         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3084
3085 2017-09-05  Tom Tromey  <tom@tromey.com>
3086
3087         * parse.c (funcall_chain): Now a std::vector.
3088         (start_arglist, end_arglist): Simplify.
3089         (free_funcalls): Remove.
3090         (parse_exp_in_context_1): Remove cleanup.
3091
3092 2017-09-05  Tom Tromey  <tom@tromey.com>
3093
3094         * go-exp.y (go_parse): Don't create a cleanup.
3095
3096 2017-09-05  Tom Tromey  <tom@tromey.com>
3097
3098         * d-exp.y (PrimaryExpression): Use std::string.
3099         (d_parse): Don't create a cleanup.
3100
3101 2017-09-05  Tom Tromey  <tom@tromey.com>
3102
3103         * utils.c (do_clear_parser_state): Remove.
3104         (make_cleanup_clear_parser_state): Remove.
3105         * p-exp.y (pascal_parse): Use scoped_restore.
3106         * m2-exp.y (m2_parse): Use scoped_restore.
3107         * f-exp.y (f_parse): Use scoped_restore.
3108         * d-exp.y (d_parse): Use scoped_restore.
3109         * c-exp.y (c_parse): Use scoped_restore.
3110         * ada-exp.y (ada_parse): Use scoped_restore.
3111         * utils.h (make_cleanup_clear_parser_state): Remove.
3112
3113 2017-09-06  Keith Seitz  <keiths@redhat.com>
3114
3115         * dwarf2read.c (dw2_linkage_name_attr): New function.
3116         (dw2_linkage_name): New function.
3117         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3118         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3119         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3120
3121 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3122
3123         * config/djgpp/djconfig.sh: Correct shell portability issue.
3124
3125 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3126
3127         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3128
3129 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3130
3131         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3132         * NEWS: Mention new FreeBSD/mips native configuration.
3133         * configure.host: Add aarch64*-*-freebsd*.
3134         * configure.nat: Likewise.
3135         * aarch64-fbsd-nat.c: New file.
3136
3137 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3138
3139         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3140         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3141         * NEWS: Mention new FreeBSD/aarch64 target.
3142         * configure.tgt: Add aarch64*-*-freebsd*.
3143         * aarch64-fbsd-tdep.c: New file.
3144         * aarch64-fbsd-tdep.h: New file.
3145
3146 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3147
3148         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3149
3150 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3151
3152         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3153         of TLS symbols.
3154
3155 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3156
3157         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3158         call.
3159
3160 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3161
3162         * infrun.c (follow_exec): Call add_thread after
3163         target_find_description.
3164
3165 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3166
3167         * infrun.c (handle_inferior_event_1): When exec'ing, read
3168         stop_pc after follow_exec.
3169
3170 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3171
3172         * remote.c (process_g_packet): Update error message.
3173
3174 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3175
3176         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3177         targets.
3178
3179 2017-09-05  Pedro Alves  <palves@redhat.com>
3180
3181         * eval.c (eval_call, evaluate_funcall): New functions, factored
3182         out from ...
3183         (evaluate_subexp_standard): ... this.
3184
3185 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3186
3187         * amd64-tdep.c (amd64_target_description): Create target
3188         descriptions.
3189         (_initialize_amd64_tdep): Don't call functions
3190         initialize_tdesc_amd64_*.  Add self tests.
3191         * arch/amd64.c (amd64_create_target_description): Add parameter
3192         is_linux.  Call set_tdesc_osabi if is_linux is true.
3193         * arch/amd64.h (amd64_create_target_description): Update the
3194         declaration.
3195         * arch/i386.c (i386_create_target_description): Add parameter
3196         is_linux.  Call set_tdesc_osabi if is_linux is true.
3197         * arch/i386.h (i386_create_target_description): Update
3198         declaration.
3199         * configure.tgt: Add i386.o to gdb_target_obs.
3200         * features/Makefile (XMLTOC): Remove i386/*.xml.
3201         * features/i386/amd64-avx-avx512.c: Remove.
3202         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3203         * features/i386/amd64-avx-mpx.c: Remove.
3204         * features/i386/amd64-avx.c: Remove.
3205         * features/i386/amd64-mpx.c: Remove.
3206         * features/i386/amd64.c: Remove.
3207         * features/i386/i386-avx-avx512.c: Remove.
3208         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3209         * features/i386/i386-avx-mpx.c: Remove.
3210         * features/i386/i386-avx.c: Remove.
3211         * features/i386/i386-mmx.c: Remove.
3212         * features/i386/i386-mpx.c: Remove.
3213         * features/i386/i386.c: Remove.
3214         * i386-tdep.c: Don't include features/i386/i386*.c., include
3215         target-descriptions.h and arch/i386.h.
3216         (i386_target_description): Create target descriptions.
3217         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3218         functions.  Do self tests.
3219
3220 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3221
3222         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3223         * features/i386/amd64-avx-avx512-linux.c: Removed.
3224         * features/i386/amd64-avx-linux.c: Removed.
3225         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3226         * features/i386/amd64-avx-mpx-linux.c: Removed.
3227         * features/i386/amd64-linux.c: Removed.
3228         * features/i386/amd64-mpx-linux.c: Removed.
3229         * features/i386/x32-avx-avx512-linux.c: Removed.
3230         * features/i386/x32-avx-linux.c: Removed.
3231         * features/i386/x32-linux.c: Removed.
3232
3233 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3234
3235         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3236         features/i386/*.c.
3237         (amd64_linux_read_description): Call
3238         amd64_create_target_description.
3239         * arch/amd64.c: New file.
3240         * arch/amd64.h: New file.
3241         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3242         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3243
3244 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3245
3246         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3247         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3248         (amd64_linux_read_description): Create target descriptions.
3249         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3250         functions.  Add unit tests.
3251         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3252         x32-core.xml.
3253         * features/i386/64bit-avx.c: Generated.
3254         * features/i386/64bit-avx512.c: Generated.
3255         * features/i386/64bit-core.c: Generated.
3256         * features/i386/64bit-linux.c: Generated.
3257         * features/i386/64bit-mpx.c: Generated.
3258         * features/i386/64bit-pkeys.c: Generated.
3259         * features/i386/64bit-segments.c: Generated.
3260         * features/i386/64bit-sse.c: Generated.
3261         * features/i386/x32-core.c: Generated.
3262         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3263         c files for amd64-linux and x32-linux.
3264
3265 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3266
3267         * amd64-linux-tdep.c (amd64_linux_read_description): New
3268         function.
3269         (amd64_linux_core_read_description): Call
3270         amd64_linux_read_description.
3271         (amd64_linux_init_abi): Likewise.
3272         (amd64_x32_linux_init_abi): Likewise.
3273         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3274         * x86-linux-nat.c (x86_linux_read_description): Call
3275         amd64_linux_read_description.
3276
3277 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3278
3279         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3280         comments.
3281
3282 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3283
3284         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3285         * features/i386/i386-avx-avx512-linux.c: Remove.
3286         * features/i386/i386-avx-linux.c: Remove.
3287         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3288         * features/i386/i386-avx-mpx-linux.c: Remove.
3289         * features/i386/i386-linux.c: Remove.
3290         * features/i386/i386-mmx-linux.c: Remove.
3291         * features/i386/i386-mpx-linux.c: Remove.
3292
3293 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3294
3295         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3296         (SFILES): Add arch/i386.c.
3297         (HFILES_NO_SRCDIR): Add arch/i386.h.
3298         * arch/i386.c: New file.
3299         * arch/i386.h: New file.
3300         * arch/tdesc.h (allocate_target_description): Declare.
3301         (set_tdesc_architecture): Declare.
3302         (set_tdesc_osabi): Declare.
3303         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3304         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3305         include arch/i386.h.
3306         (i386_linux_read_description): Remove code and call
3307         i386_create_target_description.
3308         (set_tdesc_architecture): New function.
3309         (set_tdesc_osabi): New function.
3310         * target-descriptions.h (allocate_target_description): Remove.
3311
3312 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3313
3314         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3315         * target-descriptions.c (tdesc_create_feature): Likewise, and
3316         adjust code.
3317         * features/i386/32bit-avx.c: Re-generated.
3318         * features/i386/32bit-avx512.c: Re-generated.
3319         * features/i386/32bit-core.c: Re-generated.
3320         * features/i386/32bit-linux.c: Re-generated.
3321         * features/i386/32bit-mpx.c: Re-generated.
3322         * features/i386/32bit-pkeys.c: Re-generated.
3323         * features/i386/32bit-sse.c: Re-generated.
3324
3325 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3326
3327         * regformats/regdef.h (struct reg): Override operator == and !=.
3328
3329 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3330
3331         * arch/tdesc.h: New file.
3332         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3333         * target-descriptions.c: Update comments.
3334         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3335         declarations.
3336         * features/i386/32bit-avx.c: Re-generated.
3337         * features/i386/32bit-avx512.c: Re-generated.
3338         * features/i386/32bit-core.c: Re-generated.
3339         * features/i386/32bit-linux.c: Re-generated.
3340         * features/i386/32bit-mpx.c: Re-generated.
3341         * features/i386/32bit-pkeys.c: Re-generated.
3342         * features/i386/32bit-sse.c: Re-generated.
3343
3344 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3345
3346         * regformats/regdat.sh: Update generated code.
3347
3348 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3349
3350         * regformats/regdat.sh: Adjust code order.
3351
3352 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3353
3354         * expprint.c (dump_subexp_body_standard): Use constant format
3355         string in fprintf_filtered call.
3356
3357 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3358
3359         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3360         NetBSD/i386.
3361         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3362
3363 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3364
3365         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3366
3367 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3368
3369         * bsd-kvm.o: Define _KMEMUSER.
3370         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3371         * configure: Regenerate.
3372
3373 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3374
3375         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3376         * i386-fbsd-nat.c: Likewise.
3377
3378 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3379
3380         * unittests/array-view-selftests.c: Add include of <array>.
3381
3382 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3383
3384         * spu-tdep.c (flush_ea_cache): Add missing argument to
3385         call_function_by_hand.
3386
3387 2017-09-04  Pedro Alves  <palves@redhat.com>
3388
3389         * NEWS (Safer support for debugging with no debug info): New.
3390
3391 2017-09-04  Pedro Alves  <palves@redhat.com>
3392
3393         * c-exp.y (function_method, function_method_void): Add current
3394         instance flags to TYPE_INSTANCE.
3395         * dwarf2read.c (check_modifier): New.
3396         (compute_delayed_physnames): Assert that only C++ adds delayed
3397         physnames.  Mark fn_fields as const/volatile depending on
3398         physname.
3399         * eval.c (make_params): New type_instance_flags parameter.  Use
3400         it as the new type's instance flags.
3401         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3402         flags element and pass it to make_params.
3403         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3404         instance flags element.
3405         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3406         * gdbtypes.h: Include "enum-flags.h".
3407         (type_instance_flags): New enum-flags type.
3408         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3409         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3410         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3411         (follow_type_instance_flags): New function.
3412         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3413         * parser-defs.h (follow_type_instance_flags): Declare.
3414         * valops.c (value_struct_elt_for_reference): const/volatile must
3415         match too.
3416
3417 2017-09-04  Pedro Alves  <palves@redhat.com>
3418
3419         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3420         function/method scopes; lookup the nested name as a function local
3421         static variable.
3422
3423 2017-09-04  Pedro Alves  <palves@redhat.com>
3424
3425         (%type <voidval>): Add function_method.
3426         * c-exp.y (exp): New production for calls with no arguments.
3427         (function_method, function_method_void_or_typelist): New
3428         productions.
3429         (exp): New production for "method()::static_var".
3430         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3431         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3432         Handle OP_FUNC_STATIC_VAR.
3433         * parse.c (operator_length_standard):
3434         Handle OP_FUNC_STATIC_VAR.
3435
3436 2017-09-04  Pedro Alves  <palves@redhat.com>
3437
3438         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3439         handling.
3440         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3441         Ditto.
3442         * parse.c (operator_length_standard, operator_check_standard):
3443         Ditto.
3444         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3445
3446 2017-09-04  Pedro Alves  <palves@redhat.com>
3447
3448         * ax-gdb.c: Include "typeprint.h".
3449         (gen_expr_for_cast): New function.
3450         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3451         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3452         type is unknown.
3453         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3454         nodebug_data_symbol.
3455         * eval.c: Include "typeprint.h".
3456         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3457         Error out if symbol has unknown type.
3458         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3459         evaluate_subexp_for_cast.
3460         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3461         OP_VAR_MSYM_VALUE.
3462         (evaluate_subexp_for_cast): New function.
3463         * gdbtypes.c (init_nodebug_var_type): New function.
3464         (objfile_type): Use it to initialize types of variables with no
3465         debug info.
3466         * typeprint.c (error_unknown_type): New.
3467         * typeprint.h (error_unknown_type): New declaration.
3468         * compile/compile-c-types.c (convert_type_basic): Handle
3469         TYPE_CODE_ERROR; warn and fallback to int for variables with
3470         unknown type.
3471
3472 2017-09-04  Pedro Alves  <palves@redhat.com>
3473
3474         * eval.c (evaluate_var_value): New function, factored out from ...
3475         (evaluate_subexp_standard): ... here.
3476
3477 2017-09-04  Pedro Alves  <palves@redhat.com>
3478
3479         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3480         Remove useless assignments to 'op'.
3481
3482 2017-09-04  Pedro Alves  <palves@redhat.com>
3483
3484         * eval.c (eval_skip_value): New function.
3485         (evaluate_subexp_standard): Use it.
3486
3487 2017-09-04  Pedro Alves  <palves@redhat.com>
3488
3489         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3490         function name from symbol/minsym and pass it to
3491         error_call_unknown_return_type.
3492
3493 2017-09-04  Pedro Alves  <palves@redhat.com>
3494
3495         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3496         * ax-gdb.c (gen_msym_var_ref): New function.
3497         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3498         * eval.c (evaluate_var_msym_value): New function.
3499         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3500         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3501         to call_function_by_hand.
3502         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3503         Handle OP_VAR_MSYM_VALUE.
3504         (union exp_element) <msymbol>: New field.
3505         * minsyms.h (struct type): Forward declare.
3506         (find_minsym_type_and_address): Declare.
3507         * parse.c (write_exp_elt_msym): New function.
3508         (write_exp_msymbol): Delete, refactored as ...
3509         (find_minsym_type_and_address): ... this new function.
3510         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3511         (operator_length_standard, operator_check_standard): Handle
3512         OP_VAR_MSYM_VALUE.
3513         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3514
3515 2017-09-04  Pedro Alves  <palves@redhat.com>
3516
3517         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3518         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3519         unknown.
3520         * ada-typeprint.c (print_func_type): Handle functions with unknown
3521         return type.
3522         * c-typeprint.c (c_type_print_base): Handle functions and methods
3523         with unknown return type.
3524         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3525         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3526         * compile/compile-c-types.c: Include "objfiles.h".
3527         (convert_func): For functions with unknown return type, warn and
3528         default to int.
3529         * compile/compile-object-run.c (compile_object_run): Adjust call
3530         to call_function_by_hand_dummy.
3531         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3532         call_function_by_hand.
3533         * eval.c (evaluate_subexp_standard): Adjust calls to
3534         call_function_by_hand.  Handle functions and methods with unknown
3535         return type.  Pass expect_type to call_function_by_hand.
3536         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3537         return type.
3538         * gcore.c (call_target_sbrk): Adjust call to
3539         call_function_by_hand.
3540         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3541         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3542         an integer address type instead of nodebug.
3543         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3544         call_function_by_hand.
3545         * infcall.c (error_call_unknown_return_type): New function.
3546         (call_function_by_hand): New "default_return_type" parameter.
3547         Pass it down.
3548         (call_function_by_hand_dummy): New "default_return_type"
3549         parameter.  Use it instead of defaulting to int.  If there's no
3550         default and the return type is unknown, throw an error.  If
3551         there's a default return type, and the called function has no
3552         debug info, then assume the function is prototyped.
3553         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3554         New "default_return_type" parameter.
3555         (error_call_unknown_return_type): New declaration.
3556         * linux-fork.c (call_lseek): Cast return type of lseek.
3557         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3558         call_function_by_hand.
3559         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3560         calls to call_function_by_hand.
3561         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3562         return type.
3563         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3564         (value_nsstring, print_object_command): Adjust calls to
3565         call_function_by_hand.
3566         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3567         functions with unknown return type.
3568         (pascal_type_print_func_varspec_suffix): New function.
3569         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3570         TYPE_CODE_METHOD>: Use it.
3571         * python/py-value.c (valpy_call): Adjust call to
3572         call_function_by_hand.
3573         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3574         call_function_by_hand.
3575         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3576         call_function_by_hand.
3577         * valops.c (value_allocate_space_in_inferior): Adjust call to
3578         call_function_by_hand.
3579         * typeprint.c (type_print_unknown_return_type): New function.
3580         * typeprint.h (type_print_unknown_return_type): New declaration.
3581
3582 2017-09-04  Pedro Alves  <palves@redhat.com>
3583
3584         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3585         types with more than one parameter as prototyped.
3586
3587 2017-09-04  Pedro Alves  <palves@redhat.com>
3588
3589         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3590         (disassemble_command): Use gdb_disassembly_flags instead of bare
3591         int.
3592         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3593         (dump_insns, do_mixed_source_and_assembly_deprecated)
3594         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3595         Use gdb_disassembly_flags instead of bare int.
3596         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3597         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3598         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3599         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3600         (enum gdb_disassembly_flag): ... values of this new enumeration.
3601         (gdb_disassembly_flags): Define.
3602         (gdb_disassembly)
3603         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3604         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3605         gdb_disassembly_flags instead of bare int.
3606         * record-btrace.c (btrace_insn_history)
3607         (record_btrace_insn_history, record_btrace_insn_history_range)
3608         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3609         instead of bare int.
3610         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3611         Use gdb_disassembly_flags instead of bare int.
3612         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3613         Define.
3614         * target-delegates.c: Regenerate.
3615         * target.c (target_insn_history, target_insn_history_from)
3616         (target_insn_history_range): Use gdb_disassembly_flags instead of
3617         bare int.
3618         * target.h: Include "disasm.h".
3619         (struct target_ops) <to_insn_history, to_insn_history_from,
3620         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3621         int.
3622         (target_insn_history, target_insn_history_from)
3623         (target_insn_history_range): Use gdb_disassembly_flags instead of
3624         bare int.
3625
3626 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3627
3628         * cli/cli-script.c (build_command_line): For if/while commands,
3629         check whether args is empty.
3630
3631 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3632
3633         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3634         (enum command_control_type): Likewise.
3635         (struct command_line): Likewise.
3636         (free_command_lines): Likewise.
3637         (struct command_lines_deleter): Likewise.
3638         (command_line_up): Likewise.
3639         (read_command_lines): Likewise.
3640         (read_command_lines_1): Likewise.
3641         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3642         (enum command_control_type): Likewise.
3643         (struct command_line): Likewise.
3644         (free_command_lines): Likewise.
3645         (struct command_lines_deleter): Likewise.
3646         (command_line_up): Likewise.
3647         (read_command_lines): Likewise.
3648         (read_command_lines_1): Likewise.
3649         * breakpoint.h: Include cli/cli-script.h.
3650         * extension-priv.h: Likewise.
3651         * gdbcmd.h: Likewise.
3652
3653 2017-09-04  Pedro Alves  <palves@redhat.com>
3654
3655         * ada-lang.c (is_known_support_routine): Move sal declaration to
3656         where it is initialized.
3657         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3658         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3659         (clear_command, update_static_tracepoint): Remove init_sal
3660         references.  Move declarations closer to initializations.
3661         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3662         initializations.
3663         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3664         references.  Move sal declarations closer to initializations.
3665         * frame.c (find_frame_sal): Return a symtab_and_line via function
3666         return instead of output parameter.  Remove init_sal references.
3667         * frame.h (find_frame_sal): Return a symtab_and_line via function
3668         return instead of output parameter.
3669         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3670         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3671         instead of memset.
3672         (gdbscm_find_pc_line): Remove init_sal reference.
3673         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3674         references.  Move declarations closer to initializations.
3675         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3676         initializations.
3677         (finish_backward): Remove init_sal references.  Move declarations
3678         closer to initializations.
3679         * infrun.c (process_event_stop_test, handle_step_into_function)
3680         (insert_hp_step_resume_breakpoint_at_frame)
3681         (insert_step_resume_breakpoint_at_caller): Likewise.
3682         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3683         (symbol_to_sal): Likewise.
3684         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3685         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3686         to its initialization.
3687         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3688         init_sal references.  Move declarations closer to initializations.
3689         * source.c (get_current_source_symtab_and_line): Remove brace
3690         initialization.
3691         (set_current_source_symtab_and_line): Now takes the sal by const
3692         reference.  Remove brace initialization.
3693         (line_info): Remove init_sal reference.
3694         * source.h (set_current_source_symtab_and_line): Now takes a
3695         symtab_and_line via const reference.
3696         * stack.c (set_current_sal_from_frame): Adjust.
3697         (print_frame_info): Adjust.
3698         (get_last_displayed_sal): Return the sal via function return
3699         instead of via output parameter.  Simplify.
3700         (frame_info): Adjust.
3701         * stack.h (get_last_displayed_sal): Return the sal via function
3702         return instead of via output parameter.
3703         * symtab.c (init_sal): Delete.
3704         (find_pc_sect_line): Remove init_sal references.  Move
3705         declarations closer to initializations.
3706         (find_function_start_sal): Remove init_sal references.  Move
3707         declarations closer to initializations.
3708         * symtab.h (struct symtab_and_line): In-class initialize all
3709         fields.
3710         * tracepoint.c (set_traceframe_context)
3711         (print_one_static_tracepoint_marker): Remove init_sal references.
3712         Move declarations closer to initializations.
3713         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3714         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3715         declarations closer to initializations.
3716         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3717         init_sal references.  Adjust.
3718
3719 2017-09-04  Pedro Alves  <palves@redhat.com>
3720
3721         * ax-gdb.c (agent_command_1): Use range-for.
3722         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3723         * breakpoint.c: Include "common/array-view.h".
3724         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3725         parameter from struct symtabs_and_lines to
3726         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3727         (breakpoint_sals_to_pc): Change sals parameter from struct
3728         symtabs_and_lines to std::vector reference.
3729         (check_fast_tracepoint_sals): Change sals parameter from struct
3730         symtabs_and_lines to std::array_view.  Use range-for.
3731         (decode_static_tracepoint_spec): Return a std::vector instead of
3732         symtabs_and_lines.  Update.
3733         (create_breakpoint): Update.
3734         (break_range_command, until_break_command, clear_command): Update.
3735         (base_breakpoint_decode_location, bkpt_decode_location)
3736         (bkpt_probe_create_sals_from_location)
3737         (bkpt_probe_decode_location, tracepoint_decode_location)
3738         (tracepoint_probe_decode_location)
3739         (strace_marker_create_sals_from_location): Return a std::vector
3740         instead of symtabs_and_lines.
3741         (strace_marker_create_breakpoints_sal): Update.
3742         (strace_marker_decode_location): Return a std::vector instead of
3743         symtabs_and_lines.  Update.
3744         (update_breakpoint_locations): Change struct symtabs_and_lines
3745         parameters to gdb::array_view.  Adjust.
3746         (location_to_sals): Return a std::vector instead of
3747         symtabs_and_lines.  Update.
3748         (breakpoint_re_set_default): Use std::vector instead of struct
3749         symtabs_and_lines.
3750         (decode_location_default): Return a std::vector instead of
3751         symtabs_and_lines.  Update.
3752         * breakpoint.h: Include "common/array-view.h".
3753         (struct breakpoint_ops) <decode_location>: Now returns a
3754         std::vector instead of returning a symtabs_and_lines via output
3755         parameter.
3756         (update_breakpoint_locations): Change sals parameters to use
3757         gdb::array_view.
3758         * cli/cli-cmds.c (edit_command, list_command): Update to use
3759         std::vector and gdb::array_view.
3760         (ambiguous_line_spec): Adjust to use gdb::array_view and
3761         range-for.
3762         (compare_symtabs): Rename to ...
3763         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3764         const reference and adjust.
3765         (filter_sals): Rewrite using std::vector and standard algorithms.
3766         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3767         (jump_command): Update to use std::vector.
3768         * linespec.c (struct linespec_state) <canonical_names>: Update
3769         comment.
3770         (add_sal_to_sals_basic): Delete.
3771         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3772         (decode_line_2, create_sals_line_offset)
3773         (convert_address_location_to_sals, convert_linespec_to_sals)
3774         (convert_explicit_location_to_sals, parse_linespec)
3775         (event_location_to_sals, decode_line_full, decode_line_1)
3776         (decode_line_with_current_source)
3777         (decode_line_with_last_displayed, decode_objc)
3778         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3779         (linespec_result::~linespec_result): Adjust to use std::vector
3780         instead of symtabs_and_lines.
3781         * linespec.h (linespec_sals::sals): Now a std::vector.
3782         (struct linespec_result): Use std::vector, bool, and in-class
3783         initialization.
3784         (decode_line_1, decode_line_with_current_source)
3785         (decode_line_with_last_displayed): Return std::vector.
3786         * macrocmd.c (info_macros_command): Use std::vector.
3787         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3788         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3789         std::vector.
3790         * probe.h (parse_probes): Return a std::vector.
3791         * python/python.c (gdbpy_decode_line): Use std::vector and
3792         gdb::array_view.
3793         * source.c (select_source_symtab, line_info): Use std::vector.
3794         * stack.c (func_command): Use std::vector.
3795         * symtab.h (struct symtabs_and_lines): Delete.
3796         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3797
3798 2017-09-04  Pedro Alves  <palves@redhat.com>
3799
3800         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3801         unittests/array-view-selftests.c.
3802         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3803         * common/array-view.h: New file.
3804         * unittests/array-view-selftests.c: New file.
3805
3806 2017-09-04  Pedro Alves  <palves@redhat.com>
3807
3808         * cli/cli-cmds.c (edit_command): Pass message to
3809         ambiguous_line_spec.
3810         (list_command): Pass message to ambiguous_line_spec.  Say
3811         "first"/"last" instead of "start" and "end" to be consistent with
3812         the manual.
3813         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3814         them to print formatted message.
3815
3816 2017-09-04  Pedro Alves  <palves@redhat.com>
3817
3818         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3819         ftrace_update_insns by reference instead of pointer.
3820
3821 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3822
3823         * i386-go32-tdep.c: Include x86-xstate.h.
3824         (i386_go32_init_abi): Call i386_target_description.
3825         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3826         if xcr0 is X86_XSTATE_X87_MASK.
3827         * i386-tdep.h (tdesc_i386): Remove the declaration.
3828         (tdesc_i386_mmx): Likewise.
3829
3830 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3831
3832         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3833         X86_XSTATE_SSE_MASK instead of 0.
3834
3835 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3836
3837         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3838         i386_target_description.
3839         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3840         i386_target_description.
3841         * i386-tdep.c (i386_gdbarch_init): Likewise.
3842
3843 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3844
3845         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3846         (x86_darwin_init_abi_64): Call amd64_target_description.
3847         * amd64-dicos-tdep.c: Likewise.
3848         * amd64-fbsd-nat.c: Likewise.
3849         * amd64-fbsd-tdep.c: Likewise.
3850         * amd64-nbsd-tdep.c: Likewise.
3851         * amd64-obsd-tdep.c: Likewise.
3852         * amd64-sol2-tdep.c: Likewise.
3853         * amd64-windows-tdep.c: Likewise.
3854         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3855
3856 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3857
3858         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3859         (btrace_function) <insn>: Change type to use std::vector.
3860         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3861         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3862         ftrace_update_insns, ftrace_compute_global_level_offset,
3863         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3864         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3865         change to std::vector.
3866         (ftrace_update_insns): Adjust to change to std::vector, change
3867         type of INSN parameter.
3868         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3869         * record-btrace.c (btrace_call_history_insn_range,
3870         btrace_compute_src_line_range,
3871         record_btrace_frame_prev_register): Adjust to change to
3872         std::vector.
3873         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3874         to change to std::vector.
3875
3876 2017-09-03  Tom Tromey  <tom@tromey.com>
3877
3878         * corefile.c (reopen_exec_file): Use std::string.
3879
3880 2017-09-03  Tom Tromey  <tom@tromey.com>
3881
3882         * compile/compile.c (compile_register_name_mangled): Return
3883         std::string.
3884         * compile/compile-loc2c.c (pushf_register_address): Update.
3885         (pushf_register): Update.
3886         * compile/compile-c-types.c (convert_array): Update.
3887         * compile/compile-c-symbols.c (generate_vla_size): Update.
3888         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3889         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3890         (convert_one_symbol): Update.
3891         (generate_c_for_for_one_variable): Update.
3892         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3893         std::string.
3894         (generate_register_struct): Update.
3895         * compile/compile-internal.h (c_get_range_decl_name): Return a
3896         std::string.
3897         (compile_register_name_mangled): Return std::string.
3898
3899 2017-09-03  Tom Tromey  <tom@tromey.com>
3900
3901         * utils.c (perror_string): Return a std::string.
3902         (throw_perror_with_name, perror_warning_with_name): Update.
3903
3904 2017-09-03  Tom Tromey  <tom@tromey.com>
3905
3906         * demangle.c (demangle_command): Use std::string,
3907         unique_xmalloc_ptr.
3908
3909 2017-09-03  Tom Tromey  <tom@tromey.com>
3910
3911         * cli/cli-setshow.c (do_set_command): Use std::string.
3912
3913 2017-09-03  Tom Tromey  <tom@tromey.com>
3914
3915         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3916
3917 2017-09-03  Tom Tromey  <tom@tromey.com>
3918
3919         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3920
3921 2017-09-03  Tom Tromey  <tom@tromey.com>
3922
3923         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3924         gdb::unique_xmalloc_ptr.
3925
3926 2017-09-03  Tom Tromey  <tom@tromey.com>
3927
3928         * thread.c (print_thread_info_1): Use string_printf.
3929         (thread_apply_command, thread_apply_all_command): Use
3930         std::string.
3931
3932 2017-09-03  Tom Tromey  <tom@tromey.com>
3933
3934         * valprint.c (val_print_string): Update.
3935         * gdbcore.h (memory_error_message): Return std::string.
3936         * corefile.c (memory_error_message): Return std::string.
3937         (memory_error): Update.
3938         * breakpoint.c (insert_bp_location): Update.
3939
3940 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3941
3942         * target/waitstatus.h (target_waitstatus_to_string): Change
3943         return type to std::string.
3944         * target/waitstatus.c (target_waitstatus_to_string): Return
3945         std::string.
3946         * target.h (target_waitstatus_to_string): Remove declaration.
3947         * infrun.c (resume, clear_proceed_status_thread,
3948         print_target_wait_results, do_target_wait, save_waitstatus,
3949         stop_all_threads): Adjust.
3950         * record-btrace.c (record_btrace_wait): Adjust.
3951         * target-debug.h
3952         (target_debug_print_struct_target_waitstatus_p): Adjust.
3953
3954 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3955
3956         PR gdb/22046
3957         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3958         detection.
3959
3960 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3961
3962         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3963         for setting/unsetting environment variables on the remote target.
3964         (New remote packets): Add entries for QEnvironmentHexEncoded,
3965         QEnvironmentUnset and QEnvironmentReset.
3966         * common/environ.c (gdb_environ::operator=): Extend method to
3967         handle m_user_set_env_list and m_user_unset_env_list.
3968         (gdb_environ::clear): Likewise.
3969         (match_var_in_string): Change type of first parameter from 'char
3970         *' to 'const char *'.
3971         (gdb_environ::set): Extend method to handle
3972         m_user_set_env_list and m_user_unset_env_list.
3973         (gdb_environ::unset): Likewise.
3974         (gdb_environ::clear_user_set_env): New method.
3975         (gdb_environ::user_set_envp): Likewise.
3976         (gdb_environ::user_unset_envp): Likewise.
3977         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3978         m_user_unset_env_list on move constructor/assignment.
3979         (unset): Add new default parameter 'update_unset_list = true'.
3980         (clear_user_set_env): New method.
3981         (user_set_envp): Likewise.
3982         (user_unset_envp): Likewise.
3983         (m_user_set_env_list): New std::set.
3984         (m_user_unset_env_list): Likewise.
3985         * common/rsp-low.c (hex2str): New function.
3986         (bin2hex): New overload for bin2hex function.
3987         * common/rsp-low.c (hex2str): New prototype.
3988         (str2hex): New overload prototype.
3989         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3990         QEnvironmentUnset and QEnvironmentReset.
3991         (remote_protocol_features): Add QEnvironmentHexEncoded,
3992         QEnvironmentUnset and QEnvironmentReset packets.
3993         (send_environment_packet): New function.
3994         (extended_remote_environment_support): Likewise.
3995         (extended_remote_create_inferior): Call
3996         extended_remote_environment_support.
3997         (_initialize_remote): Add QEnvironmentHexEncoded,
3998         QEnvironmentUnset and QEnvironmentReset packet configs.
3999         * unittests/environ-selftests.c (gdb_selftest_env_var):
4000         New variable.
4001         (test_vector_initialization): New function.
4002         (test_init_from_host_environ): Likewise.
4003         (test_reinit_from_host_environ): Likewise.
4004         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4005         Likewise.
4006         (test_unset_set_empty_vector): Likewise.
4007         (test_vector_clear): Likewise.
4008         (test_std_move): Likewise.
4009         (test_move_constructor):
4010         (test_self_move): Likewise.
4011         (test_set_unset_reset): Likewise.
4012         (run_tests): Rewrite in terms of the functions above.
4013
4014 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4015
4016         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4017         (adi_available): Use a temp variable of type CORE_ADDR as argument
4018         3 when calling target_auxv_search.
4019         (adi_normalize_address): Use masks and xor operators to calculate
4020         normalized address.
4021         (adi_read_versions, adi_write_versions, adi_print_versions)
4022         (do_examine, do_assign): Use paddress.
4023
4024 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4025
4026         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4027         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4028         out of loop and add supply of FIR.
4029         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4030         add collect of FIR.
4031
4032 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4033
4034         PR gdb/21827
4035         * cli/cli-script.c (define_command): Don't convert command name
4036         to lower case.
4037
4038 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4039
4040         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4041         Update all callers accordingly. Remove all code blocks handling
4042         the case where DISPP is not NULL.
4043
4044 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4045
4046         PR symtab/22003
4047         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4048         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4049         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4050
4051 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4052
4053         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4054         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4055         (read_comp_units_from_section): New parameter abbrev_section, use
4056         read_and_check_comp_unit_head, allocate signatured_type if needed.
4057         (create_all_comp_units): Update read_comp_units_from_section caller.
4058
4059 2017-08-23  Pedro Alves  <palves@redhat.com>
4060
4061         PR remote/21852
4062         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4063         to null_ptid and switch to thread without reading the registers
4064         after adding the inferior.
4065
4066 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4067
4068         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4069         compile-gcc.
4070         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4071         (compile_to_object): Implement compile_gcc.
4072         (_initialize_compile): Install "set compile-gcc".  Initialize
4073         compile_gcc.
4074
4075 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4076
4077         * compile/compile.c (compile_to_object): Conditionally call
4078         set_verbose.  Conditionally call compile or compile_v0.
4079
4080 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4081
4082         * sparc64-tdep.h: (adi_normalize_address): New export.
4083         * sparc-nat.h: (open_adi_tag_fd): New export.
4084         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4085         * sparc64-linux-tdep.c:
4086         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4087         (sparc64_linux_handle_segmentation_fault): New function.
4088         (sparc64_linux_init_abi): Register
4089         sparc64_linux_handle_segmentation_fault
4090         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4091         (sparc64_addr_bits_remove): New function.
4092         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4093         (MAX_PROC_NAME_SIZE): New macro.
4094         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4095         (sparc64adilist): New variable.
4096         (adi_proc_list): New variable.
4097         (find_adi_info): New function.
4098         (add_adi_info): New function.
4099         (get_adi_info_proc): New function.
4100         (get_adi_info): New function.
4101         (info_adi_command): New function.
4102         (read_maps_entry): New function.
4103         (adi_available): New function.
4104         (adi_normalize_address): New function.
4105         (adi_align_address): New function.
4106         (adi_convert_byte_count): New function.
4107         (adi_tag_fd): New function.
4108         (adi_is_addr_mapped): New function.
4109         (adi_read_versions): New function.
4110         (adi_write_versions): New function.
4111         (adi_print_versions): New function.
4112         (do_examine): New function.
4113         (do_assign): New function.
4114         (adi_examine_command): New function.
4115         (adi_assign_command): New function.
4116         (_initialize_sparc64_adi_tdep): New function.
4117
4118 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4119
4120         * breakpoint.c (breakpoints_info): Rename to ...
4121         (info_breakpoints_command): ... this.
4122         (watchpoints_info): Rename to ...
4123         (info_watchpoints_command): ... this.
4124         (tracepoints_info): Rename to ...
4125         (info_tracepoints_command): ... this.
4126         (_initialize_breakpoint): Adjust.
4127         * dcache.c (dcache_info): Rename to ...
4128         (info_display_command): ... this.
4129         (_initialize_dcache): Adjust.
4130         * frame.h (args_info): Rename to ...
4131         (info_args_command): ... this.
4132         (locals_info): Rename to ...
4133         (info_locals_command): ... this.
4134         * infcmd.c (nofp_registers_info): Rename to ...
4135         (info_registers_command): ... this.
4136         (float_info): Rename to ...
4137         (info_float_command): ... this.
4138         (program_info): Rename to ...
4139         (info_program_command): ... this.
4140         (all_registers_info): Rename to ...
4141         (info_all_registers_command): ... this.
4142         (vector_info): Rename to ...
4143         (info_vector_command): ... this.
4144         (float_info): Rename to ...
4145         (info_float_command): ... this.
4146         (_initialize_infcmd): Adjust.
4147         * inferior.h (term_info): Rename to ...
4148         (info_terminal_command): ... this.
4149         * inflow.c (term_info): Rename to ...
4150         (info_terminal_command): ... this.
4151         (_initialize_inflow): Adjust.
4152         * infrun.c (signals_info): Rename to ...
4153         (info_signals_command): ... this.
4154         (_initialize_infrun): Adjust.
4155         * objc-lang.c (classes_info): Rename to ...
4156         (info_classes_command): ... this.
4157         (selectors_info): Rename to ...
4158         (info_selectors_command): ... this.
4159         (_initialize_objc_language): Adjust.
4160         * printcmd.c (sym_info): Rename to ...
4161         (info_symbol_command): ... this.
4162         (address_info): Rename to ...
4163         (info_address_command): ... this.
4164         (display_info): Rename to ...
4165         (info_display_command): ... this.
4166         (_initialize_printcmd): Adjust.
4167         * reverse.c (bookmarks_info): Rename to ...
4168         (info_breakpoints_command): ... this.
4169         (_initialize_reverse): Adjust.
4170         * ser-go32.c (dos_info): Rename to ...
4171         (info_serial_command): ... this.
4172         (_initialize_ser_dos): Adjust.
4173         * skip.c (skip_info): Rename to ...
4174         (info_skip_command): ... this.
4175         (_initialize_step_skip): Adjust.
4176         * source.c (line_info): Rename to ...
4177         (info_line_command): ... this.
4178         (source_info): Rename to ...
4179         (info_source_command)
4180         * stack.c (frame_info): Rename to ...
4181         (info_frame_command): ... this.
4182         (locals_info): Rename to ...
4183         (info_locals_command): ... this.
4184         (args_info): Rename to ...
4185         (info_args_command): ... this.
4186         (_initialize_stack): Adjust.
4187         * symtab.c (sources_info): Rename to ...
4188         (info_sources_command): ... this.
4189         (variables_info): Rename to ...
4190         (info_variables_command): ... this.
4191         (functions_info): Rename to ...
4192         (info_functions_command): ... this.
4193         (types_info): Rename to ...
4194         (info_types_command): ... this.
4195         (_initialize_symtab): Adjust.
4196         * target.c (target_info): Rename to ...
4197         (info_target_command): ... this.
4198         (initialize_targets): Adjust.
4199         * tracepoint.c (tvariables_info): Rename to ...
4200         (info_tvariables_command): ... this.
4201         (scope_info): Rename to ...
4202         (info_scope_command): ... this.
4203         (trace_dump_actions): Adjust.
4204         (_initialize_tracepoint): Adjust.
4205
4206 2017-08-22  Tom Tromey  <tom@tromey.com>
4207
4208         * breakpoint.h (install_breakpoint): Update.
4209         * breakpoint.c (add_solib_catchpoint): Update.
4210         (install_breakpoint): Change argument to a std::unique_ptr.
4211         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4212         (create_breakpoint_sal, create_breakpoint): Update.
4213         (watch_command_1, catch_exec_command_1)
4214         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4215         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4216         Return the breakpoint.
4217         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4218         (new_single_step_breakpoint): Update.
4219         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4220         std::unique_ptr.
4221         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4222         std::unique_ptr.
4223         * break-catch-sig.c (create_signal_catchpoint): Use
4224         std::unique_ptr.
4225         * ada-lang.c (create_ada_exception_catchpoint): Use
4226         std::unique_ptr.
4227
4228 2017-08-22  Tom Tromey  <tom@tromey.com>
4229
4230         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4231
4232 2017-08-22  Tom Tromey  <tom@tromey.com>
4233
4234         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4235         (lookup_partial_symbol): Update.
4236
4237 2017-08-22  Tom Tromey  <tom@tromey.com>
4238
4239         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4240         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4241         (find_and_open_source, symtab_to_fullname): Update.
4242         * psymtab.c (psymtab_to_fullname): Update.
4243
4244 2017-08-22  Tom Tromey  <tom@tromey.com>
4245
4246         * exec.c (exec_file_attach): Update.
4247         * linux-thread-db.c (try_thread_db_load): Update.
4248         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4249         * utils.c (gdb_realpath): Change return type.
4250         (gdb_realpath_keepfile): Update.
4251         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4252         (_initialize_utils): Register the new self test.
4253         * source.c (openp): Update.
4254         (find_and_open_source): Update.
4255         * nto-tdep.c (nto_find_and_open_solib): Update.
4256         * main.c (set_gdb_data_directory): Update.
4257         (captured_main_1): Update.
4258         * dwarf2read.c (dwarf2_get_dwz_file): Update
4259         (dw2_map_symbol_filenames): Update.
4260         * auto-load.c (auto_load_safe_path_vec_update): Update.
4261         (filename_is_in_auto_load_safe_path_vec): Change type of
4262         "filename_realp".
4263         (auto_load_objfile_script): Update.
4264         (file_is_auto_load_safe): Update.  Use std::string.
4265         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4266
4267 2017-08-22  Tom Tromey  <tom@tromey.com>
4268
4269         * utils.c (gdb_realpath_keepfile): Return a
4270         gdb::unique_xmalloc_ptr.
4271         * exec.c (exec_file_attach): Update.
4272         * utils.h (gdb_realpath_keepfile): Return a
4273         gdb::unique_xmalloc_ptr.
4274
4275 2017-08-22  Tom Tromey  <tom@tromey.com>
4276
4277         * compile/compile.c (compile_file_command): Use
4278         gdb::unique_xmalloc_ptr, std::string.
4279         * utils.c (gdb_abspath): Change return type.
4280         * source.c (openp): Update.
4281         * objfiles.c (allocate_objfile): Update.
4282         * main.c (set_gdb_data_directory): Update.
4283         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4284
4285 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4286
4287         * cli-cmds.c (list_commands): List actual code around more than
4288         one location.
4289
4290 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4291
4292         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4293
4294 2017-08-21  Pedro Alves  <palves@redhat.com>
4295
4296         PR gdb/19487
4297         * c-exp.y (variable production): Handle function aliases.
4298         * minsyms.c (msymbol_is_text): New function.
4299         * minsyms.h (msymbol_is_text): Declare.
4300         * symtab.c (find_function_alias_target): New function.
4301         * symtab.h (find_function_alias_target): Declare.
4302
4303 2017-08-21  Pedro Alves  <palves@redhat.com>
4304
4305         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4306         typedefs.
4307         * typeprint.c (whatis_exp): If handling "whatis", and expression
4308         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4309         typedefs here.
4310         * valops.c (value_cast): Save "to" type before resolving
4311         stubs/typedefs.  Use that type as resulting value's type.
4312
4313 2017-08-18  Tom Tromey  <tom@tromey.com>
4314             Pedro Alves  <palves@redhat.com>
4315
4316         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4317         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4318         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4319         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4320         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4321         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4322         (linux_get_siginfo_data): Add "thread" argument.  Use
4323         scoped_restore.
4324         * linux-nat.c (linux_child_follow_fork)
4325         (check_stopped_by_watchpoint): Use scoped_restore.
4326         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4327         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4328         (restore_inferior_ptid, save_inferior_ptid): Remove.
4329         * btrace.c (btrace_fetch): Use scoped_restore.
4330         * bsd-uthread.c (bsd_uthread_fetch_registers)
4331         (bsd_uthread_store_registers): Use scoped_restore.
4332         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4333         scoped_restore.
4334         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4335         (aix_thread_xfer_partial): Use scoped_restore.
4336         * inferior.h (save_inferior_ptid): Remove.
4337
4338 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4339
4340         PR tdep/21818
4341         * arm-tdep.c (gdb_print_insn_arm): Mark
4342         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4343
4344 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4345
4346         * NEWS: Mention GDBserver's new option "--selftest".
4347         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4348         * selftest.c: Move it to common/selftest.c.
4349         * selftest.h: Move it to common/selftest.h.
4350         * selftest-arch.c (reset): New function.
4351         (tests_with_arch): Call reset.
4352
4353 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4354
4355         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4356         instead of exception_fprintf and printf_filtered.
4357
4358 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4359
4360         * selftest.c (register_self_test): Rename it to
4361         selftests::register_test.
4362         (run_self_tests): selftest::run_tests.
4363         * selftest.h: Update declarations.
4364         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4365         selftests::register_test_foreach_arch.
4366         * selftest-arch.h: Update declaration.
4367         * aarch64-tdep.c: Update.
4368         * arm-tdep.c: Likewise.
4369         * disasm-selftests.c: Likewise.
4370         * dwarf2loc.c: Likewise.
4371         * dwarf2-frame.c: Likewise.
4372         * findvar.c: Likewise.
4373         * gdbarch-selftests.c: Likewise.
4374         * maint.c (maintenance_selftest): Likewise.
4375         * regcache.c: Likewise.
4376         * rust-exp.y: Likewise.
4377         * selftest-arch.c: Likewise.
4378         * unittests/environ-selftests.c: Likewise.
4379         * unittests/function-view-selftests.c: Likewise.
4380         * unittests/offset-type-selftests.c: Likewise.
4381         * unittests/optional-selftests.c: Likewise.
4382         * unittests/scoped_restore-selftests.c: Likewise.
4383         * utils-selftests.c: Likewise.
4384
4385 2017-08-17  Pedro Alves  <palves@redhat.com>
4386
4387         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4388         local.
4389
4390 2017-08-17  Pedro Alves  <palves@redhat.com>
4391
4392         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4393         field.
4394         (reset_die_in_process): Delete, replaced by ...
4395         (process_die_scope): ... this new class.  Make it responsible for
4396         freeing cu->line_header too.
4397         (process_die): Use process_die_scope.
4398         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4399         cu->line_header_die_owner.  Don't release the line header if it's
4400         owned by the CU.
4401         (setup_type_unit_groups): Make the CU/DIE own the line header.
4402         Don't release the line header here.
4403
4404 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4405
4406         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4407
4408 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4409
4410         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4411         Single-Key mode
4412
4413 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4414
4415         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4416         mode command list.
4417
4418 2017-08-15  Stafford Horne  <shorne@gmail.com>
4419
4420         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4421
4422 2017-08-15  Stafford Horne  <shorne@gmail.com>
4423
4424         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4425
4426 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4427
4428         PR gdb/21954
4429         * infcmd.c (unset_environment_command): Use the 'clear' method on
4430         the environment instead of resetting it.
4431
4432 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4433
4434         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4435         platforms.
4436
4437 2017-08-14  Tom Tromey  <tom@tromey.com>
4438
4439         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4440         (print_binary_chars): Likewise.
4441         (BITS_IN_BYTES): Remove.
4442
4443 2017-08-14  Tom Tromey  <tom@tromey.com>
4444
4445         PR gdb/21675
4446         * valprint.c (LOW_ZERO): Change value to 034.
4447         (print_octal_chars): Add static_asserts for octal constants.
4448         * printcmd.c (print_scalar_formatted): Add 'd' case.
4449
4450 2017-08-11  Tom Tromey  <tom@tromey.com>
4451
4452         * symfile.c (add_symbol_file_command): Use std::vector.
4453
4454 2017-08-14  Tom Tromey  <tom@tromey.com>
4455
4456         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4457         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4458         std::move.
4459         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4460
4461 2017-08-11  Pedro Alves  <palves@redhat.com>
4462
4463         * infrun.c (process_event_stop_test): Adjust
4464         function_name_is_marked_for_skip call.
4465         * skip.c: Include <list>.
4466         (skiplist_entry): Make it a class with private fields, and
4467         getters/setters.
4468         (skiplist_entry_chain): Delete.
4469         (skiplist_entries): New.
4470         (skiplist_entry_count): Delete.
4471         (highest_skiplist_entry_num): New.
4472         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4473         (add_skiplist_entry): Delete.
4474         (skiplist_entry::skiplist_entry): New.
4475         (skiplist_entry::add_entry): New.
4476         (skip_file_command, skip_function): Adjust.
4477         (compile_skip_regexp): Delete.
4478         (skip_command): Don't compile regexp here.  Adjust to use
4479         skiplist_entry::add_entry.
4480         (skip_info): Adjust to use range-for and getters.
4481         (skip_enable_command, skip_disable_command): Adjust to use
4482         range-for and setters.
4483         (skip_delete_command): Adjust to use std::list.
4484         (add_skiplist_entry): Delete.
4485         (skip_file_p): Delete, refactored as ...
4486         (skiplist_entry::do_skip_file_p): ... this new method.
4487         (skip_gfile_p): Delete, refactored as ...
4488         (skiplist_entry::do_gskip_file_p): ... this new method.
4489         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4490         (skiplist_entry::skip_function_p): ... this new method.
4491         (function_name_is_marked_for_skip): Now returns bool, and takes
4492         the function sal by const reference.  Adjust to use range-for and
4493         skiplist_entry methods.
4494         (_initialize_step_skip): Remove references to
4495         skiplist_entry_chain, skiplist_entry_count.
4496         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4497         takes the function sal by const reference.
4498
4499 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4500
4501         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4502         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4503         (dwarf2_frame_cache):
4504         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4505         RETURN_MASK_ALL and set *this_case to NULL.
4506         * frame-unwind.h: Update comments.
4507
4508 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4509
4510         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4511         (dwarf2_frame_state_copy_regs): Remove.
4512         (dwarf2_frame_state_free_regs): Remove.
4513         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4514         (dwarf2_restore_rule): Call method .alloc_regs instead of
4515         dwarf2_frame_state_alloc_regs.
4516         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4517         constructor.  Call std::move.
4518         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4519         (dwarf2_frame_cache): Likewise.
4520
4521         [GDB_SELF_TEST]: Include selftest.h and
4522         selftest-arch.h.
4523         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4524         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4525         execute_cfa_program_test.
4526
4527         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4528         copy ctor, assignment operator, move assignment.
4529         <alloc_regs>: New method.
4530         <swap>: New method.
4531         (struct dwarf2_frame_state): Delete dtor.
4532         (dwarf2_frame_state_alloc_regs): Remove declaration.
4533         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4534         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4535
4536 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4537
4538         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4539         (dwarf2_frame_state::dwarf2_frame_state): New.
4540         (dwarf2_frame_state::~dwarf2_frame_state): New.
4541         (dwarf2_fetch_cfa_info): Update.
4542         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4543         rather than a pointer.  Update code.
4544         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4545         dtor.
4546         <data_align, code_align, retaddr_column>: Change them to const.
4547         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4548         to bool.
4549
4550 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4551
4552         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4553         <loc.exp>: New field.
4554         * dwarf2-frame.c (execute_cfa_program): Update.
4555         (dwarf2_frame_prev_register): Update.
4556
4557 2017-08-10  Pedro Alves  <palves@redhat.com>
4558
4559         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4560
4561 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4562
4563         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4564         (fbsd_pending_children): Use std::list.
4565         (fbsd_remember_child): Likewise.
4566         (fbsd_is_child_pending): Likewise.
4567         (fbsd_pending_vfork_done): Use std::forward_list.
4568         (fbsd_add_vfork_done): Likewise.
4569         (fbsd_is_vfork_done_pending): Likewise.
4570         (fbsd_next_vfork_done): Likewise.
4571
4572 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4573
4574         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4575         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4576         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4577         for `mapfilename'.
4578         (fbsd_xfer_partial): Use gdb::byte_vector.
4579         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4580
4581 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4582
4583         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4584         "filestuff.h".
4585         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4586
4587 2017-08-09  Tom Tromey  <tom@tromey.com>
4588
4589         * skip.c (skiplist_entry): New constructor.
4590         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4591         (skiplist_entry::file_is_glob): Now bool.
4592         (skiplist_entry::file, skiplist_entry::function): Now
4593         std::string.
4594         (make_skip_entry): Return a unique_ptr.  Use new.
4595         (free_skiplist_entry, free_skiplist_entry_cleanup)
4596         (make_free_skiplist_entry_cleanup): Remove.
4597         (skip_command, skip_disable_command, add_skiplist_entry)
4598         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4599         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4600         (function_name_is_marked_for_skip): Update.
4601         (skip_delete_command): Update.  Use delete.
4602
4603 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4604
4605         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4606         (aarch64_linux_core_read_description): New function.
4607         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4608
4609 2017-08-09  Pedro Alves  <palves@redhat.com>
4610
4611         * cp-name-parser.y (cp_comp_to_string): Return a
4612         gdb::unique_xmalloc_ptr<char>.
4613         * cp-support.c (replace_typedefs_qualified_name)
4614         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4615         (cp_canonicalize_string_full): Use op= instead of explicit
4616         convertion.
4617         (cp_class_name_from_physname, method_name_from_physname)
4618         (cp_func_name, cp_remove_params): Adjust to use
4619         gdb::unique_xmalloc_ptr<char>.
4620         * cp-support.h (cp_comp_to_string): Return a
4621         gdb::unique_xmalloc_ptr<char>.
4622         * python/py-type.c (typy_lookup_type): Adjust to use
4623         gdb::unique_xmalloc_ptr<char>.
4624
4625 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4626
4627         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4628
4629 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4630             Yao Qi  <yao.qi@linaro.org>
4631
4632         * cp-support.c (cp_canonicalize_string_full): Use
4633         gdb::unique_xmalloc_ptr<char>.
4634         (cp_canonicalize_string): Likewise.
4635
4636 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4637
4638         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4639         * regformats/i386/amd64-avx-avx512.dat: Remove.
4640         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4641         * regformats/i386/amd64-avx-mpx.dat:Remove.
4642         * regformats/i386/amd64-avx.dat: Remove.
4643         * regformats/i386/amd64-mpx.dat: Remove.
4644         * regformats/i386/i386-avx-avx512.dat: Remove.
4645         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4646         * regformats/i386/i386-avx-mpx.dat: Remove.
4647         * regformats/i386/i386-mmx.dat: Remove.
4648         * regformats/i386/i386-mpx.dat: Remove.
4649
4650 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4651
4652         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4653         * amd64-tdep.c: Don't include features/i386/x32*.c.
4654         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4655         functions.
4656         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4657         and i386/x32-avx-avx512.
4658         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4659         and i386/x32.xml.
4660         * features/i386/x32-avx-avx512.c: Removed.
4661         * features/i386/x32-avx-avx512.xml: Removed.
4662         * features/i386/x32-avx.c: Removed.
4663         * features/i386/x32-avx.xml: Removed.
4664         * features/i386/x32.c: Removed.
4665         * features/i386/x32.xml: Removed.
4666         * regformats/i386/x32-avx-avx512.dat: Removed.
4667         * regformats/i386/x32-avx.dat: Removed.
4668         * regformats/i386/x32.dat: Removed.
4669
4670 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4671
4672         PR breakpoints/21886
4673         * mem-break.c (default_memory_insert_breakpoint): Use
4674         `->placed_address' rather than `->reqstd_address' for the
4675         breakpoint location.
4676
4677 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4678
4679         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4680         assertions.
4681
4682 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4683
4684         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4685         a union of `tdep_info', `tdesc_data' and `id'.
4686         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4687         rather than `info.tdep_info'.
4688         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4689         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4690         * i386-tdep.c (i386_gdbarch_init): Likewise.
4691         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4692         * mips-tdep.c (mips_gdbarch_init): Likewise.
4693         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4694         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4695         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4696         `info.tdep_info'.
4697         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4698         `info.tdep_info'.
4699         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4700         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4701         `info.tdep_info'.
4702         * spu-tdep.c (spu_gdbarch_init): Likewise.
4703         * gdbarch.h: Regenerate.
4704
4705 2017-08-07  Leszek Swirski  <leszeks@google.com>
4706
4707         PR symtab/20899
4708         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4709
4710 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4711
4712         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4713         (gdbsim_open): Rename gdb_argv args object to argv.
4714
4715 2017-08-05  Tom Tromey  <tom@tromey.com>
4716
4717         * compile/compile-object-load.c (compile_object_load): Use
4718         gdb::unique_xmalloc_ptr.
4719         * cli/cli-dump.c (scan_filename): Rename from
4720         scan_filename_with_cleanup.  Change return type.
4721         (scan_expression): Rename from scan_expression_with_cleanup.
4722         Change return type.
4723         (dump_memory_to_file, dump_value_to_file, restore_command):
4724         Use gdb::unique_xmalloc_ptr.  Update.
4725         * cli/cli-cmds.c (find_and_open_script): Use
4726         gdb::unique_xmalloc_ptr.
4727         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4728         * symmisc.c (maintenance_print_symbols)
4729         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4730         * symfile.c (symfile_bfd_open, generic_load)
4731         (add_symbol_file_command, remove_symbol_file_command): Use
4732         gdb::unique_xmalloc_ptr.
4733         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4734         * psymtab.c (maintenance_print_psymbols): Use
4735         gdb::unique_xmalloc_ptr.
4736         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4737         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4738         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4739         (reload_shared_libraries_1): Likewise.
4740
4741 2017-08-05  Tom Tromey  <tom@tromey.com>
4742
4743         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4744         (rust_op_vector, rust_set_vector): New typedefs.
4745         (current_parser): New global.
4746         (work_obstack): Change to pointer type.  Update all users.
4747         (rust_ast, pstate): Remove globals.
4748         (struct rust_parser): New.
4749         (%union) <params, field_inits>: Change type.
4750         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4751         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4752         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4753         (convert_params_to_types, convert_params_to_expression): Change
4754         type of "params".
4755         (ast_string): Change type of "fields".
4756         (rust_parse): Make a rust_parser.  Remove cleanups.
4757         (rust_lex_tests): Make and install an auto_obstack.
4758
4759 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4760
4761         * configure.srv (ipa_x32_linux_regobj): New.
4762         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4763         instead of X86_TDESC_AVX512.
4764         (initialize_low_tracepoint): Call
4765         init_registers_x32_avx_avx512_linux.
4766
4767 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4768
4769         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4770
4771 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4772
4773         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4774
4775 2017-08-03  Tom Tromey  <tom@tromey.com>
4776
4777         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4778         Remove.
4779         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4780
4781 2017-08-03  Tom Tromey  <tom@tromey.com>
4782
4783         * python/py-param.c (compute_enum_values): Use gdb_argv.
4784
4785 2017-08-03  Tom Tromey  <tom@tromey.com>
4786
4787         * utils.h (struct gdb_argv_deleter): New.
4788         (gdb_argv): New class.
4789         * utils.c (gdb_argv::reset): New method.
4790         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4791         * tracefile.c (tsave_command): Use gdb_argv.
4792         * top.c (new_ui_command): Use gdb_argv.
4793         * symmisc.c (maintenance_print_symbols)
4794         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4795         * symfile.c (symbol_file_command, generic_load)
4796         (remove_symbol_file_command): Use gdb_argv.
4797         * stack.c (backtrace_command): Use gdb_argv.
4798         * source.c (add_path, show_substitute_path_command)
4799         (unset_substitute_path_command, set_substitute_path_command):
4800         Use gdb_argv.
4801         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4802         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4803         * remote.c (extended_remote_run, remote_put_command)
4804         (remote_get_command, remote_delete_command): Use gdb_argv.
4805         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4806         (gdbsim_open): Use gdb_argv.
4807         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4808         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4809         * procfs.c (procfs_info_proc): Use gdb_argv.
4810         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4811         * infrun.c (handle_command): Use gdb_argv.
4812         * inferior.c (add_inferior_command, clone_inferior_command):
4813         Use gdb_argv.
4814         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4815         * exec.c (exec_file_command): Use gdb_argv.
4816         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4817         * compile/compile.c (build_argc_argv): Use gdb_argv.
4818
4819 2017-08-03  Tom Tromey  <tom@tromey.com>
4820
4821         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4822
4823 2017-08-03  Tom Tromey  <tom@tromey.com>
4824
4825         * python/python.c (compute_python_string): Return std::string.
4826         (gdbpy_eval_from_control_command): Update.
4827         (do_start_initialization): Use std::string.
4828         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4829         xstrprintf.
4830         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4831         xstrprintf.
4832
4833 2017-08-03  Tom Tromey  <tom@tromey.com>
4834
4835         * top.h (do_restore_instream_cleanup): Remove.
4836         * top.c (do_restore_instream_cleanup): Remove.
4837         (read_command_file): Use scoped_restore.
4838         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4839
4840 2017-08-03  Tom Tromey  <tom@tromey.com>
4841
4842         * cli/cli-script.c (execute_user_command)
4843         (execute_control_command): Use scoped_restore.
4844
4845 2017-08-03  Tom Tromey  <tom@tromey.com>
4846
4847         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4848         (execute_user_command): Remove user_call_depth; use
4849         user_args_stack's size instead.
4850
4851 2017-08-03  Tom Tromey  <tom@tromey.com>
4852
4853         * top.h (in_user_command): Remove.
4854         * top.c (in_user_command): Remove.
4855         * cli/cli-script.c (do_restore_user_call_depth)
4856         (execute_user_command): Update.
4857
4858 2017-08-03  Tom Tromey  <tom@tromey.com>
4859
4860         * valops.c (search_struct_method): Use gdb::byte_vector.
4861         * valarith.c (value_concat): Use std::vector.
4862         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4863         (simple_search_memory): Likewise.
4864         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4865         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4866         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4867         * elfread.c (elf_rel_plt_read): Use std::string.
4868         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4869         * cli/cli-dump.c (restore_section_callback): Use
4870         gdb::byte_vector.
4871
4872 2017-08-03  Tom Tromey  <tom@tromey.com>
4873
4874         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4875
4876 2017-08-03  Tom Tromey  <tom@tromey.com>
4877
4878         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4879         (tui_register_format): Use scoped_restore.
4880
4881 2017-08-03  Tom Tromey  <tom@tromey.com>
4882
4883         * reverse.c (exec_direction_default): Remove.
4884         (exec_reverse_once): Use scoped_restore.
4885         * remote.c (restore_remote_timeout): Remove.
4886         (remote_flash_erase, remote_flash_write, remote_flash_done)
4887         (readchar, remote_serial_write): Use scoped_restore.
4888         * cli/cli-script.c (struct source_cleanup_lines_args)
4889         (source_cleanup_lines): Remove.
4890         (script_from_file): Use scoped_restore.
4891         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4892         (source_command): Use scoped_restore.
4893
4894 2017-08-03  Tom Tromey  <tom@tromey.com>
4895
4896         * utils.h (make_cleanup_free_so): Remove.
4897         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4898         * solist.h (struct so_deleter): New.
4899         (so_list_up): New typedef.
4900         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4901
4902 2017-08-03  Tom Tromey  <tom@tromey.com>
4903
4904         * utils.h (make_cleanup_restore_current_language): Remove.
4905         * utils.c (do_restore_current_language)
4906         (make_cleanup_restore_current_language): Remove.
4907         * parse.c (parse_exp_in_context_1)
4908         (parse_expression_with_language): Use
4909         scoped_restore_current_language.
4910         * mi/mi-main.c (mi_cmd_execute): Use
4911         scoped_restore_current_language.
4912         * language.h (scoped_restore_current_language): New class.
4913
4914 2017-08-03  Tom Tromey  <tom@tromey.com>
4915
4916         * compile/compile.c (cleanup_unlink_file): Remove.
4917         (compile_to_object): Use gdb::unlinker.
4918         (eval_compile_command): Likewise.
4919
4920 2017-08-03  Tom Tromey  <tom@tromey.com>
4921
4922         * utils.h (make_cleanup_fclose): Remove.
4923         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4924
4925 2017-08-03  Tom Tromey  <tom@tromey.com>
4926
4927         * top.c (open_terminal_stream): Return gdb_file_up.
4928         (new_ui_command): Update.
4929
4930 2017-08-03  Tom Tromey  <tom@tromey.com>
4931
4932         * source.c (print_source_lines_base, forward_search_command)
4933         (reverse_search_command): Use gdb_file_up.
4934
4935 2017-08-03  Tom Tromey  <tom@tromey.com>
4936
4937         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4938
4939 2017-08-03  Tom Tromey  <tom@tromey.com>
4940
4941         * cli/cli-cmds.c (find_and_open_script): Change return type.
4942         Remove "streamp" and "full_path" parameters.
4943         (source_script_with_search): Update.
4944         * auto-load.c (source_script_file): Update.
4945         * cli/cli-cmds.h (find_and_open_script): Change type.
4946         (open_script): New struct.
4947
4948 2017-08-03  Tom Tromey  <tom@tromey.com>
4949
4950         * xml-support.c (xml_fetch_content_from_file): Update.
4951         * ui-file.c (stdio_file::open): Update.
4952         * tracefile-tfile.c (tfile_start): Update.
4953         * remote.c (remote_file_put, remote_file_get): Update.
4954         * nat/linux-procfs.c (linux_proc_get_int)
4955         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4956         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4957         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4958         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4959         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4960         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4961         * linux-nat.c (linux_proc_pending_signals): Update.
4962         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4963         (file_closer): Remove.
4964         * compile/compile.c (compile_to_object): Update.
4965         * common/filestuff.h (struct gdb_file_deleter): New.
4966         (gdb_file_up): New typedef.
4967         (gdb_fopen_cloexec): Change return type.
4968         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4969         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4970         (dump_binary_file, restore_binary_file): Update.
4971         * auto-load.c (auto_load_objfile_script_1): Update.
4972
4973 2017-08-03  Tom Tromey  <tom@tromey.com>
4974
4975         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4976         (info_static_tracepoint_markers_command): Likewise.
4977         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4978         * skip.c (skip_info): Use ui_out_emit_table.
4979         * progspace.c (print_program_space): Use ui_out_emit_table.
4980         * osdata.c (info_osdata): Use ui_out_emit_table.
4981         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4982         ui_out_emit_table.
4983         * linux-thread-db.c (info_auto_load_libthread_db): Use
4984         ui_out_emit_table.
4985         * inferior.c (print_inferior): Use ui_out_emit_table.
4986         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4987         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4988         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4989         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4990         * ui-out.h (class ui_out_emit_table): New.
4991
4992 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4993
4994         * mips-tdep.c (mips_fpu_type_str): New function.
4995         (mips_dump_tdep): Call it.
4996
4997 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4998
4999         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5000         `->mips_fpu_type'.
5001
5002 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5003
5004         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5005
5006 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5007
5008         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5009
5010 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5011
5012         * cli/cli-cmds.c (maintenancechecklist): New variable.
5013         * gdbcmd.h (maintenancechecklist): Declare it.
5014         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5015         Call i386_linux_read_description with different masks.
5016         * maint.c (maintenance_check_command): New function.
5017         (_initialize_maint_cmds): Call add_prefix_cmd.
5018         * target-descriptions.c (tdesc_reg): override operator != and ==.
5019         (tdesc_type): Likewise.
5020         (tdesc_feature): Likewise.
5021         (target_desc): Likewise.
5022         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5023         (maintenance_check_xml_descriptions): New function.
5024         (_initialize_target_descriptions) Add command "xml-descriptions".
5025         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5026
5027 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5028
5029         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5030         Include features/i386/32bit-*.c.
5031         (i386_linux_read_description): Generate target description if it
5032         doesn't exist.
5033         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5034         functions.
5035         * features/i386/32bit-linux.c: Re-generated.
5036         * features/i386/32bit-sse.c: Likewise.
5037         * target-descriptions.c (print_c_feature::visit): Print code to
5038         set register number if needed.
5039         (print_c_feature) <m_next_regnum>: New field.
5040
5041 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5042
5043         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5044         (FEATURE_XMLFILES): New.
5045         (FEATURE_CFILES): New.
5046         New rules.
5047         (clean-cfiles): Remove generated c files.
5048         * features/i386/32bit-avx.c: Generated.
5049         * features/i386/32bit-avx512.c: Generated.
5050         * features/i386/32bit-core.c: Generated.
5051         * features/i386/32bit-linux.c: Generated.
5052         * features/i386/32bit-mpx.c: Generated.
5053         * features/i386/32bit-pkeys.c: Generated.
5054         * features/i386/32bit-sse.c: Generated.
5055         * target-descriptions.c: Include algorithm.
5056         (tdesc_element_visitor): Add method visit_end.
5057         (print_c_tdesc): Implement visit_end.
5058         (print_c_tdesc:: m_filename_after_features): Move it to
5059         protected.
5060         (print_c_feature): New class.
5061         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5062         name starts with "i386/32bit-".
5063
5064 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5065
5066         * target-descriptions.c (tdesc_element_visitor): New class.
5067         (tdesc_element): New class.
5068         (tdesc_reg): Inherit from tdesc_element.
5069         (tdesc_reg::accept): New function.
5070         (tdesc_type): Inherit from tdesc_element.
5071         (tdesc_type::accept): New function.
5072         (tdesc_feature): Inherit from tdesc_element.
5073         (tdesc_feature::accept): New function.
5074         (target_desc): Inherit from tdesc_element.
5075         (target_desc::target_desc): New.
5076         (target_desc::~target_desc): New.
5077         (target_desc::accept): New.
5078         (allocate_target_description): Use new.
5079         (free_target_description): Use delete.
5080         (print_c_tdesc): New class.
5081         (maint_print_c_tdesc_cmd): Adjust.
5082
5083         * features/aarch64.c: Re-generated.
5084         * features/arc-arcompact.c: Re-generated.
5085         * features/arc-v2.c: Re-generated.
5086         * features/arm/arm-with-iwmmxt.c: Re-generated.
5087         * features/arm/arm-with-m.c: Re-generated.
5088         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5089         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5090         * features/arm/arm-with-neon.c: Re-generated.
5091         * features/arm/arm-with-vfpv2.c: Re-generated.
5092         * features/arm/arm-with-vfpv3.c: Re-generated.
5093         * features/i386/amd64-avx-avx512.c: Re-generated.
5094         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5095         * features/i386/amd64-avx.c: Re-generated.
5096         * features/i386/amd64-avx-linux.c: Re-generated.
5097         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5098         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5099         * features/i386/amd64-avx-mpx.c: Re-generated.
5100         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5101         * features/i386/amd64.c: Re-generated.
5102         * features/i386/amd64-linux.c: Re-generated.
5103         * features/i386/amd64-mpx.c: Re-generated.
5104         * features/i386/amd64-mpx-linux.c: Re-generated.
5105         * features/i386/i386-avx-avx512.c: Re-generated.
5106         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5107         * features/i386/i386-avx.c: Re-generated.
5108         * features/i386/i386-avx-linux.c: Re-generated.
5109         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5110         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5111         * features/i386/i386-avx-mpx.c: Re-generated.
5112         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5113         * features/i386/i386.c: Re-generated.
5114         * features/i386/i386-linux.c: Re-generated.
5115         * features/i386/i386-mmx.c: Re-generated.
5116         * features/i386/i386-mmx-linux.c: Re-generated.
5117         * features/i386/i386-mpx.c: Re-generated.
5118         * features/i386/i386-mpx-linux.c: Re-generated.
5119         * features/i386/x32-avx-avx512.c: Re-generated.
5120         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5121         * features/i386/x32-avx.c: Re-generated.
5122         * features/i386/x32-avx-linux.c: Re-generated.
5123         * features/i386/x32.c: Re-generated.
5124         * features/i386/x32-linux.c: Re-generated.
5125         * features/microblaze.c: Re-generated.
5126         * features/microblaze-with-stack-protect.c: Re-generated.
5127         * features/mips64-dsp-linux.c: Re-generated.
5128         * features/mips64-linux.c: Re-generated.
5129         * features/mips-dsp-linux.c: Re-generated.
5130         * features/mips-linux.c: Re-generated.
5131         * features/nds32.c: Re-generated.
5132         * features/nios2.c: Re-generated.
5133         * features/nios2-linux.c: Re-generated.
5134         * features/rs6000/powerpc-32.c: Re-generated.
5135         * features/rs6000/powerpc-32l.c: Re-generated.
5136         * features/rs6000/powerpc-403.c: Re-generated.
5137         * features/rs6000/powerpc-403gc.c : Re-generated.
5138         * features/rs6000/powerpc-405.c: Re-generated.
5139         * features/rs6000/powerpc-505.c: Re-generated.
5140         * features/rs6000/powerpc-601.c: Re-generated.
5141         * features/rs6000/powerpc-602.c: Re-generated.
5142         * features/rs6000/powerpc-603.c: Re-generated.
5143         * features/rs6000/powerpc-604.c: Re-generated.
5144         * features/rs6000/powerpc-64.c: Re-generated.
5145         * features/rs6000/powerpc-64l.c: Re-generated.
5146         * features/rs6000/powerpc-7400.c: Re-generated.
5147         * features/rs6000/powerpc-750.c: Re-generated.
5148         * features/rs6000/powerpc-860.c: Re-generated.
5149         * features/rs6000/powerpc-altivec32.c: Re-generated.
5150         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5151         * features/rs6000/powerpc-altivec64.c: Re-generated.
5152         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5153         * features/rs6000/powerpc-cell32l.c: Re-generated.
5154         * features/rs6000/powerpc-cell64l.c: Re-generated.
5155         * features/rs6000/powerpc-e500.c: Re-generated.
5156         * features/rs6000/powerpc-e500l.c: Re-generated.
5157         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5158         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5159         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5160         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5161         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5162         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5163         * features/rs6000/powerpc-vsx32.c: Re-generated.
5164         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5165         * features/rs6000/powerpc-vsx64.c: Re-generated.
5166         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5167         * features/rs6000/rs6000.c: Re-generated.
5168         * features/s390-linux32.c: Re-generated.
5169         * features/s390-linux32v1.c: Re-generated.
5170         * features/s390-linux32v2.c: Re-generated.
5171         * features/s390-linux64.c: Re-generated.
5172         * features/s390-linux64v1.c: Re-generated.
5173         * features/s390-linux64v2.c: Re-generated.
5174         * features/s390-te-linux64.c: Re-generated.
5175         * features/s390-tevx-linux64.c: Re-generated.
5176         * features/s390-vx-linux64.c: Re-generated.
5177         * features/s390x-linux64.c: Re-generated.
5178         * features/s390x-linux64v1.c: Re-generated.
5179         * features/s390x-linux64v2.c: Re-generated.
5180         * features/s390x-te-linux64.c: Re-generated.
5181         * features/s390x-tevx-linux64.c: Re-generated.
5182         * features/s390x-vx-linux64.c: Re-generated.
5183         * features/sparc/sparc32-solaris.c: Re-generated.
5184         * features/sparc/sparc64-solaris.c: Re-generated.
5185         * features/tic6x-c62x.c: Re-generated.
5186         * features/tic6x-c62x-linux.c: Re-generated.
5187         * features/tic6x-c64x.c: Re-generated.
5188         * features/tic6x-c64x-linux.c: Re-generated.
5189         * features/tic6x-c64xp.c: Re-generated.
5190         * features/tic6x-c64xp-linux.c: Re-generated.
5191
5192 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5193
5194         * i386-linux-tdep.c (i386_linux_read_description): New function.
5195         (i386_linux_core_read_description): Call
5196         i386_linux_read_description.
5197         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5198         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5199         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5200         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5201         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5202         * x86-linux-nat.c (x86_linux_read_description): Call
5203         i386_linux_read_description.
5204
5205 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5206
5207         * NEWS: Mention it.
5208         * features/Makefile (%.c: %.xml): Pass the xml file name to
5209         command "maint print c-tdesc".
5210         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5211         name from 'arg'.
5212
5213 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5214
5215         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5216         in-class initialization.
5217         (tdesc_create_feature): Call new instead of XCNEW.
5218         (free_target_description): Ue delete.
5219
5220 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5221
5222         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5223
5224 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5225
5226         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5227         constant.
5228         (amd64_x32_init_abi): Likewise.
5229         * amd64-tdep.h (amd64_init_abi): Update declaration.
5230         (amd64_x32_init_abi): Likewise.
5231
5232 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5233
5234         PR tdep/21717
5235         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5236         condition for FPSCR.
5237         (arm_linux_store_inferior_registers): Likewise.
5238
5239 2017-07-22  Tom Tromey  <tom@tromey.com>
5240
5241         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5242         <syscalls_counts>: Now a std::vector.
5243         (get_catch_syscall_inferior_data): Use "new".
5244         (catch_syscall_inferior_data_cleanup): Use "delete".
5245         (insert_catch_syscall, remove_catch_syscall)
5246         (clear_syscall_counts): Update.
5247
5248 2017-07-22  Tom Tromey  <tom@tromey.com>
5249
5250         * break-catch-syscall.c (syscall_catchpoint)
5251         <syscalls_to_be_caught>: Now a std::vector<int>
5252         (~syscall_catchpoint): Remove.
5253         (insert_catch_syscall, remove_catch_syscall)
5254         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5255         (print_mention_catch_syscall, print_recreate_catch_syscall):
5256         Update.
5257         (create_syscall_event_catchpoint): Change type of "filter"
5258         parameter.
5259         (catch_syscall_split_args): Return a std::vector.
5260         (catch_syscall_command_1, catching_syscall_number_1): Update.
5261
5262 2017-07-22  Tom Tromey  <tom@tromey.com>
5263
5264         * break-catch-throw.c (struct exception_catchpoint)
5265         <exception_rx>: Now a std::string.
5266         (~exception_catchpoint): Remove.
5267         (print_one_detail_exception_catchpoint): Update.
5268         (handle_gnu_v3_exceptions): Change type of except_rx.
5269         (extract_exception_regexp): Return a std::string.
5270         (catch_exception_command_1): Update.
5271
5272 2017-07-22  Tom Tromey  <tom@tromey.com>
5273
5274         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5275         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5276         std::vector.
5277         <catch_all>: Now a bool.
5278         (~signal_catchpoint): Remove.
5279         (signal_catchpoint_insert_location)
5280         (signal_catchpoint_remove_location)
5281         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5282         (signal_catchpoint_print_mention)
5283         (signal_catchpoint_print_recreate)
5284         (signal_catchpoint_explains_signal): Update.
5285         (create_signal_catchpoint): Change type of "filter" and
5286         "catch_all".
5287         (catch_signal_split_args): Return a std::vector.  Change type of
5288         "catch_all".
5289         (catch_signal_command): Update.
5290
5291 2017-07-20  Pedro Alves  <palves@redhat.com>
5292
5293         * ada-lang.c (ada_language_defn): Make extern.
5294         (_initialize_ada_language): Remove add_language call.
5295         * c-lang.c (c_language_defn, cplus_language_defn)
5296         (asm_language_defn, minimal_language_defn): Make extern.
5297         (_initialize_c_language): Delete.
5298         * completer.c (compare_cstrings): Delete, moved to utils.h.
5299         * d-lang.c (d_language_defn): Make extern.
5300         (_initialize_d_language): Remove add_language calls.
5301         * defs.h (enum language): Add comment.
5302         * f-lang.c (f_language_defn): Make extern.
5303         (_initialize_f_language): Remove add_language call.
5304         * go-lang.c (go_language_defn): Make extern.
5305         (_initialize_go_language): Remove add_language call.
5306         * language.c: Include <algorithm>.
5307         (languages): Redefine as const array.
5308         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5309         (set_language_command): Handle "local".  Use for-range loop.
5310         (set_language): Remove loop.
5311         (language_enum): Rewrite.
5312         (language_def, language_str): Remove loops.
5313         (add_language): Delete.
5314         (add_set_language_command): New, based on add_languages.
5315         (skip_language_trampoline): Adjust.
5316         (local_language_defn): Delete.
5317         (language_gdbarch_post_init): Adjust.
5318         (_initialize_language): Remove add_language calls.  Call
5319         add_set_language_command.
5320         * language.h (add_language): Delete.
5321         (auto_language_defn)
5322         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5323         (asm_language_defn, c_language_defn, cplus_language_defn)
5324         (d_language_defn, f_language_defn, go_language_defn)
5325         (m2_language_defn, objc_language_defn, opencl_language_defn)
5326         (pascal_language_defn, rust_language_defn): Declare.
5327         * m2-lang.c (m2_language_defn): Make extern.
5328         (_initialize_m2_language): Remove add_language call.
5329         * objc-lang.c (objc_language_defn): Make extern.
5330         (_initialize_objc_language): Remove add_language call.
5331         * opencl-lang.c (opencl_language_defn): Make extern.
5332         (_initialize_opencl_language): Remove add_language call.
5333         * p-lang.c (pascal_language_defn): Make extern.
5334         (_initialize_pascal_language): Delete.
5335         * rust-lang.c (rust_language_defn): Make extern.
5336         (_initialize_rust_language): Delete.
5337         * utils.h (compare_cstrings): New static inline function.
5338
5339 2017-07-20  Pedro Alves  <palves@redhat.com>
5340
5341         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5342         (get_var_value): Constify parameters.
5343         (get_int_var_value): Change prototype.
5344         (to_fixed_range_type): Adjust.
5345         * ada-lang.h (get_int_var_value): Change prototype.
5346
5347 2017-07-20  Pedro Alves  <palves@redhat.com>
5348
5349         * dwarf2read.c (dw2_lookup_symbol): Use
5350         SYMBOL_MATCHES_SEARCH_NAME.
5351         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5352
5353 2017-07-20  Pedro Alves  <palves@redhat.com>
5354
5355         * block.c (block_iter_name_step, block_iter_name_first)
5356         (block_iter_name_next): Delete.
5357         (block_lookup_symbol_primary): Adjust to use
5358         dict_iter_match_first/dict_iter_match_next.
5359         * block.h (block_iter_name_first, block_iter_name_next): Delete
5360         declarations.
5361         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5362         dict_iter_match_first/dict_iter_match_next.
5363
5364 2017-07-20  Pedro Alves  <palves@redhat.com>
5365
5366         * cp-support.c (cp_find_first_component_aux): Add missing case for
5367         end of string.
5368
5369 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5370
5371         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5372         of dwo_cu's dwo_file.
5373
5374 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5375
5376         * remote.c (store_registers_using_G): Remove one line comment.
5377
5378 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5379
5380         * regcache.c (regcache_cpy): Simplify it.
5381         (regcache::cpy_no_passthrough): Remove it.
5382         * regcache.h (cpy_no_passthrough): Remove it.
5383         (regcache_dup, regcache_cpy): Update comments.
5384
5385 2017-07-18  Pedro Alves  <palves@redhat.com>
5386
5387         * remote-sim.c (sim_command_completer): Adjust to work with a
5388         completion_tracker instead of a VEC.
5389
5390 2017-07-17  Pedro Alves  <palves@redhat.com>
5391
5392         * completer.c (complete_source_filenames): New function.
5393         (complete_address_and_linespec_locations): New function.
5394         (location_completer): Use complete_address_and_linespec_locations.
5395         (completion_tracker::build_completion_result): Honor the tracker's
5396         request to suppress append.
5397         * completer.h (completion_tracker::suppress_append_ws)
5398         (completion_tracker::set_suppress_append_ws): New methods.
5399         (completion_tracker::m_suppress_append_ws): New field.
5400         (complete_source_filenames): New declaration.
5401         * linespec.c (linespec_complete_what): New.
5402         (struct ls_parser) <complete_what, completion_word,
5403         completion_quote_char, completion_quote_end, completion_tracker>:
5404         New fields.
5405         (string_find_incomplete_keyword_at_end): New.
5406         (linespec_lexer_lex_string): Record quote char.  If in completion
5407         mode, don't throw.
5408         (linespec_lexer_consume_token): Advance the completion word point.
5409         (linespec_lexer_peek_token): Save/restore completion info.
5410         (save_stream_and_consume_token): New.
5411         (set_completion_after_number): New.
5412         (linespec_parse_basic): Set what to complete next depending on
5413         token.  Handle function and label completions specially.
5414         (parse_linespec): Disable objc shortcut in completion mode.  Set
5415         what to complete next depending on token type.  Skip keyword if in
5416         completion mode.
5417         (complete_linespec_component, linespec_complete): New.
5418         * linespec.h (linespec_complete): Declare.
5419
5420 2017-07-17  Pedro Alves  <palves@redhat.com>
5421
5422         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5423         Handle 'operator<' / 'operator<<'.
5424
5425 2017-07-17  Pedro Alves  <palves@redhat.com>
5426
5427         * completer.c (collect_explicit_location_matches): Handle
5428         MATCH_LABEL.
5429         (convert_explicit_location_to_linespec): New, factored out from
5430         ...
5431         (convert_explicit_location_to_sals): ... this.
5432         (complete_label): New.
5433         (linespec_complete_label, find_label_symbols_in_block): New.
5434         (find_label_symbols): Add completion_mode parameter and adjust to
5435         call find_label_symbols_in_block.
5436         * linespec.h (linespec_complete_label): Declare.
5437
5438 2017-07-17  Pedro Alves  <palves@redhat.com>
5439
5440         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5441         complete_symbol_mode parameter.
5442         * cli/cli-cmds.c (complete_command): Get the completion result out
5443         of the handle_brkchars tracker if used a custom word point.
5444         * completer.c: Include "linespec.h".
5445         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5446         (advance_to_expression_complete_word_point): New.
5447         (completion_tracker::completes_to_completion_word): New.
5448         (complete_files_symbols): Pass down
5449         complete_symbol_mode::EXPRESSION.
5450         (explicit_options, probe_options): New.
5451         (collect_explicit_location_matches): Complete on the
5452         explictit_loc->foo instead of word.  Use
5453         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5454         keyword and options completions.
5455         (backup_text_ptr): Delete.
5456         (skip_keyword): New.
5457         (complete_explicit_location): Remove 'word' parameter.  Add
5458         language, quoted_arg_start and quoted_arg_end parameters.
5459         Rewrite, parsing left to right.
5460         (location_completer): Rewrite.
5461         (location_completer_handle_brkchars): New function.
5462         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5463         (enum complete_line_internal_reason): Adjust comments.
5464         (completion_tracker::discard_completions): New.
5465         (completer_handle_brkchars_func_for_completer): Handle
5466         location_completer.
5467         (gdb_custom_word_point_brkchars)
5468         (gdb_org_rl_basic_quote_characters): New.
5469         (gdb_completion_word_break_characters_throw)
5470         (completion_find_completion_word): Handle trackers that use a
5471         custom word point.
5472         (completion_tracker::advance_custom_word_point_by): New.
5473         (completion_tracker::build_completion_result): Don't rely on
5474         readline appending the quote char.
5475         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5476         use a custom word point.
5477         (gdb_rl_attempted_completion_function): Restore
5478         rl_basic_quote_characters.
5479         * completer.h (class completion_tracker): Extend intro comment.
5480         (completion_tracker::set_quote_char)
5481         (completion_tracker::quote_char)
5482         (completion_tracker::set_use_custom_word_point)
5483         (completion_tracker::use_custom_word_point)
5484         (completion_tracker::custom_word_point)
5485         (completion_tracker::set_custom_word_point)
5486         (completion_tracker::advance_custom_word_point_by)
5487         (completion_tracker::completes_to_completion_word)
5488         (completion_tracker::discard_completions): New methods.
5489         (completion_tracker::m_quote_char)
5490         (completion_tracker::m_use_custom_word_point)
5491         (completion_tracker::m_custom_word_point): New fields.
5492         (advance_to_expression_complete_word_point): Declare.
5493         * f-lang.c (f_collect_symbol_completion_matches): Add
5494         complete_symbol_mode parameter.
5495         * language.h (struct language_defn)
5496         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5497         parameter.
5498         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5499         (linespec_complete_function): New function.
5500         (linespec_lexer_lex_keyword): Adjust.
5501         * linespec.h (linespec_keywords, linespec_complete_function): New
5502         declarations.
5503         * location.c (find_end_quote): New function.
5504         (explicit_location_lex_one): Add explicit_completion_info
5505         parameter.  Save quoting info.  Don't throw if being called for
5506         completion.  Don't handle Ada operators here.
5507         (is_cp_operator, skip_op_false_positives, first_of)
5508         (explicit_location_lex_one_function): New function.
5509         (string_to_explicit_location): Replace 'dont_throw' parameter with
5510         an explicit_completion_info pointer parameter.  Handle it.  Don't
5511         use explicit_location_lex_one to lex function names.  Use
5512         explicit_location_lex_one_function instead.
5513         * location.h (struct explicit_completion_info): New.
5514         (string_to_explicit_location): Replace 'dont_throw' parameter with
5515         an explicit_completion_info pointer parameter.
5516         * symtab.c (default_collect_symbol_completion_matches_break_on):
5517         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5518         (default_collect_symbol_completion_matches)
5519         (collect_symbol_completion_matches): Add complete_symbol_mode
5520         parameter.
5521         (collect_symbol_completion_matches_type): Pass down
5522         complete_symbol_mode::EXPRESSION.
5523         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5524         parameter.  Handle LINESPEC mode.
5525         * symtab.h (complete_symbol_mode): New.
5526         (default_collect_symbol_completion_matches_break_on)
5527         (default_collect_symbol_completion_matches)
5528         (collect_symbol_completion_matches)
5529         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5530         parameter.
5531
5532 2017-07-17  Pedro Alves  <palves@redhat.com>
5533
5534         * utils.c (enum class strncmp_iw_mode): New.
5535         (strcmp_iw): Rename to ...
5536         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5537         parameters.  Handle them.
5538         (strncmp_iw): New.
5539         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5540         * utils.h (strncmp_iw): Declare.
5541         (strcmp_iw): Move describing comments here.
5542
5543 2017-07-17  Pedro Alves  <palves@redhat.com>
5544
5545         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5546         CP_OPERATOR_STR.
5547         * c-typeprint.c (is_type_conversion_operator): Use
5548         CP_OPERATOR_STR.
5549         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5550         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5551         CP_OPERATOR_LEN.
5552         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5553         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5554         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5555         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5556         CP_OPERATOR_STR.
5557         * location.c: Include "cp-support.h".
5558         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5559         CP_OPERATOR_STR.
5560         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5561         CP_OPERATOR_LEN.
5562
5563 2017-07-17  Pedro Alves  <palves@redhat.com>
5564
5565         * cli/cli-cmds.c (complete_command): Use a completion tracker
5566         along with completion_find_completion_word for handle_brkchars
5567         phase.
5568         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5569         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5570         (struct gdb_rl_completion_word_info): New.
5571         (gdb_rl_find_completion_word): New.
5572         (completion_find_completion_word): New.
5573         * completer.h (completion_find_completion_word): Declare.
5574
5575 2017-07-17  Pedro Alves  <palves@redhat.com>
5576
5577         * ada-lang.c (symbol_completion_match): Adjust comments.
5578         (symbol_completion_add): Replace vector parameter with
5579         completion_tracker parameter.  Use it.
5580         (ada_make_symbol_completion_list): Rename to...
5581         (ada_collect_symbol_completion_matches): ... this.  Add
5582         completion_tracker parameter and use it.
5583         (ada_language_defn): Adjust.
5584         * break-catch-syscall.c (catch_syscall_completer): Adjust
5585         prototype and work with completion_tracker instead of VEC.
5586         * breakpoint.c (condition_completer): Adjust prototype and work
5587         with completion_tracker instead of VEC.
5588         * c-lang.c (c_language_defn, cplus_language_defn)
5589         (asm_language_defn, minimal_language_defn): Adjust to renames.
5590         * cli/cli-cmds.c (complete_command): Rework using
5591         completion_tracker.  Catch exceptions when completing.
5592         * cli/cli-decode.c (integer_unlimited_completer)
5593         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5594         with completion_tracker instead of VEC.
5595         * command.h (struct completion_tracker): Forward declare.
5596         (completer_ftype, completer_handle_brkchars_ftype): Change
5597         types.
5598         (complete_on_cmdlist, complete_on_enum): Adjust.
5599         * completer.c: Include <algorithm>.
5600         (struct gdb_completer_state): New.
5601         (current_completion): New global.
5602         (readline_line_completion_function): Delete.
5603         (noop_completer, filename_completer)
5604         (filename_completer_handle_brkchars, complete_files_symbols)
5605         (linespec_location_completer): Adjust to work with a
5606         completion_tracker instead of a VEC.
5607         (string_or_empty): New.
5608         (collect_explicit_location_matches): Adjust to work with a
5609         completion_tracker instead of a VEC.
5610         (explicit_location_completer): Rename to ...
5611         (complete_explicit_location): ... this and adjust to work with a
5612         completion_tracker instead of a VEC.
5613         (location_completer): Adjust to work with a completion_tracker
5614         instead of a VEC.
5615         (add_struct_fields): Adjust to work with a completion_list instead
5616         of VEC.
5617         (expression_completer): Rename to ...
5618         (complete_expression): ... this and adjust to work with a
5619         completion_tracker instead of a VEC.  Use complete_files_symbols.
5620         (expression_completer): Reimplement on top of complete_expression.
5621         (symbol_completer): Adjust to work with a completion_tracker
5622         instead of a VEC.
5623         (enum complete_line_internal_reason): Add describing comments.
5624         (complete_line_internal_normal_command): Adjust to work with a
5625         completion_tracker instead of a VEC.
5626         (complete_line_internal): Rename to ...
5627         (complete_line_internal_1): ... this and adjust to work with a
5628         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5629         handle_brkchars phase.
5630         (new_completion_tracker): Delete.
5631         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5632         complete_line_internal_1.
5633         (free_completion_tracker): Delete.
5634         (INITIAL_COMPLETION_HTAB_SIZE): New.
5635         (completion_tracker::completion_tracker)
5636         (completion_tracker::~completion_tracker): New.
5637         (maybe_add_completion): Delete.
5638         (completion_tracker::maybe_add_completion)
5639         (completion_tracker::add_completion)
5640         (completion_tracker::add_completions): New.
5641         (throw_max_completions_reached_error): Delete.
5642         (complete_line): Adjust to work with a completion_tracker instead
5643         of a VEC.  Don't create a completion_tracker_t or check for max
5644         completions here.
5645         (command_completer, command_completer_handle_brkchars)
5646         (signal_completer, reg_or_group_completer_1)
5647         (reg_or_group_completer, default_completer_handle_brkchars):
5648         Adjust to work with a completion_tracker.
5649         (gdb_completion_word_break_characters_throw): New.
5650         (gdb_completion_word_break_characters): Reimplement.
5651         (line_completion_function): Delete.
5652         (completion_tracker::recompute_lowest_common_denominator)
5653         (expand_preserving_ws)
5654         (completion_tracker::build_completion_result)
5655         (completion_result::completion_result)
5656         (completion_result::completion_result)
5657         (completion_result::~completion_result)
5658         (completion_result::completion_result)
5659         (completion_result::release_match_list, compare_cstrings)
5660         (completion_result::sort_match_list)
5661         (completion_result::reset_match_list)
5662         (gdb_rl_attempted_completion_function_throw)
5663         (gdb_rl_attempted_completion_function): New.
5664         * completer.h (completion_list, struct completion_result)
5665         (class completion_tracker): New.
5666         (complete_line): Add completion_tracker parameter.
5667         (readline_line_completion_function): Delete.
5668         (gdb_rl_attempted_completion_function): New.
5669         (noop_completer, filename_completer, expression_completer)
5670         (location_completer, symbol_completer, command_completer)
5671         (signal_completer, reg_or_group_completer): Update prototypes.
5672         (completion_tracker_t, new_completion_tracker)
5673         (make_cleanup_free_completion_tracker): Delete.
5674         (enum maybe_add_completion_enum): Delete.
5675         (maybe_add_completion): Delete.
5676         (throw_max_completions_reached_error): Delete.
5677         * corefile.c (complete_set_gnutarget): Adjust to work with a
5678         completion_tracker instead of a VEC.
5679         * cp-abi.c (cp_abi_completer): Adjust to work with a
5680         completion_tracker instead of a VEC.
5681         * d-lang.c (d_language_defn): Adjust.
5682         * disasm.c (disassembler_options_completer): Adjust to work with a
5683         completion_tracker instead of a VEC.
5684         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5685         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5686         with a completion_tracker instead of a VEC.
5687         (f_language_defn): Adjust.
5688         * go-lang.c (go_language_defn): Adjust.
5689         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5690         Adjust to work with a completion_tracker instead of a VEC.
5691         * infrun.c (handle_completer): Likewise.
5692         * interps.c (interpreter_completer): Likewise.
5693         * interps.h (interpreter_completer): Likewise.
5694         * language.c (unknown_language_defn, auto_language_defn)
5695         (local_language_defn): Adjust.
5696         * language.h (language_defn::la_make_symbol_completion_list):
5697         Rename to ...
5698         (language_defn::la_collect_symbol_completion_matches): ... this
5699         and adjust to work with a completion_tracker instead of a VEC.
5700         * m2-lang.c (m2_language_defn): Adjust.
5701         * objc-lang.c (objc_language_defn): Adjust.
5702         * opencl-lang.c (opencl_language_defn): Adjust.
5703         * p-lang.c (pascal_language_defn): Adjust.
5704         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5705         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5706         with a completion_tracker.
5707         * rust-lang.c (rust_language_defn): Adjust.
5708         * symtab.c (free_completion_list, do_free_completion_list)
5709         (return_val, completion_tracker): Delete.
5710         (completion_list_add_name, completion_list_add_symbol)
5711         (completion_list_add_msymbol, completion_list_objc_symbol)
5712         (completion_list_add_fields, add_symtab_completions): Add
5713         completion_tracker parameter and use it.
5714         (default_make_symbol_completion_list_break_on_1): Rename to...
5715         (default_collect_symbol_completion_matches_break_on): ... this.
5716         Add completion_tracker parameter and use it instead of allocating
5717         a completion tracker here.
5718         (default_make_symbol_completion_list_break_on): Delete old
5719         implementation.
5720         (default_make_symbol_completion_list): Delete.
5721         (default_collect_symbol_completion_matches): New.
5722         (make_symbol_completion_list): Delete.
5723         (collect_symbol_completion_matches): New.
5724         (make_symbol_completion_type): Rename to ...
5725         (collect_symbol_completion_matches_type): ... this.  Add
5726         completion_tracker parameter and use it instead of VEC.
5727         (make_file_symbol_completion_list_1): Rename to...
5728         (collect_file_symbol_completion_matches): ... this.  Add
5729         completion_tracker parameter and use it instead of VEC.
5730         (make_file_symbol_completion_list): Delete.
5731         (add_filename_to_list): Use completion_list instead of a VEC.
5732         (add_partial_filename_data::list): Now a completion_list.
5733         (make_source_files_completion_list): Work with a completion_list
5734         instead of a VEC.
5735         * symtab.h: Include "completer.h".
5736         (default_make_symbol_completion_list_break_on)
5737         (default_make_symbol_completion_list, make_symbol_completion_list)
5738         (make_symbol_completion_type, make_file_symbol_completion_list)
5739         (make_source_files_completion_list): Delete.
5740         (default_collect_symbol_completion_matches_break_on)
5741         (default_collect_symbol_completion_matches)
5742         (collect_symbol_completion_matches)
5743         (collect_symbol_completion_matches_type)
5744         (collect_file_symbol_completion_matches)
5745         (make_source_files_completion_list): New.
5746         * top.c (init_main): Don't install a rl_completion_entry_function
5747         hook.  Install a rl_attempted_completion_function hook instead.
5748         * tui/tui-layout.c (layout_completer): Adjust to work with a
5749         completion_tracker.
5750         * tui/tui-regs.c (tui_reggroup_completer):
5751         * tui/tui-win.c (window_name_completer, focus_completer)
5752         (winheight_completer): Adjust to work with a completion_tracker.
5753         * value.c: Include "completer.h".
5754         (complete_internalvar): Adjust to work with a completion_tracker.
5755         * value.h (complete_internalvar): Likewise.
5756
5757 2017-07-17  Pedro Alves  <palves@redhat.com>
5758
5759         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5760         renames.
5761         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5762         comments to completer_ftype's declaration.
5763         <completer_handle_brkchars>: Change type to
5764         completer_handle_brkchars_ftype.
5765         * command.h (completer_ftype): Add describing comment and give
5766         names to parameters.
5767         (completer_ftype_void): Rename to ...
5768         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5769         (set_cmd_completer_handle_brkchars): Adjust.
5770         * completer.c (filename_completer_handle_brkchars): New function.
5771         (complete_line_internal_normal_command): New function, factored
5772         out from ...
5773         (complete_line_internal): ... here.
5774         (command_completer_handle_brkchars)
5775         (default_completer_handle_brkchars)
5776         (completer_handle_brkchars_func_for_completer): New functions.
5777         * completer.h (set_gdb_completion_word_break_characters): Delete
5778         declaration.
5779         (completer_handle_brkchars_func_for_completer): New declaration.
5780         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5781         completer_handle_brkchars_func_for_completer.
5782
5783 2017-07-17  Pedro Alves  <palves@redhat.com>
5784
5785         * completer.c (symbol_completer): New function, based on
5786         make_symbol_completion_list_fn.
5787         * completer.h (symbol_completer): New declaration.
5788         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5789         * python/py-cmd.c (completers): Adjust.
5790         * symtab.c (make_symbol_completion_list_fn): Delete.
5791         * symtab.h (make_symbol_completion_list_fn): Delete.
5792         * cli/cli-decode.c (add_cmd): Adjust.
5793
5794 2017-07-17  Pedro Alves  <palves@redhat.com>
5795
5796         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5797         * dwarf2read.c: Include "filename-seen-cache.h".
5798         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5799         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5800         * filename-seen-cache.c: New file.
5801         * filename-seen-cache.h: New file.
5802         * symtab.c: Include "filename-seen-cache.h".
5803         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5804         (create_filename_seen_cache, clear_filename_seen_cache)
5805         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5806         to filename-seen-cache.h/filename-seen-cache.c.
5807         (output_source_filename, sources_info)
5808         (maybe_add_partial_symtab_filename)
5809         (make_source_files_completion_list): Adjust to use
5810         filename_seen_cache.
5811
5812 2017-07-17  Pedro Alves  <palves@redhat.com>
5813
5814         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5815         fields.
5816         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5817         dwarf2_debug_sections*)): New.
5818         (dwarf2_per_objfile::dwarf2_per_objfile(const
5819         dwarf2_per_objfile&)): Declare as deleted.
5820         (dwarf2_per_objfile::operator=): Declare as deleted.
5821         (dwarf2_per_objfile::dwarf2_per_objfile)
5822         (dwarf2_per_objfile::~dwarf2_per_objfile)
5823         (dwarf2_per_objfile::free_cached_comp_units): New.
5824         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5825         ctor.  Call dwarf2_per_objfile's ctor manually.
5826         (dwarf2_locate_sections): Deleted/refactored as ...
5827         (dwarf2_per_objfile::locate_sections): ... this new method.
5828         (free_cached_comp_units): Defer to
5829         dwarf2_per_objfile::free_cached_comp_units.
5830         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5831
5832 2017-07-14  Tom Tromey  <tom@tromey.com>
5833
5834         PR rust/21764:
5835         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5836         parameter.
5837         <UNOP_SIZEOF>: Split into separate case.
5838         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5839
5840 2017-07-14  Tom Tromey  <tom@tromey.com>
5841
5842         PR rust/21763:
5843         * symtab.c (symbol_matches_domain): Add language_rust to special
5844         case.
5845         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5846         treat LOC_TYPEDEF symbols as variables.
5847
5848 2017-07-14  Pedro Alves  <palves@redhat.com>
5849
5850         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5851         symtabs matching all symtabs with SRCFILE as file name instead of
5852         only considering the first hit, with lookup_symtab.
5853
5854 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5855
5856         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5857         operator_name parameters.
5858         (gen_expr): Update function call.
5859
5860 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5861
5862         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5863         parameter.
5864         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5865         Likewise.
5866         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5867         parameter, use agent_expr::gdbarch instead, update function
5868         calls.
5869         (locexpr_tracepoint_var_ref): Likewise.
5870         (loclist_tracepoint_var_ref): Likewise.
5871         * ax-gdb.c (gen_trace_static_fields): Likewise.
5872         (gen_traced_pop): Likewise.
5873         (gen_frame_args_address): Likewise.
5874         (gen_frame_locals_address): Likewise.
5875         (gen_var_ref): Likewise.
5876         (gen_struct_ref_recursive): Likewise.
5877         (gen_static_field): Likewise.
5878         (gen_maybe_namespace_elt): Likewise.
5879         (gen_expr): Likewise.
5880         (gen_trace_for_var): Likewise.
5881         (gen_trace_for_expr): Likewise.
5882         (gen_trace_for_return_address): Likewise.
5883
5884 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5885
5886         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5887         parameter.
5888         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5889
5890 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5891
5892         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5893         from ax, update calls.
5894         (gen_usual_arithmetic): Likewise.
5895         (gen_integral_promotions): Likewise.
5896         (gen_bitfield_ref): Likewise.
5897         (gen_primitive_field): Likewise.
5898         (gen_struct_ref_recursive): Likewise.
5899         (gen_struct_ref): Likewise.
5900         (gen_maybe_namespace_elt): Likewise.
5901         (gen_struct_elt_for_reference): Likewise.
5902         (gen_namespace_elt): Likewise.
5903         (gen_aggregate_elt_ref): Likewise.
5904         (gen_expr): Get gdbarch from ax, update calls.
5905         (gen_expr_binop_rest): Likewise.
5906
5907 2017-07-13  Pedro Alves  <palves@redhat.com>
5908
5909         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5910         as default tdesc.
5911         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5912         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5913         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5914         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5915         tdep.
5916         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5917         Get final tdesc from the tdep.
5918         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5919         default tdesc.
5920         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5921         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5922         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5923         Use it as default tdesc.
5924         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5925         down to amd_init_abi.  No longer handle fallback tdesc here.
5926         * amd64-tdep.h (tdesc_x32): Declare.
5927         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5928         parameter.
5929         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5930         as default tdesc.
5931
5932 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5933
5934         * s390-linux-tdep.c (s390_process_record): Add support for
5935         instructions new in arch12.
5936
5937 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5938
5939         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5940         PT_GETFSBASE and PT_GETGSBASE.
5941         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5942         PT_SETGSBASE.
5943
5944 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5945
5946         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5947         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5948         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5949         those rules.
5950         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5951         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5952         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5953         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5954         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5955         * features/i386/amd64.xml: Add 64bit-segments.xml.
5956         * features/i386/amd64-avx-avx512.c: Regenerated.
5957         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5958         * features/i386/amd64-avx-mpx.c: Regenerated.
5959         * features/i386/amd64-avx.c: Regenerated.
5960         * features/i386/amd64-mpx.c: Regenerated.
5961         * features/i386/amd64.c: Regenerated.
5962         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5963         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5964         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5965         * regformats/i386/amd64-avx.dat: Regenerated.
5966         * regformats/i386/amd64-mpx.dat: Regenerated.
5967         * regformats/i386/amd64.dat: Regenerated.
5968
5969 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5970
5971         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5972         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5973
5974 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5975
5976         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5977         unsetenv.
5978         * gnulib/aclocal.m4: Regenerate.
5979         * gnulib/config.in: Regenerate.
5980         * gnulib/configure: Regenerate.
5981         * gnulib/import/Makefile.am: Regenerate.
5982         * gnulib/import/Makefile.in: Regenerate.
5983         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5984         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5985         * gnulib/import/m4/environ.m4: New file.
5986         * gnulib/import/m4/setenv.m4: New file.
5987         * gnulib/import/setenv.c: New file.
5988         * gnulib/import/unsetenv.c: New file.
5989
5990 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5991
5992         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5993         address when op is DW_OP_addr.
5994
5995 2017-07-09  Tom Tromey  <tom@tromey.com>
5996
5997         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5998         check and apply to outer type.
5999
6000 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6001
6002         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6003         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6004         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6005         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6006
6007 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6008
6009         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6010
6011 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6012
6013         * corelow.c (get_core_siginfo): Remove.
6014         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6015         instead of get_core_siginfo.
6016         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6017         * gdbarch.h: Re-generate.
6018         * gdbarch.c: Re-generate.
6019         * linux-tdep.c (linux_core_xfer_siginfo): New.
6020         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6021
6022 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6023
6024         * corelow.c (thread_section_name): Move to ...
6025         * gdbcore.h (thread_section_name): ... here.
6026
6027 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6028
6029         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6030         (struct siginfo32): New.
6031         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6032         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6033         via ptrace(PT_LWPINFO).
6034
6035 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6036
6037         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6038         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6039         (fbsd_get_siginfo_type): New.
6040         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6041         (_initialize_fbsd_tdep): New.
6042
6043 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6044
6045         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6046         a singular dwo_unit*) to support multiple CUs in the same way that
6047         multiple TUs are supported.
6048         (create_cus_hash_table): Replace create_dwo_cu with a function for
6049         parsing multiple CUs from a DWO file.
6050         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6051         create_dwo_cu.
6052         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6053         htab_find, rather than comparing the signature to a singleton CU in
6054         the dwo_file.
6055
6056 2017-07-06  Pedro Alves  <palves@redhat.com>
6057
6058         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6059
6060 2017-07-04  Pedro Alves  <palves@redhat.com>
6061
6062         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6063         * gdbtypes.h (TYPE_STATIC): Delete.
6064         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6065         is_synchronized, is_native>: Delete.
6066         <dummy>: Bump.
6067         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6068         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6069         (TYPE_FN_FIELD_ABSTRACT): Delete.
6070
6071 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6072
6073         * buffer.h (buffer_finish): Fix spelling mistakes.
6074
6075 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6076
6077         * .dir-locals.el: Automatically switch to C-style comments in
6078         versions of Emacs that support the feature.
6079
6080 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6081             Pedro Alves  <palves@redhat.com>
6082
6083         PR cli/21688
6084         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6085         (process_next_line): New variable 'inline_cmd'.
6086         Adjust 'if' clauses for "python", "compile" and "guile" to use
6087         'command_name_equals' and check for '!inline_cmd'.
6088
6089 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6090
6091         PR cli/21688
6092         * cli/cli-script.c (command_name_equals_not_inline): New function.
6093         (process_next_line): Adjust 'if' clauses for "python", "compile"
6094         and "guile" to use command_name_equals_not_inline.
6095
6096 2017-06-29  Pedro Alves  <palves@redhat.com>
6097
6098         * completer.c (expression_completer): Call
6099         linespec_location_completer instead of location_completer.
6100
6101 2017-06-29  Pedro Alves  <palves@redhat.com>
6102
6103         * completer.c (expression_completer): Remove code that recomputes
6104         'text' from 'word'.
6105
6106 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6107
6108         * regformats/regdat.sh: Generate code with
6109         "ifndef IN_PROCESS_AGENT".
6110
6111 2017-06-28  Pedro Alves  <palves@redhat.com>
6112
6113         * command.h: Include "common/scoped_restore.h".
6114
6115 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6116
6117         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6118         instead of obstack_grow.
6119
6120 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6121
6122         PR gdb/21337
6123         * symfile.c (reread_symbols): Call objfiles_changed just before
6124         read_symbols.
6125
6126 2017-06-27  Pedro Alves  <palves@redhat.com>
6127
6128         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6129         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6130         (completion_list_add_symbol, completion_list_add_msymbol):
6131         ... these new functions.
6132         (add_symtab_completions)
6133         (default_make_symbol_completion_list_break_on_1): Adjust.
6134
6135 2017-06-27  Pedro Alves  <palves@redhat.com>
6136
6137         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6138         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6139         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6140         dtor.
6141         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6142         'storage_obstack' field an auto_obstack.  In-class initialize all
6143         non-bitfield fields.  Make minsyms_read bool.
6144         * symfile.c (read_symbols): Adjust.
6145
6146 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6147
6148         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6149         (gdbsim_store_register): Likewise.
6150
6151 2017-06-27  Pedro Alves  <palves@redhat.com>
6152
6153         * c-exp.y (name_obstack): Now an auto_obstack.
6154         (yylex): Use auto_obstack::clear.
6155         (c_parse): Use auto_obstack::clear instead of reinitializing and
6156         freeing the obstack.
6157         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6158         * d-exp.y (name_obstack): Now an auto_obstack.
6159         (yylex): Use auto_obstack::clear.
6160         (d_parse): Use auto_obstack::clear instead of reinitializing and
6161         freeing the obstack.
6162         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6163         auto_obstack.
6164         * dwarf2read.c (create_addrmap_from_index)
6165         (dwarf2_build_psymtabs_hard)
6166         (update_enumeration_type_from_children): Likewise.
6167         * gdb_obstack.h (auto_obstack): New type.
6168         * go-exp.y (name_obstack): Now an auto_obstack.
6169         (build_packaged_name): Use auto_obstack::clear.
6170         (go_parse): Use auto_obstack::clear instead of reinitializing and
6171         freeing the obstack.
6172         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6173         auto_obstack.
6174         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6175         * rust-exp.y (work_obstack): Now an auto_obstack.
6176         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6177         reinitializing and freeing the obstack.
6178         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6179         (host_char_to_target): Use auto_obstack.
6180         * utils.h (make_cleanup_obstack_free): Delete declaration.
6181         * valprint.c (generic_emit_char, generic_printstr): Use
6182         auto_obstack.
6183
6184 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6185
6186         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6187         thread.
6188         (darwin_init_thread_list): Don't update dummy thread.
6189         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6190
6191 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6192
6193         * record-full.c (netorder16): Remove.
6194
6195 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6196
6197         * common/diagnostics.h: Define macros for GCC.
6198         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6199         * common/vec.h: Include diagnostics.h.
6200         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6201         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6202         warning.
6203
6204 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6205
6206         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6207         New macro.
6208         * ada-lex.l: Ignore deprecated register warnings.
6209
6210 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6211
6212         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6213         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6214
6215 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6216
6217         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6218         its own line.
6219
6220 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6221
6222         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6223
6224 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6225
6226         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6227         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6228         (xtensa_register_read_masked): Likewise.
6229
6230 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6231
6232         * common/environ.c (gdb_environ::unset): Update comment.
6233
6234 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6235
6236         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6237         registers.
6238
6239 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6240
6241         * record-full.c (record_full_exec_insn): Use byte_vector.
6242
6243 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6244
6245         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6246         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6247
6248 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6249
6250         * remote.c (cached_reg): Move from here...
6251         * regcache.h (cached_reg): ...to here.
6252         * python/py-unwind.c (struct reg_info): Remove.
6253         (cached_frame_info): Use cached_reg_t.
6254         (pyuw_prev_register): Likewise.
6255         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6256         (pyuw_dealloc_cache): Free all registers.
6257
6258 2017-06-22  Pedro Alves  <palves@redhat.com>
6259             Simon Marchi  <simon.marchi@ericsson.com>
6260
6261         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6262         warning.
6263         * common/diagnostics.h: New file.
6264
6265 2017-06-22  Pedro Alves  <palves@redhat.com>
6266
6267         * common/agent.h: Add include guards.
6268
6269 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6270
6271         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6272         talk about addressable units instead of bytes.
6273
6274 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6275
6276         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6277         of '::const_iterator'.
6278
6279 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6280
6281         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6282         'unittests/environ-selftests.c'.
6283         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6284         * charset.c (find_charset_names): Declare object 'iconv_env'.
6285         Update code to use 'iconv_env' object.  Remove call to
6286         'free_environ'.
6287         * common/environ.c: Include <utility>.
6288         (make_environ): Delete function.
6289         (free_environ): Delete function.
6290         (gdb_environ::clear): New function.
6291         (gdb_environ::operator=): New function.
6292         (gdb_environ::get): Likewise.
6293         (environ_vector): Delete function.
6294         (set_in_environ): Delete function.
6295         (gdb_environ::set): New function.
6296         (unset_in_environ): Delete function.
6297         (gdb_environ::unset): New function.
6298         (gdb_environ::envp): Likewise.
6299         * common/environ.h: Include <vector>.
6300         (struct gdb_environ): Delete; transform into...
6301         (class gdb_environ): ... this class.
6302         (free_environ): Delete prototype.
6303         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6304         environ_vector): Likewise.
6305         * infcmd.c (run_command_1): Update code to call
6306         'envp' from 'gdb_environ' class.
6307         (environment_info): Update code to call methods from 'gdb_environ'
6308         class.
6309         (unset_environment_command): Likewise.
6310         (path_info): Likewise.
6311         (path_command): Likewise.
6312         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6313         (inferior::inferior): Initialize 'environment' using the host's
6314         information.
6315         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6316         Include "environ.h".
6317         (class inferior) <environment>: Change type from 'struct
6318         gdb_environ' to 'gdb_environ'.
6319         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6320         methods from 'gdb_environ' class.
6321         * solib.c (solib_find_1): Likewise
6322         * unittests/environ-selftests.c: New file.
6323
6324 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6325
6326         * features/i386/i386-linux.xml: Exchange the order of including
6327         32bit-linux.xml and 32bit-sse.xml.
6328         * features/i386/i386-linux.c: Regenerated.
6329
6330 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6331
6332         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6333         Delete copy ctor and assignment operator.
6334         (tdesc_type): Likewise.
6335         (tdesc_feature): Likewise.
6336         (tdesc_free_reg): Remove.
6337         (tdesc_create_reg): Use new.
6338         (tdesc_free_type): Remove.
6339         (tdesc_create_vector): Use new.
6340         (tdesc_create_union): Likewise.
6341         (tdesc_create_flags): Likewise.
6342         (tdesc_create_enum): Likewise.
6343         (tdesc_free_feature): Delete.
6344         (free_target_description): Use delete.
6345
6346 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6347
6348         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6349         registers.
6350
6351 2017-06-19  Pedro Alves  <palves@redhat.com>
6352
6353         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6354         after gdb::unlinker.
6355
6356 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6357
6358         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6359         gdb_environ to access an environment variable.
6360
6361 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6362
6363         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6364         gdb_byte*.
6365
6366 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6367
6368         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6369
6370 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6371
6372         * configure: Re-generate.
6373         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6374
6375 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6376
6377         * configure: Re-generate.
6378         * warning.m4: Pass -Werror to compiler when checking for
6379         supported warning flags.
6380
6381 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6382
6383         * Makefile.in (COMPILE.pre): Add "-x c++".
6384
6385 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6386             Pedro Alves  <palves@redhat.com>
6387             Yao Qi  <yao.qi@linaro.org>
6388
6389         * defs.h (RequireLongest): New.
6390         (extract_integer): Declare function template.
6391         (extract_signed_integer): Remove the declaration, but define it
6392         static inline.
6393         (extract_unsigned_integer): Likewise.
6394         (store_integer): Declare function template.
6395         (store_signed_integer): Remove the declaration, but define it
6396         static inline.
6397         (store_unsigned_integer): Likewise.
6398         * findvar.c (extract_integer): New function template.
6399         (extract_signed_integer): Remove.
6400         (extract_unsigned_integer): Remove.
6401         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6402         instantiations.
6403         (store_integer): New function template.
6404         (store_signed_integer): Remove.
6405         (store_unsigned_integer): Remove.
6406         (store_integer): Explicit instantiations.
6407         * regcache.c (regcache_raw_read_signed): Update.
6408         (regcache::raw_read): New function.
6409         (regcache::raw_read_signed): Remove.
6410         (regcache::raw_read_unsigned): Remove.
6411         (regcache_raw_read_unsigned): Update.
6412         (regcache_raw_write_unsigned): Update.
6413         (regcache::raw_write_signed): Remove.
6414         (regcache::raw_write): New function.
6415         (regcache_cooked_read_signed): Update.
6416         (regcache::raw_write_unsigned): Remove.
6417         (regcache::cooked_read_signed): Remove.
6418         (regcache_cooked_read_unsigned): Update.
6419         (regcache::cooked_read_unsigned): Remove.
6420         (regcache_cooked_write_signed): Update.
6421         (regcache_cooked_write_unsigned): Update.
6422         * regcache.h (regcache) <raw_read_signed>: Remove.
6423         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6424         <raw_read, raw_write>: New.
6425         <cooked_read_signed, cooked_write_signed>: Remove.
6426         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6427         <cooked_read, cooked_write>: New.
6428         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6429         (sh64_pseudo_register_write): Update.
6430
6431 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6432
6433         * arc-tdep.c (arc_disassembler_options): New variable.
6434         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6435         of default_print_insn.
6436         (arc_delayed_print_insn): Set info->section when needed,
6437         use default_print_insn to retrieve a disassembler.
6438
6439 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6440
6441         PR gdb/21574
6442         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6443         to mention $SHELL and startup-with-shell.
6444
6445 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6446
6447         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6448
6449 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6450
6451         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6452         default_print_insn instead of print_insn_aarch64.
6453         * arm-tdep.c (gdb_print_insn_arm): Call
6454         default_print_insn instead of print_insn_big_arm
6455         and print_insn_little_arm.
6456         * i386-tdep.c (i386_print_insn): Call default_print_insn
6457         instead of print_insn_i386.
6458         * ia64-tdep.c (ia64_print_insn): Call
6459         default_print_insn instead of print_insn_ia64.
6460         * mips-tdep.c (gdb_print_insn_mips): Call
6461         default_print_insn instead of print_insn_big_mips
6462         and print_insn_little_mips.
6463         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6464         instead of print_insn_spu.
6465
6466 2017-06-14  Pedro Alves  <palves@redhat.com>
6467
6468         * ada-lang.c: Include "common/byte-vector.h".
6469         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6470         * charset.c (wchar_iterator::iterate): Resize the vector instead
6471         of reserving it.
6472         * common/byte-vector.h: Include "common/def-vector.h".
6473         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6474         * cli/cli-dump.c: Include "common/byte-vector.h".
6475         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6476         * common/byte-vector.h: New file.
6477         * common/def-vector.h: New file.
6478         * common/default-init-alloc.h: New file.
6479         * dwarf2loc.c: Include "common/byte-vector.h".
6480         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6481         instead of reserving it.
6482         * dwarf2read.c: Include "common/byte-vector.h".
6483         (data_buf::m_vec): Now a gdb::byte_vector.
6484         * gdb_regex.c: Include "common/def-vector.h".
6485         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6486         * mi/mi-main.c: Include "common/byte-vector.h".
6487         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6488         * printcmd.c: Include "common/byte-vector.h".
6489         (print_scalar_formatted): Use gdb::byte_vector.
6490         * valprint.c: Include "common/byte-vector.h".
6491         (maybe_negate_by_bytes, print_decimal_chars): Use
6492         gdb::byte_vector.
6493
6494 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6495
6496         * darwin-nat.c: Include "nat/fork-inferior.h".
6497
6498 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6499
6500         * configure.nat: Factor out Darwin bits that are not
6501         architecture-specific.  Add fork-inferior.o.
6502
6503 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6504
6505         * configure.nat: Factor out AIX bits that are not
6506         architecture-specific.  Add fork-inferior.o.
6507
6508 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6509
6510         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6511         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6512         wrappers that just call rw_pieced_value.
6513
6514 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6515
6516         * dwarf2loc.c (write_pieced_value): When writing the data for a
6517         memory piece, use write_memory_with_notification instead of
6518         write_memory.
6519
6520 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6521
6522         * valops.c (read_value_memory): Change embedded_offset to
6523         represent a bit offset instead of a byte offset.
6524         * value.h (read_value_memory): Adjust comment.
6525
6526 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6527
6528         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6529         dest_offset_bits and source_offset_bits.
6530         (write_pieced_value): Likewise.
6531
6532 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6533
6534         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6535         given by DW_OP_bit_piece.
6536         (write_pieced_value): Likewise.
6537
6538 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6539
6540         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6541         some other preparations to the places where sufficient information
6542         is available.
6543         (write_pieced_value): Likewise.
6544
6545 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6546
6547         * dwarf2loc.c (bits_to_bytes): New function.
6548         (read_pieced_value): Fix offset calculations for register pieces
6549         on big-endian targets.
6550         (write_pieced_value): Likewise.
6551
6552 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6553
6554         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6555         (write_pieced_value): Likewise.
6556
6557 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6558
6559         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6560         transfer the source value's least significant bits, instead of its
6561         lowest-addressed ones.  Rename type_len to max_offset.
6562         (read_pieced_value): Mirror above changes to write_pieced_value as
6563         applicable.
6564
6565 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6566
6567         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6568         truncate full bytes from dest_offset_bits before using it as an
6569         offset into the buffer.
6570
6571 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6572
6573         * dwarf2loc.c (write_pieced_value): Include transfer size in
6574         byte-wise check.
6575
6576 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6577
6578         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6579         calculation of this_size.
6580
6581 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6582
6583         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6584         when targeting a bit-field.
6585         (write_pieced_value): Likewise.
6586
6587 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6588
6589         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6590         (allocate_piece_closure): Drop addr_size parameter.
6591         (dwarf2_evaluate_loc_desc_full): Adjust call to
6592         allocate_piece_closure.
6593
6594 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6595
6596         PR gdb/21226
6597         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6598         the LSB end, independent of endianness.
6599
6600 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6601
6602         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6603         size capping.
6604
6605 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6606
6607         * mips-linux-nat.c: Move include features/mips*-linux.c to
6608         mips-linux-tdep.c.
6609         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6610         to mips-linux-tdep.c.
6611         * mips-linux-tdep.c: Include features/mips*-linux.c
6612         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6613         functions.
6614         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6615         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6616         (tdesc_mips64_dsp_linux): Declare.
6617
6618 2017-06-12  Tom Tromey  <tom@tromey.com>
6619
6620         * valprint.h (val_print_type_code_int): Remove.
6621         * valprint.c (generic_val_print_int): Always call
6622         val_print_scalar_formatted.
6623         (val_print_type_code_int): Remove.
6624         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6625         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6626         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6627         * ada-valprint.c (ada_val_print_num): Use
6628         val_print_scalar_formatted.
6629
6630 2017-06-12  Tom Tromey  <tom@tromey.com>
6631
6632         * printcmd.c (print_scalar_formatted): Unify the two switches.
6633         Don't convert scalars to LONGEST.
6634
6635 2017-06-12  Tom Tromey  <tom@tromey.com>
6636
6637         PR exp/16225:
6638         * valprint.h (print_decimal_chars): Update.
6639         * valprint.c (maybe_negate_by_bytes): New function.
6640         (print_decimal_chars): Add "is_signed" argument.
6641         * printcmd.c (print_scalar_formatted): Update.
6642
6643 2017-06-12  Tom Tromey  <tom@tromey.com>
6644
6645         PR exp/16225:
6646         * valprint.h (print_binary_chars, print_hex_chars): Update.
6647         * valprint.c (val_print_type_code_int): Update.
6648         (print_binary_chars): Add "zero_pad" argument.
6649         (emit_octal_digit): New function.
6650         (print_octal_chars): Don't zero-pad.
6651         (print_decimal_chars): Likewise.
6652         (print_hex_chars): Add "zero_pad" argument.
6653         * sh64-tdep.c (sh64_do_fp_register): Update.
6654         * regcache.c (regcache::dump): Update.
6655         * printcmd.c (print_scalar_formatted): Update.
6656         * infcmd.c (default_print_one_register_info): Update.
6657
6658 2017-06-12  Pedro Alves  <palves@redhat.com>
6659             Alan Hayward  <alan.hayward@arm.com>
6660
6661         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6662         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6663         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6664         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6665         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6666
6667 2017-06-12  Pedro Alves  <palves@redhat.com>
6668
6669         * dwarf2read.c (mapped_symtab::data): Now a vector of
6670         symtab_index_entry instead of vector of
6671         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6672         whether an element's name is NULL instead of checking whether the
6673         element itself is NULL.
6674         (find_slot): Change return type.  Adjust.
6675         (hash_expand, , add_index_entry, uniquify_cu_indices)
6676         (write_hash_table): Adjust.
6677
6678 2017-06-12  Pedro Alves  <palves@redhat.com>
6679
6680         * dwarf2read.c (recursively_count_psymbols): New function.
6681         (write_psymtabs_to_index): Call it to compute number of psyms and
6682         pass estimate size of psyms_seen to unordered_set's ctor.
6683
6684 2017-06-12  Pedro Alves  <palves@redhat.com>
6685
6686         * dwarf2read.c (write_hash_table): Check if key already exists
6687         before emplacing.
6688
6689 2017-06-12  Pedro Alves  <palves@redhat.com>
6690
6691         * dwarf2read.c (data_buf::append_space): Rename to...
6692         (data_buf::grow): ... this, and make private.  Adjust all callers.
6693         (data_buf::append_uint): New method.
6694         (add_address_entry, write_one_signatured_type)
6695         (write_psymtabs_to_index): Use it.
6696
6697 2017-06-12  Pedro Alves  <palves@redhat.com>
6698
6699         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6700         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6701         (data_buf::file_write): Call ::fwrite directly.
6702
6703 2017-06-12  Pedro Alves  <palves@redhat.com>
6704
6705         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6706         std::vector::erase.
6707
6708 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6709
6710         Code cleanup: C++ify .gdb_index producer.
6711         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6712         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6713         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6714         (create_strtab, add_string): Remove.
6715         (file_write, data_buf): New.
6716         (struct symtab_index_entry): Use std::vector for cu_indices.
6717         (struct mapped_symtab): Use std::vector for data.
6718         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6719         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6720         Remove.
6721         (find_slot): Change return type.  Update it to the new data structures.
6722         (hash_expand, add_index_entry): Update it to the new data structures.
6723         (offset_type_compare): Remove.
6724         (uniquify_cu_indices): Update it to the new data structures.
6725         (c_str_view, c_str_view_hasher, vector_hasher): New.
6726         (add_indices_to_cpool): Remove.
6727         (write_hash_table): Update it to the new data structures.
6728         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6729         (eq_psymtab_cu_index): Remove.
6730         (psym_index_map): New typedef.
6731         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6732         reference and std::unordered_map for cu_index_htab.
6733         (add_address_entry, add_address_entry_worker, write_address_map)
6734         (write_psymbols): Update it to the new data structures.
6735         (write_obstack): Remove.
6736         (struct signatured_type_index_data): Change types_list to a data_buf
6737         reference and psyms_seen to a std::unordered_set reference.
6738         (write_one_signatured_type, recursively_write_psymbols)
6739         (write_psymtabs_to_index): Update it to the new data structures.
6740
6741 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6742
6743         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6744         separate-debug-file commands.
6745         * symfile.h (separate_debug_file_debug): New global.
6746         * symfile.c (separate_debug_file_debug): New global.
6747         (separate_debug_file_exists, find_separate_debug_file): Add
6748         debug output.
6749         (_initialize_symfile): Add "set debug separate-debug-file"
6750         command.
6751         * build-id.c (build_id_to_debug_bfd,
6752         find_separate_debug_file_by_buildid): Add debug output.
6753
6754 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6755
6756         * gdbarch.sh (displaced_step_free_closure): Remove.
6757         * gdbarch.h, gdbarch.c: Re-generate.
6758         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6759         displaced_step_free_closure.
6760         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6761         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6762         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6763         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6764         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6765         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6766         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6767         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6768         * infrun.c (displaced_step_clear): Call xfree instead of
6769         gdbarch_displaced_step_free_closure.
6770
6771 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6772
6773         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6774         NULL".
6775
6776 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6777
6778         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6779         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6780         (mn10300_push_dummy_call): Likewise.
6781
6782 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6783
6784         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6785
6786 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6787
6788         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6789
6790 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6791
6792         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6793         able to start inferiors using a shell.
6794         (New remote packets): Announce new packet "QStartupWithShell".
6795         * remote.c: Add PACKET_QStartupWithShell.
6796         (extended_remote_create_inferior): Handle new
6797         PACKET_QStartupWithShell.
6798         (remote_protocol_features) <QStartupWithShell>: New entry for
6799         PACKET_QStartupWithShell.
6800         (_initialize_remote): Call "add_packet_config_cmd" for
6801         QStartupShell.
6802
6803 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6804             Pedro Alves  <palves@redhat.com>
6805
6806         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6807         and "nat/fork-inferior.h".
6808         * common/common-inferior.h: New file, with contents from
6809         "gdb/inferior.h".
6810         * commom/common-utils.c: Include "common-utils.h".
6811         (stringify_argv): New function.
6812         * common/common-utils.h (stringify_argv): New prototype.
6813         * configure.nat: Add "fork-inferior.o" as a dependency for
6814         "*linux*", "fbsd*" and "nbsd*" hosts.
6815         * corefile.c (get_exec_file): Update comment.
6816         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6817         instead of "startup_inferior".
6818         (darwin_create_inferior): Call "add_thread_silent" after
6819         "fork_inferior".
6820         * fork-child.c: Cleanup unnecessary includes.
6821         (SHELL_FILE): Move to "common/common-fork-child.c".
6822         (environ): Likewise.
6823         (exec_wrapper): Initialize.
6824         (get_exec_wrapper): New function.
6825         (breakup_args): Move to "common/common-fork-child.c"; rename to
6826         "breakup_args_for_exec".
6827         (escape_bang_in_quoted_argument): Move to
6828         "common/common-fork-child.c".
6829         (saved_ui): New variable.
6830         (prefork_hook): New function.
6831         (postfork_hook): Likewise.
6832         (postfork_child_hook): Likewise.
6833         (gdb_startup_inferior): Likewise.
6834         (fork_inferior): Move to "common/common-fork-child.c".  Update
6835         function to support gdbserver.
6836         (startup_inferior): Likewise.
6837         * gdbcore.h (get_exec_file): Remove declaration.
6838         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6839         instead of "startup_inferior".  Call "add_thread_silent" after
6840         "fork_inferior".
6841         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6842         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6843         instead of "startup_inferior".  Call "add_thread_silent" after
6844         "fork_inferior".
6845         * inferior.h: Include "common-inferior.h".
6846         (trace_start_error): Move to "common/common-utils.h".
6847         (trace_start_error_with_name): Likewise.
6848         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6849         (startup_inferior): Likewise.
6850         (gdb_startup_inferior): New prototype.
6851         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6852         * nat/fork-inferior.h: New file.
6853         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6854         instead of "startup_inferior".  Call "add_thread_silent" after
6855         "fork_inferior".
6856         * target.h (target_terminal_init): Move prototype to
6857         "target/target.h".
6858         (target_terminal_inferior): Likewise.
6859         (target_terminal_ours): Likewise.
6860         * target/target.h (target_terminal_init): New prototype, moved
6861         from "target.h".
6862         (target_terminal_inferior): Likewise.
6863         (target_terminal_ours): Likewise.
6864         * utils.c (gdb_flush_out_err): New function.
6865
6866 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6867
6868         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6869         * common/common-gdbthread.h: New file, with parts from
6870         "gdb/gdbthread.h".
6871         * gdbthread.h: Include "common-gdbthread.h".
6872         (switch_to_thread): Moved to "common/common-gdbthread.h".
6873
6874 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6875
6876         * Makefile.in (SFILES): Add "common/job-control.c".
6877         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6878         (COMMON_OBS): Add "job-control.o".
6879         * common/job-control.c: New file, with contents from
6880         "gdb/inflow.c".
6881         * common/job-control.h: New file, with contents from "terminal.h".
6882         * fork-child.c: Include "job-control.h".
6883         * inflow.c: Include "job-control.h".
6884         (gdb_setpgid): Move to "common/common-inflow.c".
6885         (_initialize_inflow): Move setting of "job_control" to
6886         "handle_job_control".
6887         * terminal.h (job_control): Moved to "common/common-terminal.h".
6888         (gdb_setpgid): Likewise.
6889         * top.c: Include "job_control.h".
6890         * utils.c: Likewise.
6891         (job_control): Moved to "job-control.c".
6892
6893 2017-06-07  Pedro Alves  <palves@redhat.com>
6894
6895         * Makefile.in (SFILES): Add gdb_regex.c.
6896         (COMMON_OBS): Add gdb_regex.o.
6897         * ada-lang.c (ada_add_standard_exceptions)
6898         (ada_add_exceptions_from_frame, name_matches_regex)
6899         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6900         parameter type to compiled_regex.  Adjust.
6901         (ada_exceptions_list): Use compiled_regex.
6902         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6903         std::unique_ptr<compiled_regex>.
6904         (exception_catchpoint::~exception_catchpoint): Remove regfree
6905         call.
6906         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6907         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6908         * breakpoint.c (solib_catchpoint::compiled): Now a
6909         std::unique_ptr<compiled_regex>.
6910         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6911         (check_status_catch_solib): Adjust to use compiled_regex.
6912         (add_solib_catchpoint): Adjust to use compiled_regex.
6913         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6914         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6915         compiled_regex reference.  Adjust to use it.
6916         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6917         declaration.  Include "gdb_regex.h".
6918         (apropos_cmd): Change regex parameter to compiled_regex reference.
6919         * gdb_regex.c: New file.
6920         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6921         declarations.
6922         (class compiled_regex): New.
6923         * linux-tdep.c: Include "common/gdb_optional.h".
6924         (struct mapping_regexes): New, factored out from
6925         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6926         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6927         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6928         * probe.c: Include "common/gdb_optional.h".
6929         (collect_probes): Use compiled_regex and gdb::optional and remove
6930         cleanups.
6931         * skip.c: Include "common/gdb_optional.h".
6932         (skiplist_entry::compiled_function_regexp): Now a
6933         gdb::optional<compiled_regex>.
6934         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6935         (free_skiplist_entry): Remove regfree call.
6936         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6937         compiled_regex and gdb::optional.
6938         * symtab.c: Include "common/gdb_optional.h".
6939         (search_symbols): Use compiled_regex and gdb::optional.
6940         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6941         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6942         to gdb_regex.c.
6943
6944 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6945
6946         * regcache.c (regcache::save): Avoid buffer use.
6947         (regcache::dump): Likewise.
6948
6949 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6950
6951         * sh-tdep.c (sh_pseudo_register_read): Remove
6952         MAX_REGISTER_SIZE.
6953         (sh_pseudo_register_write): Likewise.
6954         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6955         (sh64_pseudo_register_write): Likewise
6956
6957 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6958
6959         * aarch64-tdep.c (aarch64_store_return_value): Use
6960         V_REGISTER_SIZE.
6961         (aarch64_pseudo_read_value): Likewise.
6962         (aarch64_pseudo_write): Likewise.
6963
6964 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6965
6966         * regformats/regdef.h (set_register_cache): Remove the
6967         declaration.
6968
6969 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6970
6971         * frame.c (frame_unwind_register_signed): Use
6972         frame_unwind_register_value.
6973
6974 2017-06-06  Pedro Alves  <palves@redhat.com>
6975
6976         PR breakpoints/21553
6977         * breakpoint.c (create_breakpoints_sal_default)
6978         (init_breakpoint_sal, create_breakpoint_sal): Use
6979         gdb::unique_xmalloc_ptr for string parameters.
6980         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6981         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6982         (base_breakpoint_create_breakpoints_sal)
6983         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6984         (strace_marker_create_breakpoints_sal)
6985         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6986         string parameters.
6987         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6988         gdb::unique_xmalloc_ptr for string parameters.
6989         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6990         parameters.
6991
6992 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6993
6994         * alpha-tdep.c (alpha_register_to_value): Use
6995         get_frame_register_value.
6996         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6997
6998 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6999
7000         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7001         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7002         (ia64_value_to_register): Likewise.
7003         (ia64_extract_return_value): Likewise.
7004         (ia64_store_return_value): Likewise.
7005         (ia64_push_dummy_call): Likewise.
7006
7007 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7008
7009         GDB 8.0 released.
7010
7011 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7012
7013         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7014
7015 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7016
7017         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7018         parameter.
7019         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7020
7021 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7022
7023         * event-loop.c (poll_timers): Unallocate timer using delete
7024         instead of xfree.
7025
7026 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7027
7028         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7029         (struct breakpoint) <~breakpoint>: New.
7030         (struct watchpoint): Inherit from breakpoint.
7031         <~watchpoint>: New.
7032         <base>: Remove.
7033         (struct tracepoint): Inherit from breakpoint.
7034         <base>: Remove.
7035         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7036         (struct longjmp_breakpoint): Inherit from breakpoint.
7037         <~longjmp_breakpoint>: New.
7038         <base>: Remove.
7039         (new_breakpoint_from_type): Remove casts.
7040         (watchpoint_in_thread_scope): Remove reference to base field.
7041         (watchpoint_del_at_next_stop): Likewise.
7042         (update_watchpoint): Likewise.
7043         (watchpoint_check): Likewise.
7044         (bpstat_check_watchpoint): Likewise.
7045         (set_longjmp_breakpoint): Likewise.
7046         (struct fork_catchpoint): Inherit from breakpoint.
7047         <base>: Remove.
7048         (struct solib_catchpoint): Inherit from breakpoint.
7049         <~solib_catchpoint>: New.
7050         <base>: Remove.
7051         (dtor_catch_solib): Change to ...
7052         (solib_catchpoint::~solib_catchpoint): ... this.
7053         (breakpoint_hit_catch_solib): Remove reference to base field.
7054         (add_solib_catchpoint): Likewise.
7055         (create_fork_vfork_event_catchpoint): Likewise.
7056         (struct exec_catchpoint): Inherit from breakpoint.
7057         <~exec_catchpoint>: New.
7058         <base>: Remove.
7059         (dtor_catch_exec): Change to ...
7060         (exec_catchpoint::~exec_catchpoint): ... this.
7061         (dtor_watchpoint): Change to ...
7062         (watchpoint::~watchpoint): ... this.
7063         (watch_command_1): Remove reference to base field.
7064         (catch_exec_command_1): Likewise.
7065         (base_breakpoint_dtor): Change to ...
7066         (breakpoint::~breakpoint): ... this.
7067         (base_breakpoint_ops): Remove dtor field value.
7068         (longjmp_bkpt_dtor): Change to ...
7069         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7070         (strace_marker_create_breakpoints_sal): Remove reference to base
7071         field.
7072         (delete_breakpoint): Don't manually call breakpoint destructor.
7073         (create_tracepoint_from_upload): Remove reference to base field.
7074         (trace_pass_set_count): Likewise.
7075         (initialize_breakpoint_ops): Don't initialize
7076         momentary_breakpoint_ops, don't set dtors.
7077         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7078         <~ada_catchpoint>: New.
7079         <base>: Remove.
7080         (create_excep_cond_exprs): Remove reference to base field.
7081         (dtor_exception): Change to ...
7082         (ada_catchpoint::~ada_catchpoint): ... this.
7083         (dtor_catch_exception): Remove.
7084         (dtor_catch_exception_unhandled): Remove.
7085         (dtor_catch_assert): Remove.
7086         (create_ada_exception_catchpoint): Remove reference to base
7087         field.
7088         (initialize_ada_catchpoint_ops): Don't set dtors.
7089         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7090         breakpoint.
7091         <~signal_catchpoint>: New.
7092         <base>: Remove.
7093         (signal_catchpoint_dtor): Change to ...
7094         (signal_catchpoint::~signal_catchpoint): ... this.
7095         (create_signal_catchpoint): Remove reference to base field.
7096         (initialize_signal_catchpoint_ops): Don't set dtor.
7097         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7098         from breakpoint.
7099         <~syscall_catchpoint>: New.
7100         <base>: Remove.
7101         (dtor_catch_syscall): Change to ...
7102         (syscall_catchpoint::~syscall_catchpoint): ... this.
7103         (create_syscall_event_catchpoint): Remove reference to base
7104         field.
7105         (initialize_syscall_catchpoint_ops): Don't set dtor.
7106         * break-catch-throw.c (struct exception_catchpoint): Inherit
7107         from breakpoint.
7108         <~exception_catchpoint>: New.
7109         <base>: Remove.
7110         (dtor_exception_catchpoint): Change to ...
7111         (exception_catchpoint::~exception_catchpoint): ... this.
7112         (handle_gnu_v3_exceptions): Remove reference to base field.
7113         (initialize_throw_catchpoint_ops): Don't set dtor.
7114         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7115         field.
7116         * remote.c (remote_get_tracepoint_status): Likewise.
7117         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7118         * tracefile.c (tracefile_fetch_registers): Likewise.
7119         * tracepoint.c (actions_command): Likewise.
7120         (validate_actionline): Likewise.
7121         (tfind_1): Likewise.
7122         (get_traceframe_location): Likewise.
7123         (find_matching_tracepoint_location): Likewise.
7124         (parse_tracepoint_status): Likewise.
7125         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7126
7127 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7128
7129         * breakpoint.c (struct longjmp_breakpoint): New struct.
7130         (is_tracepoint_type): Change return type to bool.
7131         (is_longjmp_type): New function.
7132         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7133         (set_raw_breakpoint_without_location): Use
7134         new_breakpoint_from_type.
7135         (set_raw_breakpoint): Likewise.
7136
7137 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7138
7139         * breakpoint.c (new_breakpoint_from_type): New function.
7140         (create_breakpoint_sal): Use new_breakpoint_from_type and
7141         unique_ptr.
7142         (create_breakpoint): Likewise.
7143
7144 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7145
7146         * memattr.c (mem_info_command): Rename to ...
7147         (info_mem_command): ... this.
7148         (mem_enable_command): Rename to ...
7149         (enable_mem_command): ... this.
7150         (mem_disable_command): Rename to ...
7151         (disable_mem_command): ... this.
7152         (mem_delete_command): Rename to ...
7153         (delete_mem_command): ... this.
7154         (_initialize_mem): Adjust function names.
7155
7156 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7157
7158         * btrace.c (handle_pt_insn_events): New.
7159         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7160         STATUS.  Split into this and ...
7161         (handle_pt_insn_event_flags): ... this.
7162
7163 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7164
7165         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7166         and struct pt_insn.resynced.
7167         * configure: Regenerated.
7168         * config.in: Regenerated.
7169
7170 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7171
7172         * btrace.c (ftrace_find_call_by_number): New function.
7173         (ftrace_new_function): Store objects, not pointers.
7174         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7175         ftrace_new_gap, ftrace_update_function,
7176         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7177         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7178         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7179         btrace_ends_with_single_insn, btrace_call_get): Account for
7180         btrace_thread_info::functions now storing objects.
7181         * btrace.h (struct btrace_thread_info): Add constructor.
7182         (struct btrace_thread_info) <functions>: Make std::vector.
7183         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7184         Initialize with default values.
7185         * record-btrace.c (record_btrace_frame_sniffer): Account for
7186         btrace_thread_info::functions now storing objects.
7187
7188 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7189
7190         * btrace.c: Remove typedef bfun_s.
7191         (ftrace_new_gap): Directly add gaps to the list of gaps.
7192         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7193         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7194         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7195         instead of gdb VEC.
7196
7197 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7198
7199         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7200         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7201         with btrace_thread_info::next_segment and
7202         btrace_thread_info::prev_segment.
7203         * btrace.h: Remove struct btrace_func_link.
7204         (struct btrace_function): Replace pair of function segment pointers
7205         with pair of indices.
7206         * python/py-record-btrace.c (btpy_call_prev_sibling,
7207         btpy_call_next_sibling): Replace references to
7208         btrace_thread_info::segment with btrace_thread_info::next_segment and
7209         btrace_thread_info::prev_segment.
7210         * record-btrace.c (record_btrace_frame_this_id): Use
7211         btrace_find_call_by_number.
7212
7213 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7214
7215         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7216         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7217         btrace_insn_next, btrace_insn_prev): Remove references to
7218         btrace_thread_info::flow.
7219         * btrace.h (struct btrace_function): Remove FLOW.
7220
7221 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7222
7223         * btrace.c (ftrace_find_call_by_number): New function.
7224         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7225         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7226         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7227         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7228         index.
7229         * btrace.h (struct btrace_function): Turn UP into an index.
7230         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7231         as an index.
7232         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7233         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7234         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7235
7236 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7237
7238         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7239         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7240         ftrace_update_function, ftrace_compute_global_level_offset,
7241         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7242         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7243         btrace_insn_end, btrace_is_empty): Remove references to
7244         btrace_thread_info::begin and btrace_thread_info::end.
7245         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7246         (struct btrace_thread_info) <functions>: Adjust comment.
7247         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7248         btrace_thread_info::begin.
7249
7250 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7251
7252         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7253         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7254         ftrace_update_function): Remove arguments that implicitly were always
7255         BTINFO->END.
7256         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7257         Don't pass BTINFO->END.
7258
7259 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7260
7261         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7262         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7263         btrace_find_insn_by_number): Replace function segment pointer with
7264         index.
7265         (btrace_insn_cmp): Simplify.
7266         * btrace.h: (struct btrace_insn_iterator) Rename index to
7267         insn_index.  Replace function segment pointer with index into function
7268         segment vector.
7269         * record-btrace.c (record_btrace_call_history): Replace function
7270         segment pointer use with index.
7271         (record_btrace_frame_sniffer): Retrieve function call segment through
7272         vector.
7273         (record_btrace_set_replay): Remove defunc't safety check.
7274
7275 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7276
7277         * btrace.c (btrace_ends_with_single_insn): New function.
7278         (btrace_call_get, btrace_call_number, btrace_call_begin,
7279         btrace_call_end, btrace_call_next, btrace_call_prev,
7280         btrace_find_call_by_number): Use index into call segment vector
7281         instead of pointer.
7282         (btrace_call_cmp): Simplify.
7283         * btrace.h (struct btrace_call_iterator): Replace function call segment
7284         pointer with index into vector.
7285         * record-btrace.c (record_btrace_call_history): Use index instead of
7286         pointer.
7287
7288 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7289
7290         * btrace.c (btrace_insn_begin, btrace_insn_end,
7291         btrace_find_insn_by_number): Add btinfo to iterator.
7292         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7293
7294 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7295
7296         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7297         and save pointers directly.
7298         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7299         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7300         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7301         changed signature of functions.
7302         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7303         (btrace_fetch): Remove code that adds btrace_function pointers to
7304         vector of btrace_functions.
7305         (btrace_clear): Simplify freeing vector of btrace_functions.
7306
7307 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7308
7309         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7310         Replace VEC_* with std::vector functions.
7311         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7312         (struct btrace_thread_info)<functions>: Change type to std::vector.
7313
7314 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7315
7316         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7317         "Removed targets and native configurations" up.  Merge duplicate
7318         "New commands" sub-sections.  Add "New options" sub-sections.
7319
7320 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7321
7322         * defs.h (copy_integer_to_size): New declaration.
7323         * findvar.c (copy_integer_to_size): New function.
7324         (do_cint_test): New selftest function.
7325         (copy_integer_to_size_test): Likewise.
7326         (_initialize_findvar): Likewise.
7327         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7328         (mips_fbsd_collect_reg): Use raw_collect_integer.
7329         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7330         (mips64_fill_gregset): Use raw_collect_integer
7331         (mips64_fill_fpregset): Use raw_supply_integer.
7332         * regcache.c (regcache::raw_supply_integer): New function.
7333         (regcache::raw_collect_integer): Likewise.
7334         * regcache.h: (regcache::raw_supply_integer): New declaration.
7335         (regcache::raw_collect_integer): Likewise.
7336
7337 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7338
7339         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7340         (COMMON_OBS): Add gdbarch-selftests.o.
7341         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7342         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7343         * gdbarch-selftests.c: New file.
7344         * regcache.h (regcache) <~regcache>: Mark it virtual if
7345         GDB_SELF_TEST.
7346         <raw_write>: Likewise.
7347
7348 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7349
7350         * regcache.c (current_regcache): Change it to
7351         regcache::current_regcache.
7352         (regcache_observer_target_changed): Update.
7353         (regcache_thread_ptid_changed): Make it a regcache static
7354         method.
7355         (regcache_thread_ptid_changed): Update.
7356         (class regcache_access): New.
7357         (current_regcache_test): Update.
7358         (_initialize_regcache): Update.
7359         * regcache.h: Include forward_list.
7360         (regcache): Declare regcache_thread_ptid_changed and declare
7361         registers_changed_ptid as friend.
7362
7363 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7364
7365         * i387-tdep.c (i387_register_to_value): Use register_size
7366         instead of TYPE_LENGTH.
7367         * m68k-tdep.c (m68k_register_to_value): Likewise.
7368
7369 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7370
7371         * i387-tdep.c (i387_convert_register_p): Return false if type
7372         code isn't TYPE_CODE_FLT.
7373
7374 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7375
7376         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7377         length is 4.
7378         (alpha_register_to_value): Remove type length check.
7379         (alpha_value_to_register): Likewise.
7380
7381 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7382
7383         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7384         TYPE_CODE_FLT.
7385
7386 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7387
7388         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7389         TYPE_CODE_FLT or not.
7390
7391 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7392
7393         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7394         * avr-tdep.c (avr_gdbarch_init): Likewise.
7395         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7396         * cris-tdep.c (cris_gdbarch_init): Likewise.
7397         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7398         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7399         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7400         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7401         * mep-tdep.c (mep_gdbarch_init): Likewise.
7402         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7403         * mips-tdep.c (mips_gdbarch_init): Likewise.
7404         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7405         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7406         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7407         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7408         * v850-tdep.c (v850_gdbarch_init): Likewise.
7409
7410 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7411
7412         * selftest-arch.c (tests_with_arch): Call registers_changed
7413         and reinit_frame_cache.
7414         * selftest.c (run_self_tests): Likewise.
7415
7416 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7417
7418         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7419         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7420
7421 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7422
7423         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7424         set_gdbarch_print_insn.
7425
7426 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7427
7428         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7429         set_gdbarch_print_insn.
7430
7431 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7432
7433         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7434         set_gdbarch_print_insn.
7435         * arc-tdep.c (arc_gdbarch_init): Likewise.
7436         * arch-utils.c: include dis-asm.h.
7437         (default_print_insn): New function.
7438         * arch-utils.h (default_print_insn): Declare.
7439         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7440         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7441         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7442         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7443         * frv-tdep.c (frv_gdbarch_init): Likewise.
7444         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7445         * gdbarch.sh (print_insn): Use default_print_insn.
7446         * gdbarch.c: Regenerated.
7447         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7448         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7449         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7450         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7451         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7452         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7453         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7454         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7455         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7456         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7457         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7458         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7459         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7460         * mt-tdep.c (mt_gdbarch_init): Likewise.
7461         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7462         * nios2-tdep.c (nios2_print_insn): Remove.
7463         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7464         * rx-tdep.c (rx_gdbarch_init): Likewise.
7465         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7466         * score-tdep.c (score_print_insn): Remove.
7467         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7468         * sh-tdep.c (sh_gdbarch_init): Likewise.
7469         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7470         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7471         * tic6x-tdep.c (tic6x_print_insn): Remove.
7472         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7473         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7474         * v850-tdep.c (v850_gdbarch_init): Likewise.
7475         * vax-tdep.c (vax_gdbarch_init): Likewise.
7476         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7477         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7478
7479 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7480
7481         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7482         (MIPS_FP0_REGNUM): Remove.
7483         (MIPS_FSR_REGNUM): Remove.
7484         (mips_fbsd_supply_fpregs): Use mips_regnum.
7485         (mips_fbsd_supply_gregs): Likewise.
7486         (mips_fbsd_collect_fpregs): Likewise.
7487         (mips_fbsd_collect_gregs): Likewise.
7488
7489 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7490
7491         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7492         (getpfpregs_supplies): New function.
7493         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7494         getfpregs_supplies.
7495         (mips_fbsd_store_inferior_registers): Likewise.
7496
7497 2017-05-22  Pedro Alves <palves@redhat.com>
7498
7499         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7500         maintainer.
7501
7502 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7503
7504         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7505         (store_register): Likewise.
7506         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7507         (get_decimal_float_return_value): Likewise.
7508         (do_ppc_sysv_return_value): Likewise.
7509         (ppc64_sysv_abi_push_integer): Likewise.
7510         (ppc64_sysv_abi_push_freg): Likewise.
7511         (ppc64_sysv_abi_return_value_base): Likewise.
7512         (ppc64_sysv_abi_return_value): Likewise.
7513         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7514         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7515         * rs6000-nat.c: Likewise.
7516         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7517         (rs6000_value_to_register): Likewise.
7518         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7519
7520 2017-05-21  Tom Tromey  <tom@tromey.com>
7521
7522         PR rust/21466:
7523         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7524         arrays as "[T]", not "[T; ]".
7525
7526 2017-05-19  Tom Tromey  <tom@tromey.com>
7527
7528         PR rust/21484:
7529         * rust-lang.c (exp_descriptor_rust): New function.
7530         (rust_language_defn): Use it.
7531         * p-lang.c (pascal_language_defn): Update.
7532         * opencl-lang.c (opencl_language_defn): Update.
7533         * objc-lang.c (objc_language_defn): Update.
7534         * m2-lang.c (m2_language_defn): Update.
7535         * language.h (struct language_defn)
7536         <la_watch_location_expression>: New member.
7537         * language.c (unknown_language_defn, auto_language_defn)
7538         (local_language_defn): Update.
7539         * go-lang.c (go_language_defn): Update.
7540         * f-lang.c (f_language_defn): Update.
7541         * d-lang.c (d_language_defn): Update.
7542         * c-lang.h (c_watch_location_expression): Declare.
7543         * c-lang.c (c_watch_location_expression): New function.
7544         (c_language_defn, cplus_language_defn, asm_language_defn)
7545         (minimal_language_defn): Use it.
7546         * breakpoint.c (watch_command_1): Call
7547         la_watch_location_expression.
7548         * ada-lang.c (ada_language_defn): Update.
7549
7550 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7551
7552         PR tui/21482
7553         * gdb_curses.h (NOMACROS): Define.
7554         (NCURSES_NOMACROS): Define.
7555
7556 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7557
7558         PR tui/21482
7559         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7560         arg to char *.
7561         * tui/tui-wingeneral.c (box_win): Likewise.
7562         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7563         (tui_show_source_line): Likewise.
7564         (tui_show_exec_info_content): Likewise.
7565
7566 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7567
7568         * sparc-tdep.c (sparc_structure_return_p)
7569         (sparc_arg_on_registers_p): New functions.
7570         (sparc32_store_arguments): Use them.
7571         * sparc64-tdep.c (sparc64_16_byte_align_p)
7572         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7573         Handle TYPE_CODE_ARRAY.
7574
7575 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7576
7577         * cli/cli-decode.c (add_alias_cmd): New function.
7578         * command.h (add_alias_cmd): Declare.
7579         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7580         instead call add_alias_cmd.
7581
7582 2017-05-17  Pedro Alves  <palves@redhat.com>
7583
7584         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7585         (nat_makefile_frag): ... this.  All references updated.
7586         * configure.ac: Likewise.
7587         * configure.nat: Likewise.  Enhance comments.
7588         * configure: Regenerate.
7589
7590 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7591
7592         * procfs.c (procfs_create_inferior): Change prototype to match
7593         definition.
7594
7595 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7596
7597         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7598         C++ compiler warning.
7599
7600 2017-05-12  Tom Tromey  <tom@tromey.com>
7601
7602         PR rust/21483:
7603         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7604         recurse, just call value_struct_elt directly.
7605
7606 2017-05-12  Tom Tromey  <tom@tromey.com>
7607
7608         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7609         OP_RUST_ARRAY>: Fix.
7610
7611 2017-05-12  Tom Tromey  <tom@tromey.com>
7612
7613         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7614
7615 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7616
7617         * regcache.c: Include <forward_list>.
7618         (struct regcache_list): Remove.
7619         (current_regcache): Update.
7620         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7621         (regcache_thread_ptid_changed): Likewise.
7622         (registers_changed_ptid): Likewise.
7623         (current_regcache_size): Likewise.
7624
7625 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7626
7627         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7628         (current_regcache_size): New function.
7629         (current_regcache_test): New function.
7630         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7631
7632 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7633
7634         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7635         (print_gp_register_row): Use get_frame_register_value.
7636
7637 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7638
7639         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7640         (mips_supply_fpregset): Likewise.
7641         (mips64_supply_gregset): Likewise.
7642
7643 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7644
7645         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7646         regcache->raw_supply_zeroed.
7647
7648 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7649
7650         * configure.nat: Rearrange 'case' statements to match
7651         host before cpu.
7652
7653 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7654
7655         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7656         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7657         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7658         "@nat_extra_makefile_frag@".
7659         (Makefile): Remove dependency on "@frags@".
7660         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7661         (data-directory/Makefile): Likewise.
7662         * config/aarch64/linux.mh: Deleted; moved contents to
7663         "gdb/configure.nat".
7664         * config/alpha/alpha-linux.mh: Likewise.
7665         * config/alpha/nbsd.mh: Likewise.
7666         * config/arm/linux.mh: Likewise.
7667         * config/arm/nbsdelf.mh: Likewise.
7668         * config/i386/cygwin.mh: Likewise.
7669         * config/i386/cygwin64.mh: Likewise.
7670         * config/i386/darwin.mh: Likewise.
7671         * config/i386/fbsd.mh: Likewise.
7672         * config/i386/fbsd64.mh: Likewise.
7673         * config/i386/go32.mh: Likewise.
7674         * config/i386/i386gnu.mh: Likewise.
7675         * config/i386/i386sol2.mh: Likewise.
7676         * config/i386/linux.mh: Likewise.
7677         * config/i386/linux64.mh: Likewise.
7678         * config/i386/mingw.mh: Likewise.
7679         * config/i386/mingw64.mh: Likewise.
7680         * config/i386/nbsd64.mh: Likewise.
7681         * config/i386/nbsdelf.mh: Likewise.
7682         * config/i386/nto.mh: Likewise.
7683         * config/i386/obsd.mh: Likewise.
7684         * config/i386/obsd64.mh: Likewise.
7685         * config/i386/sol2-64.mh: Likewise.
7686         * config/ia64/linux.mh: Likewise.
7687         * config/m32r/linux.mh: Likewise.
7688         * config/m68k/linux.mh: Likewise.
7689         * config/m68k/nbsdelf.mh: Likewise.
7690         * config/m68k/obsd.mh: Likewise.
7691         * config/m88k/obsd.mh: Likewise.
7692         * config/mips/fbsd.mh: Likewise.
7693         * config/mips/linux.mh: Likewise.
7694         * config/mips/nbsd.mh: Likewise.
7695         * config/mips/obsd64.mh: Likewise.
7696         * config/pa/linux.mh: Likewise.
7697         * config/pa/nbsd.mh: Likewise.
7698         * config/pa/obsd.mh: Likewise.
7699         * config/powerpc/aix.mh: Likewise.
7700         * config/powerpc/fbsd.mh: Likewise.
7701         * config/powerpc/linux.mh: Likewise.
7702         * config/powerpc/nbsd.mh: Likewise.
7703         * config/powerpc/obsd.mh: Likewise.
7704         * config/powerpc/ppc64-linux.mh: Likewise.
7705         * config/powerpc/spu-linux.mh: Likewise.
7706         * config/s390/linux.mh: Likewise.
7707         * config/sh/nbsd.mh: Likewise.
7708         * config/sparc/fbsd.mh: Likewise.
7709         * config/sparc/linux.mh: Likewise.
7710         * config/sparc/linux64.mh: Likewise.
7711         * config/sparc/nbsd64.mh: Likewise.
7712         * config/sparc/nbsdelf.mh: Likewise.
7713         * config/sparc/obsd64.mh: Likewise.
7714         * config/sparc/sol2.mh: Likewise.
7715         * config/tilegx/linux.mh: Likewise.
7716         * config/vax/nbsdelf.mh: Likewise.
7717         * config/vax/obsd.mh: Likewise.
7718         * config/xtensa/linux.mh: Likewise.
7719         * config/i386/i386gnu.mn: New file, with excerpts from
7720         "config/i386/i386gnu.mh".
7721         * configure: Regenerate.
7722         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7723         *.mh files under "gdb/config".
7724         * configure.nat: New file, with contents from the
7725         "gdb/config/*/*.mh" files.
7726
7727 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7728
7729         * btrace.c (btrace_clear): Free insn vector.
7730
7731 2017-05-05  Pedro Alves  <palves@redhat.com>
7732
7733         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7734         * configure: Regenerate.
7735
7736 2017-05-04  Pedro Alves  <palves@redhat.com>
7737
7738         * Makefile.in (SFILES): Add progspace-and-thread.c.
7739         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7740         (COMMON_OBS): Add progspace-and-thread.o.
7741         * breakpoint.c: Include "progspace-and-thread.h".
7742         (update_inserted_breakpoint_locations)
7743         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7744         Use scoped_restore_current_pspace_and_thread.
7745         (create_std_terminate_master_breakpoint): Use
7746         scoped_restore_current_program_space.
7747         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7748         (print_breakpoint_location): Use
7749         scoped_restore_current_program_space.
7750         (bp_loc_is_permanent): Use
7751         scoped_restore_current_pspace_and_thread.
7752         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7753         (download_tracepoint_locations): Use
7754         scoped_restore_current_pspace_and_thread.
7755         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7756         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7757         (enum step_over_calls_kind): Moved from inferior.h.
7758         (class scoped_restore_current_thread): New class.
7759         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7760         declaration.
7761         (scoped_restore_current_thread): New class.
7762         * infcmd.c: Include "common/gdb_optional.h".
7763         (continue_1, proceed_after_attach): Use
7764         scoped_restore_current_thread.
7765         (notice_new_inferior): Use scoped_restore_current_thread.
7766         * inferior.c: Include "progspace-and-thread.h".
7767         (restore_inferior, save_current_inferior): Delete.
7768         (add_inferior_command, clone_inferior_command): Use
7769         scoped_restore_current_pspace_and_thread.
7770         * inferior.h (scoped_restore_current_inferior): New class.
7771         * infrun.c: Include "progspace-and-thread.h" and
7772         "common/gdb_optional.h".
7773         (follow_fork_inferior): Use
7774         scoped_restore_current_pspace_and_thread.
7775         (scoped_restore_exited_inferior): New class.
7776         (handle_vfork_child_exec_or_exit): Use
7777         scoped_restore_exited_inferior,
7778         scoped_restore_current_pspace_and_thread,
7779         scoped_restore_current_thread and scoped_restore.
7780         (fetch_inferior_event): Use scoped_restore_current_thread.
7781         * linespec.c (decode_line_full, decode_line_1): Use
7782         scoped_restore_current_program_space.
7783         * mi/mi-main.c: Include "progspace-and-thread.h".
7784         (exec_continue): Use scoped_restore_current_thread.
7785         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7786         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7787         * proc-service.c (ps_pglobal_lookup): Use
7788         scoped_restore_current_program_space.
7789         * progspace-and-thread.c: New file.
7790         * progspace-and-thread.h: New file.
7791         * progspace.c (release_program_space, clone_program_space): Use
7792         scoped_restore_current_program_space.
7793         (restore_program_space, save_current_program_space)
7794         (save_current_space_and_thread): Delete.
7795         (switch_to_program_space_and_thread): Moved to
7796         progspace-and-thread.c.
7797         * progspace.h (save_current_program_space)
7798         (save_current_space_and_thread): Delete declarations.
7799         (scoped_restore_current_program_space): New class.
7800         * remote.c (remote_btrace_maybe_reopen): Use
7801         scoped_restore_current_thread.
7802         * symtab.c: Include "progspace-and-thread.h".
7803         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7804         * thread.c (print_thread_info_1): Use
7805         scoped_restore_current_thread.
7806         (struct current_thread_cleanup): Delete.
7807         (do_restore_current_thread_cleanup)
7808         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7809         (scoped_restore_current_thread::~scoped_restore_current_thread):
7810         ... this new dtor.
7811         (make_cleanup_restore_current_thread): Rename/convert to ...
7812         (scoped_restore_current_thread::scoped_restore_current_thread):
7813         ... this new ctor.
7814         (thread_apply_all_command): Use scoped_restore_current_thread.
7815         (thread_apply_command): Use scoped_restore_current_thread.
7816         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7817         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7818
7819 2017-05-04  Pedro Alves  <palves@redhat.com>
7820
7821         * thread.c (make_cleanup_restore_current_thread): Move
7822         find_thread_ptid call before the is_stopped call.  Assert that the
7823         thread is found.  Replace is_stopped call by checking the thread's
7824         state directly.  Remove unnecessary NULL-thread check.
7825
7826 2017-05-04  Pedro Alves  <palves@redhat.com>
7827
7828         * corelow.c (thread_section_name): New class.
7829         (get_core_register_section, get_core_siginfo): Use it.
7830
7831 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7832
7833         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7834         (get_core_register_section): Remove xfree of NULL pointer.
7835
7836 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7837
7838         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7839         * regcache.c (regcache::raw_supply_zeroed): New function.
7840         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7841
7842 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7843
7844         * gdbarch.sh: Remove commented out definition of
7845         TARGET_CHAR_BIT.
7846         * gdbarch.h: Re-generate.
7847
7848 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7849
7850         * configure: Regenerate.
7851
7852 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7853
7854         * solib-target.c (solib_target_relocate_section_addresses):
7855         Remove num_section_bases, num_bases, segment_bases variables.
7856
7857 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7858
7859         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7860
7861 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7862
7863         * solib-target.c: Include <vector>
7864         (struct lm_info_target) <~lm_info_target>: Remove.
7865         <segment_bases, section_bases>: Change type to
7866         std::vector<CORE_ADDR>.
7867         (library_list_start_segment, library_list_start_section,
7868         library_list_end_library,
7869         solib_target_relocate_section_addresses): Adjust.
7870
7871 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7872
7873         * gdbarch.sh (software_single_step): Change return type to
7874         std::vector<CORE_ADDR>.
7875         * gdbarch.c, gdbarch.h: Re-generate.
7876         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7877         Adjust.
7878         (arm_deal_with_atomic_sequence_raw): Adjust.
7879         (thumb_get_next_pcs_raw): Adjust.
7880         (arm_get_next_pcs_raw): Adjust.
7881         (arm_get_next_pcs): Adjust.
7882         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7883         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7884         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7885         (alpha_software_single_step): Adjust.
7886         * alpha-tdep.h (alpha_software_single_step): Adjust.
7887         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7888         * arm-tdep.c (arm_software_single_step): Adjust.
7889         (arm_breakpoint_kind_from_current_state): Adjust.
7890         * arm-tdep.h (arm_software_single_step): Adjust.
7891         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7892         * cris-tdep.c (cris_software_single_step): Adjust.
7893         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7894         (micromips_deal_with_atomic_sequence): Adjust.
7895         (deal_with_atomic_sequence): Adjust.
7896         (mips_software_single_step): Adjust.
7897         * mips-tdep.h (mips_software_single_step): Adjust.
7898         * moxie-tdep.c (moxie_software_single_step): Adjust.
7899         * nios2-tdep.c (nios2_software_single_step): Adjust.
7900         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7901         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7902         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7903         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7904         * sparc-tdep.c (sparc_software_single_step): Adjust.
7905         * spu-tdep.c (spu_software_single_step): Adjust.
7906         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7907
7908 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7909
7910         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7911         * gdbarch.h: Re-generate.
7912
7913 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7914
7915         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7916         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7917         * python/py-instruction.c, python/py-instruction.h: New file.
7918         * python/py-record.c: Add py-instruction.h include.
7919         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7920         gdb.RecordInstruction.
7921         * python/python-internal.h: Add gdbpy_initialize_instruction
7922         declaration.
7923         * python/python.c (do_start_initialization): Add
7924         gdbpy_initialize_instruction.
7925
7926 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7927
7928         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7929         Remove.
7930         (btrace_func_from_recpy_func): New function.
7931         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7932         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7933         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7934         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7935         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7936         Also, use new helper functions.
7937         (btpy_list_item): Use new helper functions.
7938         (recpy_bt_function_call_history): Use new type name.
7939         (btpy_call_getset): Remove.
7940         (gdbpy_initialize_btrace): Remove code to initialize
7941         gdb.BtraceFunctionCall.
7942         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7943         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7944         recpy_bt_func_prev, recpy_bt_func_next): New export.
7945         * python/py-record.c (recpy_func_type): New static object.
7946         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7947         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7948         recpy_func_next): New function.
7949         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7950         (recpy_func_getset): New static object.
7951         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7952         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7953
7954 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7955
7956         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7957         (btpy_object, btpy_insn_type, btpy_new): Remove.
7958         (btpy_list_object): Use gdb.RecordInstruction type instead of
7959         gdb.BtraceInstruction type.
7960         (btrace_insn_from_recpy_insn): New function.
7961         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7962         btpy_new.
7963         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7964         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7965         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7966         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7967         instead of btpy_object.
7968         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7969         btpy_insn_data, btpy_insn_decode): Rename to ...
7970         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7971         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7972         recpy_bt_insn_decode): This.  Also, use new helper functions.
7973         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7974         recpy_insn_type.
7975         (btpy_insn_getset): Remove.
7976         (gdbpy_initialize_btrace): Remove code to initialize
7977         gdb.BtraceInstruction.  Use recpy_element_object.
7978         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7979         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7980         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7981         * python/py-record.c (recpy_insn_type): New static object.
7982         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7983         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7984         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7985         New function.
7986         (recpy_insn_getset): New static object.
7987         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7988         * python/py-record.h (recpy_element_object): New typedef.
7989         (recpy_insn_type, recpy_insn_new): New export.
7990
7991 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7992
7993         * py-record-btrace.c (btpy_insn_new): Removed.
7994         (btpy_insn_or_gap_new): New function.
7995         (btpy_insn_error): Removed.
7996         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7997         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7998         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7999         btpy_insn_or_gap_new instead of btpy_insn_new.
8000         (btpy_insn_getset): Remove btpy_insn_error.
8001         * py-record.c (recpy_gap_type): New static object.
8002         (recpy_gap_object): New typedef.
8003         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8004         recpy_gap_reason_string): New function.
8005         (recpy_gap_getset): New static object.
8006         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8007         * py-record.h (recpy_gap_new): New export.
8008
8009 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8010
8011         * python/py-record.c (recpy_ptid): Remove.
8012         (recpy_record_getset): Remove recpy_ptid.
8013
8014 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8015
8016         * btrace.c (btrace_fetch): Set inferior_ptid.
8017         * python/py-record-btrace.c: Add "py-record.h" include.
8018         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8019         recpy_bt_end, recpy_bt_instruction_history,
8020         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8021         in gdb.Record object instead of current ptid.
8022         * python/py-record.c: Include new "py-record.h" file.
8023         (recpy_record_object): Moved to py-record.h.
8024         * python/py-record.h: New file.
8025
8026 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8027
8028         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8029         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8030         indentation.
8031
8032 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8033
8034         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8035         the past maintainers section.
8036
8037 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8038
8039         * infcmd.c (get_return_value): Use regcache ctor, and remove
8040         cleanup.
8041
8042 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8043             Pedro Alves  <palves@redhat.com>
8044
8045         * regcache.c (regcache::regcache): New tag dispatch ctor.
8046         (do_cooked_read): Moved above.
8047         (regcache_dup): Use the tag dispatch ctor..
8048         * regcache.h (regcache): Declare ctor, delete copy ctor and
8049         assignment operator, remove friend regcache_dup.
8050
8051 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8052
8053         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8054         call method save instead of regcache_cpy.
8055         * regcache.h (struct regcache): Make regcache_dup a friend.
8056
8057 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8058
8059         * regcache.c (struct regcache): Move to regcache.h
8060         (regcache::arch): New method.
8061         (regcache_get_ptid): Update.
8062         (get_regcache_arch): Call arch method.
8063         (get_regcache_aspace): Call method aspace.
8064         (register_buffer): Change it to method.
8065         (regcache_save): Change it to regcache::save.
8066         (regcache_restore): Likewise.
8067         (regcache_cpy_no_passthrough): Remove the declaration.
8068         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8069         (regcache_cpy_no_passthrough): Change it to method
8070         cpy_no_passthrough.
8071         (regcache_register_status): Change it to method
8072         get_register_status.
8073         (regcache_invalidate): Change it to method invalidate.
8074         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8075         (regcache_raw_update): Change it to method raw_update.
8076         (regcache_raw_read): Likewise.
8077         (regcache_raw_read_signed): Likewise.
8078         (regcache_raw_read_unsigned): Likewise.
8079         (regcache_raw_write_signed): Likewise.
8080         (regcache_raw_write_unsigned): Likewise.
8081         (regcache_cooked_read): Likewise.
8082         (regcache_cooked_read_value): Likewise.
8083         (regcache_cooked_read_signed): Likewise.
8084         (regcache_cooked_read_unsigned): Likewise.
8085         (regcache_cooked_write_signed): Likewise.
8086         (regcache_cooked_write_unsigned): Likewise.
8087         (regcache_raw_set_cached_value): Likewise.
8088         (regcache_raw_write): Likewise.
8089         (regcache_cooked_write): Likewise.
8090         (regcache_xfer_part): Likewise.
8091         (regcache_raw_read_part): Likewise.
8092         (regcache_raw_write_part): Likewise.
8093         (regcache_cooked_read_part): Likewise.
8094         (regcache_cooked_write_part): Likewise.
8095         (regcache_raw_supply): Likewise.
8096         (regcache_raw_collect): Likewise.
8097         (regcache_transfer_regset): Likewise.
8098         (regcache_supply_regset): Likewise.
8099         (regcache_collect_regset): Likewise.
8100         (regcache_debug_print_register): Likewise.
8101         (enum regcache_dump_what): Move it to regcache.h.
8102         (regcache_dump): Change it to method dump.
8103         * regcache.h (enum regcache_dump_what): New.
8104         (class regcache): New.
8105         * target.c (target_fetch_registers): Call method
8106         debug_print_register.
8107         (target_store_registers): Likewise.
8108
8109 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8110
8111         * windows-nat.c (struct lm_info_windows): Initialize field.
8112         (windows_make_so): Allocate lm_info_windows with new.
8113         (windows_free_so): Free lm_info_windows with delete.
8114
8115 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8116
8117         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8118         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8119         cleanup.
8120         (darwin_free_so): Free lm_info_darwin with delete.
8121
8122 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8123
8124         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8125         <l_addr_p>: Change type to bool.
8126         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8127         (svr4_free_so): Free lm_info_svr4 with delete.
8128         (svr4_copy_library_list): Replace memcpy with call to copy
8129         constructor.
8130         (library_list_start_library, svr4_default_sos): Allocate
8131         lm_info_svr4 with new.
8132
8133 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8134
8135         * solib-target.c (struct lm_info_target): Add destructor,
8136         initialize fields.
8137         <name>: Change type to std::string.
8138         (library_list_start_library): Allocate lm_info_target with new.
8139         (solib_target_free_library_list): Free lm_info_target with
8140         delete.
8141         (solib_target_current_sos): Adapt to std::string.
8142         (solib_target_free_so): Free lm_info_target with delete.
8143
8144 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8145
8146         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8147         fields.
8148         (frv_current_sos): Allocate lm_info_frv with new.
8149         (frv_relocate_main_executable): Free lm_info_frv with delete,
8150         allocate with new.
8151         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8152
8153 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8154
8155         * solib-frv.c (struct lm_info_frv): Fix indentation.
8156
8157 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8158
8159         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8160         map field.
8161         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8162         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8163         and allocate with new.
8164         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8165
8166 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8167
8168         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8169         <filename, member_name>: Change type to std::string.
8170         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8171         (library_list_start_library): Allocate lm_info_aix with new.
8172         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8173         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8174         with copy constructor.
8175
8176 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8177
8178         * solist.h (struct lm_info): Remove.
8179         (struct lm_info_base): New class.
8180         (struct so_list) <lm_info>: Change type to lm_info_base *.
8181         * nto-tdep.c (struct lm_info): Remove.
8182         (lm_addr): Adjust.
8183         * solib-aix.c (struct lm_info): Rename to ...
8184         (struct lm_info_aix): ... this.  Extend lm_info_base.
8185         (lm_info_p): Rename to ...
8186         (lm_info_aix_p): ... this, and adjust.
8187         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8188         solib_aix_parse_libraries, library_list_start_library,
8189         solib_aix_free_library_list, solib_aix_parse_libraries,
8190         solib_aix_get_library_list,
8191         solib_aix_relocate_section_addresses, solib_aix_free_so,
8192         solib_aix_get_section_offsets,
8193         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8194         Adjust.
8195         (struct solib_aix_inferior_data) <library_list>: Adjust.
8196         * solib-darwin.c (struct lm_info): Rename to ...
8197         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8198         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8199         * solib-dsbt.c (struct lm_info): Rename to ...
8200         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8201         (struct dsbt_info) <main_executable_lm_info): Adjust.
8202         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8203         dsbt_relocate_section_addresses): Adjust.
8204         * solib-frv.c (struct lm_info): Rename to ...
8205         (struct lm_info_frv): ... this.  Extend lm_info_base.
8206         (main_executable_lm_info): Adjust.
8207         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8208         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8209         find_canonical_descriptor_in_load_object,
8210         frv_fdpic_find_canonical_descriptor): Adjust.
8211         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8212         to lm_info_svr4.
8213         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8214         svr4_clear_so, svr4_copy_library_list,
8215         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8216         svr4_current_sos, svr4_fetch_objfile_link_map,
8217         solist_update_incremental): Adjust.
8218         * solib-svr4.h (struct lm_info_svr4): Move here from
8219         solib-svr4.c.
8220         * solib-target.c (struct lm_info): Rename to ...
8221         (struct lm_info_target): ... this.  Extend lm_info_base.
8222         (lm_info_p): Rename to ...
8223         (lm_info_target_p): ... this.
8224         (solib_target_parse_libraries, library_list_start_segment,
8225         library_list_start_section, library_list_start_library,
8226         library_list_end_library, solib_target_free_library_list,
8227         solib_target_current_sos, solib_target_free_so,
8228         solib_target_relocate_section_addresses): Adjust.
8229         * windows-nat.c (struct lm_info): Rename to ...
8230         (struct lm_info_windows): ... this.  Extend lm_info_base.
8231         (windows_make_so, handle_load_dll, handle_unload_dll,
8232         windows_xfer_shared_libraries): Adjust.
8233
8234 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8235
8236         * solib-darwin.c (struct darwin_so_list): Remove.
8237         (darwin_current_sos): Allocate an so_list object instead of a
8238         darwin_so_list, separately allocate an lm_info object.
8239         (darwin_free_so): Free lm_info.
8240
8241 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8242
8243         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8244         with fprintf_filtered.
8245
8246 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8247
8248         * regcache.c (regcache::regcache): New function.
8249         (regcache::~regcache): New function.
8250         (regcache_xmalloc_1): Remove.
8251         (regcache_xmalloc): Call new regcache.
8252         (regcache_xfree): Call delete regcache.
8253         (get_thread_arch_aspace_regcache): Call new regcache.
8254
8255 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8256
8257         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8258         lwp instead of ptid_get_lwp.
8259
8260 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8261
8262         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8263         lwp_info instead of getting from inferior_ptid.
8264
8265 2017-04-27  Keith Seitz  <keiths@redhat.com>
8266
8267         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8268         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8269         (CV_CONVERSION_BADNESS): Define.
8270         (rank_one_type): Remove overly restrictive rvalue reference
8271         rank checks.
8272         Add cv-qualifier checks and subranks for type equality.
8273         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8274         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8275         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8276
8277 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8278
8279         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8280         count when creating the object.
8281
8282 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8283             Ulrich Weigand  <uweigand@de.ibm.com>
8284
8285         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8286         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8287         is used in AIX.
8288         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8289         (process_xcoff_symbol): Likewise.
8290         (scan_xcoff_symtab): Likewise.
8291
8292 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8293
8294         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8295         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8296         (ia64_access_reg): Use get_frame_register_unsigned.
8297         (ia64_access_rse_reg): Likewise.
8298         (ia64_libunwind_frame_prev_register): Likewise.
8299
8300 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8301
8302         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8303         * gdbarch.c: Regenerated.
8304         * gdbarch.h: Regenerated.
8305         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8306         visibility external.
8307         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8308         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8309         (enum cfa_how_kind): Move to ...
8310         (struct dwarf2_frame_state_reg_info): Likewise.
8311         (struct dwarf2_frame_state): Likewise.
8312         * dwarf2-frame.h: ... here.
8313         (dwarf2_frame_state_alloc_regs): New declaration.
8314         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8315         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8316
8317 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8318
8319         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8320         regcache_raw_read_unsigned.
8321         (xtensa_pseudo_register_write): Likewise.
8322
8323 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8324
8325         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8326         (nds32_pseudo_register_write): Likewise.
8327
8328 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8329
8330         * regcache.c (struct regcache) <readonly_p>: Change its type
8331         to bool.
8332         (regcache_xmalloc_1): Update parameter type and callers update.
8333
8334 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8335
8336         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8337         set_gdbarch_wchar_bit.
8338         * arm-tdep.c (arm_gdbarch_init): Likewise.
8339
8340 2017-04-25  Pedro Alves  <palves@redhat.com>
8341
8342         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8343         (BothAreRelocatable, memcopy, memmove): Don't define.
8344         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8345         macros.
8346
8347 2017-04-25  Pedro Alves  <palves@redhat.com>
8348
8349         * common/common-defs.h: Include "common/poison.h".
8350         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8351         and adjust.
8352         * common/poison.h: New file.
8353         * common/traits.h: Include <type_traits>.
8354         (Not, Or, Requires): New, moved from common/function-view.h.
8355
8356 2017-04-25  Pedro Alves  <palves@redhat.com>
8357
8358         * breakpoint.h (struct breakpoint): In-class initialize all
8359         fields.  Make boolean fields "bool".
8360         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8361         memset call and initializations no longer necessary.
8362
8363 2017-04-25  Pedro Alves  <palves@redhat.com>
8364
8365         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8366         reference.
8367         (pt_btrace_insn): New function.
8368         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8369
8370 2017-04-25  Pedro Alves  <palves@redhat.com>
8371
8372         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8373         "base" field and inherit from "bp_location" instead.  Add
8374         non-default ctor.
8375         (allocate_location_exception): Use new non-default ctor.
8376         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8377         (init_bp_location): Convert to ...
8378         (bp_location::bp_location): ... this new ctor, and remove memset
8379         call.
8380         (base_breakpoint_allocate_location): Use the new non-default ctor.
8381         * breakpoint.h (bp_location): Now a class.  Declare default and
8382         non-default ctors.  In-class initialize all members.
8383         (init_bp_location): Remove declaration.
8384
8385 2017-04-25  Pedro Alves  <palves@redhat.com>
8386
8387         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8388         assignment operator.
8389
8390 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8391
8392         * doublest.c (convert_doublest_to_floatformat): Call
8393         floatformat_totalsize_bytes.
8394
8395 2017-04-22  Tom Tromey  <tom@tromey.com>
8396
8397         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8398         ui_out_emit_list.
8399         * stack.c (print_frame): Use ui_out_emit_list.
8400         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8401         ui_out_emit_list.
8402         * mi/mi-main.c (print_one_inferior)
8403         (mi_cmd_data_list_register_names)
8404         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8405         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8406         ui_out_emit_list.
8407         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8408         (mi_output_solib_attribs): Use ui_out_emit_list,
8409         ui_out_emit_tuple.
8410         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8411         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8412         (mi_cmd_stack_list_args, list_args_or_locals): Use
8413         ui_out_emit_list.
8414         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8415         * breakpoint.c (print_solib_event, output_thread_groups): Use
8416         ui_out_emit_list.
8417
8418 2017-04-22  Tom Tromey  <tom@tromey.com>
8419
8420         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8421         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8422         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8423
8424 2017-04-22  Tom Tromey  <tom@tromey.com>
8425
8426         * tracepoint.c (tvariables_info_1)
8427         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8428
8429 2017-04-22  Tom Tromey  <tom@tromey.com>
8430
8431         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8432         annotate_arg_emitter.
8433         * breakpoint.c (print_mention_watchpoint)
8434         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8435         * annotate.h (struct annotate_arg_emitter): New.
8436
8437 2017-04-22  Tom Tromey  <tom@tromey.com>
8438
8439         * record-btrace.c (record_btrace_insn_history)
8440         (record_btrace_insn_history_range, record_btrace_call_history)
8441         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8442         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8443         ui_out_emit_tuple.
8444         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8445         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8446         * skip.c (skip_info): Use ui_out_emit_tuple.
8447         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8448         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8449         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8450         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8451         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8452         ui_out_emit_tuple.
8453         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8454         (output_register, mi_cmd_data_read_memory)
8455         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8456         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8457         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8458         Use ui_out_emit_tuple.
8459         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8460         ui_out_emit_tuple.
8461         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8462         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8463         * linux-thread-db.c (info_auto_load_libthread_db): Use
8464         ui_out_emit_tuple.
8465         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8466         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8467         * disasm.c (do_mixed_source_and_assembly_deprecated)
8468         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8469         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8470         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8471         * breakpoint.c (print_one_breakpoint_location)
8472         (print_one_breakpoint): Use ui_out_emit_tuple.
8473         * auto-load.c (print_script, info_auto_load_cmd): Use
8474         ui_out_emit_tuple.
8475         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8476
8477 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8478
8479         * thread.c (print_thread_info_1): Remove dead code.
8480
8481 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8482
8483         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8484         GDB_SELF_TEST.
8485         * arm-tdep.c (selftests::arm_record_test): Likewise.
8486
8487 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8488
8489         * regcache.c (regcache_restore): Remove argument 2.  Replace
8490         argument 3 with regcache.  Get register status from
8491         src->register_status and get register contents from
8492         register_buffer (src, regnum).
8493         (regcache_cpy): Update.
8494
8495 2017-04-19  Pedro Alves  <palves@redhat.com>
8496
8497         * gdbthread.h (thread): Add missing closing parenthesis in
8498         comment.
8499
8500 2017-04-19  Pedro Alves  <palves@redhat.com>
8501
8502         * common/refcounted-object.h: New file.
8503         * gdbthread.h: Include "common/refcounted-object.h".
8504         (thread_info): Inherit from refcounted_object and add comments.
8505         (thread_info::incref, thread_info::decref)
8506         (thread_info::m_refcount): Delete.
8507         (thread_info::deletable): Use the refcounted_object::refcount()
8508         method.
8509         * inferior.c (current_inferior_): Add comment.
8510         (set_current_inferior): Increment/decrement refcounts.
8511         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8512         not-deletable instead of comparing with the current inferior.
8513         (initialize_inferiors): Increment the initial inferior's refcount.
8514         * inferior.h (struct inferior): Forward declare.
8515         Include "common/refcounted-object.h".
8516         (current_inferior, set_current_inferior): Move declaration to
8517         before struct inferior's definition, and fix comment.
8518         (inferior): Inherit from refcounted_object.  Add comments.
8519         * thread.c (switch_to_thread_no_regs): Reference the thread's
8520         inferior pointer directly instead of doing a ptid lookup.
8521         (switch_to_no_thread): New function.
8522         (switch_to_thread(thread_info *)): New function, factored out
8523         from ...
8524         (switch_to_thread(ptid_t)): ... this.
8525         (restore_current_thread): Delete.
8526         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8527         fields, and add 'inf' field.
8528         (do_restore_current_thread_cleanup): Check whether old->inf is
8529         alive instead of looking up an inferior by ptid.  Use
8530         switch_to_thread and switch_to_no_thread.
8531         (restore_current_thread_cleanup_dtor): Use old->inf directly
8532         instead of lookup up an inferior by id.  Decref the inferior.
8533         Don't restore 'removable'.
8534         (make_cleanup_restore_current_thread): Same the inferior pointer
8535         in old, instead of the inferior number.  Incref the inferior.
8536         Don't save/clear 'removable'.
8537
8538 2017-04-19  Pedro Alves  <palves@redhat.com>
8539
8540         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8541         unittests/scoped_restore-selftests.c.
8542         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8543         * common/scoped_restore.h (scoped_restore_base): Make "class".
8544         (scoped_restore_base::release): New public method.
8545         (scoped_restore_base::scoped_restore_base): New protected ctor.
8546         (scoped_restore_base::m_saved_var): New protected field.
8547         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8548         scoped_restore_base base class instead of m_saved_var directly.
8549         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8550         (scoped_restore_tmpl::scoped_restore_tmpl(const
8551         scoped_restore_tmpl<T>&)): Likewise.
8552         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8553         method.
8554         (scoped_restore_tmpl::saved_var): New method.
8555         (scoped_restore_tmpl::m_saved_var): Delete.
8556         * inferior.h (inferior::detaching): Now a bool.
8557         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8558         cleanup.
8559         * unittests/scoped_restore-selftests.c: New file.
8560
8561 2017-04-19  Pedro Alves  <palves@redhat.com>
8562
8563         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8564         Re-sort in alphabetic order.
8565
8566 2017-04-18  Pedro Alves  <palves@redhat.com>
8567
8568         * xml-support.c (obstack_xml_printf): Delete.
8569         * xml-support.h (obstack_xml_printf): Delete.
8570
8571 2017-04-18  Pedro Alves  <palves@redhat.com>
8572
8573         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8574         vdebug, verror, body_text, start_element, end_element, name,
8575         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8576         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8577         is_xinclude>: Make private and add m_ prefix.
8578         (gdb_xml_parser::body_text): New method, based on ...
8579         (gdb_xml_body_text): ... this.  Adjust.
8580         (gdb_xml_parser::vdebug): New method, based on ...
8581         (gdb_xml_debug): ... this.  Adjust.
8582         (gdb_xml_parser::verror): New method, based on ...
8583         (gdb_xml_error): ... this.  Adjust.
8584         (gdb_xml_parser::start_element): New method, based on ...
8585         (gdb_xml_start_element): ... this.  Adjust.
8586         (gdb_xml_start_element_wrapper): Defer to
8587         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8588         (gdb_xml_parser::end_element): New method, based on ...
8589         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8590         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8591         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8592         (gdb_xml_parser::use_dtd): New method, based on ...
8593         (gdb_xml_use_dtd): ... this.  Adjust.
8594         (gdb_xml_parser::parse): New method, based on ...
8595         (gdb_xml_parse): ... this.  Adjust.
8596         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8597         (xinclude_start_include): Adjust to call the parser's name method.
8598         (xml_xinclude_default, xml_xinclude_start_doctype)
8599         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8600         method.
8601         (xml_process_xincludes): Adjust to call parser methods.
8602         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8603         declarations.
8604
8605 2017-04-18  Pedro Alves  <palves@redhat.com>
8606
8607         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8608         gdb::optional<std::string>.
8609         * xml-support.c: Include <string>.
8610         (scope_level::scope_level(scope_level &&))
8611         (scope_level::~scope_level): Delete.
8612         (scope_level::body): Now a std::string.
8613         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8614         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8615         parameter.
8616         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8617         (xinclude_parsing_data::output): Now a std::string reference.
8618         (xinclude_start_include): Adjust.
8619         (xml_xinclude_default): Adjust.
8620         (xml_process_xincludes): Add 'output' parameter, and return bool.
8621         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8622         and return bool.
8623         * xml-tdesc.c: Include <unordered_map> and <string>.
8624         (tdesc_xml_cache): Delete.
8625         (tdesc_xml_cache_s): Delete.
8626         (xml_cache): Now an std::unordered_map.
8627         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8628         (target_fetch_description_xml): Change return type to
8629         gdb::optional<std::string>, and adjust.
8630         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8631         (target_fetch_description_xml): Change return type to
8632         gdb::optional<std::string>.
8633
8634 2017-04-18  Pedro Alves  <palves@redhat.com>
8635
8636         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8637         unittests/optional-selftests.c.
8638         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8639         * unittests/optional-selftests.c: New file.
8640         * unittests/optional/assignment/1.cc: New file.
8641         * unittests/optional/assignment/2.cc: New file.
8642         * unittests/optional/assignment/3.cc: New file.
8643         * unittests/optional/assignment/4.cc: New file.
8644         * unittests/optional/assignment/5.cc: New file.
8645         * unittests/optional/assignment/6.cc: New file.
8646         * unittests/optional/assignment/7.cc: New file.
8647         * unittests/optional/cons/copy.cc: New file.
8648         * unittests/optional/cons/default.cc: New file.
8649         * unittests/optional/cons/move.cc: New file.
8650         * unittests/optional/cons/value.cc: New file.
8651         * unittests/optional/in_place.cc: New file.
8652         * unittests/optional/observers/1.cc: New file.
8653         * unittests/optional/observers/2.cc: New file.
8654
8655 2017-04-18  Pedro Alves  <palves@redhat.com>
8656
8657         * common/gdb_optional.h: Include common/traits.h.
8658         (in_place_t): New type.
8659         (in_place): New constexpr variable.
8660         (optional::optional): Remove member initialization of
8661         m_instantiated.
8662         (optional::optional(in_place_t...)): New constructor.
8663         (optional::~optional): Use reset.
8664         (optional::optional(const optional&)): New.
8665         (optional::optional(const optional&&)): New.
8666         (optional::optional(T &)): New.
8667         (optional::optional(T &&)): New.
8668         (operator::operator=(const optional &)): New.
8669         (operator::operator=(optional &&)): New.
8670         (operator::operator= (const T &))
8671         (operator::operator= (T &&))
8672         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8673         (operator::reset): New.
8674         (operator::m_instantiated):: Add in-class initializer.
8675         * common/traits.h: Include <type_traits>.
8676         (struct And): New types.
8677
8678 2017-04-18  Pedro Alves  <palves@redhat.com>
8679
8680         * xml-support.c: Include <vector>.
8681         (scope_level::scope_level(const gdb_xml_element *))
8682         (scope_level::scope_level(scope_level&&)): New.
8683         (scope_level::~scope_level): New.
8684         (scope_level_s): Delete.
8685         (gdb_xml_parser::scopes): Now a std::vector.
8686         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8687         Use std::vector.
8688         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8689         scope cleanup code.
8690         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8691         of the scopes member.  Use std::vector::emplace_back.
8692
8693 2017-04-18  Pedro Alves  <palves@redhat.com>
8694
8695         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8696         a bool.
8697         (gdb_xml_end_element): Change type of first parameter.
8698         (gdb_xml_cleanup): Rename to ...
8699         (gdb_xml_parser::~gdb_xml_parser): ... this.
8700         (gdb_xml_create_parser_and_cleanup): Delete with ...
8701         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8702         to this new ctor.
8703         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8704         using gdb_xml_create_parser_and_cleanup.
8705         (xinclude_parsing_data): Add ctor/dtor.
8706         (xml_xinclude_cleanup): Delete.
8707         (xml_process_xincludes): Create a local xinclude_parsing_data
8708         instead of heap-allocating one.  Create a local gdb_xml_parser
8709         instead of heap-allocating one with
8710         gdb_xml_create_parser_and_cleanup.
8711
8712 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8713
8714         PR threads/20743
8715         * fbsd-nat.c (resume_one_thread_cb): Remove.
8716         (resume_all_threads_cb): Remove.
8717         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8718         iterate_over_threads.
8719
8720 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8721
8722         * NEWS: Create a new section for the next release branch.
8723         Rename the section of the current branch, now that it has
8724         been cut.
8725
8726 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8727
8728         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8729         * version.in: Bump version to 8.0.50.DATE-git.
8730
8731 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8732
8733         PR gdb/21385
8734         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8735         independently of the host, and fix build breakage on Cygwin.
8736
8737 2017-04-13  Pedro Alves  <palves@redhat.com>
8738
8739         * inferior.c (free_inferior): Convert to ...
8740         (inferior::~inferior): ... this dtor.
8741         (inferior::inferior): New ctor, factored out from ...
8742         (add_inferior_silent): ... here.  Allocate the inferior with a new
8743         expression.
8744         (delete_inferior): Call delete instead of free_inferior.
8745         * inferior.h (gdb_environ, continuation): Forward declare.
8746         (inferior): Now a class.  Add in-class initialization to all
8747         members.  Make boolean fields bool, except 'detaching'.
8748         (inferior::inferior): New explicit ctor.
8749         (inferior::~inferior): New.
8750
8751 2017-04-13  Pedro Alves  <palves@redhat.com>
8752
8753         * inferior.c (init_inferior_list): Delete.
8754         * inferior.h (init_inferior_list): Delete.
8755
8756 2017-04-13  Pedro Alves  <palves@redhat.com>
8757
8758         PR threads/13217
8759         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8760         (top level): Call it twice, with different thread sets.
8761
8762 2017-04-13  Pedro Alves  <palves@redhat.com>
8763
8764         * thread.c: Include <algorithm>.
8765         (thread_array_cleanup): Delete.
8766         (scoped_inc_dec_ref): New class.
8767         (live_threads_count): New function.
8768         (set_thread_refcount): Delete.
8769         (tp_array_compar_ascending): Now a bool.
8770         (tp_array_compar): Convert to a std::sort comparison function.
8771         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8772         and live_threads_count.
8773
8774 2017-04-13  Pedro Alves  <palves@redhat.com>
8775
8776         * infrun.c (follow_fork_inferior): Also switch the current
8777         inferior.
8778
8779 2017-04-13  Pedro Alves  <palves@redhat.com>
8780
8781         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8782         before calling create_internal_breakpoint.
8783
8784 2017-04-13  Pedro Alves  <palves@redhat.com>
8785
8786         * fork-child.c (execv_argv): New class.
8787         (breakup_args): Refactored as ...
8788         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8789         Copy arguments to storage and replace separators with NULL
8790         terminators in place.
8791         (escape_bang_in_quoted_argument): Adjust to return bool.
8792         (execv_argv::execv_argv): New ctor.
8793         (execv_argv::init_for_shell): New method, factored out from
8794         fork_inferior.  Don't strdup strings into the vector.
8795         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8796         Remove free_vector_argv call.
8797
8798 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8799
8800         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8801         tdep->rx_psw_type.
8802
8803 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8804
8805         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8806         * rx-tdep.c (rx_gdbarch_init): Likewise.
8807
8808 2017-04-13  Pedro Alves  <palves@redhat.com>
8809
8810         * breakpoint.h (struct breakpoint): Reindent.
8811
8812 2017-04-13  Pedro Alves  <palves@redhat.com>
8813
8814         * breakpoint.c (bp_location): Rename to ...
8815         (bp_locations): ... this.  All references updated.
8816         (bp_location_count): Rename to ...
8817         (bp_locations_count): ... this.  All references updated.
8818         (bp_location_placed_address_before_address_max): Rename to ...
8819         (bp_locations_placed_address_before_address_max): ... this.  All
8820         references updated.
8821         (bp_location_shadow_len_after_address_max): Rename to ...
8822         (bp_locations_shadow_len_after_address_max): ... this.  All
8823         references updated.
8824         (bp_location_compare_addrs): Rename to ...
8825         (bp_locations_compare_addrs): ... this.  All references updated.
8826         (bp_location_compare):Rename to ...
8827         (bp_locations_compare): ... this.  All references updated.
8828         (bp_location_target_extensions_update): Rename to ...
8829         (bp_locations_target_extensions_update): ... this.  All references
8830         updated.
8831
8832 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8833
8834         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8835         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8836         'sgtty.h'.
8837         * common/gdb_termios.h: New file, with parts of "terminal.h".
8838         * inflow.c: Include "gdb_termios.h".
8839         * ser-unix.c: Include "gdb_termios.h".
8840         * terminal.h: Move terminal-related defines to
8841         "common/gdb_termios.h".
8842
8843 2017-04-12  Tom Tromey  <tom@tromey.com>
8844
8845         * probe.c (parse_probes): Update.
8846         * location.h (delete_event_location): Don't declare.
8847         (event_location_deleter::operator()): Update.
8848         * location.c (event_location_deleter::operator()): Rename from
8849         delete_event_location.
8850         * linespec.h (linespec_result) <location>: Change type to
8851         event_location_up.
8852         * linespec.c (canonicalize_linespec, event_location_to_sals)
8853         (decode_objc): Update.
8854         (linespec_result): Don't call delete_event_location.
8855         * breakpoint.c (create_breakpoints_sal)
8856         (bkpt_probe_create_sals_from_location)
8857         (strace_marker_create_sals_from_location): Update.
8858
8859 2017-04-12  Tom Tromey  <tom@tromey.com>
8860
8861         * linespec.h (struct linespec_result): Add constructor and
8862         destructor.
8863         (init_linespec_result, destroy_linespec_result)
8864         (make_cleanup_destroy_linespec_result): Don't declare.
8865         * linespec.c (init_linespec_result): Remove.
8866         (linespec_result::~linespec_result): Rename from
8867         destroy_linespec_result.  Update.
8868         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8869         Remove.
8870         * breakpoint.c (create_breakpoint, break_range_command)
8871         (decode_location_default): Update.
8872         * ax-gdb.c (agent_command_1): Update.
8873
8874 2017-04-12  Tom Tromey  <tom@tromey.com>
8875
8876         * remote.c (remote_download_tracepoint): Update.
8877         * python/py-breakpoint.c (bppy_get_location): Update.
8878         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8879         (gdbscm_breakpoint_location): Update.
8880         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8881         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8882         Change type to event_location_up.
8883         * breakpoint.c (create_overlay_event_breakpoint)
8884         (create_longjmp_master_breakpoint)
8885         (create_std_terminate_master_breakpoint)
8886         (create_exception_master_breakpoint)
8887         (breakpoint_event_location_empty_p, print_breakpoint_location)
8888         (print_one_breakpoint_location, create_thread_event_breakpoint)
8889         (init_breakpoint_sal, create_breakpoint)
8890         (print_recreate_ranged_breakpoint, break_range_command)
8891         (init_ada_exception_breakpoint, say_where): Update.
8892         (base_breakpoint_dtor): Don't call delete_event_location.
8893         (bkpt_print_recreate, tracepoint_print_recreate)
8894         (dprintf_print_recreate, update_static_tracepoint)
8895         (breakpoint_re_set_default): Update.
8896
8897 2017-04-12  Tom Tromey  <tom@tromey.com>
8898
8899         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8900         type of "to_do".  Update.
8901         (compute_stack_depth): Use std::vector.
8902
8903 2017-04-12  Tom Tromey  <tom@tromey.com>
8904
8905         * printcmd.c (find_instruction_backward): Use std::vector.
8906
8907 2017-04-12  Tom Tromey  <tom@tromey.com>
8908
8909         * symfile.c (objfilep): Remove typedef.
8910         (reread_symbols): Use a std::vector.
8911
8912 2017-04-12  Tom Tromey  <tom@tromey.com>
8913
8914         * mi/mi-main.c (exec_direction_forward): Remove.
8915         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8916         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8917         scoped_restore.
8918         * guile/guile.c (guile_repl_command, guile_command)
8919         (gdbscm_execute_gdb_command): Use scoped_restore.
8920         * go-exp.y (go_parse): Use scoped_restore.
8921         * d-exp.y (d_parse): Use scoped_restore.
8922         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8923         * c-exp.y (c_parse): Use scoped_restore.
8924
8925 2017-04-12  Tom Tromey  <tom@tromey.com>
8926
8927         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8928         (mi_parse): Update return type.
8929         (mi_parse_free): Remove.
8930         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8931         (mi_parse::~mi_parse): Rename from mi_parse_free.
8932         (mi_parse_cleanup): Remove.
8933         (mi_parse): Return a unique_ptr.  Use new.
8934         * mi/mi-main.c (mi_execute_command): Update.
8935
8936 2017-04-12  Tom Tromey  <tom@tromey.com>
8937
8938         * location.c (explicit_location_lex_one): Return a
8939         unique_xmalloc_ptr.
8940         (string_to_explicit_location): Update.  Remove cleanups.
8941
8942 2017-04-12  Tom Tromey  <tom@tromey.com>
8943
8944         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8945         (compare_value_and_voffset): Change type.  Update.
8946         (compute_vtable_size): Change type of "offset_vec".
8947         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8948         (gnuv3_get_typeid): Remove extraneous declaration.
8949
8950 2017-04-12  Tom Tromey  <tom@tromey.com>
8951
8952         * charset.h (wchar_iterator): Fix comment.
8953
8954 2017-04-12  Tom Tromey  <tom@tromey.com>
8955
8956         * charset.c (iconv_wrapper): New class.
8957         (cleanup_iconv): Remove.
8958         (convert_between_encodings): Use it.
8959
8960 2017-04-12  Tom Tromey  <tom@tromey.com>
8961
8962         * symfile.h (increment_reading_symtab): Update type.
8963         * symfile.c (decrement_reading_symtab): Remove.
8964         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8965         * psymtab.c (psymtab_to_symtab): Update.
8966         * dwarf2read.c (dw2_instantiate_symtab): Update.
8967
8968 2017-04-12  Tom Tromey  <tom@tromey.com>
8969
8970         * jit.c (struct jit_reader): Declare separately.  Add constructor
8971         and destructor.  Change type of "handle".
8972         (loaded_jit_reader): Define separately.
8973         (jit_reader_load): Update.  New "new".
8974         (jit_reader_unload_command): Use "delete".
8975         * gdb-dlfcn.h (struct dlclose_deleter): New.
8976         (gdb_dlhandle_up): New typedef.
8977         (gdb_dlopen, gdb_dlsym): Update types.
8978         (gdb_dlclose): Remove.
8979         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8980         (gdb_dlsym): Change type of "handle".
8981         (make_cleanup_dlclose): Remove.
8982         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8983         * compile/compile-c-support.c (load_libcc): Update.
8984
8985 2017-04-12  Tom Tromey  <tom@tromey.com>
8986
8987         * symtab.h (find_pcs_for_symtab_line): Change return type.
8988         * symtab.c (find_pcs_for_symtab_line): Change return type.
8989         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8990         type of "vec".  Update.
8991         (ltpy_get_pcs_for_line): Update.
8992         * linespec.c (decode_digits_ordinary): Update.
8993
8994 2017-04-12  Tom Tromey  <tom@tromey.com>
8995
8996         * tracepoint.c (actions_command): Update.
8997         * python/python.c (python_command, python_interactive_command):
8998         Update.
8999         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9000         * guile/guile.c (guile_command): Update.
9001         * defs.h (read_command_lines, read_command_lines_1): Return
9002         command_line_up.
9003         (command_lines_deleter): New struct.
9004         (command_line_up): New typedef.
9005         * compile/compile.c (compile_code_command)
9006         (compile_print_command): Update.
9007         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9008         command_line_up.
9009         (make_cleanup_free_command_lines): Remove.
9010         * cli/cli-script.c (get_command_line, read_command_lines_1)
9011         (copy_command_lines): Return command_line_up.
9012         (while_command, if_command, read_command_lines, define_command)
9013         (document_command): Update.
9014         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9015         Remove.
9016         * breakpoint.h (breakpoint_set_commands): Change type of
9017         "commands".
9018         * breakpoint.c (breakpoint_set_commands): Change type of
9019         "commands".  Update.
9020         (do_map_commands_command, update_dprintf_command_list)
9021         (create_tracepoint_from_upload): Update.
9022
9023 2017-04-12  Tom Tromey  <tom@tromey.com>
9024
9025         * tracepoint.c (scope_info): Update.
9026         * spu-tdep.c (spu_catch_start): Update.
9027         * python/python.c (gdbpy_decode_line): Update.
9028         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9029         * python/py-breakpoint.c (bppy_init): Update.
9030         * probe.c (parse_probes): Update.
9031         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9032         * location.h (event_location_deleter): New struct.
9033         (event_location_up): New typedef.
9034         (new_linespec_location, new_address_location, new_probe_location)
9035         (new_explicit_location, copy_event_location)
9036         (string_to_event_location, string_to_event_location_basic)
9037         (string_to_explicit_location): Update return type.
9038         (make_cleanup_delete_event_location): Remove.
9039         * location.c (new_linespec_location, new_address_location)
9040         (new_probe_location, new_explicit_location, copy_event_location):
9041         Return event_location_up.
9042         (delete_event_location_cleanup)
9043         (make_cleanup_delete_event_location): Remove.
9044         (string_to_explicit_location, string_to_event_location_basic)
9045         (string_to_event_location): Return event_location_up.
9046         * linespec.c (canonicalize_linespec, event_location_to_sals)
9047         (decode_line_with_current_source)
9048         (decode_line_with_last_displayed, decode_objc): Update.
9049         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9050         * completer.c (location_completer): Update.
9051         * cli/cli-cmds.c (edit_command, list_command): Update.
9052         * breakpoint.c (create_overlay_event_breakpoint)
9053         (create_longjmp_master_breakpoint)
9054         (create_std_terminate_master_breakpoint)
9055         (create_exception_master_breakpoint)
9056         (create_thread_event_breakpoint): Update.
9057         (init_breakpoint_sal): Update.  Remove some dead code.
9058         (create_breakpoint_sal): Change type of "location".  Update.
9059         (create_breakpoints_sal, create_breakpoint, break_command_1)
9060         (dprintf_command, break_range_command, until_break_command)
9061         (init_ada_exception_breakpoint)
9062         (strace_marker_create_sals_from_location)
9063         (update_static_tracepoint, trace_command, ftrace_command)
9064         (strace_command, create_tracepoint_from_upload): Update.
9065         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9066         * ax-gdb.c (agent_command_1): Update.
9067
9068 2017-04-12  Pedro Alves  <palves@redhat.com>
9069
9070         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9071         * configure.tgt: Handle i[34567]86-*-go32* and
9072         i[34567]86-*-msdosdjgpp*.
9073         * i386-tdep.c (i386_svr4_reg_to_regnum):
9074         Make extern.
9075         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9076         i386-go32-tdep.c.
9077         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9078         * i386-go32-tdep.c: New file.
9079         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9080         declarations.
9081
9082 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9083
9084         * aix-thread.c (pd_status2str): Change return type to const char *.
9085
9086 2017-04-12  Pedro Alves  <palves@redhat.com>
9087
9088         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9089         calls to set_gdbarch_gnu_triplet_regexp.
9090
9091 2017-04-12  Pedro Alves  <palves@redhat.com>
9092
9093         PR gdb/21323
9094         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9095         New enum value.
9096         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9097         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9098         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9099         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9100         * gdbarch.h, gdbarch.c: Regenerate.
9101         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9102         gdbarch_wchar_bit and gdbarch_wchar_signed.
9103         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9104         * arm-tdep.c (arm_gdbarch_init): Likewise.
9105         * avr-tdep.c (avr_gdbarch_init): Likewise.
9106         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9107         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9108         * i386-tdep.c (i386_go32_init_abi): Likewise.
9109         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9110         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9111         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9112         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9113         * sh-tdep.c (sh_gdbarch_init): Likewise.
9114         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9115         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9116         * windows-tdep.c (windows_init_abi): Likewise.
9117         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9118
9119 2017-04-12  Pedro Alves  <palves@redhat.com>
9120
9121         PR c++/21323
9122         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9123         cplus_primitive_type_char32_t>: New enum values.
9124         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9125         and cplus_primitive_type_char32_t.
9126         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9127         32, use the archtecture's built-in type for char16_t and char32_t,
9128         respectively.  Otherwise, fallback to init_integer_type as before,
9129         but make the type unsigned, and issue a complaint.
9130         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9131
9132 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9133
9134         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9135         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9136
9137 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9138
9139         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9140         'const char *'.
9141
9142 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9143
9144         * common/common-utils.c (free_vector_argv): New function.
9145         * common/common-utils.h: Include <vector>.
9146         (free_vector_argv): New prototype.
9147         * darwin-nat.c (darwin_create_inferior): Rewrite function
9148         prototype in order to constify "exec_file" and accept a
9149         "std::string" for "allargs".
9150         * fork-child.c: Include <vector>.
9151         (breakup_args): Rewrite function, using C++.
9152         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9153         and accept "std::string" for "allargs".  Update the code to
9154         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9155         and "execvp".
9156         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9157         order to constify "exec_file" and accept a "std::string" for
9158         "allargs".
9159         * go32-nat.c (go32_create_inferior): Likewise.
9160         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9161         * infcmd.c (run_command_1): Constify "exec_file".  Use
9162         "std::string" for inferior arguments.
9163         * inferior.h (fork_inferior): Update prototype.
9164         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9165         prototype in order to constify "exec_file" and accept a
9166         "std::string" for "allargs".
9167         * nto-procfs.c (procfs_create_inferior): Likewise.
9168         * procfs.c (procfs_create_inferior): Likewise.
9169         * remote-sim.c (gdbsim_create_inferior): Likewise.
9170         * remote.c (extended_remote_run): Update code to accept
9171         "std::string" as argument.
9172         (extended_remote_create_inferior): Rewrite function prototype in
9173         order to constify "exec_file" and accept a "std::string" for
9174         "allargs".
9175         * rs6000-nat.c (super_create_inferior): Likewise.
9176         (rs6000_create_inferior): Likewise.
9177         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9178         * windows-nat.c (windows_create_inferior): Likewise.
9179
9180 2017-04-11  Pedro Alves  <palves@redhat.com>
9181
9182         * thread.c: Fix whitespace throughout.
9183
9184 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9185
9186         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9187
9188 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9189
9190         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9191
9192 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9193
9194         PR gdb/21364
9195         * osdata.c (info_osdata): Check if 'type' is an empty string
9196         instead of NULL.
9197
9198 2017-04-10  Pedro Alves  <palves@redhat.com>
9199
9200         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9201         (ptid_to_global_thread_id, in_thread_list)
9202         (do_captured_list_thread_ids, set_resumed, set_running)
9203         (set_executing, set_stop_requested, finish_thread_state)
9204         (validate_registers_access, can_access_registers_ptid)
9205         (print_thread_info_1, switch_to_thread)
9206         (do_restore_current_thread_cleanup)
9207         (make_cleanup_restore_current_thread, thread_command)
9208         (thread_name_command): Use operator== instead of ptid_equal.
9209
9210 2017-04-10  Pedro Alves  <palves@redhat.com>
9211
9212         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9213         (current_thread_cleanup_chain): Delete.
9214         (restore_current_thread_cleanup_dtor)
9215         (make_cleanup_restore_current_thread): Remove references to
9216         current_thread_cleanup_chain.
9217
9218 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9219
9220         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9221         REG_UNKNOWN.
9222
9223 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9224
9225         PR gdb/19942
9226         * gdbthread.h (thread_info::deletable): New method.
9227         (thread_info::incref): New method.
9228         (thread_info::decref): New method.
9229         (thread_info::refcount): Move it to private.
9230         * infrun.c (save_stop_context): Call inc_refcount.
9231         (release_stop_context_cleanup): Likewise.
9232         * thread.c (set_thread_exited): New function.
9233         (init_thread_list): Delete "tp" only it is deletable, otherwise
9234         call set_thread_exited.
9235         (delete_thread_1): Call set_thread_exited.
9236         (current_thread_cleanup) <inferior_pid>: Remove.
9237         <thread>: New field.
9238         (restore_current_thread_ptid_changed): Removed.
9239         (do_restore_current_thread_cleanup): Adjust.
9240         (restore_current_thread_cleanup_dtor): Don't call
9241         find_thread_ptid.
9242         (set_thread_refcount): Use dec_refcount.
9243         (make_cleanup_restore_current_thread): Adjust.
9244         (thread_apply_all_command): Call inc_refcount.
9245         (_initialize_thread): Don't call
9246         observer_attach_thread_ptid_changed.
9247
9248 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9249
9250         * thread.c (delete_thread_1): Hoist code on marking thread as
9251         exited.
9252
9253 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9254
9255         * windows-nat.c (windows_detach): Initialize ptid with
9256         minus_one_ptid.
9257
9258 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9259
9260         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9261
9262 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9263
9264         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9265         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9266         (bfin_pseudo_register_write): Likewise
9267
9268 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9269
9270         * common/ptid.h (struct ptid): Change to...
9271         (class ptid_t): ... this.
9272         <ptid_t>: New constructors.
9273         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9274         matches>: New methods.
9275         <make_null, make_minus_one>: New static methods.
9276         <pid>: Rename to...
9277         <m_pid>: ...this.
9278         <lwp>: Rename to...
9279         <m_lwp>: ...this.
9280         <tid>: Rename to...
9281         <m_tid>: ...this.
9282         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9283         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9284         as references, move comment to class ptid_t.
9285         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9286         ptid_t static methods.
9287         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9288         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9289         Take ptid arguments as references, implement using ptid_t methods.
9290         * unittests/ptid-selftests.c: New file.
9291         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9292         unittests/ptid-selftests.c.
9293         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9294
9295 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9296
9297         * python/python.c (python_run_simple_file): Cast mode literal to
9298         non-const char pointer as expected by PyFile_FromString.
9299
9300 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9301
9302         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9303         minus_one_ptid and null_ptid.
9304
9305 2017-04-05  Pedro Alves  <palves@redhat.com>
9306
9307         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9308         * configure: Regenerate.
9309
9310 2017-04-05  Pedro Alves  <palves@redhat.com>
9311
9312         * ada-exp.y (yyerror): Constify.
9313         * ada-lang.c (bound_name, get_selections)
9314         (ada_variant_discrim_type)
9315         (ada_variant_discrim_name, ada_value_struct_elt)
9316         (ada_lookup_struct_elt_type, is_unchecked_variant)
9317         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9318         (catch_ada_exception_command_split)
9319         (catch_ada_assert_command_split, catch_assert_command)
9320         (ada_op_name): Constify.
9321         * ada-lang.h (ada_yyerror, get_selections)
9322         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9323         * arc-tdep.c (arc_print_frame_cache): Constify.
9324         * arm-tdep.c (arm_skip_stub): Constify.
9325         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9326         (gen_aggregate_elt_ref): Constify.
9327         * bcache.c (print_bcache_statistics): Constify.
9328         * bcache.h (print_bcache_statistics): Constify.
9329         * break-catch-throw.c (catch_exception_command_1):
9330         * breakpoint.c (struct ep_type_description::description):
9331         Constify.
9332         (add_solib_catchpoint): Constify.
9333         (catch_fork_command_1): Add cast.
9334         (add_catch_command): Constify.
9335         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9336         Constify.
9337         * bsd-uthread.c (bsd_uthread_state): Constify.
9338         * buildsym.c (patch_subfile_names): Constify.
9339         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9340         Constify.
9341         * c-exp.y (yyerror): Constify.
9342         (token::oper): Constify.
9343         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9344         * c-varobj.c (cplus_describe_child): Constify.
9345         * charset.c (find_charset_names): Add cast.
9346         (find_charset_names): Constify array and add const_cast.
9347         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9348         (edit_command): Constify.
9349         * cli/cli-decode.c (lookup_cmd): Constify.
9350         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9351         Constify.
9352         (struct dump_context): Constify.
9353         (add_dump_command, restore_command): Constify.
9354         * cli/cli-script.c (get_command_line): Constify.
9355         * cli/cli-script.h (get_command_line): Constify.
9356         * cli/cli-utils.c (check_for_argument): Constify.
9357         * cli/cli-utils.h (check_for_argument): Constify.
9358         * coff-pe-read.c (struct read_pe_section_data): Constify.
9359         * command.h (lookup_cmd): Constify.
9360         * common/print-utils.c (decimal2str): Constify.
9361         * completer.c (gdb_print_filename): Constify.
9362         * corefile.c (set_gnutarget): Constify.
9363         * cp-name-parser.y (yyerror): Constify.
9364         * cp-valprint.c (cp_print_class_member): Constify.
9365         * cris-tdep.c (cris_register_name, crisv32_register_name):
9366         Constify.
9367         * d-exp.y (yyerror): Constify.
9368         (struct token::oper): Constify.
9369         * d-lang.h (d_yyerror): Constify.
9370         * dbxread.c (struct header_file_location::name): Constify.
9371         (add_old_header_file, add_new_header_file, last_function_name)
9372         (dbx_next_symbol_text, add_bincl_to_list)
9373         (find_corresponding_bincl_psymtab, set_namestring)
9374         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9375         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9376         * defs.h (command_line_input, print_address_symbolic)
9377         (deprecated_readline_begin_hook): Constify.
9378         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9379         Constify.
9380         * event-top.c (handle_line_of_input): Constify and add cast.
9381         * exceptions.c (catch_errors): Constify.
9382         * exceptions.h (catch_errors): Constify.
9383         * expprint.c (print_subexp_standard, op_string, op_name)
9384         (op_name_standard, dump_raw_expression, dump_raw_expression):
9385         * expression.h (op_name, op_string, dump_raw_expression):
9386         Constify.
9387         * f-exp.y (yyerror): Constify.
9388         (struct token::oper): Constify.
9389         (struct f77_boolean_val::name): Constify.
9390         * f-lang.c (f_word_break_characters): Constify.
9391         * f-lang.h (f_yyerror): Constify.
9392         * fork-child.c (fork_inferior): Add cast.
9393         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9394         (new_variant): Constify.
9395         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9396         * gdbarch.c: Regenerate.
9397         * gdbcore.h (set_gnutarget): Constify.
9398         * go-exp.y (yyerror): Constify.
9399         (token::oper): Constify.
9400         * go-lang.h (go_yyerror): Constify.
9401         * go32-nat.c (go32_sysinfo): Constify.
9402         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9403         * guile/scm-cmd.c (cmdscm_function): Constify.
9404         * guile/scm-param.c (pascm_param_value): Constify.
9405         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9406         (h8300sx_register_name): Constify.
9407         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9408         Constify.
9409         * ia64-tdep.c (ia64_register_names): Constify.
9410         * infcmd.c (construct_inferior_arguments): Constify.
9411         (path_command, attach_post_wait): Constify.
9412         * language.c (show_range_command, show_case_command)
9413         (unk_lang_error): Constify.
9414         * language.h (language_defn::la_error)
9415         (language_defn::la_name_of_this): Constify.
9416         * linespec.c (decode_line_2): Constify.
9417         * linux-thread-db.c (thread_db_err_str): Constify.
9418         * lm32-tdep.c (lm32_register_name): Constify.
9419         * m2-exp.y (yyerror): Constify.
9420         * m2-lang.h (m2_yyerror): Constify.
9421         * m32r-tdep.c (m32r_register_names): Constify and make static.
9422         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9423         * m88k-tdep.c (m88k_register_name): Constify.
9424         * macroexp.c (appendmem): Constify.
9425         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9426         (upgrade_type, parse_external, parse_partial_symbols)
9427         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9428         (new_symbol): Constify.
9429         * memattr.c (mem_info_command): Constify.
9430         * mep-tdep.c (register_name_from_keyword): Constify.
9431         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9432         Constify.
9433         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9434         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9435         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9436         cast.
9437         (mi_execute_async_cli_command): Constify.
9438         * mips-tdep.c (mips_register_name): Constify.
9439         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9440         (am33_register_name, am33_2_register_name)
9441         * moxie-tdep.c (moxie_register_names): Constify.
9442         * nat/linux-osdata.c (osdata_type): Constify fields.
9443         * nto-tdep.c (nto_parse_redirection): Constify.
9444         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9445         (lookup_child_selector): Constify.
9446         (objc_methcall::name): Constify.
9447         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9448         (lookup_struct_typedef): Constify.
9449         * objfiles.c (pc_in_section): Constify.
9450         * objfiles.h (pc_in_section): Constify.
9451         * p-exp.y (struct token::oper): Constify.
9452         (yyerror): Constify.
9453         * p-lang.h (pascal_yyerror): Constify.
9454         * parser-defs.h (op_name_standard): Constify.
9455         (op_print::string): Constify.
9456         (exp_descriptor::op_name): Constify.
9457         * printcmd.c (print_address_symbolic): Constify.
9458         * psymtab.c (print_partial_symbols): Constify.
9459         * python/py-breakpoint.c (stop_func): Constify.
9460         (bppy_get_expression): Constify.
9461         * python/py-cmd.c (cmdpy_completer::name): Constify.
9462         (cmdpy_function): Constify.
9463         * python/py-event.c (evpy_add_attribute)
9464         (gdbpy_initialize_event_generic): Constify.
9465         * python/py-event.h (evpy_add_attribute)
9466         (gdbpy_initialize_event_generic): Constify.
9467         * python/py-evts.c (add_new_registry): Constify.
9468         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9469         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9470         * python/py-inferior.c (get_buffer): Add cast.
9471         * python/py-param.c (parm_constant::name): Constify.
9472         * python/py-unwind.c (fprint_frame_id): Constify.
9473         * python/python.c (gdbpy_parameter_value): Constify.
9474         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9475         * remote.c (memory_packet_config::name): Constify.
9476         (show_packet_config_cmd, remote_write_bytes)
9477         (remote_buffer_add_string):
9478         * reverse.c (exec_reverse_once): Constify.
9479         * rs6000-tdep.c (variant::name, variant::description): Constify.
9480         * rust-exp.y (rustyyerror): Constify.
9481         * rust-lang.c (rust_op_name): Constify.
9482         * rust-lang.h (rustyyerror): Constify.
9483         * serial.h (serial_ops::name): Constify.
9484         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9485         (sh_sh3e_register_name, sh_sh2e_register_name)
9486         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9487         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9488         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9489         (sh_sh4al_dsp_register_name): Constify.
9490         * sh64-tdep.c (sh64_register_name): Constify.
9491         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9492         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9493         * stabsread.c (patch_block_stabs, read_type_number)
9494         (ref_map::stabs, ref_add, process_reference)
9495         (symbol_reference_defined, define_symbol, define_symbol)
9496         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9497         (read_one_struct_field, read_struct_fields, read_baseclasses)
9498         (read_tilde_fields, read_struct_type, read_array_type)
9499         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9500         (read_huge_number, read_range_type, read_args, common_block_start)
9501         (find_name_end): Constify.
9502         * stabsread.h (common_block_start, define_symbol)
9503         (process_one_symbol, symbol_reference_defined, ref_add):
9504         * symfile.c (get_section_index, add_symbol_file_command):
9505         * symfile.h (get_section_index): Constify.
9506         * target-descriptions.c (tdesc_type::name): Constify.
9507         (tdesc_free_type): Add cast.
9508         * target.c (find_default_run_target):
9509         (add_deprecated_target_alias, find_default_run_target)
9510         (target_announce_detach): Constify.
9511         (do_option): Constify.
9512         * target.h (add_deprecated_target_alias): Constify.
9513         * thread.c (print_thread_info_1): Constify.
9514         * top.c (deprecated_readline_begin_hook, command_line_input):
9515         Constify.
9516         (init_main): Add casts.
9517         * top.h (handle_line_of_input): Constify.
9518         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9519         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9520         (tfind_command): Rename to ...
9521         (tfind_command_1): ... this and constify.
9522         (tfind_command): New function.
9523         (tfind_end_command, tfind_start_command): Adjust.
9524         (encode_source_string): Constify.
9525         * tracepoint.h (encode_source_string): Constify.
9526         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9527         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9528         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9529         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9530         * tui/tui-win.c (parse_scrolling_args): Constify.
9531         * tui/tui-windata.c (tui_erase_data_content): Constify.
9532         * tui/tui-windata.h (tui_erase_data_content): Constify.
9533         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9534         * tui/tui.c (tui_enable): Add cast.
9535         * utils.c (defaulted_query): Constify.
9536         (init_page_info): Add cast.
9537         (puts_debug, subset_compare): Constify.
9538         * utils.h (subset_compare): Constify.
9539         * varobj.c (varobj_format_string): Constify.
9540         * varobj.h (varobj_format_string): Constify.
9541         * vax-tdep.c (vax_register_name): Constify.
9542         * windows-nat.c (windows_detach): Constify.
9543         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9544         * xml-support.c (gdb_xml_end_element): Constify.
9545         * xml-tdesc.c (tdesc_start_reg): Constify.
9546         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9547         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9548         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9549
9550 2017-04-05  Pedro Alves  <palves@redhat.com>
9551
9552         * proc-api.c (struct trans): Constify.
9553         (procfs_note): Constify.
9554         * proc-events.c (struct trans, syscall_table):
9555         * proc-flags.c (struct trans): Constify.
9556         * proc-utils.h (procfs_note): Constify.
9557         * proc-why.c (struct trans): Constify.
9558         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9559         (procfs_detach): Constify.
9560         * sol-thread.c (struct string_map): Constify.
9561         (td_err_string, td_state_string): Constify.
9562
9563 2017-04-05  Pedro Alves  <palves@redhat.com>
9564
9565         * proc-api.c (procfs_filename): Don't initialize
9566         procfs_filename.
9567         (prepare_to_trace): Assume procfs_filename is non-NULL.
9568         (_initialize_proc_api): Give procfs_filename a default value here.
9569
9570 2017-04-05  Pedro Alves  <palves@redhat.com>
9571
9572         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9573         'cond_string' parameter.
9574         (extract_exception_regexp): Constify 'string' parameter.
9575         (catch_exception_command_1): Constify.
9576         * breakpoint.c (init_catchpoint)
9577         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9578         parameter.
9579         (ep_parse_optional_if_clause, catch_fork_command_1)
9580         (catch_exec_command_1): Constify.
9581         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9582         parameter.
9583         (ep_parse_optional_if_clause): Constify.
9584         * cli/cli-utils.c (remove_trailing_whitespace)
9585         (check_for_argument): Constify.
9586         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9587         non-const overload.
9588         (check_for_argument): Likewise.
9589
9590 2017-04-05  Pedro Alves  <palves@redhat.com>
9591
9592         * event-top.c (command_line_handler): Add cast to execute_command
9593         call.
9594         * record-btrace.c (cmd_record_btrace_bts_start)
9595         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9596         (cmd_record_btrace_start): Add cast to execute_command call.
9597         * record-full.c (record_full_goto_insn):
9598         * record.c (record_start, record_stop): Add cast to
9599         execute_command_to_string calls.
9600         (cmd_record_start): Add cast to execute_command calls.
9601
9602 2017-04-05  Pedro Alves  <palves@redhat.com>
9603
9604         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9605         static inline function.
9606         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9607         array and use gdb_PyArg_ParseTupleAndKeywords.
9608         * python/py-cmd.c (cmdpy_init): Likewise.
9609         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9610         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9611         (infpy_search_memory): Likewise.
9612         * python/py-objfile.c (objfpy_add_separate_debug_file)
9613         (gdbpy_lookup_objfile): Likewise.
9614         * python/py-symbol.c (gdbpy_lookup_symbol)
9615         (gdbpy_lookup_global_symbol): Likewise.
9616         * python/py-type.c (gdbpy_lookup_type): Likewise.
9617         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9618         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9619         Likewise.
9620
9621 2017-04-05  Pedro Alves  <palves@redhat.com>
9622
9623         * python/python-internal.h (gdb_PyGetSetDef): New type.
9624         * python/py-block.c (block_object_getset)
9625         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9626         * python/py-event.c (event_object_getset)
9627         (finish_breakpoint_object_getset): Likewise.
9628         * python/py-inferior.c (inferior_object_getset): Likewise.
9629         * python/py-infthread.c (thread_object_getset): Likewise.
9630         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9631         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9632         * python/py-objfile.c (objfile_getset): Likewise.
9633         * python/py-progspace.c (pspace_getset): Likewise.
9634         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9635         Likewise.
9636         * python/py-record.c (recpy_record_getset): Likewise.
9637         * python/py-symbol.c (symbol_object_getset): Likewise.
9638         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9639         Likewise.
9640         * python/py-type.c (type_object_getset, field_object_getset):
9641         Likewise.
9642         * python/py-value.c (value_object_getset): Likewise.
9643
9644 2017-04-05  Pedro Alves  <palves@redhat.com>
9645
9646         * python/python-internal.h (gdb_PyObject_CallMethod)
9647         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9648         New functions.
9649         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9650         (PySys_GetObject, PySys_SetPath): New macros.
9651
9652 2017-04-05  Pedro Alves  <palves@redhat.com>
9653
9654         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9655         info_osdata_command.
9656         * osdata.c (info_osdata_command): Rename to ...
9657         (info_osdata): ... this.  Constify 'type' parameter, and remove
9658         the 'from_tty' parameter.  Accept NULL TYPE.
9659         (info_osdata_command): New function.
9660         * osdata.h (info_osdata_command): Remove declaration.
9661         (info_osdata): New declaration.
9662
9663 2017-04-05  Pedro Alves  <palves@redhat.com>
9664
9665         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9666         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9667         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9668         parameter.
9669         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9670         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9671         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9672         parameter.
9673         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9674         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9675         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9676         (mi_cmd_file_list_exec_source_files)
9677         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9678         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9679         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9680         parameter.
9681         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9682         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9683         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9684         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9685         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9686         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9687         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9688         'command' parameter.
9689         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9690         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9691         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9692         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9693         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9694         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9695         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9696         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9697         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9698         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9699         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9700         parameter.
9701         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9702         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9703         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9704         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9705         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9706         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9707         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9708         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9709         (mi_cmd_data_list_changed_registers)
9710         (mi_cmd_data_write_register_values)
9711         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9712         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9713         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9714         (mi_cmd_list_features, mi_cmd_list_target_features)
9715         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9716         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9717         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9718         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9719         (mi_cmd_trace_frame_collected): Constify 'command'
9720         parameter.
9721         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9722         'command' parameter.
9723
9724 2017-04-05  Pedro Alves  <palves@redhat.com>
9725
9726         * ada-lang.c (ada_completer_word_break_characters): Now a const
9727         array.
9728         (ada_get_gdb_completer_word_break_characters): Constify.
9729         * completer.c (gdb_completer_command_word_break_characters)
9730         (gdb_completer_file_name_break_characters)
9731         (gdb_completer_quote_characters): Now const arrays.
9732         (get_gdb_completer_quote_characters): Constify.
9733         (set_rl_completer_word_break_characters): New function.
9734         (set_gdb_completion_word_break_characters)
9735         (complete_line_internal): Use it.
9736         * completer.h (get_gdb_completer_quote_characters): Constify.
9737         (set_rl_completer_word_break_characters): Declare.
9738         * f-lang.c (f_word_break_characters): Constify.
9739         * language.c (default_word_break_characters): Constify.
9740         * language.h (language_defn::la_word_break_characters): Constify.
9741         (default_word_break_characters): Constify.
9742         * top.c (init_main): Use set_rl_completer_word_break_characters.
9743
9744 2017-04-05  Pedro Alves  <palves@redhat.com>
9745
9746         * aix-thread.c (aix_thread_pid_to_str)
9747         (aix_thread_extra_thread_info): Constify.
9748         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9749         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9750         (bsd_uthread_pid_to_str): Constify.
9751         * corelow.c (core_pid_to_str): Constify.
9752         * darwin-nat.c (darwin_pid_to_str): Constify.
9753         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9754         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9755         Constify.
9756         * gnu-nat.c (gnu_pid_to_str): Constify.
9757         * go32-nat.c (go32_pid_to_str): Constify.
9758         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9759         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9760         * inferior.c (inferior_pid_to_str): Constify.
9761         * linux-nat.c (linux_nat_pid_to_str): Constify.
9762         * linux-tdep.c (linux_core_pid_to_str): Constify.
9763         * linux-thread-db.c (thread_db_pid_to_str)
9764         (thread_db_extra_thread_info): Constify.
9765         * nto-tdep.c (nto_extra_thread_info): Constify.
9766         * nto-tdep.h (nto_extra_thread_info): Constify.
9767         * obsd-nat.c (obsd_pid_to_str): Constify.
9768         * procfs.c (procfs_pid_to_str): Constify.
9769         * ravenscar-thread.c (ravenscar_extra_thread_info)
9770         (ravenscar_pid_to_str): Constify.
9771         * remote-sim.c (gdbsim_pid_to_str): Constify.
9772         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9773         Constify.
9774         * sol-thread.c (solaris_pid_to_str): Constify.
9775         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9776         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9777         * target.c (default_pid_to_str, target_pid_to_str)
9778         (normal_pid_to_str, default_pid_to_str): Constify.
9779         * target.h (target_ops::to_pid_to_str)
9780         (target_ops::to_extra_thread_info): Constify.
9781         (target_pid_to_str, normal_pid_to_str): Constify.
9782         * windows-nat.c (windows_pid_to_str): Constify.
9783         * gdbarch.sh (core_pid_to_str): Constify.
9784         * target-delegates.c: Regenerate.
9785         * gdbarch.h, gdbarch.c: Regenerate.
9786
9787 2017-04-05  Pedro Alves  <palves@redhat.com>
9788
9789         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9790         the memory of the temporary warning_pre_print override.
9791         * utils.c (warning_pre_print): Constify.
9792         * utils.h (warning_pre_print): Constify.
9793
9794 2017-04-05  Pedro Alves  <palves@redhat.com>
9795
9796         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9797         (shell_command): New function.
9798         (make_command): Use std::string.
9799         (init_cli_cmds): Register shell_command instead of shell_escape.
9800
9801 2017-04-05  Pedro Alves  <palves@redhat.com>
9802
9803         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9804         * tracepoint.c (default_collect): Don't initialize.
9805
9806 2017-04-05  Pedro Alves  <palves@redhat.com>
9807
9808         * macroexp.c (macro_buffer::shared): Now a bool.
9809         (init_buffer): Update.
9810         (init_shared_buffer): Constify 'addr' parameter.
9811         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9812         casts.
9813
9814 2017-04-05  Pedro Alves  <palves@redhat.com>
9815
9816         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9817         * disasm.c (set_disassembler_options): Constify local.
9818         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9819
9820 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9821
9822         PR gdb/21352
9823         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9824         option.
9825
9826 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9827
9828         * frame.c (frame_unwind_register_unsigned): Call
9829         frame_unwind_register_value.
9830
9831 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9832
9833         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9834         Use gdb_test_multiple, and don't match anchor.
9835
9836 2017-04-05  Pedro Alves  <palves@redhat.com>
9837
9838         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9839         (Write After Approval): Remove Simon Marchi.
9840
9841 2017-04-05  Pedro Alves  <palves@redhat.com>
9842
9843         * common/gdb_optional.h (optional::optional): Make constexpr and
9844         initialize m_dummy.
9845
9846 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9847
9848         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9849         (amd64fbsd_jmp_buf_reg_offset): Remove.
9850         (amd64fbsd_supply_uthread): Remove function.
9851         (amd64fbsd_collect_uthread): Remove function.
9852         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9853         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9854         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9855         (fbsd-nat.c): Update comment.
9856         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9857         (i386fbsd_jmp_buf_reg_offset): Remove.
9858         (i386fbsd_supply_uthread): Remove function.
9859         (i386fbsd_collect_uthread): Remove function.
9860         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9861
9862 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9863
9864         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9865         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9866         * NEWS: Mention that support for FreeBSD/alpha was removed.
9867         * alpha-fbsd-tdep.c: Delete file.
9868         * config/alpha/fbsd.mh: Delete file.
9869         * configure.host: Delete alpha*-*-freebsd* and
9870         alpha*-*-kfreebsd*-gnu.
9871         * configure.tgt: Delete alpha*-*-freebsd* and
9872         alpha*-*-kfreebsd*-gnu.
9873
9874 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9875
9876         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9877         amd64bsd_store_inferior_registers): Use ptid from regcache.
9878
9879 2017-04-04  Pedro Alves  <palves@redhat.com>
9880
9881         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9882         data fields, make them private and add "m_" prefixes.
9883         (lnp_state_machine::lnp_state_machine): New ctor.
9884         (record_line, check_line_address, handle_set_discriminator)
9885         (handle_set_address, handle_advance_pc, handle_special_opcode)
9886         (handle_advance_line, handle_set_file, handle_negate_stmt)
9887         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9888         (end_sequence, advance_line): New methods.
9889         (m_gdbarch, m_record_lines_p): New fields.
9890         (lnp_reader_state): Delete.
9891         (dwarf_record_line): Rename to ...
9892         (lnp_state_machine::record_line): ... adjust.
9893         (init_lnp_state_machine): Delete.
9894         (lnp_state_machine::lnp_state_machine): New.
9895         (check_line_address): Rename to ...
9896         (lnp_state_machine::check_line_address): This.
9897         (dwarf_decode_lines_1): Remove reference to "reader_state".
9898         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9899         State machine internal state manipulation moved to
9900         lnp_state_machine methods.
9901
9902 2017-04-04  Pedro Alves  <palves@redhat.com>
9903
9904         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9905         unittests/offset-type-selftests.c.
9906         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9907         * common/offset-type.h: New file.
9908         * common/preprocessor.h: New file.
9909         * common/traits.h: New file.
9910         * common/valid-expr.h: New file.
9911         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9912         sect_offset and cu_offset strong typedefs throughout.
9913         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9914         typedefs throughout.
9915         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9916         sect_offset and cu_offset strong typedefs throughout.
9917         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9918         typedefs throughout.
9919         * gdbtypes.h: Include "common/offset-type.h".
9920         (cu_offset): Now an offset type (strong typedef) instead of a
9921         struct.
9922         (sect_offset): Likewise.
9923         (union call_site_parameter_u): Rename "param_offset" field to
9924         "param_cu_off".
9925         * unittests/offset-type-selftests.c: New file.
9926
9927 2017-04-04  Pedro Alves  <palves@redhat.com>
9928
9929         * common/underlying.h: New file.
9930         * dwarf2read.c: Include "common/gdb_optional.h" and
9931         "common/underlying.h".
9932         (dir_index, file_name_index): New types.
9933         (file_entry): Use them.
9934         (file_entry::include): Use to_underlying.
9935         (line_header::add_file_name): Use dir_index.
9936         (read_formatted_entries): Use gdb::optional.  Read form before
9937         writting to file_entry.
9938         (dwarf_decode_line_header): Use dir_index.
9939         (lnp_state_machine::current_file): Use to_underlying.
9940         (lnp_state_machine::file): Change type to file_name_index.
9941         (dwarf_record_line): Use to_underlying.
9942         (init_lnp_state_machine): Use file_name_index.
9943         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9944
9945 2017-04-04  Pedro Alves  <palves@redhat.com>
9946
9947         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9948         operator bool, has_value and get methods.
9949
9950 2017-04-04  Pedro Alves  <palves@redhat.com>
9951
9952         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9953         fields.
9954         (line_header): Initialize all data fields.  Change type of
9955         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9956         Change type of include_dirs to std::vector<const char *>.  Remove
9957         num_include_dirs, include_dirs_size.  Change type of file_names to
9958         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9959         (line_header::line_header): New.
9960         (line_header::add_include_dir, line_header::add_file_name): New
9961         methods.
9962         (line_header::include_dir_at): Remove NULL check.
9963         (line_header::file_name_at): Add const overload.
9964         (line_header_up): New unique_ptr typedef.
9965         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9966         std::vector.  Remove free_line_header call.
9967         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9968         free_line_header call.
9969         (free_cu_line_header): Delete.
9970         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9971         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9972         Adjust to use std::vector.
9973         (free_line_header): Delete.
9974         (free_line_header_voidp): Use delete.
9975         (add_include_dir): Replace with ...
9976         (line_header::add_include_dir): ... this method.  Use std::vector.
9977         (add_file_name): Replace with ...
9978         (line_header::add_file_name): ... this method.  Use std::vector.
9979         (add_include_dir_stub): Delete.
9980         (read_formatted_entries): Remove memset.
9981         (dwarf_decode_line_header): Return a line_header_up instead of a
9982         raw pointer.  Remove cleanup handling.  Pass lambdas to
9983         read_formatted_entries.  Adjust to use line_header methods.
9984         (dwarf_decode_lines_1): Adjust to use line_header methods.
9985         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9986         use std::vector.
9987
9988 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9989
9990         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9991         instead of struct ptid.
9992
9993 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9994
9995         * frame.c (get_frame_register_bytes): Unwind using value.
9996         (put_frame_register_bytes): Likewise.
9997
9998 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9999
10000         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10001         aggregate-like.
10002
10003 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10004
10005         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10006
10007 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10008
10009         * gdbthread.h (struct thread_info): Declare constructor and
10010         destructor.  Add some in-class member initializers.
10011         * thread.c (free_thread): Remove.
10012         (init_thread_list): Call delete instead of free_thread.
10013         (new_thread): Call thread_info constructor.
10014         (thread_info::thread_info): New function.
10015         (thread_info::~thread_info): New function.
10016         (delete_thread_1): Call delete instead of free_thread.
10017         (make_cleanup_restore_current_thread): Move tp and frame to
10018         inner block.
10019
10020 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10021
10022         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10023         (arc_skip_prologue): Likewise.
10024         (arc_make_frame_cache): Likewise.
10025         (arc_pv_get_operand): New function.
10026         (arc_is_in_prologue): Likewise.
10027         (arc_analyze_prologue): Likewise.
10028         (arc_print_frame_cache): Likewise.
10029         (MAX_PROLOGUE_LENGTH): New constant.
10030
10031 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10032
10033         * configure.tgt: Add arc-insn.o.
10034         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10035         (dump_arc_instruction_command): New function.
10036         (arc_fprintf_disasm): Likewise.
10037         (arc_disassemble_info): Likewise.
10038         (arc_insn_get_operand_value): Likewise.
10039         (arc_insn_get_operand_value_signed): Likewise.
10040         (arc_insn_get_memory_base_reg): Likewise.
10041         (arc_insn_get_memory_offset): Likewise.
10042         (arc_insn_get_branch_target): Likewise.
10043         (arc_insn_dump): Likewise.
10044         (arc_insn_get_linear_next_pc): Likewise.
10045         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10046         (arc_disassemble_info): Likewise.
10047         (arc_insn_get_branch_target): Likewise.
10048         (arc_insn_get_linear_next_pc): Likewise.
10049         * NEWS: Mention new "maint print arc arc-instruction".
10050
10051 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10052
10053         * arc-tdep (maintenance_print_arc_list): New variable.
10054         (maintenance_print_arc_command): New function.
10055
10056 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10057
10058         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10059         Add "limm" and "reserved".
10060         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10061         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10062         * arc-tdep.h (arc_regnum): Likewise.
10063
10064 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10065
10066         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10067         for THREADPTR register.
10068         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10069         register.
10070         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10071         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10072         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10073
10074 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10075
10076         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10077         registers above gdbarch_num_regs (gdbarch) as privileged in
10078         call0 ABI.
10079
10080 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10081
10082         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10083         for a single specified register or for all registers in
10084         a0_base..a0_base + C0_NREGS range.
10085         (supply_gregset_reg): Call regcache_raw_supply for a single
10086         specified register or for all registers in a0_base..a0_base +
10087         C0_NREGS range.
10088
10089 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10090
10091         * arch/xtensa.h (C0_NREGS): Add definition.
10092         * xtensa-tdep.c (C0_NREGS): Remove definition.
10093
10094 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10095
10096         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10097         Drop xtensa_default_isa initialization.
10098         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10099
10100 2017-03-27  Pedro Alves  <palves@redhat.com>
10101
10102         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10103         (file_entry::include_dir): New method.
10104         (line_header::include_dir_at, line_header::file_name_at): New
10105         methods.
10106         (setup_type_unit_groups, setup_type_unit_groups)
10107         (psymtab_include_file_name): Simplify using the new methods.
10108         (lnp_state_machine) <the_line_header>: New field.
10109         <file>: Add comment.
10110         (lnp_state_machine::current_file): New method.
10111         (dwarf_record_line): Simplify using the new methods.
10112         (init_lnp_state_machine): Initialize the "the_line_header" field.
10113         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10114         Simplify using the new methods.
10115
10116 2017-03-27  Pedro Alves  <palves@redhat.com>
10117
10118         * cp-name-parser.y (make_empty): Delete.
10119         (demangler_special, nested_name, ptr_operator, array_indicator)
10120         (direct_declarator, declarator_1): Use fill_comp instead of
10121         make_empty.
10122
10123 2017-03-27  Pedro Alves  <palves@redhat.com>
10124
10125         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10126         to ATTRIBUTE_PRINTF.
10127         * solib-target.c (library_list_start_list): Print "string" not
10128         "version".
10129         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10130         gdb_xml_error call.
10131
10132 2017-03-27  Pedro Alves  <palves@redhat.com>
10133
10134         * dwarf2read.c (struct file_and_directory): New.
10135         (dwarf2_get_dwz_file): Adjust to use std::string.
10136         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10137         (find_file_and_directory): Adjust to return a file_and_directory
10138         object.
10139         (read_file_scope): Adjust to use file_and_directory.  Remove
10140         make_cleanup/do_cleanups calls.
10141         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10142         make_cleanup/do_cleanups calls.
10143         * python/python.c (do_start_initialization): Adjust to ldirname
10144         returning a std::string.
10145         * utils.c (ldirname): Now returns a std::string.
10146         * utils.h (ldirname): Change return type to std::string.
10147         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10148         returning a std::string.
10149         * xml-tdesc.c (file_read_description_xml): Likewise.
10150
10151 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10152
10153         * regcache.c (regcache_debug_print_register): New function.
10154         * regcache.h (regcache_debug_print_register): New declaration.
10155         * target.c (debug_print_register): Remove.
10156         (target_fetch_registers): Call regcache_debug_print_register.
10157         (target_store_registers): Likewise.
10158
10159 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10160
10161         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10162         reference beyond the 'lh->include_dirs' array before accessing to
10163         it.
10164         (psymtab_include_file_name): Likewise.
10165         (dwarf_decode_lines_1): Likewise.
10166         (dwarf_decode_lines): Likewise.
10167         (file_file_name): Likewise.
10168
10169 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10170
10171         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10172         inferior_ptid.
10173         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10174         ps_lsetfpregs): Likewise.
10175         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10176         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10177         ps_lsetfpregs): Likewise.
10178         * target.c (target_fetch_registers, target_store_registers):
10179         Remove asserts.
10180
10181 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10182
10183         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10184
10185 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10186
10187         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10188         (_initialize_aarch64_tdep): Register it.
10189         (aarch64_record_load_store): Handle PRFM instruction.
10190         (aarch64_process_record_test): New function.
10191
10192 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10193
10194         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10195         indentation.
10196
10197 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10198
10199         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10200
10201 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10202
10203         python/python.c (do_start_initialization): Fix memory leak.
10204
10205 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10206
10207         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10208         using get_ptrace_pid.
10209         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10210         inferior_ptid.
10211         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10212         inferior_ptid instead of pid.
10213
10214 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10215
10216         * aarch64-tdep.c: Wrap locally used classes in anonymous
10217         namespace.
10218         * arm-tdep.c: Likewise.
10219         * linespec.c: Likewise.
10220         * ui-out.c: Likewise.
10221
10222 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10223
10224         PR gdb/19637
10225         * python/lib/gdb/printer/bound_registers.py: Import sys.
10226
10227 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10228
10229         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10230         windows_thread_info parameter and use it instead of
10231         current_thread.
10232         (windows_fetch_inferior_registers): Don't set current_thread,
10233         pass the thread to do_windows_fetch_inferior_registers.  Use
10234         ptid from regcache instead of inferior_ptid.
10235         (do_windows_store_inferior_registers): Add windows_thread_info
10236         parameter and use it instead of current_thread.
10237         (windows_store_inferior_registers): Don't set current_thread,
10238         pass the thread to do_windows_store_inferior_registers.  Use
10239         ptid from regcache instead of inferior_ptid.
10240
10241 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10242
10243         * ser-mingw.c (ser_windows_raw): Remove reference to
10244         struct serial::current_timeout.
10245
10246 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10247
10248         PR tdep/20928
10249         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10250         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10251         (sparc64_fsr_type): Fix %fsr decoding.
10252
10253 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10254
10255         * python/py-record-btrace.c (btpy_insn_data): Change return type
10256         for Python 2.
10257
10258 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10259
10260         * spu-linux-nat.c (spu_fetch_inferior_registers,
10261         spu_store_inferior_registers): Use ptid from regcache, set and
10262         restore inferior_ptid.
10263         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10264         Likewise.
10265
10266 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10267
10268         * i386-linux-nat.c (fetch_register, store_register,
10269         i386_linux_fetch_inferior_registers,
10270         i386_linux_store_inferior_registers): Use ptid from regcache.
10271         * ia64-linux-nat.c (ia64_linux_fetch_register,
10272         ia64_linux_store_register): Likewise.
10273         * inf-ptrace.c (inf_ptrace_fetch_register,
10274         inf_ptrace_store_register): Likewise.
10275         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10276         m32r_linux_store_inferior_registers): Likewise.
10277         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10278         m68kbsd_store_inferior_registers): Likewise.
10279         * m68k-linux-nat.c (fetch_register, store_register,
10280         m68k_linux_fetch_inferior_registers,
10281         m68k_linux_store_inferior_registers): Likewise.
10282         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10283         m88kbsd_store_inferior_registers): Likewise.
10284         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10285         mips_fbsd_store_inferior_registers): Likewise.
10286         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10287         mips64_linux_regsets_store_registers): Likewise.
10288         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10289         mipsnbsd_store_inferior_registers): Likewise.
10290         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10291         mips64obsd_store_inferior_registers): Likewise.
10292         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10293         Likewise.
10294         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10295         ppcfbsd_store_inferior_registers): Likewise.
10296         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10297         ppc_linux_store_inferior_registers): Likewise.
10298         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10299         ppcnbsd_store_inferior_registers): Likewise.
10300         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10301         ppcobsd_store_registers): Likewise.
10302         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10303         Likewise.
10304         * ravenscar-thread.c (ravenscar_fetch_registers,
10305         ravenscar_store_registers, ravenscar_prepare_to_store):
10306         Likewise.
10307         * record-btrace.c (record_btrace_fetch_registers,
10308         record_btrace_store_registers, record_btrace_prepare_to_store):
10309         Likewise.
10310         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10311         Lookup inferior using ptid from regcache, instead of
10312         current_inferior.
10313         * remote.c (remote_fetch_registers, remote_store_registers): Use
10314         ptid from regcache.
10315         * rs6000-nat.c (fetch_register, store_register): Likewise.
10316         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10317         s390_linux_store_inferior_registers): Likewise.
10318         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10319         shnbsd_store_inferior_registers): Likewise.
10320         * sol-thread.c (sol_thread_fetch_registers,
10321         sol_thread_store_registers): Likewise.
10322         * sparc-nat.c (sparc_fetch_inferior_registers,
10323         sparc_store_inferior_registers): Likewise.
10324         * tilegx-linux-nat.c (fetch_inferior_registers,
10325         store_inferior_registers): Likewise.
10326         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10327         vaxbsd_store_inferior_registers): Likewise.
10328         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10329         store_xtregs): Likewise.
10330
10331 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10332
10333         PR gdb/14441
10334         * NEWS: Mention support for rvalue references in GDB and python.
10335         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10336         supports both lvalue and rvalue references.
10337
10338 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10339
10340         PR gdb/14441
10341         * gdbtypes.c (rank_one_type): Implement overloading
10342         resolution rules regarding rvalue references.
10343
10344 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10345
10346         PR gdb/14441
10347         * aarch64-tdep.c (aarch64_type_align)
10348         (aarch64_extract_return_value, aarch64_store_return_value): Change
10349         lvalue reference type checks to general reference type checks.
10350         * amd64-tdep.c (amd64_classify): Likewise.
10351         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10352         Likewise.
10353         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10354         (arm_store_return_value): Likewise.
10355         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10356         * c-typeprint.c (c_print_type): Likewise.
10357         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10358         (cplus_number_of_children, cplus_describe_child): Likewise.
10359         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10360         * completer.c (expression_completer): Likewise.
10361         * cp-support.c (make_symbol_overload_list_adl_namespace):
10362         Likewise.
10363         * darwin-nat-info.c (info_mach_region_command): Likewise.
10364         * dwarf2loc.c (entry_data_value_coerce_ref)
10365         (value_of_dwarf_reg_entry): Likewise.
10366         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10367         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10368         Likewise.
10369         * findvar.c (extract_typed_address, store_typed_address):
10370         Likewise.
10371         * gdbtypes.c (rank_one_type): Likewise.
10372         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10373         * infcall.c (value_arg_coerce): Likewise.
10374         * language.c (pointer_type): Likewise.
10375         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10376         Likewise.
10377         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10378         * mn10300-tdep.c (mn10300_type_align): Likewise.
10379         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10380         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10381         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10382         Likewise.
10383         * printcmd.c (print_formatted, x_command): Likewise.
10384         * python/py-type.c (typy_get_composite, typy_template_argument):
10385         Likewise.
10386         * python/py-value.c (valpy_referenced_value)
10387         (valpy_get_dynamic_type, value_has_field): Likewise.
10388         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10389         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10390         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10391         * spu-tdep.c (spu_scalar_value_p): Likewise.
10392         * symtab.c (lookup_symbol_aux): Likewise.
10393         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10394         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10395         Likewise.
10396         * valops.c (value_cast_pointers, value_cast)
10397         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10398         (value_struct_elt, value_struct_elt_bitpos)
10399         (value_find_oload_method_list, find_overload_match)
10400         (value_rtti_indirect_type): Likewise.
10401         * valprint.c (val_print_scalar_type_p, generic_val_print):
10402         Likewise.
10403         * value.c (value_actual_type, value_as_address, unpack_long)
10404         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10405         (coerce_ref): Likewise.
10406         * varobj.c (varobj_get_value_type): Likewise.
10407
10408 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10409
10410         PR gdb/14441
10411         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10412         table of constants.
10413         * python/lib/gdb/command/explore.py: Support exploring values
10414         of rvalue reference types.
10415         * python/lib/gdb/types.py: Implement get_basic_type() for
10416         rvalue reference types.
10417         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10418         constant.
10419         * python/py-value.c (valpy_getitem): Add an rvalue reference
10420         check.
10421         (valpy_reference_value): Add new parameter "refcode".
10422         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10423         New wrappers for valpy_reference_value().
10424         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10425         (gdbpy_invoke_xmethod): Likewise.
10426
10427 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10428
10429         PR gdb/14441
10430         * dwarf2read.c (process_die, read_type_die_1): Handle the
10431         DW_TAG_rvalue_reference_type DIE.
10432         (read_tag_reference_type): Add new parameter "refcode".
10433
10434 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10435
10436         PR gdb/14441
10437         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10438         (c_type_print_modifier, c_type_print_varspec_suffix)
10439         (c_type_print_base): Support printing rvalue reference types.
10440         * c-valprint.c (c_val_print, c_value_print): Support printing
10441         rvalue reference values.
10442
10443 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10444
10445         PR gdb/14441
10446         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10447         typename.
10448         * cp-support.c (replace_typedefs): Handle
10449         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10450         * python/py-type.c (typy_lookup_type): Likewise.
10451
10452 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10453
10454         PR gdb/14441
10455         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10456         * parse.c (insert_type): Change assert statement.
10457         (follow_types): Handle rvalue reference types.
10458         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10459         constant.
10460
10461 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10462
10463         PR gdb/14441
10464         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10465         value_ref() interface.
10466         * c-valprint.c (c_value_print): Likewise.
10467         * infcall.c (value_arg_coerce): Likewise.
10468         * python/py-value.c (valpy_reference_value): Likewise.
10469         * valops.c (value_cast, value_reinterpret_cast)
10470         (value_dynamic_cast, typecmp): Likewise.
10471         (value_ref): Parameterize by kind of return value reference type.
10472         * value.h (value_ref): Add new parameter "refcode".
10473
10474 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10475
10476         PR gdb/14441
10477         * dwarf2read.c (read_tag_reference_type): Use
10478         lookup_lvalue_reference_type() instead of lookup_reference_type().
10479         * eval.c (evaluate_subexp_standard): Likewise.
10480         * f-exp.y: Likewise.
10481         * gdbtypes.c (make_reference_type, lookup_reference_type):
10482         Generalize with rvalue reference types.
10483         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10484         convenience wrappers for lookup_reference_type().
10485         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10486         reference kind parameter.
10487         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10488         wrappers for lookup_reference_type().
10489         * guile/scm-type.c (gdbscm_type_reference): Use
10490         lookup_lvalue_reference_type() instead of lookup_reference_type().
10491         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10492         * parse.c (follow_types): Likewise.
10493         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10494         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10495         Likewise.
10496         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10497         (gdbpy_invoke_xmethod): Likewise.
10498         * stabsread.c: Provide extra argument to make_reference_type()
10499         call.
10500         * valops.c (value_ref, value_rtti_indirect_type): Use
10501         lookup_lvalue_reference_type() instead of lookup_reference_type().
10502
10503 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10504
10505         PR gdb/14441
10506         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10507         (TYPE_IS_REFERENCE): New macro.
10508         (struct type): Add rvalue_reference_type field.
10509         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10510
10511 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10512
10513         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10514         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10515         New function definition.
10516         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10517         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10518         New function declaration.
10519         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10520         * mi/mi-interp.h: New file.
10521         * solib.c (info_sharedlibrary_command): Replace for loop with
10522         ALL_SO_LIBS macro
10523         * solib.h (update_solib_list): New function declaration.
10524         (so_list_head): Move macro.
10525         * solist.h (ALL_SO_LIBS): New macro.
10526
10527 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10528
10529         * infcmd.c (post_create_inferior): Remove unused argument in
10530         call to solib_add.
10531         * remote.c (remote_start_remote): Likewise.
10532         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10533         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10534         (enable_break): Likewise.
10535         * solib.c (update_solib_list): Remove unused target argument
10536         and its documentation.
10537         (solib_add): Remove unused target argument.  Remove unused
10538         argument in call to update_solib_list.
10539         (info_sharedlibrary_command): Remove unused argument in call
10540         to update_solib_list.
10541         (sharedlibrary_command): Remove unused argument in call to
10542         solib_add.
10543         (handle_solib_event): Likewise.
10544         (reload_shared_libraries): Likewise.
10545         * solib.h (solib_add): Remove unused target argument.
10546
10547 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10548
10549         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10550         (s390_displaced_step_fixup): Cover relative branches with the
10551         default fixup handling.  This fixes lack of support for some
10552         relative branch instructions.
10553
10554 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10555
10556         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10557         ptid from regcache.
10558
10559 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10560
10561         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10562         i386_darwin_store_inferior_registers): Use ptid from regcache.
10563
10564 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10565
10566         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10567         i386bsd_store_inferior_registers): Use ptid from regcache.
10568
10569 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10570
10571         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10572         hppaobsd_store_registers): Use ptid from regcache.
10573
10574 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10575
10576         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10577         hppanbsd_store_registers): Use ptid from regcache.
10578
10579 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10580
10581         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10582         from regcache.  Use get_ptrace_pid.
10583
10584 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10585
10586         * corelow.c (get_core_register_section): Use ptid from regcache,
10587         update doc.
10588
10589 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10590
10591         * bsd-uthread.c (bsd_uthread_fetch_registers,
10592         bsd_uthread_store_registers): Use ptid from regcache, set and
10593         restore inferior_ptid.
10594
10595 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10596
10597         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10598         fetch_fp_regs, store_register, store_regs, store_fp_register,
10599         store_fp_regs): Use ptid from regcache.
10600
10601 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10602
10603         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10604         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10605         store_vfp_regs): Use ptid from regcache.
10606
10607 2017-03-17  Pedro Alves  <palves@redhat.com>
10608
10609         PR remote/21188
10610         * ser-base.c (ser_base_wait_for): Add comment.
10611         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10612         version.
10613         * ser-unix.c (hardwire_raw): Remove reference to
10614         scb->current_timeout.
10615         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10616         (hardwire_ops): Install ser_base_readchar instead of
10617         hardwire_readchar.
10618         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10619         Remove fields.
10620
10621 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10622
10623         PR gdb/19637
10624         * python/lib/gdb/printer/bound_registers.py: Add support for
10625         Python 3.
10626
10627 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10628
10629         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10630         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10631         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10632         byte_offset to subobj_byte_offset.  Fix the handling of
10633         DWARF_VALUE_STACK on big-endian targets when coming via an
10634         implicit pointer.
10635         (dwarf2_evaluate_loc_desc): Adjust call to
10636         dwarf2_evaluate_loc_desc_full.
10637         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10638         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10639
10640 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10641
10642         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10643         and REVSH instructions.
10644
10645 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10646
10647         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10648         (arm_record_test): Declare.
10649         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10650         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10651         align with the manual.
10652         (thumb_record_misc): Adjust the code order to align with the
10653         manual.
10654         (thumb2_record_decode_insn_handler): Fix instruction matching.
10655         (instruction_reader_thumb): New class.
10656         (arm_record_test): New function.
10657
10658 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10659
10660         * arm-tdep.c (abstract_memory_reader): New class.
10661         (instruction_reader): New class.
10662         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10663         (decode_insn): Likewise.
10664
10665 2017-03-16  Doug Evans  <dje@google.com>
10666
10667         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10668         member.  Change type of TYPE member to SCM.  All uses updated.
10669         (lsscm_make_lazy_string_smob): Add assert.
10670         (lsscm_make_lazy_string): Flag bad length values.
10671         (lsscm_elt_type): New function.
10672         (gdbscm_lazy_string_to_value): Rewrite to use
10673         lsscm_safe_lazy_string_to_value.
10674         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10675         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10676         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10677         in incoming type.
10678         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10679         * guile/scm-type.c (tyscm_scm_to_type): New function.
10680
10681 2017-03-15  Doug Evans  <dje@google.com>
10682
10683         PR python/17728, python/18439, python/18779
10684         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10685         member.  Change type of TYPE member to PyObject *.  All uses updated.
10686         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10687         (gdbpy_create_lazy_string_object): Flag bad length values.
10688         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10689         Handle typedefs in incoming type.
10690         (stpy_lazy_string_elt_type): New function.
10691         (gdbpy_extract_lazy_string): Call it.
10692         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10693         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10694         typedefs in incoming type.
10695
10696 2017-03-16  Doug Evans  <dje@google.com>
10697
10698         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10699         * guile/scm-type.c (tyscm_scm_to_type): New function.
10700
10701 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10702
10703         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10704         "ULONGEST" for "skip".
10705
10706 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10707
10708         PR gdb/21220
10709         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10710         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10711         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10712         over ptrace peek/poke until end of buffer or error.
10713
10714 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10715
10716         * parse.c (length_of_subexp): Make static.
10717         * parser-defs.h (length_of_subexp): Remove.
10718
10719 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10720
10721         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10722         as well.
10723
10724 2017-03-14  Pedro Alves  <palves@redhat.com>
10725
10726         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10727         (main): Use std::unique_ptr.  Remove calls to
10728         cp_demangled_name_parse_free.
10729
10730 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10731
10732         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10733         alphabsd_store_inferior_registers): Use regcache->ptid instead
10734         of inferior_ptid.
10735
10736 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10737
10738         * aix-thread.c (aix_thread_fetch_registers,
10739         aix_thread_store_registers): Use regcache->ptid instead of
10740         inferior_ptid.
10741
10742 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10743
10744         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10745         store_gregs_to_thread, fetch_fpregs_from_thread,
10746         store_fpregs_to_thread): Use regcache->ptid instead of
10747         inferior_ptid.
10748
10749 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10750
10751         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10752         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10753         instead of inferior_ptid.
10754
10755 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10756
10757         * target.c (target_fetch_registers, target_store_registers): Add
10758         assert.
10759
10760 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10761
10762         * regcache.h (regcache_get_ptid): New function.
10763         * regcache.c (regcache_get_ptid): New function.
10764
10765 2017-03-13  Mark Wielaard  <mark@klomp.org>
10766
10767         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10768
10769 2017-03-10  Keith Seitz  <keiths@redhat.com>
10770
10771         PR c++/8218
10772         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10773
10774 2017-03-08  Pedro Alves  <palves@redhat.com>
10775
10776         PR gdb/18360
10777         * infrun.c (start_step_over, do_target_resume, resume)
10778         (restart_threads): Assert we're not resuming a thread that is
10779         meant to be stopped.
10780         (infrun_thread_stop_requested_callback): Delete.
10781         (infrun_thread_stop_requested): If the thread is internally
10782         stopped, queue a pending stop event and clear the thread's
10783         inline-frame state.
10784         (handle_stop_requested): New function.
10785         (handle_syscall_event, handle_inferior_event_1): Use
10786         handle_stop_requested.
10787         (handle_stop_requested): New function.
10788         (handle_signal_stop): Set the thread's stop_signal here instead of
10789         at caller.
10790         (finish_step_over): Clear step over info unconditionally.
10791         (handle_signal_stop): If the user had interrupted the event
10792         thread, consider the stop a random signal.
10793         (handle_signal_stop) <signal arrived while stepping over
10794         breakpoint>: Don't restart threads here.
10795         (stop_waiting): Don't clear step-over info here.
10796
10797 2017-03-08  Pedro Alves  <palves@redhat.com>
10798
10799         PR 21206
10800         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10801         goes to argument 2, not 1.
10802
10803 2017-03-08  Pedro Alves  <palves@redhat.com>
10804
10805         PR cli/21218
10806         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10807         display_gdb_prompt.
10808         (command_line_input): Add comment.
10809
10810 2017-03-08  Pedro Alves  <palves@redhat.com>
10811
10812         PR tui/21216
10813         * tui/tui-file.c (tui_file::write): New.
10814         * tui/tui-file.h (tui_file): Override "write".
10815         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10816         factored out from ...
10817         (tui_puts): ... here.
10818         (tui_putc): Use them.
10819         (tui_write): New function.
10820         * tui/tui-io.h (tui_write): Declare.
10821
10822 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10823
10824         * Makefile.in (SFILES): Replace "environ.c" with
10825         "common/environ.c".
10826         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10827         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10828         to...
10829         * common/environ.c: ... here.
10830         * environ.h: Moved to...
10831         * common/environ.h: ... here.
10832
10833 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10834
10835         * gdbarch.sh (pstring_ptr): New static function.
10836         (gdbarch_disassembler_options): Use it.
10837         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10838         not valid_disassembler_option->name.
10839         * gdbarch.c: Regenerate.
10840
10841 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10842
10843         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10844
10845 2017-03-07  Pedro Alves  <palves@redhat.com>
10846
10847         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10848
10849 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10850
10851         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10852         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10853         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10854         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10855
10856 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10857
10858         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10859
10860 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10861
10862         * remote.c (remote_add_target_side_commands): Use range-based
10863         for loop.
10864
10865 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10866
10867         PR gdb/21165
10868         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10869         value is lazy.
10870         * valprint.c (common_val_print): Likewise.
10871
10872 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10873
10874         * NEWS: Mention new set/show disassembler-options commands.
10875         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10876         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10877         (prospective_options): New static variable.
10878         (gdb_disassembler::gdb_disassembler): Initialize
10879         m_di.disassembler_options.
10880         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10881         (get_disassembler_options): New function.
10882         (set_disassembler_options): Likewise.
10883         (set_disassembler_options_sfunc): Likewise.
10884         (show_disassembler_options_sfunc): Likewise.
10885         (disassembler_options_completer): Likewise.
10886         (_initialize_disasm): Likewise.
10887         * disasm.h (get_disassembler_options): New prototype.
10888         (set_disassembler_options): Likewise.
10889         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10890         (gdbarch_verify_disassembler_options): Likewise.
10891         * gdbarch.c: Regenerate.
10892         * gdbarch.h: Likewise.
10893         * arm-tdep.c (num_disassembly_options): Delete.
10894         (set_disassembly_style): Likewise.
10895         (arm_disassembler_options): New static variable.
10896         (set_disassembly_style_sfunc): Convert short style name into long
10897         option name.  Call set_disassembler_options.
10898         (show_disassembly_style_sfunc): New function.
10899         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10900         set_gdbarch_verify_disassembler_options.
10901         (_initialize_arm_tdep): Delete regnames variable and update callers.
10902         (arm_disassembler_options): Initialize.
10903         (disasm_options): New variable.
10904         (num_disassembly_options): Rename from this...
10905         (num_disassembly_styles): ...to this.  Compute by scanning through
10906         disasm_options.
10907         (valid_disassembly_styles): Initialize using disasm_options.
10908         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10909         set_arm_regname_option.
10910         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10911         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10912         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10913         set_gdbarch_verify_disassembler_options.
10914         * s390-tdep.c (s390_disassembler_options): New static variable.
10915         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10916         set_gdbarch_verify_disassembler_options.
10917
10918 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10919
10920         * remote.c (remote_add_target_side_condition): Remove "struct"
10921         keyword from range-based for loop.
10922
10923 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10924
10925         * remote.c (remote_add_target_side_condition): Use range-based
10926         for loop.  Update comment.
10927
10928 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10929
10930         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10931
10932 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10933
10934         * regcache.c (regcache_raw_update): New function.
10935         (regcache_raw_read): Move code to regcache_raw_update.
10936         * regcache.h (regcache_raw_update): New declaration.
10937         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10938
10939 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10940
10941         * dwarf2read.c (create_debug_type_hash_table): Initialize
10942         header.signature and header.type_offset_in_tu.
10943
10944 2017-02-24  Pedro Alves  <palves@redhat.com>
10945
10946         * symtab.c (make_file_symbol_completion_list_1): Use
10947         add_symtab_completions.
10948
10949 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10950
10951         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10952
10953 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10954
10955         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10956         I386_MAX_REGISTER_SIZE.
10957         (i386_pseudo_register_write): Likewise.
10958         (i386_process_record): Likewise.
10959         * i387-tdep.c (i387_supply_xsave): Likewise.
10960         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10961         (store_register): Likewise.
10962
10963 2017-02-23  Pedro Alves  <palves@redhat.com>
10964
10965         * ada-lang.c: Include "common/function-view.h".
10966         (ada_iterate_over_symbols): Adjust to use function_view as
10967         callback type.
10968         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10969         (ada_make_symbol_completion_list): Use a lambda.
10970         (ada_exc_search_name_matches): Delete.
10971         (name_matches_regex): New.
10972         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10973         * compile/compile-c-support.c: Include "common/function-view.h".
10974         (print_one_macro): Change prototype to accept a ui_file pointer.
10975         (write_macro_definitions): Use a lambda.
10976         * dwarf2read.c: Include "common/function-view.h".
10977         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10978         (dw2_expand_symtabs_matching): Adjust to use function_view as
10979         callback type.
10980         * language.h: Include "common/function-view.h".
10981         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10982         function_view as callback type.
10983         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10984         * linespec.c: Include "common/function-view.h".
10985         (collect_info::add_symbol): New method.
10986         (struct symbol_and_data_callback, iterate_inline_only, struct
10987         symbol_matcher_data, iterate_name_matcher): Delete.
10988         (iterate_over_all_matching_symtabs): Adjust to use function_view
10989         as callback type and lambdas.
10990         (iterate_over_file_blocks): Adjust to use function_view as
10991         callback type.
10992         (decode_compound_collector): Now a class with private fields.
10993         (decode_compound_collector::release_symbols): New method.
10994         (collect_one_symbol): Rename to...
10995         (decode_compound_collector::operator()): ... this and adjust.
10996         (lookup_prefix_sym): decode_compound_collector construction bits
10997         move to decode_compound_collector ctor.  Pass the
10998         decode_compound_collector object directly as callback.  Remove
10999         cleanups and use decode_compound_collector::release_symbols
11000         instead.
11001         (symtab_collector): Now a class with private fields.
11002         (symtab_collector::release_symtabs): New method.
11003         (add_symtabs_to_list): Rename to...
11004         (symtab_collector::operator()): ... this and adjust.
11005         (collect_symtabs_from_filename): symtab_collector construction
11006         bits move to symtab_collector ctor.  Pass the symtab_collector
11007         object directly as callback.  Remove cleanups and use
11008         symtab_collector::release_symtabs instead.
11009         (collect_symbols): Delete.
11010         (add_matching_symbols_to_info): Use lambdas.
11011         * macrocmd.c (print_macro_callback): Delete.
11012         (info_macro_command): Use a lambda.
11013         (info_macros_command): Pass print_macro_definition as callable
11014         directly.
11015         (print_one_macro): Remove 'ignore' parameter.
11016         (macro_list_command): Adjust.
11017         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11018         (macro_for_each_data::user_data): Delete field.
11019         (foreach_macro): Adjust to call the function_view.
11020         (macro_for_each): Adjust to use function_view as callback type.
11021         (foreach_macro_in_scope): Adjust to call the function_view.
11022         (macro_for_each_in_scope): Adjust to use function_view as callback
11023         type.
11024         * macrotab.h: Include "common/function-view.h".
11025         (macro_callback_fn): Declare a prototype instead of a pointer.
11026         Remove "user_data" parameter.
11027         (macro_for_each, macro_for_each_in_scope): Adjust to use
11028         function_view as callback type.
11029         * psymtab.c (partial_map_expand_apply)
11030         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11031         Adjust to use function_view as callback type and to return bool.
11032         (psym_expand_symtabs_matching): Adjust to use function_view as
11033         callback types.
11034         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11035         to use function_view as callback type and to return bool.
11036         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11037         callback types.
11038         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11039         as callback types.
11040         * symfile.h: Include "common/function-view.h".
11041         (expand_symtabs_file_matcher_ftype)
11042         (expand_symtabs_symbol_matcher_ftype)
11043         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11044         return bool.
11045         (quick_symbol_functions::map_symtabs_matching_filename)
11046         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11047         function_view as callback type and return bool.
11048         (expand_symtabs_matching): Adjust to use function_view as callback
11049         type.
11050         (maintenance_expand_name_matcher)
11051         (maintenance_expand_file_matcher): Delete.
11052         (maintenance_expand_symtabs): Use lambdas.
11053         * symtab.c (iterate_over_some_symtabs): Adjust to use
11054         function_view as callback types and return bool.
11055         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11056         of a cleanup.
11057         (lookup_symtab_callback): Delete.
11058         (lookup_symtab): Use a lambda.
11059         (iterate_over_symbols): Adjust to use function_view as callback
11060         type.
11061         (struct search_symbols_data, search_symbols_file_matches)
11062         (search_symbols_name_matches): Delete.
11063         (search_symbols): Use a pair of lambdas.
11064         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11065         (symtab_expansion_callback): Delete.
11066         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11067         * symtab.h: Include "common/function-view.h".
11068         (iterate_over_some_symtabs): Adjust to use function_view as
11069         callback type and return bool.
11070         (iterate_over_symtabs): Adjust to use function_view as callback
11071         type.
11072         (symbol_found_callback_ftype): Remove 'data' parameter and return
11073         bool.
11074         (iterate_over_symbols): Adjust to use function_view as callback
11075         type.
11076
11077 2017-02-23  Pedro Alves  <palves@redhat.com>
11078
11079         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11080         (%.o) <unittests/%.c>: New pattern.
11081         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11082         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11083         * common/function-view.h: New file.
11084         * unittests/function-view-selftests.c: New file.
11085         * configure: Regenerate.
11086
11087 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11088
11089         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11090         inferior_ptid.
11091         * go32-nat.c (go32_thread_alive): Likewise.
11092
11093 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11094
11095         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11096         delete.
11097
11098 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11099
11100         * varobj.c (varobj_clear_saved_item): Use delete instead of
11101         xfree.
11102         (update_dynamic_varobj_children): Likewise.
11103
11104 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11105
11106         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11107
11108 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11109
11110         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11111         m_enum_value to 0 in default constructor.
11112
11113 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11114
11115         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11116         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11117         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11118         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11119         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11120         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11121         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11122         IS_STORE_CONDITIONAL_INSN.
11123
11124 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11125
11126         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11127
11128 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11129
11130         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11131
11132 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11133
11134         * dwarf2read.c (skip_one_die, read_attribute_value)
11135         (dwarf2_const_value_attr, dump_die_shallow)
11136         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11137         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11138
11139 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11140
11141         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11142         (dwarf_parse_macro_header): Accept DWARF version 5.
11143         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11144
11145 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11146
11147         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11148         DW_AT_GNU_*.
11149         * common/common-exceptions.h (enum errors): Likewise.
11150         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11151         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11152         (dwarf_expr_context::execute_stack_op): Likewise.
11153         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11154         Likewise.
11155         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11156         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11157         (show_entry_values_debug, call_site_to_target_addr)
11158         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11159         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11160         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11161         (value_of_dwarf_block_entry, indirect_pieced_value)
11162         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11163         (disassemble_dwarf_expression): Likewise.
11164         * dwarf2read.c (process_die, inherit_abstract_dies)
11165         (read_call_site_scope): Likewise.
11166         * gdbtypes.h (struct func_type, struct call_site_parameter)
11167         (struct call_site): Likewise.
11168         * stack.c (read_frame_arg): Likewise.
11169         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11170
11171 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11172
11173         * defs.h (read_unsigned_leb128): New declaration.
11174         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11175         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11176         (dwarf2_find_location_expression): Call also
11177         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11178         * dwarf2loc.h (dwarf2_version): New declaration.
11179         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11180         rnglists.
11181         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11182         .debug_rnglists.
11183         (struct dwop_section_names): Add loclists_dwo.
11184         (dwop_section_names): Add .debug_loclists.dwo.
11185         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11186         (struct dwarf2_per_cu_data): Add dwarf_version.
11187         (struct dwo_sections): Add loclists.
11188         (struct attr_abbrev): Add implicit_const.
11189         (read_indirect_line_string): New declaration.
11190         (read_unsigned_leb128): Delete declaration.
11191         (rcuh_kind): New definition.
11192         (read_and_check_comp_unit_head): Change parameter
11193         is_debug_types_section to section_kind.
11194         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11195         (read_comp_unit_head): Change parameter abfd to section, add parameter
11196         section_kind.  Handle DWARF-5.
11197         (error_check_comp_unit_head): Accept also DWARF version 5.
11198         (read_and_check_comp_unit_head): Change parameter
11199         is_debug_types_section to section_kind.
11200         (read_and_check_type_unit_head): Delete function.
11201         (read_abbrev_offset): Handle DWARF-5.
11202         (create_debug_type_hash_table): Add parameter section_kind.  Process
11203         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11204         comp_unit_head.
11205         (create_debug_types_hash_table): Update create_debug_type_hash_table
11206         caller.
11207         (create_all_type_units): Call create_debug_type_hash_table.
11208         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11209         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11210         caller.
11211         (skip_one_die): Handle DW_FORM_implicit_const.
11212         (dwarf2_rnglists_process): New function.
11213         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11214         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11215         (read_attribute_value): Handle DW_FORM_implicit_const,
11216         DW_FORM_line_strp.
11217         (read_attribute): Handle DW_FORM_implicit_const.
11218         (read_indirect_string_at_offset_from): New function from
11219         read_indirect_string_at_offset.
11220         (read_indirect_string_at_offset): Call
11221         read_indirect_string_at_offset_from.
11222         (read_indirect_line_string_at_offset): New function.
11223         (read_indirect_string): New function comment.
11224         (read_indirect_line_string): New function.
11225         (read_unsigned_leb128): Make it global.
11226         (dwarf2_string_attr): Handle DWARF-5.
11227         (add_include_dir_stub, read_formatted_entries): New functions.
11228         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11229         Handle DWARF-5.
11230         (per_cu_header_read_in): Update read_comp_unit_head caller.
11231         (dwarf2_version): New function.
11232         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11233         rnglists.
11234         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11235         fields.
11236
11237 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11238
11239         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11240
11241 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11242
11243         * dwarf2read.c (dwarf2_ranges_process): New function from
11244         dwarf2_ranges_read.
11245         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11246         dwarf2_ranges_process.
11247
11248 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11249
11250         * dwarf2read.c (create_debug_type_hash_table): New function from
11251         create_debug_types_hash_table.
11252         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11253         (create_all_type_units, open_and_init_dwo_file): Update
11254         create_debug_types_hash_table callers.
11255
11256 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11257
11258         PR gdb/16188
11259         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11260         refer to 'ap', not 'args'.
11261
11262 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11263             Pedro Alves  <palves@redhat.com>
11264
11265         PR gdb/16188
11266         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11267         calls succeeded.
11268         * fork-child.c (trace_start_error): New function.
11269         (trace_start_error_with_name): Likewise.
11270         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11271         * inf-ptrace.c (inf_ptrace_me): Likewise.
11272         * inferior.h (trace_start_error): New prototype.
11273         (trace_start_error_with_name): Likewise.
11274
11275 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11276
11277         PR gdb/21164
11278         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11279         NULL before using it.
11280         * symmisc.c (maintenance_print_symbols): Likewise.
11281         (maintenance_print_msymbols): Likewise.
11282
11283 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11284
11285         * NEWS: Add record Python bindings entry.
11286
11287 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11288
11289         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11290         py-record-full.o.
11291         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11292         * python/py-record-btrace.c, python/py-record-btrace.h,
11293         python/py-record-full.c, python/py-record-full.h: New file.
11294         * python/py-record.c: Add include for py-record-btrace.h and
11295         py-record-full.h.
11296         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11297         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11298         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11299         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11300         New definition.
11301         (gdbpy_initialize_btrace): New export.
11302         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11303
11304 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11305
11306         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11307         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11308         * python/py-record.c: New file.
11309         * python/python-internal.h (gdbpy_start_recording,
11310         gdbpy_current_recording, gdpy_stop_recording,
11311         gdbpy_initialize_record): New export.
11312         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11313         (python_GdbMethods): Add gdbpy_start_recording,
11314         gdbpy_current_recording and gdbpy_stop_recording.
11315
11316 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11317
11318         * record-btrace.c (record_btrace_record_method): New function.
11319         (init_record_btrace_ops): Initialize to_record_method.
11320         * record-full.c (record_full_record_method): New function.
11321         (init_record_full_ops, init_record_full_core_ops): Add
11322         record_full_record_method.
11323         * record.h (enum record_method): New enum.
11324         * target-debug.h (target_debug_print_enum_record_method: New define.
11325         * target-delegates.c: Regenerate.
11326         * target.c (target_record_method): New function.
11327         * target.h: Include record.h.
11328         (struct target_ops) <to_record_method>: New field.
11329         (target_record_method): New export.
11330
11331 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11332
11333         * record.h (record_start, record_stop): New export.
11334         * record.c (record_start, record_stop): New function.
11335
11336 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11337
11338         * btrace.c (btrace_fetch): Copy function call segments pointer
11339         into a vector.
11340         (btrace_clear): Clear the vector.
11341         (btrace_find_insn_by_number): Use binary search to find the correct
11342         function call segment.
11343         * btrace.h (brace_fun_p): New typedef.
11344         (struct btrace_thread_info) <functions>: New field.
11345
11346 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11347
11348         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11349         * btrace.c (btrace_decode_error): ... here.  New function.
11350         * btrace.h (btrace_decode_error): New export.
11351
11352 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11353
11354         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11355         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11356         btrace_find_insn_by_number): Remove special case for gaps.
11357         * btrace.h (btrace_insn_get_error): New export.
11358         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11359         * record-btrace.c (btrace_insn_history): Print number for gaps.
11360         (record_btrace_info, record_btrace_goto): Handle gaps.
11361
11362 2017-02-14  Tom Tromey  <tom@tromey.com>
11363
11364         PR python/13598:
11365         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11366         event.
11367         * python/py-evts.c (gdbpy_initialize_py_events): Add
11368         before_prompt registry.
11369         * python/py-events.h (events_object) <before_prompt>: New field.
11370
11371 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11372
11373         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11374
11375 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11376
11377         * symfile (_initialize_symfile): Add usage text to the load command's
11378         help text.
11379
11380 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11381
11382         * utils.c (defaulted_query): Don't query on secondary UIs.
11383
11384 2017-02-10  Tom Tromey  <tom@tromey.com>
11385
11386         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11387
11388 2017-02-10  Tom Tromey  <tom@tromey.com>
11389
11390         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11391         "cleanup" local.
11392         * python/py-type.c (typy_legacy_template_argument): Remove
11393         unnecessary "cleanup" local.
11394
11395 2017-02-10  Tom Tromey  <tom@tromey.com>
11396
11397         * python/python.c (do_start_initialization): New function, from
11398         _initialize_python.
11399         (_initialize_python): Call do_start_initialization.
11400         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11401         goto.
11402
11403 2017-02-10  Tom Tromey  <tom@tromey.com>
11404
11405         * python/py-prettyprint.c (pretty_print_one_value): Use
11406         gdbpy_ref.
11407
11408 2017-02-10  Tom Tromey  <tom@tromey.com>
11409
11410         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11411         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11412         gdbpy_ref.
11413         * python/py-type.c (field_new): Use gdbpy_ref.
11414         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11415         gdbpy_ref.
11416         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11417         (py_free_pspace): Likewise.
11418         (pspace_to_pspace_object): Likewise.
11419         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11420         (py_free_objfile): Likewise.
11421         (objfile_to_objfile_object): Likewise.
11422         * python/py-inferior.c (delete_thread_object): Use
11423         gdbpy_ref.
11424         (infpy_read_memory): Likewise.
11425         (py_free_inferior): Likewise.
11426         * python/py-evtregistry.c (create_eventregistry_object): Use
11427         gdbpy_ref.
11428         * python/py-event.c (create_event_object): Use gdbpy_ref.
11429
11430 2017-02-10  Tom Tromey  <tom@tromey.com>
11431
11432         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11433         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11434         used.
11435         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11436         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11437         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11438         python/py-framefilter.c, python/py-function.c,
11439         python/py-inferior.c, python/py-infevents.c,
11440         python/py-linetable.c, python/py-newobjfileevent.c,
11441         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11442         python/py-signalevent.c, python/py-stopevent.c,
11443         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11444         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11445         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11446         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11447
11448 2017-02-10  Tom Tromey  <tom@tromey.com>
11449
11450         * ui-out.h (ui_out_emit_type): New class.
11451         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11452         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11453         and ui_out_emit_tuple.
11454         (enumerate_locals): Likewise.
11455         (py_mi_print_variables, py_print_locals, py_print_args): Use
11456         ui_out_emit_list.
11457         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11458         ui_out_emit_list.
11459         * common/gdb_optional.h: New file.
11460
11461 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11462
11463         * MAINTAINERS (Write After Approval): Update my e-mail address.
11464
11465 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11466
11467         PR gdb/21122
11468         * breakpoint.c (_initialize_breakpoint): Update the help description
11469         of the 'commands' command to indicate that it takes a list argument.
11470
11471 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11472
11473         * interps.c (current_interp_set_logging): Remove "return".
11474
11475 2017-02-09  Gary Benson  <gbenson@redhat.com>
11476
11477         * symtab.c (add_symtab_completions): Prevent NULL pointer
11478         dereference.
11479
11480 2017-02-08  Pedro Alves  <palves@redhat.com>
11481
11482         * interps.c (interp::interp): Remove reference to quiet_p.
11483         (interp_set): Make static.  Remove dead "Switching to" output
11484         code.
11485         (interp_quiet_p, interp_set_quiet): Delete.
11486         (interpreter_exec_cmd): Don't set the interpreter quiet.
11487         * interps.h (interp_quiet_p): Make static.
11488         (class interp) <quiet_p>: Remove field
11489
11490 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11491
11492         * cli/cli-decode.c (find_command_name_length): Make it extern.
11493         * cli/cli-decode.h (find_command_name_length): Declare.
11494         * cli/cli-script.c (command_name_equals, line_first_arg):
11495         New functions.
11496         (process_next_line): Use cli-decode to parse command names.
11497         (build_command_line): Make args a constant pointer.
11498
11499 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11500
11501         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11502         Remove case-insensitive search.
11503
11504 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11505
11506         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11507         at the end of the line.  Avoids an ARI warning.
11508
11509 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11510
11511         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11512         rdseed instructions.
11513         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11514
11515 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11516
11517         PR tdep/20936
11518         Provide and use sparc32 and sparc64 target description XML files.
11519         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11520         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11521         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11522         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11523         * features/sparc/sparc32-solaris.xml: New file.
11524         * features/sparc/sparc64-solaris.xml: New file.
11525         * features/sparc/sparc32-solaris.c: Generated.
11526         * features/sparc/sparc64-solaris.c: Generated.
11527         * sparc-tdep.h: Account for differences in target descriptions.
11528         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11529         (sparc32_register_type): Use target provided registers.
11530         (validate_tdesc_registers): New function.
11531         (sparc32_gdbarch_init): Use tdesc_has_registers.
11532         Set pseudoregister functions.
11533         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11534         (sparc64_register_type): Use target provided registers.
11535         (sparc64_init_abi): Set pseudoregister functions.
11536
11537 2017-02-03  Tom Tromey  <tom@tromey.com>
11538
11539         PR rust/21097:
11540         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11541         with a single member.
11542
11543 2017-02-03  Pedro Alves  <palves@redhat.com>
11544
11545         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11546         (cli_interp_base::~cli_interp_base): New.
11547         (cli_interp): New struct.
11548         (as_cli_interp): Cast the interp itself to cli_interp.
11549         (cli_interpreter_pre_command_loop): Rename to ...
11550         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11551         parameter.
11552         (cli_interpreter_init): Rename to ...
11553         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11554         boolean.  Make extern.
11555         (cli_interpreter_resume): Rename to ...
11556         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11557         extern.
11558         (cli_interpreter_suspend): Rename to ...
11559         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11560         extern.
11561         (cli_interpreter_exec): Rename to ...
11562         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11563         extern.
11564         (cli_interpreter_supports_command_editing): Rename to ...
11565         (cli_interp_base::supports_command_editing): ... this.  Remove
11566         'interp' parameter.  Make extern.
11567         (cli_ui_out): Rename to ...
11568         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11569         Make extern.
11570         (cli_set_logging): Rename to ...
11571         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11572         parameter.  Make extern.
11573         (cli_interp_procs): Delete.
11574         (cli_interp_factory): Adjust to use "new".
11575         * cli/cli-interp.h: Include "interps.h".
11576         (struct cli_interp_base): New struct.
11577         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11578         (interp_new): Delete.
11579         (interp::interp, interp::~interp): New.
11580         (interp_set): Use bool, and return void.  Assume the interpreter
11581         has suspend, init and resume methods, and that the all return
11582         void.
11583         (set_top_level_interpreter): interp_set returns void.
11584         (interp_ui_out): Adapt.
11585         (current_interp_set_logging): Adapt.
11586         (interp_data): Delete.
11587         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11588         (interp_exec): Adapt.
11589         (top_level_interpreter_data): Delete.
11590         * interps.h (interp_init_ftype, interp_resume_ftype)
11591         (interp_suspend_ftype, interp_exec_ftype)
11592         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11593         (class interp): New.
11594         (interp_new): Delete.
11595         (interp_set): Now returns void.  Use bool.
11596         (interp_data, top_level_interpreter_data): Delete.
11597         * mi/mi-common.h: Include interps.h.
11598         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11599         init, resume, suspect, exec, interp_ui_out, set_logging and
11600         pre_command_loop methods.
11601         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11602         (mi_interpreter_init): Rename to ...
11603         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11604         bool, return void and make extern.  Adjust.
11605         (mi_interpreter_resume): ... Rename to ...
11606         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11607         return void and make extern.  Adjust.
11608         (mi_interpreter_suspend): ... Rename to ...
11609         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11610         return void and make extern.  Adjust.
11611         (mi_interpreter_exec): ... Rename to ...
11612         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11613         extern.  Adjust.
11614         (mi_interpreter_pre_command_loop): ... Rename to ...
11615         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11616         parameter and make extern.
11617         (mi_on_normal_stop_1): Adjust.
11618         (mi_ui_out): Rename to ...
11619         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11620         parameter and make extern.  Adjust.
11621         (mi_set_logging): Rename to ...
11622         (mi_interp::set_logging): ... this.  Remove the 'interp'
11623         parameter and make extern.  Adjust.
11624         (mi_interp_procs): Delete.
11625         (mi_interp_factory): Adjust to use 'new'.
11626         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11627         (mi_print_exception, mi_execute_command, mi_load_progress):
11628         Adjust.
11629         * tui/tui-interp.c (tui_interp): New class.
11630         (as_tui_interp): Return a tui_interp pointer.
11631         (tui_on_normal_stop, tui_on_signal_received)
11632         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11633         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11634         to use interp::interp_ui_out.
11635         (tui_init): Rename to ...
11636         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11637         bool, return void and make extern.  Adjust.
11638         (tui_resume): Rename to ...
11639         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11640         return void and make extern.  Adjust.
11641         (tui_suspend): Rename to ...
11642         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11643         return void and make extern.  Adjust.
11644         (tui_ui_out): Rename to ...
11645         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11646         parameter, and make extern.  Adjust.
11647         (tui_exec): Rename to ...
11648         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11649         make extern.
11650         (tui_interp_procs): Delete.
11651         (tui_interp_factory): Use "new".
11652
11653 2017-02-02  Tom Tromey  <tom@tromey.com>
11654
11655         * rust-exp.y (ends_raw_string, space_then_number)
11656         (rust_identifier_start_p): Return bool.
11657         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11658         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11659         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11660         (rust_chartype_p): Return bool.
11661         (val_print_struct, rust_print_struct_def, rust_print_type):
11662         Update.
11663         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11664         Return bool.
11665
11666 2017-02-02  Tom Tromey  <tom@tromey.com>
11667
11668         * rust-lang.c: Reindent.
11669
11670 2017-02-02  Tom Tromey  <tom@tromey.com>
11671
11672         * rust-lang.h (rust_crate_for_block): Update.
11673         * rust-lang.c (rust_crate_for_block): Return std::string.
11674         (rust_get_disr_info): Use std:;string, not
11675         gdb::unique_xmalloc_ptr.
11676         * rust-exp.y (crate_name): Update.
11677
11678 2017-02-02  Pedro Alves  <palves@redhat.com>
11679
11680         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11681         field out of gdb_disassembler_test and make it static.
11682
11683 2017-02-02  Pedro Alves  <palves@redhat.com>
11684
11685         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11686         mi1_interp and mi_interp fields.
11687
11688 2017-02-02  Pedro Alves  <palves@redhat.com>
11689
11690         * cli/cli-interp.c (struct saved_output_files, saved_output):
11691         Moved from cli/cli-logging.c.
11692         (cli_set_logging): New function.
11693         (cli_interp_procs): Install cli_set_logging.
11694         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11695         Declare.
11696         * cli/cli-logging.c (struct saved_output_files, saved_output):
11697         Moved to cli/cli-interp.c.
11698         (pop_output_files): Don't save outputs here.
11699         (make_logging_output): New function.
11700         (handle_redirections): Don't build tee nor save previous outputs
11701         here.
11702         * interps.c (current_interp_set_logging): Change prototype.
11703         Assume there's always a set_logging_proc method installed.
11704         * interps.h (interp_set_logging_ftype): Change prototype.
11705         (current_interp_set_logging): Change prototype and adjust comment.
11706         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11707         use make_logging_output.
11708         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11709 2017-02-02  Pedro Alves  <palves@redhat.com>
11710
11711         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11712         from ...
11713         (set_logging_overwrite): ... here.
11714         (logging_no_redirect_file): Delete.
11715         (set_logging_redirect): Don't handle redirection on the fly.
11716         Instead warn that "logging off" / "logging on" is necessary.
11717         (pop_output_files): Delete references to logging_no_redirect_file.
11718         (show_logging_command): Always speak in terms of what will happen
11719         once logging is reenabled.
11720
11721 2017-02-02  Pedro Alves  <palves@redhat.com>
11722
11723         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11724
11725 2017-02-02  Pedro Alves  <palves@redhat.com>
11726
11727         * disasm.c (gdb_pretty_print_insn): Rename to ...
11728         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11729         Remove gdbarch parameter.  Adapt to clear the object's buffers
11730         instead of allocating new buffers, and to print using the object's
11731         gdb_disassembler instead of calling gdb_print_insn.
11732         (dump_insns): Use gdb_pretty_print_disassembler.
11733         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11734         (gdb_pretty_print_disassembler): New class.
11735         * record-btrace.c (btrace_insn_history): Use
11736         gdb_pretty_print_disassembler.
11737
11738 2017-02-02  Pedro Alves  <palves@redhat.com>
11739
11740         * ada-lang.c (type_as_string): Use string_file.
11741         * ada-valprint.c (ada_print_floating): Use string_file.
11742         * ada-varobj.c (ada_varobj_scalar_image)
11743         (ada_varobj_get_value_image): Use string_file.
11744         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11745         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11746         * breakpoint.c (update_inserted_breakpoint_locations)
11747         (insert_breakpoint_locations, reattach_breakpoints)
11748         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11749         (print_it_watchpoint): Use string_file.
11750         (save_breakpoints): Use stdio_file.
11751         * c-exp.y (oper): Use string_file.
11752         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11753         tee_file.
11754         (pop_output_files): Use delete.
11755         (handle_redirections): Use stdio_file and tee_file.
11756         * cli/cli-setshow.c (do_show_command): Use string_file.
11757         * compile/compile-c-support.c (c_compute_program): Use
11758         string_file.
11759         * compile/compile-c-symbols.c (generate_vla_size): Take a
11760         'string_file &' instead of a 'ui_file *'.
11761         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11762         of a 'ui_file *'.  Use string_file.
11763         (generate_c_for_variable_locations): Take a 'string_file &'
11764         instead of a 'ui_file *'.
11765         * compile/compile-internal.h (generate_c_for_for_one_variable):
11766         Take a 'string_file &' instead of a 'ui_file *'.
11767         * compile/compile-loc2c.c (push, pushf, unary, binary)
11768         (print_label, pushf_register_address, pushf_register)
11769         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11770         'ui_file *'.  Adjust.
11771         * compile/compile.c (compile_to_object): Use string_file.
11772         * compile/compile.h (compile_dwarf_expr_to_c)
11773         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11774         'ui_file *'.
11775         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11776         (replace_typedefs_qualified_name): Use string_file and
11777         obstack_copy0.
11778         * disasm.c (gdb_pretty_print_insn): Use string_file.
11779         (gdb_disassembly): Adjust reference the null_stream global.
11780         (do_ui_file_delete): Delete.
11781         (gdb_insn_length): Use null_stream.
11782         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11783         * dwarf2loc.c (dwarf2_compile_property_to_c)
11784         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11785         'string_file &' instead of a 'ui_file *'.
11786         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11787         * dwarf2read.c (do_ui_file_peek_last): Delete.
11788         (dwarf2_compute_name): Use string_file.
11789         * event-top.c (gdb_setup_readline): Use stdio_file.
11790         * gdbarch.sh (verify_gdbarch): Use string_file.
11791         * gdbtypes.c (safe_parse_type): Use null_stream.
11792         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11793         string_file.
11794         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11795         'string_file *' instead of a 'ui_file *'.
11796         (gdbscm_arch_disassemble): Use string_file.
11797         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11798         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11799         inherits from ui_file.
11800         (ioscm_file_port_delete, ioscm_file_port_rewind)
11801         (ioscm_file_port_put): Delete.
11802         (ioscm_file_port_write): Rename to ...
11803         (ioscm_file_port::write): ... this.  Remove file_port_magic
11804         checks.
11805         (ioscm_file_port_new): Delete.
11806         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11807         ui_file_up.
11808         * guile/scm-type.c (tyscm_type_name): Use string_file.
11809         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11810         Use string_file.
11811         * infcmd.c (print_return_value_1): Use string_file.
11812         * infrun.c (print_target_wait_results): Use string_file.
11813         * language.c (add_language): Use string_file.
11814         * location.c (explicit_to_string_internal): Use string_file.
11815         * main.c (captured_main_1): Use null_file.
11816         * maint.c (maintenance_print_architecture): Use stdio_file.
11817         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11818         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11819         event_channel>: Change type to mi_console_file pointer.
11820         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11821         (mi_console_file_delete): Delete.
11822         (struct mi_console_file): Delete.
11823         (mi_console_file_magic): Delete.
11824         (mi_console_file_new): Delete.
11825         (mi_console_file::mi_console_file): New.
11826         (mi_console_file_delete): Delete.
11827         (mi_console_file_fputs): Delete.
11828         (mi_console_file::write): New.
11829         (mi_console_raw_packet): Delete.
11830         (mi_console_file::flush): New.
11831         (mi_console_file_flush): Delete.
11832         (mi_console_set_raw): Rename to ...
11833         (mi_console_file::set_raw): ... this.
11834         * mi/mi-console.h (class mi_console_file): New class.
11835         (mi_console_file_new, mi_console_set_raw): Delete.
11836         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11837         (mi_set_logging): Use delete and tee_file.  Adjust.
11838         * mi/mi-main.c (output_register): Use string_file.
11839         (mi_cmd_data_evaluate_expression): Use string_file.
11840         (mi_cmd_data_read_memory): Use string_file.
11841         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11842         * mi/mi-out.c (mi_ui_out::main_stream): New.
11843         (mi_ui_out::rewind): Use main_stream and
11844         string_file.
11845         (mi_ui_out::put): Use main_stream and string_file.
11846         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11847         Allocate a 'string_file' instead.
11848         (mi_out_new): Don't allocate a mem_fileopen stream here.
11849         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11850         (mi_ui_out::main_stream): Declare method.
11851         * printcmd.c (eval_command): Use string_file.
11852         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11853         * python/py-arch.c (archpy_disassemble): Use string_file.
11854         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11855         * python/py-frame.c (frapy_str): Use string_file.
11856         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11857         Use string_file.
11858         * python/py-type.c (typy_str): Use string_file.
11859         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11860         * python/py-value.c (valpy_str): Use string_file.
11861         * record-btrace.c (btrace_insn_history): Use string_file.
11862         * regcache.c (regcache_print): Use stdio_file.
11863         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11864         * remote.c (escape_buffer): Use string_file.
11865         * rust-lang.c (rust_get_disr_info): Use string_file.
11866         * serial.c (serial_open_ops_1): Use stdio_file.
11867         (do_serial_close): Use delete.
11868         * stack.c (print_frame_arg): Use string_file.
11869         (print_frame_args): Remove local mem_fileopen stream, not used.
11870         (print_frame): Use string_file.
11871         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11872         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11873         Take a 'string_file *' instead of a 'ui_file *'.
11874         * top.c (new_ui): Use stdio_file and stderr_file.
11875         (free_ui): Use delete.
11876         (execute_command_to_string): Use string_file.
11877         (quit_confirm): Use string_file.
11878         * tracepoint.c (collection_list::append_exp): Use string_file.
11879         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11880         * tui/tui-file.c: Don't include "ui-file.h".
11881         (enum streamtype, struct tui_stream): Delete.
11882         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11883         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11884         (tui_file::tui_file): New method.
11885         (tui_file_fputs): Delete.
11886         (tui_file_get_strbuf): Delete.
11887         (tui_file::puts): New method.
11888         (tui_file_adjust_strbuf): Delete.
11889         (tui_file_flush): Delete.
11890         (tui_file::flush): New method.
11891         * tui/tui-file.h: Tweak intro comment.
11892         Include ui-file.h.
11893         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11894         (tui_file_adjust_strbuf): Delete declarations.
11895         (class tui_file): New class.
11896         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11897         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11898         (tui_register_format): Use string_stream.
11899         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11900         (tui_get_function_from_frame): Use string_file.
11901         * typeprint.c (type_to_string): Use string_file.
11902         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11903         (null_stream): New global.
11904         (ui_file_delete): Delete.
11905         (ui_file::ui_file): New.
11906         (null_file_isatty): Delete.
11907         (ui_file::~ui_file): New.
11908         (null_file_rewind): Delete.
11909         (ui_file::printf): New.
11910         (null_file_put): Delete.
11911         (null_file_flush): Delete.
11912         (ui_file::putstr): New.
11913         (null_file_write): Delete.
11914         (ui_file::putstrn): New.
11915         (null_file_read): Delete.
11916         (ui_file::putc): New.
11917         (null_file_fputs): Delete.
11918         (null_file_write_async_safe): Delete.
11919         (ui_file::vprintf): New.
11920         (null_file_delete): Delete.
11921         (null_file::write): New.
11922         (null_file_fseek): Delete.
11923         (null_file::puts): New.
11924         (ui_file_data): Delete.
11925         (null_file::write_async_safe): New.
11926         (gdb_flush, ui_file_isatty): Adjust.
11927         (ui_file_put, ui_file_rewind): Delete.
11928         (ui_file_write): Adjust.
11929         (ui_file_write_for_put): Delete.
11930         (ui_file_write_async_safe, ui_file_read): Adjust.
11931         (ui_file_fseek): Delete.
11932         (fputs_unfiltered): Adjust.
11933         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11934         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11935         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11936         (set_ui_file_data): Delete.
11937         (string_file::~string_file, string_file::write)
11938         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11939         (do_ui_file_as_string, ui_file_as_string): Delete.
11940         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11941         (struct mem_file): Delete.
11942         (mem_file_new): Delete.
11943         (stdio_file::stdio_file): New.
11944         (mem_file_delete): Delete.
11945         (stdio_file::stdio_file): New.
11946         (mem_fileopen): Delete.
11947         (stdio_file::~stdio_file): New.
11948         (mem_file_rewind): Delete.
11949         (stdio_file::set_stream): New.
11950         (mem_file_put): Delete.
11951         (stdio_file::open): New.
11952         (mem_file_write): Delete.
11953         (stdio_file_magic, struct stdio_file): Delete.
11954         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11955         (stdio_file::flush): New.
11956         (stdio_file_read): Rename to ...
11957         (stdio_file::read): ... this.  Adjust.
11958         (stdio_file_write): Rename to ...
11959         (stdio_file::write): ... this.  Adjust.
11960         (stdio_file_write_async_safe): Rename to ...
11961         (stdio_file::write_async_safe) ... this.  Adjust.
11962         (stdio_file_fputs): Rename to ...
11963         (stdio_file::puts) ... this.  Adjust.
11964         (stdio_file_isatty): Delete.
11965         (stdio_file_fseek): Delete.
11966         (stdio_file::isatty): New.
11967         (stderr_file_write): Rename to ...
11968         (stderr_file::write) ... this.  Adjust.
11969         (stderr_file_fputs): Rename to ...
11970         (stderr_file::puts) ... this.  Adjust.
11971         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11972         (stderr_file::stderr_file): New.
11973         (tee_file_magic): Delete.
11974         (struct tee_file): Delete.
11975         (tee_file::tee_file): New.
11976         (tee_file_new): Delete.
11977         (tee_file::~tee_file): New.
11978         (tee_file_delete): Delete.
11979         (tee_file_flush): Rename to ...
11980         (tee_file::flush): ... this.  Adjust.
11981         (tee_file_write): Rename to ...
11982         (tee_file::write): ... this.  Adjust.
11983         (tee_file::write_async_safe): New.
11984         (tee_file_fputs): Rename to ...
11985         (tee_file::puts): ... this.  Adjust.
11986         (tee_file_isatty): Rename to ...
11987         (tee_file::isatty): ... this.  Adjust.
11988         * ui-file.h (struct obstack, struct ui_file): Don't
11989         forward-declare.
11990         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11991         (ui_file_write_ftype)
11992         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11993         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11994         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11995         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11996         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11997         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11998         (set_ui_file_fseek): Delete.
11999         (ui_file_data, ui_file_delete, ui_file_rewind)
12000         (struct ui_file): New.
12001         (ui_file_up): New.
12002         (class null_file): New.
12003         (null_stream): Declare.
12004         (ui_file_write_for_put, ui_file_put): Delete.
12005         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12006         Delete.
12007         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12008         (gdb_fopen, tee_file_new): Delete.
12009         (struct string_file): New.
12010         (struct stdio_file): New.
12011         (stdio_file_up): New.
12012         (struct stderr_file): New.
12013         (class tee_file): New.
12014         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12015         of a 'ui_file *'.  Adjust.
12016         * ui-out.h (class ui_out) <field_stream>: Likewise.
12017         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12018         (null_stream): Delete.
12019         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12020         Adjust.
12021         * utils.h (struct ui_file): Delete forward declaration..
12022         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12023         (error_stream): Take a 'string_file &' instead of a
12024         'ui_file *'.
12025         * varobj.c (varobj_value_get_print_value): Use string_file.
12026         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12027         * gdbarch.c: Regenerate.
12028
12029 2017-02-02  Pedro Alves  <palves@redhat.com>
12030
12031         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12032         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12033         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12034         Adjust to call gdb_print_insn instead of
12035         gdb_disassembler::print_insn.
12036         (dump_insns, do_mixed_source_and_assembly_deprecated)
12037         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12038         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12039         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12040         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12041         declaration.
12042         (gdb_pretty_print_insn): Re-add declaration.
12043         * record-btrace.c (btrace_insn_history): Don't allocate a
12044         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12045
12046 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12047
12048         * disasm.h (gdb_disassembly): Remove file_string parameter.
12049         * disasm.c (gdb_disassembly): Likewise.
12050         * cli/cli-cmds.c (print_disassembly): Adapt.
12051         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12052         * stack.c (do_gdb_disassembly): Likewise.
12053
12054 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12055
12056         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12057         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12058         targets.  And if the implicit value is longer than needed, extract
12059         the first bytes instead of the "least significant" ones.
12060
12061 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12062
12063         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12064         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12065         (btrace_fetch): Assert can_access_registers_ptid.
12066         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12067         validate_registers_access.
12068
12069 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12070
12071         * gdbthread.h (can_access_registers_ptid): New.
12072         * thread.c (can_access_registers_ptid): New.
12073
12074 2017-02-01  Pedro Alves  <palves@redhat.com>
12075
12076         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12077
12078 2017-01-31  Pedro Alves  <palves@redhat.com>
12079
12080         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12081         Fix typos.
12082
12083 2017-01-31  Pedro Alves  <palves@redhat.com>
12084
12085         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12086         not used.
12087
12088 2017-01-31  Pedro Alves  <palves@redhat.com>
12089
12090         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12091
12092 2017-01-31  Pedro Alves  <palves@redhat.com>
12093
12094         * common/scoped_restore.h
12095         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12096         change the value's parameter type to T2.
12097         (make_scoped_restore): Likewise.
12098
12099 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12100             Richard Henderson  <rth@redhat.com>
12101
12102         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12103         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12104         GS_BASE for older kernels.
12105         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12106         GS_BASE for older kernels.
12107         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12108         and GS_BASE to the offset table.
12109         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12110         system register group.
12111         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12112         for older kernels.
12113         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12114         amd64 ABI.
12115         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12116         AMD64_GSBASE_REGNUM.
12117         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12118         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12119         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12120         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12121         i386/64bit-segments.xml in those rules.
12122         * features/i386/64bit-segments.xml: New file.
12123         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12124         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12125         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12126         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12127         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12128         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12129         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12130         * features/i386/amd64-avx-linux.c: Regenerated.
12131         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12132         * features/i386/amd64-avx-mpx.c: Regenerated.
12133         * features/i386/amd64-avx512-linux.c: Regenerated.
12134         * features/i386/amd64-linux.c: Regenerated.
12135         * features/i386/amd64-mpx-linux.c: Regenerated.
12136         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12137         * features/i386/i386-avx-mpx.c: Regenerated.
12138         * features/i386/x32-avx-linux.c: Regenerated.
12139         * features/i386/x32-avx512-linux.c: Regenerated.
12140         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12141         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12142         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12143         * regformats/i386/amd64-linux.dat: Regenerated.
12144         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12145         * regformats/i386/x32-avx-linux.dat: Regenerated.
12146         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12147         * regformats/i386/x32-linux.dat: Regenerated.
12148
12149 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12150
12151         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12152         Set to AMD64_NUM_REGS.
12153
12154 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12155
12156         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12157         that checks validity of a register number.
12158
12159 2017-01-27  Kees Cook  <keescook@google.com>
12160
12161         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12162         fetch_fpregs if target has fpa registers.
12163         (arm_linux_store_inferior_registers): Call store_fpregs if target
12164         has fpa registers.
12165
12166 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12167
12168         * cris-tdep.c (cris_gdbarch_init): Remove check for
12169         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12170
12171 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12172
12173         * corelow.c (get_core_register_section): Check for regset
12174         existence before checking for REGSET_VARIABLE_SIZE.
12175
12176 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12177             Pedro Alves  <palves@redhat.com>
12178
12179         PR gdb/20939
12180         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12181         call memory_error, save memaddr instead.
12182         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12183         negative, cal memory_error.
12184         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12185
12186 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12187
12188         * disasm-selftests.c (memory_error_test): New function.
12189         (_initialize_disasm_selftests): Register memory_error_test.
12190
12191 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12192
12193         * Makefile.in (SFILES): Add disasm-selftests.c and
12194         selftest-arch.c.
12195         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12196         * disasm-selftests.c: New file.
12197         * selftest-arch.c: New file.
12198         * selftest-arch.h: New file.
12199
12200 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12201
12202         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12203         to bfd_arch_mep.  Don't return 0 if section is not
12204         found.  Call print_insn_mep.
12205
12206 2017-01-26  Pedro Alves  <palves@redhat.com>
12207             Yao Qi  <yao.qi@linaro.org>
12208
12209         * arm-tdep.c: Include "disasm.h".
12210         (gdb_print_insn_arm): Update code to get gdbarch.
12211         * disasm.c (dis_asm_read_memory): Change it to
12212         gdb_disassembler::dis_asm_read_memory.
12213         (dis_asm_memory_error): Likewise.
12214         (dis_asm_print_address): Likewise.
12215         (gdb_pretty_print_insn): Change it to
12216         gdb_disassembler::pretty_print_insn.
12217         (dump_insns): Add one argument gdb_disassemlber.  All
12218         callers updated.
12219         (do_mixed_source_and_assembly_deprecated): Likewise.
12220         (do_mixed_source_and_assembly): Likewise.
12221         (do_assembly_only): Likewise.
12222         (gdb_disassembler::gdb_disassembler): New.
12223         (gdb_disassembler::print_insn): New.
12224         * disasm.h (class gdb_disassembler): New.
12225         (gdb_pretty_print_insn): Remove declaration.
12226         (gdb_disassemble_info): Likewise.
12227         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12228         (gdbscm_disasm_read_memory_worker): Update.
12229         (gdbscm_disasm_read_memory): Update.
12230         (gdbscm_disasm_memory_error): Remove.
12231         (gdbscm_disasm_print_address): Remove.
12232         (gdbscm_disassembler::gdbscm_disassembler): New.
12233         (gdbscm_print_insn_from_port): Update.
12234         * mips-tdep.c: Include disasm.h.
12235         (gdb_print_insn_mips): Update code to get gdbarch.
12236         * record-btrace.c (btrace_insn_history): Update.
12237         * spu-tdep.c: Include disasm.h.
12238         (struct spu_dis_asm_data): Remove.
12239         (struct spu_dis_asm_info): New.
12240         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12241         SPU id.
12242         (gdb_print_insn_spu): Cast disassemble_info to
12243         spu_dis_asm_info.
12244
12245 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12246
12247         * disasm.c (do_ui_file_delete): Delete.
12248         (gdb_insn_length): Move code creating stream to ...
12249         * utils.c (null_stream): ... here.  New function.
12250         * utils.h (null_stream): Declare.
12251
12252 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12253
12254         * python/py-inferior.c (find_thread_object): Return directly
12255         from the loop.  Remove "found" variable.
12256
12257 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12258
12259         GDB 7.12.1 released.
12260
12261 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12262
12263         * python/py-function.c (fnpy_call): Reorder declarations to have
12264         the gdbpy_enter object declared first.
12265         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12266
12267 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12268
12269         PR python/21068
12270         * python/python-internal.h (PyMem_RawMalloc): Define for
12271         Python < 3.4.
12272         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12273         PyMem_RawMalloc instead of PyMem_Malloc.
12274
12275 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12276             Luis Machado  <lgustavo@codesourcery.com>
12277
12278         * NEWS (New commands): Mention flash-erase.
12279         (New MI commands): Mention target-flash-erase.
12280         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12281         command.
12282         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12283         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12284         * target.c (flash_erase_command): New function.
12285         (initialize_targets): Add new flash-erase command.
12286         * target.h (flash_erase_command): New declaration.
12287
12288 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12289
12290         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12291         HAVE_SYS_PROCFS_H is defined.
12292
12293 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12294
12295         * remote.c (struct cached_reg): Change data into a pointer.
12296         * (stop_reply_dtr): Free data pointers before deleting vector.
12297         (process_stop_reply): Likewise.
12298         (remote_parse_stop_reply): Allocate space for data
12299
12300 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12301
12302         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12303         MAX_REGISTER_SIZE.
12304         (amd64_pseudo_register_read_value): Likewise.
12305         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12306         (store_register_using_P): Likewise.
12307         * regcache.c (regcache_xfer_part): Likewise.
12308
12309 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12310
12311         Split real and pseudo registers.
12312         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12313         (sparc32_pseudo_regnum): New enum.
12314         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12315         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12316         (SPARC32_CP0_REGISTERS): New macro.
12317         (sparc32_pseudo_register_name): New function.
12318         (sparc32_register_name): Use sparc32_pseudo_register_name.
12319         (sparc32_pseudo_register_type): New function.
12320         (sparc32_register_type): Use sparc32_pseudo_register_type.
12321         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12322         pseudo register numbers.
12323         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12324         (SPARC64_CP0_REGISTERS): New macro.
12325         (sparc64_pseudo_register_name): New function.
12326         (sparc64_register_name): Use sparc64_pseudo_register_name.
12327         (sparc64_pseudo_register_type): New function.
12328         (sparc64_register_type): Use sparc64_pseudo_register_type.
12329         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12330         pseudo register numbers.
12331         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12332         sparc64_store_arguments): Handle pseudo register numbers.
12333
12334 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12335
12336         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12337         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12338         output.
12339         (getpkt_or_notif_sane_1): Likewise.
12340
12341 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12342
12343         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12344         of CC.  Pass "-x c++-header" instead of "-x c".
12345
12346 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12347
12348         * remote.c (remote_can_async_p): Update comment.
12349
12350 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12351
12352         * linux-nat.c (linux_nat_can_async_p): Update comment.
12353
12354 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12355
12356         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12357
12358 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12359
12360         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12361
12362 2017-01-10  Tom Tromey  <tom@tromey.com>
12363
12364         * python/py-type.c (typy_legacy_template_argument): Update.
12365         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12366         ~demangle_parse_info): Declare new members.
12367         (cp_demangled_name_to_comp): Return unique_ptr.
12368         (cp_demangled_name_parse_free)
12369         (make_cleanup_cp_demangled_name_parse_free)
12370         (cp_new_demangle_parse_info): Remove.
12371         * cp-support.c (do_demangled_name_parse_free_cleanup)
12372         (make_cleanup_cp_demangled_name_parse_free): Remove.
12373         (inspect_type, cp_canonicalize_string_full)
12374         (cp_canonicalize_string): Update.
12375         (mangled_name_to_comp): Change return type.
12376         (cp_class_name_from_physname, method_name_from_physname)
12377         (cp_func_name, cp_remove_params): Update.
12378         * cp-name-parser.y (demangle_parse_info): New constructor, from
12379         cp_new_demangle_parse_info.
12380         (~demangle_parse_info): New destructor, from
12381         cp_demangled_name_parse_free.
12382         (cp_merge_demangle_parse_infos): Update.
12383         (cp_demangled_name_to_comp): Change return type.
12384
12385 2017-01-10  Tom Tromey  <tom@tromey.com>
12386
12387         * top.c (prevent_dont_repeat): Change return type.
12388         * python/python.c (execute_gdb_command): Use std::string.
12389         Update.
12390         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12391         * command.h (prevent_dont_repeat): Change return type.
12392         * breakpoint.c (bpstat_do_actions_1): Update.
12393
12394 2017-01-10  Tom Tromey  <tom@tromey.com>
12395
12396         * value.h (scoped_value_mark::~scoped_value_mark): Call
12397         free_to_mark.
12398         (scoped_value_mark::free_to_mark): New method.
12399         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12400         scoped_value_mark.
12401
12402 2017-01-10  Tom Tromey  <tom@tromey.com>
12403
12404         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12405         (valpy_reference_value, valpy_const_value, valpy_get_address)
12406         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12407         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12408         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12409         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12410         scoped_value_mark.
12411         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12412         * value.h (scoped_value_mark): New class.
12413
12414 2017-01-10  Tom Tromey  <tom@tromey.com>
12415
12416         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12417         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12418         * psymtab.c (discard_psymtabs_upto): Remove.
12419         (make_cleanup_discard_psymtabs): Remove.
12420         (struct psymtab_state): Remove.
12421
12422 2017-01-10  Tom Tromey  <tom@tromey.com>
12423
12424         * record-full.c (record_full_save_cleanups): Remove.
12425         (record_full_save): Use gdb::unlinker.
12426         * gcore.c (do_bfd_delete_cleanup): Remove.
12427         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12428         cleanups.
12429         * dwarf2read.c (unlink_if_set): Remove.
12430         (write_psymtabs_to_index): Use gdb::unlinker.
12431         * common/gdb_unlinker.h: New file.
12432
12433 2017-01-10  Tom Tromey  <tom@tromey.com>
12434
12435         * windows-tdep.c (windows_xfer_shared_library): Update.
12436         * windows-nat.c (windows_make_so): Update.
12437         * utils.h (make_cleanup_bfd_unref): Remove.
12438         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12439         * symfile.h (symfile_bfd_open)
12440         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12441         * symfile.c (read_symbols, symbol_file_add)
12442         (separate_debug_file_exists): Update.
12443         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12444         (generic_load, reread_symbols): Update.
12445         * symfile-mem.c (symbol_file_add_from_memory): Update.
12446         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12447         (spu_symbol_file_add_from_memory): Update.
12448         * solist.h (struct target_so_ops) <bfd_open>: Return
12449         gdb_bfd_ref_ptr.
12450         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12451         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12452         gdb_bfd_ref_ptr.
12453         (solib_map_sections, reload_shared_libraries_1): Update.
12454         * solib-svr4.c (enable_break): Update.
12455         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12456         * solib-frv.c (enable_break2): Update.
12457         * solib-dsbt.c (enable_break): Update.
12458         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12459         gdb_bfd_ref_ptr.
12460         (darwin_solib_get_all_image_info_addr_at_init): Update.
12461         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12462         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12463         * record-full.c (record_full_save): Update.
12464         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12465         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12466         * minidebug.c (find_separate_debug_file_in_section): Return
12467         gdb_bfd_ref_ptr.
12468         * machoread.c (macho_add_oso_symfile): Change abfd to
12469         gdb_bfd_ref_ptr.
12470         (macho_symfile_read_all_oso): Update.
12471         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12472         (macho_symfile_read): Update.
12473         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12474         (jit_bfd_try_read_symtab): Update.
12475         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12476         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12477         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12478         gdb_bfd_ref_ptr.
12479         (gdb_bfd_ref_policy): New struct.
12480         (gdb_bfd_ref_ptr): New typedef.
12481         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12482         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12483         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12484         gdb_bfd_ref_ptr.
12485         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12486         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12487         (gcore_command): Update.
12488         * exec.c (exec_file_attach): Update.
12489         * elfread.c (elf_symfile_read): Update.
12490         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12491         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12492         (open_and_init_dwo_file): Update.
12493         (open_dwp_file): Return gdb_bfd_ref_ptr.
12494         (open_and_init_dwp_file): Update.
12495         * corelow.c (core_open): Update.
12496         * compile/compile-object-load.c (compile_object_load): Update.
12497         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12498         * coffread.c (coff_symfile_read): Update.
12499         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12500         gdb_bfd_ref_ptr.  Rename.
12501         (dump_bfd_file, restore_command): Update.
12502         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12503         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12504         (find_separate_debug_file_by_buildid): Update.
12505
12506 2017-01-10  Tom Tromey  <tom@tromey.com>
12507
12508         * common/gdb_ref_ptr.h: New file.
12509         * python/py-ref.h (struct gdbpy_ref_policy): New.
12510         (gdbpy_ref): Now a typedef.
12511
12512 2017-01-10  Tom Tromey  <tom@tromey.com>
12513
12514         * utils.h (make_cleanup_htab_delete): Don't declare.
12515         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12516         Remove.
12517         * linespec.c (decode_compound_collector): Add constructor,
12518         destructor.
12519         (lookup_prefix_sym): Remove cleanup.
12520         (symtab_collector): Add constructor, destructor.
12521         (collect_symtabs_from_filename): Remove cleanup.
12522         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12523         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12524         Use htab_up.
12525         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12526         * dwarf2read.c (dw2_expand_symtabs_matching)
12527         (dw2_map_symbol_filenames, dwarf_decode_macros)
12528         (write_psymtabs_to_index): Use htab_up.
12529         * dwarf2loc.c (func_verify_no_selftailcall)
12530         (call_site_find_chain_1, func_verify_no_selftailcall)
12531         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12532         std::vector, gdb::unique_xmalloc_ptr.
12533         (call_sitep): Remove typedef.
12534         (dwarf2_locexpr_baton_eval): Remove unused variable.
12535
12536 2017-01-10  Tom Tromey  <tom@tromey.com>
12537
12538         * python/python-internal.h (make_cleanup_py_decref)
12539         (make_cleanup_py_xdecref): Don't declare.
12540         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12541         (py_xdecref, make_cleanup_py_xdecref): Remove.
12542
12543 2017-01-10  Tom Tromey  <tom@tromey.com>
12544
12545         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12546         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12547
12548 2017-01-10  Tom Tromey  <tom@tromey.com>
12549
12550         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12551
12552 2017-01-10  Tom Tromey  <tom@tromey.com>
12553
12554         * python/py-utils.c (unicode_to_encoded_string)
12555         (python_string_to_target_string)
12556         (python_string_to_target_python_string)
12557         (python_string_to_host_string, gdbpy_obj_to_string)
12558         (get_addr_from_python): Use gdbpy_ref.
12559
12560 2017-01-10  Tom Tromey  <tom@tromey.com>
12561
12562         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12563         gdbpy_ref.
12564
12565 2017-01-10  Tom Tromey  <tom@tromey.com>
12566
12567         * python/python.c (eval_python_command, gdbpy_decode_line)
12568         (gdbpy_run_events, gdbpy_start_type_printers)
12569         (gdbpy_apply_type_printers): Use gdbpy_ref.
12570
12571 2017-01-10  Tom Tromey  <tom@tromey.com>
12572
12573         * python/py-param.c (get_doc_string, compute_enum_values): Use
12574         gdbpy_ref.
12575
12576 2017-01-10  Tom Tromey  <tom@tromey.com>
12577
12578         * python/py-inferior.c (find_thread_object, build_inferior_list):
12579         Use gdbpy_ref.
12580
12581 2017-01-10  Tom Tromey  <tom@tromey.com>
12582
12583         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12584
12585 2017-01-10  Tom Tromey  <tom@tromey.com>
12586
12587         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12588         gdbpy_ref.
12589
12590 2017-01-10  Tom Tromey  <tom@tromey.com>
12591
12592         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12593         extra incref.
12594         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12595         Use gdbpy_ref.
12596
12597 2017-01-10  Tom Tromey  <tom@tromey.com>
12598
12599         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12600         gdbpy_ref.
12601
12602 2017-01-10  Tom Tromey  <tom@tromey.com>
12603
12604         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12605         decref results of PyArg_ParseTupleAndKeywords.
12606
12607 2017-01-10  Tom Tromey  <tom@tromey.com>
12608
12609         * python/python.c (python_run_simple_file): Use
12610         unique_xmalloc_ptr, gdbpy_ref.
12611
12612 2017-01-10  Tom Tromey  <tom@tromey.com>
12613
12614         * python/py-prettyprint.c (print_stack_unless_memory_error)
12615         (print_string_repr, print_children): Use gdbpy_ref.
12616         (dummy_python_frame): New class.
12617         (dummy_python_frame::dummy_python_frame): Rename from
12618         push_dummy_python_frame.
12619         (py_restore_tstate): Remove.
12620
12621 2017-01-10  Tom Tromey  <tom@tromey.com>
12622
12623         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12624
12625 2017-01-10  Tom Tromey  <tom@tromey.com>
12626
12627         * python/python.c (ensure_python_env, restore_python_env):
12628         Remove.
12629         * python/python-internal.h (ensure_python_env): Don't declare.
12630         * varobj.h (varobj_ensure_python_env): Don't declare.
12631         * varobj.c (varobj_ensure_python_env): Remove.
12632
12633 2017-01-10  Tom Tromey  <tom@tromey.com>
12634
12635         * varobj.c (varobj_value_get_print_value): Use
12636         gdbpy_enter_varobj.
12637
12638 2017-01-10  Tom Tromey  <tom@tromey.com>
12639
12640         * python/py-prettyprint.c (print_string_repr, print_children):
12641         Update.
12642         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12643         of "encoding".
12644         * varobj.c (varobj_value_get_print_value): Update.
12645         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12646
12647 2017-01-10  Tom Tromey  <tom@tromey.com>
12648
12649         * varobj.c (varobj_get_display_hint)
12650         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12651         (varobj_set_visualizer, free_variable): Use
12652         gdbpy_enter_varobj.
12653
12654 2017-01-10  Tom Tromey  <tom@tromey.com>
12655
12656         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12657         (do_finish_initialization): New function.  Use gdbpy_ref.
12658         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12659         do_finish_initialization.
12660
12661 2017-01-10  Tom Tromey  <tom@tromey.com>
12662
12663         * python/py-param.c (get_set_value, get_show_value): Use
12664         gdbpy_enter, gdbpy_ref.
12665
12666 2017-01-10  Tom Tromey  <tom@tromey.com>
12667
12668         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12669
12670 2017-01-10  Tom Tromey  <tom@tromey.com>
12671
12672         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12673
12674 2017-01-10  Tom Tromey  <tom@tromey.com>
12675
12676         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12677         Use gdbpy_enter_varobj.
12678
12679 2017-01-10  Tom Tromey  <tom@tromey.com>
12680
12681         * varobj.c (gdbpy_enter_varobj): New constructor.
12682         * python/python-internal.h (gdbpy_enter_varobj): New class.
12683         * python/py-varobj.c (py_varobj_get_iterator): Use
12684         gdbpy_enter_varobj.
12685
12686 2017-01-10  Tom Tromey  <tom@tromey.com>
12687
12688         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12689         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12690         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12691         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12692         unique_xmalloc_ptr.
12693         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12694
12695 2017-01-10  Tom Tromey  <tom@tromey.com>
12696
12697         * python/py-xmethods.c (invoke_match_method): Use
12698         gdbpy_ref.
12699
12700 2017-01-10  Tom Tromey  <tom@tromey.com>
12701
12702         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12703         gdbpy_enter, gdbpy_ref.
12704
12705 2017-01-10  Tom Tromey  <tom@tromey.com>
12706
12707         * python/python.c (python_interactive_command): Use gdbpy_enter.
12708
12709 2017-01-10  Tom Tromey  <tom@tromey.com>
12710
12711         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12712         gdbpy_ref.
12713
12714 2017-01-10  Tom Tromey  <tom@tromey.com>
12715
12716         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12717         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12718
12719 2017-01-10  Tom Tromey  <tom@tromey.com>
12720
12721         * utils.h (htab_deleter): New struct.
12722         (htab_up): New typedef.
12723         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12724         gdbpy_enter, gdbpy_ref, htab_up.
12725
12726 2017-01-10  Tom Tromey  <tom@tromey.com>
12727
12728         * python/py-unwind.c (pending_frame_invalidate): Remove.
12729         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12730
12731 2017-01-10  Tom Tromey  <tom@tromey.com>
12732
12733         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12734         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12735
12736 2017-01-10  Tom Tromey  <tom@tromey.com>
12737
12738         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12739
12740 2017-01-10  Tom Tromey  <tom@tromey.com>
12741
12742         * python/python.c (gdbpy_eval_from_control_command)
12743         (gdbpy_source_script, gdbpy_run_events)
12744         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12745         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12746         gdbpy_enter.
12747
12748 2017-01-10  Tom Tromey  <tom@tromey.com>
12749
12750         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12751
12752 2017-01-10  Tom Tromey  <tom@tromey.com>
12753
12754         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12755
12756 2017-01-10  Tom Tromey  <tom@tromey.com>
12757
12758         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12759         (python_on_inferior_call_pre, python_on_inferior_call_post)
12760         (python_on_memory_change, python_on_register_change)
12761         (python_inferior_exit, python_new_objfile, add_thread_object)
12762         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12763
12764 2017-01-10  Tom Tromey  <tom@tromey.com>
12765
12766         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12767         (bpfinishpy_handle_exit): Use gdbpy_enter.
12768
12769 2017-01-10  Tom Tromey  <tom@tromey.com>
12770
12771         * python/py-cmd.c (cmdpy_destroyer)
12772         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12773         gdbpy_enter.
12774
12775 2017-01-10  Tom Tromey  <tom@tromey.com>
12776
12777         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12778         gdbpy_enter.
12779         (gdbpy_breakpoint_has_cond): Likewise.
12780
12781 2017-01-10  Tom Tromey  <tom@tromey.com>
12782
12783         * python/python.c (gdbpy_enter): New constructor.
12784         (~gdbpy_enter): New destructor.
12785         (restore_python_env, ensure_python_env): Rewrite.
12786         * python/python-internal.h (gdbpy_enter): New class.
12787
12788 2017-01-10  Tom Tromey  <tom@tromey.com>
12789
12790         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12791
12792 2017-01-10  Tom Tromey  <tom@tromey.com>
12793
12794         * python/py-value.c (value_has_field, get_field_flag)
12795         (get_field_type, valpy_getitem, convert_value_from_python): Use
12796         gdbpy_ref.
12797
12798 2017-01-10  Tom Tromey  <tom@tromey.com>
12799
12800         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12801         gdbpy_ref.
12802
12803 2017-01-10  Tom Tromey  <tom@tromey.com>
12804
12805         * python/py-prettyprint.c (search_pp_list)
12806         (find_pretty_printer_from_objfiles)
12807         (find_pretty_printer_from_progspace)
12808         (find_pretty_printer_from_gdb, find_pretty_printer)
12809         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12810         gdbpy_ref.
12811
12812 2017-01-10  Tom Tromey  <tom@tromey.com>
12813
12814         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12815
12816 2017-01-10  Tom Tromey  <tom@tromey.com>
12817
12818         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12819         (ltpy_get_all_source_lines): Use gdbpy_ref.
12820
12821 2017-01-10  Tom Tromey  <tom@tromey.com>
12822
12823         * python/py-framefilter.c (extract_sym, extract_value)
12824         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12825         gdbpy_ref.
12826
12827 2017-01-10  Tom Tromey  <tom@tromey.com>
12828
12829         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12830
12831 2017-01-10  Tom Tromey  <tom@tromey.com>
12832
12833         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12834
12835 2017-01-10  Tom Tromey  <tom@tromey.com>
12836
12837         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12838         gdbpy_ref.
12839
12840 2017-01-10  Tom Tromey  <tom@tromey.com>
12841
12842         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12843
12844 2017-01-10  Tom Tromey  <tom@tromey.com>
12845
12846         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12847         (typy_range): Use gdbpy_ref.
12848
12849 2017-01-10  Tom Tromey  <tom@tromey.com>
12850
12851         * python/py-threadevent.c (create_thread_event_object): Use
12852         gdbpy_ref.
12853         * python/py-stopevent.c (create_stop_event_object): Simplify.
12854         (emit_stop_event): Use gdbpy_ref.
12855         * python/py-signalevent.c (create_signal_event_object): Use
12856         gdbpy_ref.
12857         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12858         (emit_new_objfile_event, create_clear_objfiles_event_object)
12859         (emit_clear_objfiles_event): Use gdbpy_ref.
12860         * python/py-infevents.c (create_inferior_call_event_object)
12861         (create_register_changed_event_object)
12862         (create_memory_changed_event_object, emit_inferior_call_event)
12863         (emit_memory_changed_event, emit_register_changed_event): Use
12864         gdbpy_ref.
12865         * python/py-exitedevent.c (create_exited_event_object)
12866         (emit_exited_event): Use gdbpy_ref.
12867         * python/py-event.h (evpy_emit_event): Remove
12868         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12869         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12870         * python/py-continueevent.c (emit_continue_event): Use
12871         gdbpy_ref.
12872         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12873         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12874         gdbpy_ref.
12875         * python/py-bpevent.c (create_breakpoint_event_object): Use
12876         gdbpy_ref.
12877
12878 2017-01-10  Tom Tromey  <tom@tromey.com>
12879
12880         * python/py-ref.h: New file.
12881
12882 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12883
12884         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12885         void.
12886         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12887         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12888         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12889         * ui-out.c (ui_out::redirect): Likewise.
12890         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12891         * cli/cli-logging.c (set_logging_redirect): Update call site of
12892         ui_out::redirect.
12893         (handle_redirections): Likewise.
12894         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12895         * top.c (execute_command_to_string): Likewise.
12896         * utils.c (do_ui_out_redirect_pop): Likewise.
12897
12898 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * stack.c (_initialize_stack): Update "frame" command help message.
12901
12902 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12903
12904         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12905
12906 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12907
12908         * x86-linux-nat.h: Include gdb_proc_service.h.
12909
12910 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12911
12912         * ser-base.h: Include serial.h.
12913
12914 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12915
12916         * ppc-linux-tdep.h: Include ppc-tdep.h.
12917
12918 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12919
12920         * nat/amd64-linux-siginfo.h: Include signal.h.
12921
12922 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12923
12924         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12925
12926 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12927
12928         * mi/mi-parse.h: Include mi-cmds.h.
12929
12930 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12931
12932         * inf-loop.c: Don't include "target.h".
12933         * inf-loop.h: Include it here.
12934
12935 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12936
12937         * dfp.h: Include "dboulest.h" and "expression.h".
12938
12939 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12940
12941         * ax-gdb.h: Include "ax.h".
12942
12943 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12944
12945         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12946         with nat/gdb_ptrace.h.
12947
12948 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12949
12950         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12951         new line.
12952         (mips64_fbsd_sigframe_init): Likewise.
12953
12954 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12955
12956         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12957         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12958
12959 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12960
12961         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12962         * NEWS: Mention new FreeBSD/mips native configuration.
12963         * config/mips/fbsd.mh: New file.
12964         * configure.host: Add mips*-*-freebsd*.
12965         * mips-fbsd-nat.c: New file.
12966
12967 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12968
12969         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12970         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12971         * NEWS: Mention new FreeBSD/mips target.
12972         * configure.tgt: Add mips*-*-freebsd*.
12973         * mips-fbsd-tdep.c: New file.
12974         * mips-fbsd-tdep.h: New file.
12975
12976 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12977
12978         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12979         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12980
12981 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12982
12983         Update copyright year range in all GDB files.
12984
12985 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12986
12987         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12988
12989 For older changes see ChangeLog-2016.
12990 \f
12991 Local Variables:
12992 mode: change-log
12993 left-margin: 8
12994 fill-column: 74
12995 version-control: never
12996 coding: utf-8
12997 End: