Rename traceframe_info variable to current_traceframe_info
[external/binutils.git] / gdb / ChangeLog
1 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * tracepoint.c (traceframe_info): Rename to...
4         (current_traceframe_info): ...this.
5         (clear_traceframe_info): Adjust.
6         (get_traceframe_info): Adjust.
7
8 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
9
10         * nat/linux-osdata.c: Include algorithm.
11         (compare_processes): Remove.
12         (struct pid_pgid_entry): New struct.
13         (linux_xfer_osdata_processgroups): Use std::vector instead of
14         XNEWVEC.
15
16 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
17
18         * objfiles.h: Don't include symfile.h.
19         (struct partial_symbol): Remove forward-declaration.
20         (struct objfile) <global_psymbols, static_psymbols>: Change type
21         to std::vector<partial_symbol *>.
22         * objfiles.c (objfile::objfile): Don't memset those fields.
23         (objfile::~objfile): Don't free those fields.
24         * psympriv.h (struct psymbol_allocation_list): Remove
25         forward-declaration.
26         (add_psymbol_to_list): Change psymbol_allocation_list parameter
27         to std::vector.
28         (start_psymtab_common): Change parameters to std::vector.
29         * psymtab.c: Include algorithm.
30         (require_partial_symbols): Call shrink_to_fit.
31         (find_pc_sect_psymbol): Adjust to vector change.
32         (match_partial_symbol): Likewise.
33         (lookup_partial_symbol): Likewise.
34         (psym_relocate): Likewise.
35         (dump_psymtab): Likewise.
36         (recursively_search_psymtabs): Likewise.
37         (compare_psymbols): Remove.
38         (sort_pst_symbols): Adjust to vector change.
39         (start_psymtab_common): Likewise.
40         (end_psymtab_common): Likewise.
41         (psymbol_bcache_full): De-constify return value.
42         (add_psymbol_to_bcache): Likewise.
43         (extend_psymbol_list): Remove.
44         (append_psymbol_to_list): Adjust to vector change.
45         (add_psymbol_to_list): Likewise.
46         (init_psymbol_list): Likewise.
47         (maintenance_info_psymtabs): Likewise.
48         (maintenance_check_psymtabs): Likewise.
49         * symfile.h (struct psymbol_allocation_list): Remove.
50         * symfile.c (reread_symbols): Adjust to vector change.
51         * dbxread.c (start_psymtab): Change type of parameters.
52         (dbx_symfile_read): Adjust to vector change.
53         (read_dbx_symtab): Likewise.
54         (start_psymtab): Change type of parameters.
55         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
56         (create_partial_symtab): Likewise.
57         (add_partial_symbol): Likewise.
58         (write_one_signatured_type): Likewise.
59         (recursively_write_psymbols): Likewise.
60         * mdebugread.c (parse_partial_symbols): Likewise.
61         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
62         (scan_xcoff_symtab): Adjust to vector change.
63         (xcoff_initial_scan): Likewise.
64
65 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
66
67         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
68
69 2017-10-13  Yao Qi  <yao.qi@linaro.org>
70
71         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
72         Remove s390x-*-expedite, add s390x-expedite.
73
74 2017-10-13  Yao Qi  <yao.qi@linaro.org>
75
76         * features/s390-gs-linux64.c: Regenerated.
77         * features/s390x-gs-linux64.c: Regenerated.
78
79 2017-10-13  Tom Tromey  <tom@tromey.com>
80
81         * compile/compile-object-run.c (do_module_cleanup): Use delete.
82         * solib.c (update_solib_list, reload_shared_libraries_1): Use
83         delete.
84         * symfile.c (symbol_file_add_with_addrs): Use new.
85         (symbol_file_add_separate): Update comment.
86         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
87         * jit.c (jit_object_close_impl): Use new.
88         (jit_unregister_code): Use delete.
89         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
90         (~objfile): Rename from free_objfile.
91         (free_objfile_separate_debug, do_free_objfile_cleanup)
92         (free_all_objfiles, objfile_purge_solibs): Use delete.
93         * objfiles.h (struct objfile): Add constructor and destructor.
94         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
95         (allocate_objfile, free_objfile): Don't declare.
96         (struct objstats): Add initializers.
97
98 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
99
100         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
101         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
102         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
103         * gdbarch.h: Regenerate.
104         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
105         Adjust comment.
106         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
107         (i386_displaced_step_fixup): Adjust comment.
108         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
109
110 2017-10-12  Tom Tromey  <tom@tromey.com>
111
112         * prologue-value.h (pv_area::store_would_trash): Return bool.
113         (pv_area::find_reg): Likewise.
114         * prologue-value.c (pv_area::store_would_trash): Return bool.
115         (pv_area::find_reg): Likewise.
116
117 2017-10-12  Tom Tromey  <tom@tromey.com>
118
119         * s390-linux-tdep.c (s390_store, s390_load)
120         (s390_check_for_saved, s390_analyze_prologue): Update.
121         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
122         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
123         * prologue-value.h (class pv_area): Move from prologue-value.c.
124         Change names of members.  Add constructor, destructor, member
125         functions.
126         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
127         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
128         (pv_area_fetch, pv_area_scan): Don't declare.
129         * prologue-value.c (struct pv_area::area_entry): Now member of
130         pv_area.
131         (struct pv_area): Move to prologue-value.h.
132         (pv_area::pv_area): Rename from make_pv_area.
133         (pv_area::~pv_area): Rename from free_pv_area.
134         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
135         (clear_entries, find_entry, overlaps, store_would_trash, store)
136         (fetch, find_reg, scan): Now member of pv_area.
137         Remove "area" argument.  Update.
138         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
139         Update.
140         * mn10300-tdep.c (push_reg, check_for_saved)
141         (mn10300_analyze_prologue): Update.
142         * mep-tdep.c (is_arg_spill, check_for_saved)
143         (mep_analyze_prologue): Update.
144         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
145         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
146         (m32c_is_struct_return, m32c_analyze_prologue): Update.
147         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
148         Update.
149         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
150         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
151
152 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
153
154         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
155         * linux-nat.c (linux_nat_delete_thread): New variable.
156         (lwp_free): Invoke linux_nat_delete_thread if set.
157         (linux_nat_set_delete_thread): New function.
158         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
159         thread delete callback.
160         * arm-linux-nat.c (arm_linux_delete_thread): New function.
161         (_initialize_arm_linux_nat): Assign thread delete callback.
162         * s390-linux-nat.c (s390_delete_thread): New function.
163         (_initialize_s390_nat): Assign thread delete callback.
164         * x86-linux-nat.c (x86_linux_add_target): Likewise.
165         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
166         function.
167         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
168         declaration.
169         * nat/x86-linux.c (x86_linux_delete_thread): New function.
170         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
171
172 2017-10-09  Tom Tromey  <tom@tromey.com>
173
174         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
175         std::string.
176         * tui/tui-layout.c (enum tui_status): Use std::string.
177
178 2017-10-11  Tom Tromey  <tom@tromey.com>
179
180         * gdbthread.h (thread_command): Constify.
181         * inferior.h (detach_command): Constify.
182         * top.h (set_history, show_history): Constify.
183         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
184         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
185         * bsd-kvm.c (bsd_kvm_cmd): Constify.
186         * printcmd.c (set_command): Constify.
187         (non_const_set_command): New function.
188         * dcache.c (set_dcache_command, show_dcache_command): Constify.
189         * breakpoint.c (enable_command, disable_command, delete_command)
190         (catch_command, tcatch_command, set_breakpoint_cmd)
191         (show_breakpoint_cmd): Constify.
192         * macrocmd.c (macro_command): Constify.
193         * infcmd.c (unset_command, kill_command, detach_command)
194         (info_proc_cmd): Constify.
195         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
196         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
197         (info_auto_load_cmd): Constify.
198         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
199         (unset_tdesc_cmd): Constify.
200         * ada-lang.c (set_ada_command, show_ada_command)
201         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
202         * guile/guile.c (set_guile_command, show_guile_command)
203         (info_guile_command): Constify.
204         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
205         Constify.
206         * skip.c (skip_command): Constify.
207         * compile/compile.c (_initialize_compile): Constify.
208         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
209         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
210         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
211         (maint_btrace_pt_show_cmd): Constify.
212         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
213         Constify.
214         * python/python.c (user_show_python, user_set_python): Constify.
215         * mips-tdep.c (set_mips_command, show_mips_command)
216         (set_mipsfpu_command): Constify.
217         * record-btrace.c (cmd_record_btrace_start)
218         (cmd_set_record_btrace, cmd_show_record_btrace)
219         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
220         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
221         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
222         Constify.
223         * symfile.c (overlay_command): Constify.
224         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
225         * cli/cli-logging.c (set_logging_command, show_logging_command):
226         Constify.
227         * cli/cli-dump.c (dump_command, append_command)
228         (srec_dump_command, ihex_dump_command, verilog_dump_command)
229         (tekhex_dump_command, binary_dump_command)
230         (binary_append_command): Constify.
231         * cli/cli-decode.c (struct cmd_list_element): Change type of
232         "fun".
233         * cli/cli-cmds.c (info_command, show_command, set_debug)
234         (show_debug): Constify.
235         (show_command): Add non-const overload.
236         * top.c (set_history, show_history): Constify.
237         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
238         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
239         * target.c (target_command): Constify.
240         * sparc64-tdep.c (info_adi_command): Constify.
241         * record-full.c (cmd_record_full_start): Constify.
242         (set_record_full_command): Constify.  Fix typo.
243         (show_record_full_command): Constify.
244         * thread.c (thread_command, thread_apply_command): Constify.
245         * memattr.c (dummy_cmd): Constify.
246         * value.c (function_command): Constify.
247         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
248         * probe.c (info_probes_command): Constify.
249         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
250         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
251         (show_thread_cmd, set_thread_default_cmd)
252         (show_thread_default_cmd): Constify.
253         (check_empty): Constify.
254         * tracepoint.c (tfind_command): Constify.
255         * cp-support.c (maint_cplus_command): Constify.
256         * windows-tdep.c (info_w32_command): Constify.
257         * record.c (cmd_record_start, set_record_command)
258         (show_record_command, info_record_command, cmd_record_goto):
259         Constify.
260         * ravenscar-thread.c (set_ravenscar_command)
261         (show_ravenscar_command): Constify.
262         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
263         Constify.
264         (add_internal_problem_command): Remove casts.
265         * arc-tdep.c (maintenance_print_arc_command): Constify.
266         * valprint.c (set_print, show_print, set_print_raw)
267         (show_print_raw): Constify.
268         * maint.c (maintenance_command, maintenance_info_command)
269         (maintenance_print_command, maintenance_set_cmd)
270         (maintenance_show_cmd, set_per_command_cmd)
271         (show_per_command_cmd, maintenance_check_command): Constify.
272         * language.c (set_check, show_check): Constify.
273         * typeprint.c (show_print_type, set_print_type): Constify.
274         * go32-nat.c (go32_info_dos_command): Constify.
275
276 2017-10-11  Tom Tromey  <tom@tromey.com>
277
278         * breakpoint.c (prepare_re_set_context): Remove.
279         (breakpoint_re_set_one): Update.  Don't use cleanups.
280         (breakpoint_re_set): Use scoped_restore, std::string, and
281         scoped_restore_current_language.
282
283 2017-10-11  Tom Tromey  <tom@tromey.com>
284
285         * breakpoint.c (commands_command_1): Use std::string.
286         (cleanup_executing_breakpoints): Remove.
287         (bpstat_do_actions_1): Use scoped_restore.
288         (bpstat_check_watchpoint): Use std::string.
289         (decode_static_tracepoint_spec): Likewise.
290         (break_range_command): Likewise.
291         (watch_command_1): Likewise.
292         (compare_breakpoints): Change argument types.
293         (clear_command): Use std::vector.
294         (cleanup_executing_breakpoints): Remove.
295         (update_global_location_list): Use unique_xmalloc_ptr.
296         (strace_command): Remove unused declaration.
297
298 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
299
300         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
301         * NEWS: Mention new FreeBSD/arm native configuration.
302         * configure.host: Add arm*-*-freebsd*.
303         * configure.nat: Likewise.
304         * arm-fbsd-nat.c: New file.
305
306 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
307
308         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
309         (ALLDEPFILES): Add arm-fbsd-tdep.c.
310         * NEWS: Mention new FreeBSD/arm target.
311         * configure.tgt: Add arm*-*-freebsd*.
312         * arm-fbsd-tdep.c: New file.
313         * arm-fbsd-tdep.h: New file.
314
315 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
316
317         * linux-tdep.c (linux_make_corefile_notes): Remove call to
318         `gdbarch_elfcore_write_linux_prpsinfo'.
319         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
320         method.
321         (elf_internal_linux_prpsinfo): Remove declaration.
322         * gdbarch.h: Regenerate.
323         * gdbarch.c: Regenerate.
324
325 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
326
327         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
328         `set_gdbarch_elfcore_write_linux_prpsinfo'.
329
330 2017-10-11  Pedro Alves  <palves@redhat.com>
331
332         * breakpoint.c (reattach_breakpoints): Delete.
333         * breakpoint.h (reattach_breakpoints): Delete.
334
335 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
336
337         * symfile.c (registered_sym_fns): Make struct, not typedef.
338         (DEF_VEC_O (registered_sym_fns)): Remove.
339         (symtab_fns): Change type to std::vector.
340         (add_symtab_fns): Adjust.
341         (find_sym_fns): Adjust.
342
343 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
344
345         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
346         * arc-tdep.h (arc_arch_is_em): New function.
347         (arc_arch_is_hs): Likewise.
348
349 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
350
351         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
352         parentheses in the declaration.
353         (macro_lookup_inclusion): Likewise.
354         (macro_lookup_definition): Likewise.
355         * p-lang.h (pascal_builtin_types): Likewise.
356         * tui/tui-data.c (tui_win_list): Likewise.
357         * tui/tui-data.h (tui_win_list): Likewise.
358         * utils.h (make_cleanup_free_section_addr_info): Likewise.
359
360 2017-10-11  Mark Rages  <markrages@gmail.com>
361
362         * target-memory.c (block_boundaries): Fix for block address not
363         aligned on block size.
364
365 2017-10-10  Pedro Alves <palves@redhat.com>
366             Tom Tromey  <tom@tromey.com>
367
368         * breakpoint.c (struct captured_breakpoint_query_args)
369         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
370         (print_breakpoint): New.
371         * breakpoint.h (print_breakpoint): Declare.
372         * common/common-exceptions.h (enum return_reason): Remove
373         references to catch_exceptions.
374         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
375         Delete.
376         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
377         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
378         * gdb.h: Delete.
379         * gdbthread.h (thread_select): Declare.
380         * mi/mi-cmd-break.c: Don't include gdb.h.
381         (breakpoint_notify): Use print_breakpoint.
382         * mi/mi-cmd-catch.c: Don't include gdb.h.
383         * mi/mi-interp.c: Don't include gdb.h.
384         (mi_print_breakpoint_for_event): New.
385         (mi_breakpoint_created, mi_breakpoint_modified): Use
386         mi_print_breakpoint_for_event.
387         * mi/mi-main.c: Don't include gdb.h.
388         (mi_cmd_thread_select): Parse the global thread ID here.  Use
389         thread_select instead of gdb_thread_select.
390         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
391         of using gdb_list_thread_ids.
392         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
393         FILEIO_ENOSYS here.
394         (remote_fileio_request): Use TRY/CATCH instead of
395         catch_exceptions.
396         * symfile-mem.c (struct symbol_file_add_from_memory_args)
397         (symbol_file_add_from_memory_wrapper): Delete.
398         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
399         * thread.c: Don't include gdb.h.
400         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
401         (thread_alive): Use thread_select.
402         (do_captured_thread_select): Delete, parts salvaged as ...
403         (thread_select): ... this new function.
404         (gdb_thread_select): Delete.
405
406 2017-10-10  Pedro Alves  <palves@redhat.com>
407             Tom Tromey  <tom@tromey.com>
408
409         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
410         and reverse logic.
411         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
412         No longer macros.  Instead ...
413         (enum wp_check_result): They're now values of this new
414         enumeration.
415         (watchpoint_check): Change return type to wp_check_result and
416         parameter type to bpstat.
417         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
418         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
419         catch_errors.  Reverse logic of watchpoint_check call.
420         (breakpoint_re_set_one): Now returns void and takes a breakpoint
421         pointer as parameter.
422         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
423         * common/common-exceptions.c (throw_exception_sjlj): Update
424         comments to avoid mentioning catch_errors.
425         * exceptions.c (catch_errors): Delete.
426         * exceptions.h: Update comments to avoid mentioning catch_errors.
427         (catch_errors_ftype, catch_errors): Delete.
428         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
429         (hook_stop_stub): Delete.
430         (restore_selected_frame): Change return type to void, and
431         parameter type to const frame_id &.
432         (restore_infcall_control_state): Use TRY/CATCH instead of
433         catch_errors.
434         * main.c (captured_command_loop): Return void and remove
435         parameter.  Remove references to catch_errors.
436         (captured_main): Use TRY/CATCH instead of catch_errors.
437         * objc-lang.c (objc_submethod_helper_data)
438         (find_objc_msgcall_submethod_helper): Delete.
439         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
440         catch_errors.
441         * record-full.c (record_full_message): Return void.
442         (record_full_message_args, record_full_message_wrapper): Delete.
443         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
444         instead of catch_errors.
445         * solib-aix.c (solib_aix_open_symbol_file_object): Change
446         parameter type to int.
447         * solib-darwin.c (open_symbol_file_object): Ditto.
448         * solib-dsbt.c (open_symbol_file_object): Ditto.
449         * solib-frv.c (open_symbol_file_object): Ditto.
450         * solib-svr4.c (open_symbol_file_object): Ditto.
451         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
452         * solib.c (update_solib_list): Use TRY/CATCH instead of
453         catch_errors.
454         * solist.h (struct target_so_ops) <open_symbol_file_object>:
455         Change type.
456         * symmisc.c (struct print_symbol_args): Remove.
457         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
458         (print_symbol): Change type.
459         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
460         and remove parameters.
461         (catch_errors): New.
462         (get_windows_debug_event): Adjust.
463
464 2017-10-09  Tom Tromey  <tom@tromey.com>
465
466         * mi/mi-main.c (free_splay_tree): Remove.
467         (list_available_thread_groups): Use splay_tree_up.
468         * common/gdb_splay_tree.h: New file.
469
470 2017-10-09  Tom Tromey  <tom@tromey.com>
471
472         * mi/mi-main.c (do_nothing): Remove.
473         (list_available_thread_groups): Update.
474
475 2017-10-09  Pedro Alves  <palves@redhat.com>
476
477         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
478         reading registers when switching context.
479
480 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
481
482         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
483         (fbsd_convert_siginfo): Likewise.
484         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
485
486 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
487
488         * configure.ac (try_guile_versions): Remove guile-2.2.
489         * configure: Regenerate.
490
491 2017-10-09  Tom Tromey  <tom@tromey.com>
492
493         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
494         (COMPILE.pre): Use $(CXX).
495
496 2017-10-09  Pedro Alves  <palves@redhat.com>
497
498         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
499         Use bool.
500         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
501         * cp-support.h (cp_remove_params): Now returns a
502         gdb::unique_xmalloc_ptr.
503         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
504         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
505         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
506         returning a gdb::unique_xmalloc_ptr.
507         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
508         * stack.c (find_frame_funname): Adjust to cp_remove_params
509         returning a gdb::unique_xmalloc_ptr.
510
511 2017-10-08  Tom Tromey  <tom@tromey.com>
512
513         * dwarf2read.c (dwarf2_get_dwz_file): Use
514         gdb::unique_xmalloc_ptr.
515         (find_slot_in_mapped_hash): Likewise.
516         (dwarf2_physname): Likewise.
517         (create_dwo_unit_in_dwp_v1): Use std::string.
518         (create_dwo_unit_in_dwp_v2): Likewise.
519         (lookup_dwo_cutu): Likewise.
520         (inherit_abstract_dies): Use std::vector.
521         (read_array_type): Likewise.
522         (dwarf_decode_macros): Remove unused declaration.
523         (unsigned_int_compar): Remove.
524         (dwarf2_build_psymtabs_hard): Use scoped_restore.
525         (psymtabs_addrmap_cleanup): Remove.
526
527 2017-10-08  Tom Tromey  <tom@tromey.com>
528
529         * frame-unwind.c (frame_unwind_try_unwinder): Update.
530         * frame.h (frame_cleanup_after_sniffer): Declare.
531         (frame_prepare_for_sniffer): Return void.
532         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
533         type of argument.
534         (frame_prepare_for_sniffer): Return void.
535
536 2017-10-08  Tom Tromey  <tom@tromey.com>
537
538         * utils.h (make_cleanup_value_free): Remove.
539         * utils.c (do_value_free, struct cleanup): Remove.
540         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
541         Use gdb_value_up.
542         * value.h (struct value_deleter): New.
543         (gdb_value_up): New typedef.
544
545 2017-10-08  Tom Tromey  <tom@tromey.com>
546
547         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
548         (make_cleanup_free_search_symbols): Remove.
549         (search_symbols): Return std::vector.
550         (symbol_search::compare_search_syms): Now member of
551         symbol_search.  Change arguments.
552         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
553         (symtab_symbol_info, rbreak_command): Update.
554         * symtab.h (struct symbol_search) <next>: Remove.
555         Add constructors.
556         (symbol_search::operator<): New function.
557         (symbol_search::operator==): New function.
558         (search_symbols): Remove std::vector.
559         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
560         (symbol_search::compare_search_syms): Declare.
561
562 2017-10-06  Yao Qi  <yao.qi@linaro.org>
563
564         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
565         arch/aarch64-insn.o.
566         Remove one rule.
567         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
568
569 2017-10-06  Yao Qi  <yao.qi@linaro.org>
570
571         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
572         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
573         arch/arm-linux.o respectively.
574         * configure.tgt: Likewise.
575
576 2017-10-06  Yao Qi  <yao.qi@linaro.org>
577
578         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
579         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
580
581 2017-10-06  Pedro Alves  <palves@redhat.com>
582
583         * windows-nat.c: Include <algorithm>.
584
585 2017-10-06  Yao Qi  <yao.qi@linaro.org>
586
587         * configure.tgt (i386_tobjs): New variable.
588         (amd64_tobjs): New variable.
589         Set $cpu_obs and $os_obs.
590
591 2017-10-06  Yao Qi  <yao.qi@linaro.org>
592
593         * Makefile.in (CONFIG_SRC_SUBDIR): New.
594         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
595         (clean): Remove object files and dependency files.
596         (distclean): Remove the directory.
597         * configure.ac: Invoke AC_CONFIG_COMMANDS.
598         * configure: Re-generated.
599         * configure.tgt: Replace amd64.o with arch/amd64.o.
600
601 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
602
603         PR build/22188
604         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
605         and SETEND.
606
607 2017-10-05  Pedro Alves  <palves@redhat.com>
608
609         * linux-nat.c (linux_child_follow_fork): When following the parent
610         and detaching the child, consult the parent thread's architecture
611         instead of the child's.
612
613 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
614
615         * ax.h: Do not include "doublest.h".
616         (union agent_val): Remove.
617
618 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
619
620         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
621         (decimal_to_string): Return std::string object.
622         (decimal_from_string): Accept std::string object.  Return bool.
623         (decimal_from_integral, decimal_from_doublest): Remove.
624         (decimal_from_longest): Add prototype.
625         (decimal_from_ulongest): Likewise.
626         (decimal_to_longest): Likewise.
627         (decimal_from_doublest): Likewise.
628         * dfp.c: Do not include "gdbtypes.h" or "value.h".
629         (MAX_DECIMAL_STRING): Move here.
630         (decimal_to_string): Return std::string object.
631         (decimal_from_string): Accept std::string object.  Return bool.
632         (decimal_from_integral): Remove, replace by ...
633         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
634         (decimal_to_longest): New function.
635         (decimal_from_floating): Remove, replace by ...
636         (decimal_from_doublest): ... this new function.
637         (decimal_to_doublest): Update to new decimal_to_string interface.
638
639         * value.c (unpack_long): Use decimal_to_longest.
640         * valops.c (value_cast): Use decimal_from_doublest instead of
641         decimal_from_floating.  Use decimal_from_[u]longest isntead of
642         decimal_from_integral.
643         * valarith.c (value_args_as_decimal): Likewise.
644         * valprint.c (print_decimal_floating): Update to new
645         decimal_to_string interface.
646         * printcmd.c (printf_decfloat): Likewise.
647         * c-exp.y (parse_number): Update to new decimal_from_string interface.
648
649 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
650
651         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
652         * gdbtypes.c: Include "floatformat.h".
653         * value.c: Likewise.
654         * m68k-tdep.c: Likewise.
655
656         * findvar.c: Do not include "floatformat.h".
657         * amd64-darwin-tdep.c: Likewise.
658         * arm-linux-tdep.c: Likewise.
659         * i386-darwin-tdep.c: Likewise.
660         * i387-tdep.c: Likewise.
661         * m68k-linux-tdep.c: Likewise.
662         * mep-tdep.c: Likewise.
663         * mips-tdep.c: Likewise.
664         * nios2-tdep.c: Likewise.
665         * s390-linux-tdep.c: Likewise.
666         * sparc-obsd-tdep.c: Likewise.
667         * sparc-tdep.c: Likewise.
668         * sparc64-tdep.c: Likewise.
669         * spu-tdep.c: Likewise.
670         * tic6x-tdep.c: Likewise.
671         * tilegx-tdep.c: Likewise.
672         * vax-tdep.c: Likewise.
673         * xstormy16-tdep.c: Likewise.
674         * xtensa-tdep.c: Likewise.
675
676         * top.c: Do not include "doublest.h".
677         * aarch64-tdep.c: Likewise.
678         * alpha-tdep.c: Likewise.
679         * arm-linux-tdep.c: Likewise.
680         * m68k-linux-tdep.c: Likewise.
681         * tilegx-tdep.c: Likewise.
682         * xstormy16-tdep.c: Likewise.
683
684 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
685
686         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
687         (mipsn32_fbsd_sigframe): Define.
688         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
689         for FreeBSD/mipsn32.
690
691 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
692
693         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
694         AT_HWCAP.
695
696 2017-10-05  Tristan Gingold  <tgingold@free.fr>
697
698         * MAINTAINERS (Misc): Update my email address.
699
700 2017-10-04  Pedro Alves  <palves@redhat.com>
701
702         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
703         it instead of target_gdbarch.
704         (get_remote_state, get_remote_packet_size): Adjust
705         get_remote_arch_state calls, passing down target_gdbarch
706         explicitly.
707         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
708         'gdbarch' and use it instead of target_gdbarch.
709         (get_memory_packet_size): Adjust get_remote_arch_state calls,
710         passing down target_gdbarch explicitly.
711         (struct stop_reply) <arch>: New field.
712         (remote_parse_stop_reply): Use the stopped thread's architecture,
713         not the current inferior's.  Save the architecture in the
714         stop_reply.
715         (process_stop_reply): Use the stop reply's architecture.
716         (process_g_packet, remote_fetch_registers)
717         (remote_prepare_to_store, store_registers_using_G)
718         (remote_store_registers): Adjust get_remote_arch_state calls,
719         using the regcache's architecture.
720         (remote_get_trace_status): Adjust get_remote_arch_state calls,
721         passing down target_gdbarch explicitly.
722         * spu-multiarch.c (spu_thread_architecture): Defer to the target
723         beneath instead of calling target_gdbarch.
724         * target.c (default_thread_architecture): Use the specified
725         inferior's architecture, instead of the current inferior's
726         architecture (via target_gdbarch).
727
728 2017-10-04  Pedro Alves  <palves@redhat.com>
729
730         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
731         case.
732         (regcache_print): Handle !target_has_registers here instead.
733
734 2017-10-04  Pedro Alves  <palves@redhat.com>
735
736         * frame.c (create_test_frame): Delete.
737         * frame.h (create_test_frame): Delete.
738         * gdbarch-selftests.c: Include gdbthread.h and target.h.
739         (class regcache_test): Delete.
740         (test_target_has_registers, test_target_has_stack)
741         (test_target_has_memory, test_target_prepare_to_store)
742         (test_target_store_registers): New functions.
743         (test_target_ops): New class.
744         (register_to_value_test): Error out if there's already a
745         process_stratum (or higher) target pushed.  Create a fuller mock
746         environment, with mock target_ops, inferior, address space, thread
747         and inferior_ptid.
748         * progspace.c (struct address_space): Move to ...
749         * progspace.h (struct address_space): ... here.
750         * regcache.h (regcache::~regcache, regcache::raw_write)
751         [GDB_SELF_TEST]: No longer virtual.
752
753 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
754
755         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
756
757 2017-10-04  Pedro Alves  <palves@redhat.com>
758
759         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
760         out of 'between TRY and CATCH'.
761
762 2017-10-04  Pedro Alves  <palves@redhat.com>
763
764         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
765         * common/common-exceptions.h (TRY): Open an outermost scope.
766         Expand intro comment.
767         (CATCH): Reindent.
768         (END_CATCH): Close the outermost scope.
769         * completer.c (complete_line_internal): Add missing END_CATCH.
770
771 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
772
773         * NEWS (Changes since GDB 8.0): Add entry about new
774         'set-cwd-on-gdbserver' feature.
775         (New remote packets): Add entry for QSetWorkingDir.
776         * common/common-inferior.h (set_inferior_cwd): New prototype.
777         * infcmd.c (set_inferior_cwd): Remove "static".
778         (show_cwd_command): Expand text to include remote debugging.
779         * remote.c: Add PACKET_QSetWorkingDir.
780         (remote_protocol_features) <QSetWorkingDir>: New entry for
781         PACKET_QSetWorkingDir.
782         (extended_remote_set_inferior_cwd): New function.
783         (extended_remote_create_inferior): Call
784         "extended_remote_set_inferior_cwd".
785         (_initialize_remote): Call "add_packet_config_cmd" for
786         QSetWorkingDir.
787
788 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
789
790         * NEWS (New commands): Mention "set/show cwd".
791         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
792         "cd" command's help text.
793         * common/common-inferior.h (get_inferior_cwd): New prototype.
794         * infcmd.c (inferior_cwd_scratch): New global variable.
795         (set_inferior_cwd): New function.
796         (get_inferior_cwd): Likewise.
797         (set_cwd_command): Likewise.
798         (show_cwd_command): Likewise.
799         (_initialize_infcmd): Add "set/show cwd" commands.
800         * inferior.h (class inferior) <cwd>: New field.
801         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
802         (fork_inferior): Change inferior's cwd before its execution.
803         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
804         to CreateProcess.
805
806 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
807
808         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
809         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
810         (COMMON_OBS): Add gdb_tilde_expand.o.
811         * common/gdb_tilde_expand.c: New file.
812         * common/gdb_tilde_expand.h: Likewise.
813
814 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
815
816         * gdbarch.sh (objfile): Remove duplicate declaration.
817         * gdbarch.h: Regenerate.
818
819 2017-10-03  Tom Tromey  <tom@tromey.com>
820
821         * utils.c (internal_vproblem): Use string_vprintf.
822
823 2017-10-03  Tom Tromey  <tom@tromey.com>
824
825         * printcmd.c (info_symbol_command): Use std::string.
826
827 2017-10-03  Tom Tromey  <tom@tromey.com>
828
829         * top.c (gdb_safe_append_history): Use std::string.
830
831 2017-10-03  Tom Tromey  <tom@tromey.com>
832
833         * event-top.c (stdin_event_handler): Update.
834         * main.c (captured_main_1): Update.
835         * top.h (make_delete_ui_cleanup): Remove.
836         (struct ui): Add constructor and destructor.
837         (new_ui, delete_ui): Remove.
838         * top.c (make_delete_ui_cleanup): Remove.
839         (new_ui_command): Use std::unique_ptr.
840         (delete_ui_cleanup): Remove.
841         (ui::ui): Rename from new_ui.  Update.
842         (free_ui): Remove.
843         (ui::~ui): Rename from delete_ui.  Update.
844
845 2017-10-03  Tom Tromey  <tom@tromey.com>
846
847         * symfile.c (load_progress): Use gdb::byte_vector.
848
849 2017-10-03  Tom Tromey  <tom@tromey.com>
850
851         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
852         declaration.
853         * printcmd.c (x_command): Remove unused declaration.
854         * symfile.c (symbol_file_command): Remove unused declaration.
855
856 2017-10-03  Tom Tromey  <tom@tromey.com>
857
858         * utils.c (internal_vproblem): Use std::string.
859         (defaulted_query): Likewise.
860
861 2017-10-03  Tom Tromey  <tom@tromey.com>
862
863         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
864         * top.c (execute_command_to_string): Update.
865         * utils.c (make_cleanup_restore_page_info): Remove.
866         (do_restore_page_info_cleanup): Remove.
867         (set_batch_flag_and_restore_page_info):
868         New.
869         (make_cleanup_restore_page_info): Remove.
870         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
871         (~set_batch_flag_and_restore_page_info): New
872         (make_cleanup_restore_uinteger): Remove.
873         (make_cleanup_restore_integer): Remove.
874         (struct restore_integer_closure): Remove.
875         (restore_integer): Remove.
876         * utils.h (struct set_batch_flag_and_restore_page_info): New
877         class.
878         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
879         (make_cleanup_restore_page_info): Remove.
880         (make_cleanup_restore_uinteger) Remove.
881         (make_cleanup_restore_integer) Remove.
882
883 2017-10-03  Tom Tromey  <tom@tromey.com>
884
885         * record-full.h (record_full_gdb_operation_disable_set): Return
886         scoped_restore_tmpl<int>.
887         * infrun.c (adjust_pc_after_break): Update.
888         (handle_signal_stop): Update.
889         * record-full.c (record_full_gdb_operation_disable_set): Return
890         scoped_restore_tmpl<int>.
891         (record_full_wait_1, record_full_insert_breakpoint)
892         (record_full_remove_breakpoint, record_full_save)
893         (record_full_goto_insn): Update.
894
895 2017-10-02  Tom Tromey  <tom@tromey.com>
896
897         PR rust/22236:
898         * rust-lang.c (rust_val_print_str): New function.
899         (val_print_struct): Call it.
900         (rust_subscript): Preserve name of slice type.
901
902 2017-10-02  Tom Tromey  <tom@tromey.com>
903
904         * rust-lang.c (rust_subscript): Handle slices in
905         EVAL_AVOID_SIDE_EFFECTS case.
906
907 2017-10-02  Tom Tromey  <tom@tromey.com>
908
909         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
910
911 2017-10-02  Tom Tromey  <tom@tromey.com>
912
913         * rust-lang.h (rust_slice_type): Add "extern".
914
915 2017-10-02  Tom Tromey  <tom@tromey.com>
916             Pedro Alves  <palves@redhat.com>
917
918         * ada-lang.h (ada_exc_info::operator<): Make const.
919         (ada_exc_info::operator==): Make const.
920         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
921         Make const.
922
923 2017-09-29  Tom Tromey  <tom@tromey.com>
924
925         * target.c (read_whatever_is_readable): Change type of "result".
926         Update.
927         (free_memory_read_result_vector): Remove.
928         (read_memory_robust): Change return type.  Update.
929         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
930         bin2hex, std::string.
931         * target.h (memory_read_result_s): Remove typedef.
932         (free_memory_read_result_vector): Remove.
933         (read_memory_robust): Return std::vector.
934
935 2017-09-29  Tom Tromey  <tom@tromey.com>
936
937         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
938
939 2017-09-29  Tom Tromey  <tom@tromey.com>
940
941         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
942         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
943         operator< and operator==.
944         (ada_exceptions_list): Return a std::vector.
945         * ada-lang.c (ada_exc_info::operator<): Rename from
946         compare_ada_exception_info.
947         (ada_exc_info::operator==): New.
948         (sort_remove_dups_ada_exceptions_list): Change type of
949         "exceptions".
950         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
951         (ada_add_global_exceptions): Likewise.
952         (ada_exceptions_list_1): Return a std::vector.
953         (ada_exceptions_list): Likewise.
954
955 2017-09-29  Tom Tromey  <tom@tromey.com>
956
957         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
958         'std::set *'.
959         (print_one_inferior): Update.
960         (free_vector_of_ints): Remove.
961         (list_available_thread_groups): Change "ids" to std::set.
962         (mi_cmd_list_thread_groups): Update.
963         (struct collect_cores_data) <core>: Now a std::set.
964         (collect_cores): Update.
965         (unique): Remove.
966         (print_one_inferior): Update.
967
968 2017-09-29  Tom Tromey  <tom@tromey.com>
969
970         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
971         (mi_execute_async_cli_command): Likewise.
972         (mi_cmd_trace_frame_collected): Use field_fmt.
973
974 2017-09-29  Tom Tromey  <tom@tromey.com>
975
976         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
977         gdb::byte_vector.
978
979 2017-09-29  Tom Tromey  <tom@tromey.com>
980
981         * mi/mi-parse.c (mi_parse): Remove unused declaration.
982
983 2017-09-29  Tom Tromey  <tom@tromey.com>
984
985         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
986
987 2017-09-29  Tom Tromey  <tom@tromey.com>
988
989         * varobj.h (varobj_gen_name): Return std::string.
990         * varobj.c (varobj_gen_name): Return std::string.
991         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
992         (mi_cmd_var_delete): Don't copy "name".
993
994 2017-09-29  Tom Tromey  <tom@tromey.com>
995
996         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
997         (mi_cmd_break_insert_1): Update.
998
999 2017-09-29  Tom Tromey  <tom@tromey.com>
1000
1001         * target.h (make_scoped_defer_target_commit_resume): Update.
1002         * target.c (make_scoped_defer_target_commit_resume): Rename from
1003         make_cleanup_defer_target_commit_resume.  Return a
1004         scoped_restore.
1005         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1006
1007 2017-09-29  Tom Tromey  <tom@tromey.com>
1008
1009         * main.c (captured_main_1): Remove unused declaration.
1010         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1011
1012 2017-09-29  Tom Tromey  <tom@tromey.com>
1013
1014         * symtab.c (search_symbols): Remove unused outer cleanup.
1015         (make_source_files_completion_list): Remove unused declaration.
1016
1017 2017-09-29  Tom Tromey  <tom@tromey.com>
1018
1019         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1020
1021 2017-09-29  Tom Tromey  <tom@tromey.com>
1022
1023         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1024         gdb::byte_vector.
1025
1026 2017-09-29  Tom Tromey  <tom@tromey.com>
1027
1028         * complaints.c (vcomplaint): Use std::string.
1029
1030 2017-09-29  Tom Tromey  <tom@tromey.com>
1031
1032         * tracepoint.c (trace_variable_command): Use std::string.
1033         (encode_actions_1): Remove unused declarations.
1034         (create_tsv_from_upload): Use std::string.
1035
1036 2017-09-29  Tom Tromey  <tom@tromey.com>
1037
1038         * cp-support.c (gdb_demangle): Use std::string.
1039
1040 2017-09-29  Tom Tromey  <tom@tromey.com>
1041
1042         * stack.c (parse_frame_specification): Use std::string
1043         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1044
1045 2017-09-29  Tom Tromey  <tom@tromey.com>
1046
1047         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1048
1049 2017-09-29  Tom Tromey  <tom@tromey.com>
1050
1051         * utils.c (vfprintf_maybe_filtered): Use std::string.
1052         (vfprintf_unfiltered): Likewise.
1053
1054 2017-09-29  Tom Tromey  <tom@tromey.com>
1055
1056         * event-top.c (top_level_prompt): Return std::string.
1057         (display_gdb_prompt): Update.
1058
1059 2017-09-29  Tom Tromey  <tom@tromey.com>
1060
1061         * unittests/common-utils-selftests.c (format): New function.
1062         (string_vprintf_tests): New function.
1063         (_initialize_common_utils_selftests): Register new tests.
1064         * common/common-utils.c (string_vprintf): New function.
1065         * common/common-utils.h (string_vprintf): Declare.
1066
1067 2017-09-29  Pedro Alves  <palves@redhat.com>
1068
1069         * common/rsp-low.c (unpack_varlen_hex): Constify.
1070         * common/rsp-low.h (unpack_varlen_hex): Constify.
1071         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1072         Constify.
1073         * remote.c (remote_set_permissions, read_ptid)
1074         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1075         (remote_static_tracepoint_marker_at)
1076         (remote_static_tracepoint_markers_by_strid)
1077         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1078         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1079         (parse_tracepoint_definition, parse_tsv_definition)
1080         (parse_static_tracepoint_marker_definition): Constify.
1081         * tracepoint.h (parse_static_tracepoint_marker_definition)
1082         (parse_trace_status, parse_tracepoint_status)
1083         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1084
1085 2017-09-29  Pedro Alves  <palves@redhat.com>
1086
1087         * remote.c (target_buf, target_buf_size): Delete.
1088         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1089         Use the connection's packet buffer instead.
1090         All callers adjusted.
1091         (_initialize_remote): Remove references to target_buf and
1092         target_buf_size.
1093
1094 2017-09-28  Pedro Alves  <palves@redhat.com>
1095
1096         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1097         unittests/common-utils-selftests.c.
1098         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1099         (COMMON_OBS): Remove utils-selftests.o.
1100         * utils-selftests.c: Move to ...
1101         * unittests/common-utils-selftests.c: ... here and rename self
1102         test to "string_printf".
1103
1104 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1105
1106         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1107         having NULL cus or tus.
1108
1109 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1110
1111         * arm-tdep.c: (convert_from_extended): Remove.
1112         (convert_to_extended): Likewise.
1113         (arm_extract_return_value): Use convert_typed_floating.
1114         (arm_store_return_value): Likewise.
1115
1116         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1117         * sh-tdep.c: Do not include "floatformat.h".
1118         (sh_littlebyte_bigword_type): New function.
1119         (sh_register_convert_to_virtual): Use convert_typed_floating.
1120         (sh_register_convert_to_raw): Likewise.
1121         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1122         (sh64_littlebyte_bigword_type): New function.
1123         (sh64_extract_return_value): Use convert_typed_floating.
1124         (sh64_register_convert_to_virtual): Likewise.
1125         (sh64_register_convert_to_raw): Likewise.
1126
1127 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1128
1129         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1130         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1131
1132         * gdbtypes.h (union type_specific): Make field floatformat hold
1133         just a single struct floatformat, not an array.
1134         (floatformat_from_type): Move here.
1135         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1136         changed TYPE_FLOATFORMAT definition.
1137         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1138         (recursive_dump_type): Likewise.
1139         (init_float_type): Install correct floatformat for byte order.
1140         (arch_float_type): Likewise.
1141
1142 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1143
1144         * gdbtypes.c (init_type): Change incoming argument from
1145         length-in-bytes to length-in-bits.  Assert length is a
1146         multiple of TARGET_CHAR_BITS.
1147         (arch_type, arch_flags_type): Likewise.
1148         (init_integer_type): Update call to init_type.
1149         (init_character_type): Likewise.
1150         (init_boolean_type): Likewise.
1151         (init_float_type): Likewise.
1152         (init_decfloat_type): Likewise.
1153         (init_complex_type): Likewise.
1154         (init_pointer_type): Likewise.
1155         (objfile_type): Likewise.
1156         (arch_integer_type): Update call to arch_type.
1157         (arch_character_type): Likewise.
1158         (arch_boolean_type): Likewise.
1159         (arch_float_type): Likewise.
1160         (arch_decfloat_type): Likewise.
1161         (arch_complex_type): Likewise.
1162         (arch_pointer_type): Likewise.
1163         (gdbtypes_post_init): Likewise.
1164
1165         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1166         (read_base_type): Likewise.
1167         * mdebugread.c (basic_type): Likewise.
1168         * stabsread.c (dbx_init_float_type): Likewise.
1169         (rs6000_builtin_type): Likewise.
1170         (read_range_type): Likewise.  Also, fix call to init_integer_type
1171         with erroneous length argument.
1172
1173         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1174         * d-lang.c (build_d_types): Likewise.
1175         * f-lang.c (build_fortran_types): Likewise.
1176         * go-lang.c (build_go_types): Likewise.
1177         * opencl-lang.c (build_opencl_types): Likewise.
1178         * jit.c (finalize_symtab): Likewise.
1179         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1180         (build_std_type_info_type): Likewise.
1181         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1182         update call to arch_flags_type.
1183
1184         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1185         arch_type.
1186         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1187         * windows-tdep.c (windows_get_tlb_type): Likewise.
1188
1189         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1190         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1191         * m32c-tdep.c (make_types): Likewise.
1192         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1193         (rl78_psw_type): Update call to arch_flags_type.
1194         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1195         * rx-tdep.c (rx_psw_type): Likewise.
1196         (rx_fpsw_type): Likewise.
1197         * sparc-tdep.c (sparc_psr_type): Likewise.
1198         (sparc_fsr_type): Likewise.
1199         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1200         (sparc64_ccr_type): Likewise.
1201         (sparc64_fsr_type): Likewise.
1202         (sparc64_fprs_type): Likewise.
1203
1204 2017-09-27  Tom Tromey  <tom@tromey.com>
1205
1206         * findcmd.c (find_command): Constify.
1207
1208 2017-09-27  Tom Tromey  <tom@tromey.com>
1209
1210         * ada-tasks.c (task_command_1, task_command): Constify.
1211
1212 2017-09-27  Tom Tromey  <tom@tromey.com>
1213
1214         * symtab.c (maintenance_print_symbol_cache)
1215         (maintenance_flush_symbol_cache)
1216         (maintenance_print_symbol_cache_statistics): Constify.
1217
1218 2017-09-27  Tom Tromey  <tom@tromey.com>
1219
1220         * inferior.c (detach_inferior_command, kill_inferior_command)
1221         (inferior_command): Constify.
1222
1223 2017-09-27  Tom Tromey  <tom@tromey.com>
1224
1225         * regcache.c (regcache_print, maintenance_print_registers)
1226         (maintenance_print_raw_registers)
1227         (maintenance_print_cooked_registers)
1228         (maintenance_print_register_groups)
1229         (maintenance_print_remote_registers): Constify.
1230
1231 2017-09-27  Tom Tromey  <tom@tromey.com>
1232
1233         * printcmd.c (map_display_numbers, undisplay_command)
1234         (enable_disable_display_command, enable_display_command)
1235         (disable_display_command): Constify.
1236
1237 2017-09-27  Tom Tromey  <tom@tromey.com>
1238
1239         * breakpoint.h (delete_command): Don't declare.
1240         * breakpoint.c (delete_command, enable_once_command)
1241         (enable_count_command, enable_delete_command, breakpoint_1)
1242         (maintenance_info_breakpoints, stopin_command, stopat_command)
1243         (delete_command, delete_trace_command, save_breakpoints)
1244         (save_breakpoints_command, save_tracepoints_command): Constify.
1245
1246 2017-09-27  Tom Tromey  <tom@tromey.com>
1247
1248         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1249         (skip_ws, extract_identifier, macro_define_command)
1250         (macro_undef_command, macro_list_command): Constify.
1251
1252 2017-09-27  Tom Tromey  <tom@tromey.com>
1253
1254         * infcmd.c (environment_info, set_environment_command)
1255         (unset_environment_command, path_info, info_proc_cmd_1)
1256         (info_proc_cmd_mappings, info_proc_cmd_stat)
1257         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1258         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1259
1260 2017-09-27  Tom Tromey  <tom@tromey.com>
1261
1262         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1263         Constify.
1264
1265 2017-09-27  Tom Tromey  <tom@tromey.com>
1266
1267         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1268
1269 2017-09-27  Tom Tromey  <tom@tromey.com>
1270
1271         * demangle.c (demangle_command): Constify.
1272
1273 2017-09-27  Tom Tromey  <tom@tromey.com>
1274
1275         * progspace.c (maintenance_info_program_spaces_command):
1276         Constify.
1277
1278 2017-09-27  Tom Tromey  <tom@tromey.com>
1279
1280         * compile/compile.c (check_raw_argument, compile_file_command)
1281         (compile_code_command, compile_print_command): Constify.
1282
1283 2017-09-27  Tom Tromey  <tom@tromey.com>
1284
1285         * reggroups.c (maintenance_print_reggroups): Constify.
1286
1287 2017-09-27  Tom Tromey  <tom@tromey.com>
1288
1289         * dwarf2read.c (save_gdb_index_command): Constify.
1290
1291 2017-09-27  Tom Tromey  <tom@tromey.com>
1292
1293         * stap-probe.c (info_probes_stap_command): Constify.
1294
1295 2017-09-27  Tom Tromey  <tom@tromey.com>
1296
1297         * fork-child.c (unset_exec_wrapper_command): Constify.
1298
1299 2017-09-27  Tom Tromey  <tom@tromey.com>
1300
1301         * btrace.c (get_uint, get_context_size, no_chunk)
1302         (maint_btrace_packet_history_cmd)
1303         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1304         (maint_info_btrace_cmd): Constify.
1305
1306 2017-09-27  Tom Tromey  <tom@tromey.com>
1307
1308         * reverse.c (delete_bookmark_command): Constify.
1309
1310 2017-09-27  Tom Tromey  <tom@tromey.com>
1311
1312         * remote.c (set_memory_packet_size)
1313         (set_memory_write_packet_size, show_memory_write_packet_size)
1314         (set_memory_read_packet_size, show_memory_read_packet_size)
1315         (compare_sections_command, packet_command, remote_put_command)
1316         (remote_get_command, remote_delete_command): Constify.
1317
1318 2017-09-27  Tom Tromey  <tom@tromey.com>
1319
1320         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1321         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1322         (set_mipsfpu_auto_command): Constify.
1323
1324 2017-09-27  Tom Tromey  <tom@tromey.com>
1325
1326         * cli/cli-cmds.h (cd_command): Constify.
1327         * cli/cli-cmds.c (cd_command): Constify.
1328
1329 2017-09-27  Tom Tromey  <tom@tromey.com>
1330
1331         * thread.c (thread_name_command, thread_find_command): Constify.
1332
1333 2017-09-27  Tom Tromey  <tom@tromey.com>
1334
1335         * probe.c (enable_probes_command, disable_probes_command):
1336         Constify.
1337
1338 2017-09-27  Tom Tromey  <tom@tromey.com>
1339
1340         * symfile.c (symbol_file_command): Constify.
1341         * gdbcore.h (deprecated_file_changed_hook): Constify.
1342         * exec.c (deprecated_file_changed_hook, exec_file_command)
1343         (file_command): Constify.
1344         * defs.h (symbol_file_command): Constify.
1345
1346 2017-09-27  Tom Tromey  <tom@tromey.com>
1347
1348         * remote-fileio.c (set_system_call_allowed)
1349         (show_system_call_allowed): Constify.
1350
1351 2017-09-27  Tom Tromey  <tom@tromey.com>
1352
1353         * tracepoint.c (delete_trace_variable_command)
1354         (tfind_end_command, tfind_start_command, tfind_pc_command)
1355         (tfind_tracepoint_command, tfind_line_command)
1356         (tfind_range_command, tfind_outside_command): Constify.
1357
1358 2017-09-27  Tom Tromey  <tom@tromey.com>
1359
1360         * ax-gdb.c (maint_agent_printf_command, agent_command)
1361         (agent_eval_command): Constify.
1362
1363 2017-09-27  Tom Tromey  <tom@tromey.com>
1364
1365         * tracepoint.c (info_scope_command): Constify.
1366         * python/python.c (gdbpy_decode_line): Constify.
1367         * python/py-breakpoint.c (bppy_init): Constify.
1368         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1369         * location.h: (new_linespec_location)
1370         (string_to_event_location_basic, string_to_event_location):
1371         Constify.
1372         * location.c (new_linespec_location)
1373         (string_to_event_location_basic, string_to_event_location):
1374         Constify.
1375         * linespec.h (decode_line_with_current_source)
1376         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1377         * linespec.c (linespec_lex_to_end)
1378         (decode_line_with_current_source)
1379         (decode_line_with_last_displayed): Constify.
1380         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1381         Constify.
1382         * cli/cli-cmds.c (edit_command, list_command): Constify.
1383         * breakpoint.h (until_break_command, watch_command_wrapper)
1384         (awatch_command_wrapper, rwatch_command_wrapper)
1385         (init_ada_exception_breakpoint): Constify.
1386         * breakpoint.c (break_command_1, dprintf_command)
1387         (break_range_command, watch_command_wrapper)
1388         (rwatch_command_wrapper, awatch_command_wrapper)
1389         (until_break_command, init_ada_exception_breakpoint)
1390         (strace_marker_create_sals_from_location, trace_command)
1391         (ftrace_command, strace_command, struct tracepoint): Constify.
1392         * ax-gdb.c (agent_command_1): Constify.
1393         * ada-lang.c (ada_exception_sal): Constify.
1394
1395 2017-09-27  Tom Tromey  <tom@tromey.com>
1396
1397         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1398         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1399         (get_context_size, no_chunk, get_insn_history_modifiers)
1400         (cmd_record_insn_history, get_call_history_modifiers)
1401         (cmd_record_call_history): Constify.
1402
1403 2017-09-27  Tom Tromey  <tom@tromey.com>
1404
1405         * source.c (show_substitute_path_command)
1406         (unset_substitute_path_command, set_substitute_path_command):
1407         Constify.
1408
1409 2017-09-27  Tom Tromey  <tom@tromey.com>
1410
1411         * typeprint.c (maintenance_print_type): Constify.
1412         * maint.c (maintenance_dump_me, maintenance_demangle)
1413         (maintenance_time_display, maintenance_info_sections)
1414         (maintenance_print_statistics, maintenance_deprecate)
1415         (maintenance_undeprecate): Constify.
1416         (maintenance_do_deprecate): Constify.  Use std::string.
1417         (maintenance_selftest): Constify.
1418         * gdbtypes.h (maintenance_print_type): Constify.
1419
1420 2017-09-27  Tom Tromey  <tom@tromey.com>
1421
1422         * hppa-tdep.c (unwind_command): Constify.
1423
1424 2017-09-27  Tom Tromey  <tom@tromey.com>
1425
1426         * target-descriptions.c (unset_tdesc_filename_cmd)
1427         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1428         Constify.
1429
1430 2017-09-27  Tom Tromey  <tom@tromey.com>
1431
1432         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1433
1434 2017-09-27  Tom Tromey  <tom@tromey.com>
1435
1436         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1437
1438 2017-09-27  Tom Tromey  <tom@tromey.com>
1439
1440         * tui/tui-regs.c (tui_reg_command): Constify.
1441
1442 2017-09-27  Tom Tromey  <tom@tromey.com>
1443
1444         * skip.c (skip_file_command, skip_function_command)
1445         (skip_enable_command, skip_disable_command, skip_delete_command):
1446         Constify.
1447
1448 2017-09-27  Tom Tromey  <tom@tromey.com>
1449
1450         * record-btrace.c (cmd_record_btrace_bts_start)
1451         (cmd_record_btrace_pt_start): Constify.
1452
1453 2017-09-27  Tom Tromey  <tom@tromey.com>
1454
1455         * symmisc.c (maintenance_print_symbols)
1456         (maintenance_print_msymbols, maintenance_print_objfiles)
1457         (maintenance_info_symtabs, maintenance_check_symtabs)
1458         (maintenance_expand_symtabs, maintenance_info_line_tables):
1459         Constify.
1460
1461 2017-09-27  Tom Tromey  <tom@tromey.com>
1462
1463         * top.c (new_ui_command): Constify.
1464
1465 2017-09-27  Tom Tromey  <tom@tromey.com>
1466
1467         * symfile.c (add_symbol_file_command)
1468         (remove_symbol_file_command, list_overlays_command)
1469         (map_overlay_command, unmap_overlay_command)
1470         (overlay_auto_command, overlay_manual_command)
1471         (overlay_off_command, overlay_load_command): Constify.
1472
1473 2017-09-27  Tom Tromey  <tom@tromey.com>
1474
1475         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1476         (info_spu_mailbox_command, info_spu_dma_command)
1477         (info_spu_proxydma_command): Constify.
1478
1479 2017-09-27  Tom Tromey  <tom@tromey.com>
1480
1481         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1482
1483 2017-09-27  Tom Tromey  <tom@tromey.com>
1484
1485         * cli/cli-script.c (user_defined_command): Constify.
1486
1487 2017-09-27  Tom Tromey  <tom@tromey.com>
1488
1489         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1490         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1491         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1492         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1493         (dump_binary_value, append_binary_memory, append_binary_value):
1494         Constify.
1495         (struct dump_context) <func>: Constify.
1496         (add_dump_command): Update.
1497
1498 2017-09-27  Tom Tromey  <tom@tromey.com>
1499
1500         * cli/cli-cmds.c (show_version, show_configuration)
1501         (source_command, show_user): Constify.
1502
1503 2017-09-27  Tom Tromey  <tom@tromey.com>
1504
1505         * target.c (maintenance_print_target_stack): Constify.
1506
1507 2017-09-27  Tom Tromey  <tom@tromey.com>
1508
1509         * interps.c (interpreter_exec_cmd): Constify.
1510
1511 2017-09-27  Tom Tromey  <tom@tromey.com>
1512
1513         * record-full.c (cmd_record_full_restore): Constify.
1514
1515 2017-09-27  Tom Tromey  <tom@tromey.com>
1516
1517         * memattr.c (enable_mem_command, disable_mem_command)
1518         (delete_mem_command): Constify.
1519
1520 2017-09-27  Tom Tromey  <tom@tromey.com>
1521
1522         * value.c (show_convenience): Constify.
1523
1524 2017-09-27  Tom Tromey  <tom@tromey.com>
1525
1526         * gdbcore.h (core_file_command): Update.
1527         * corefile.c (core_file_command): Constify.
1528
1529 2017-09-27  Tom Tromey  <tom@tromey.com>
1530
1531         * user-regs.c (maintenance_print_user_registers): Constify.
1532
1533 2017-09-27  Tom Tromey  <tom@tromey.com>
1534
1535         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1536
1537 2017-09-27  Tom Tromey  <tom@tromey.com>
1538
1539         * cp-support.c (first_component_command): Constify.
1540
1541 2017-09-27  Tom Tromey  <tom@tromey.com>
1542
1543         * psymtab.c (maintenance_print_psymbols)
1544         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1545         Constify.
1546
1547 2017-09-27  Tom Tromey  <tom@tromey.com>
1548
1549         * windows-tdep.c (display_tib): Constify.
1550
1551 2017-09-27  Tom Tromey  <tom@tromey.com>
1552
1553         * linux-fork.c (delete_checkpoint_command)
1554         (detach_checkpoint_command): Constify.
1555
1556 2017-09-27  Tom Tromey  <tom@tromey.com>
1557
1558         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1559
1560 2017-09-27  Tom Tromey  <tom@tromey.com>
1561
1562         * arc-tdep.c (dump_arc_instruction_command): Constify.
1563
1564 2017-09-27  Tom Tromey  <tom@tromey.com>
1565
1566         * valprint.c (set_radix, show_radix): Constify.
1567
1568 2017-09-27  Tom Tromey  <tom@tromey.com>
1569
1570         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1571
1572 2017-09-27  Tom Tromey  <tom@tromey.com>
1573
1574         * command.h (not_just_help_class_command): Update.
1575         * cli/cli-decode.h (not_just_help_class_command): Update.
1576         * cli/cli-decode.c (not_just_help_class_command): Constify.
1577
1578 2017-09-27  Tom Tromey  <tom@tromey.com>
1579
1580         * gdb_bfd.c (maintenance_info_bfds): Constify.
1581
1582 2017-09-27  Tom Tromey  <tom@tromey.com>
1583
1584         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1585         overloads.
1586         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1587         (do_const_cfunc): New function.
1588         (cmd_cfunc_eq): New overload.
1589         (cli_user_command_p): Check do_const_cfunc.
1590         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1591         const_cfunc.
1592         * command.h (add_cmd): Add const overload and no-function
1593         overload.
1594         (set_cmd_cfunc): Add const overload.
1595         (cmd_const_cfunc_ftype): Declare.
1596         (cmd_cfunc_eq): Add const overload.
1597         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1598         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1599         overload.
1600
1601 2017-09-27  Tom Tromey  <tom@tromey.com>
1602
1603         * macroexp.c (get_next_token_for_substitution): New function.
1604         (substitute_args): Call it.  Check for __VA_OPT__.
1605
1606 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1607             Pedro Alves <palves@redhat.com>
1608
1609         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1610         producer_is_icc_lt_14.
1611         (producer_is_icc_lt_14): New function.
1612         (check_producer): Add code for checking version of ICC.
1613         (producer_is_icc): Move to producer.c.
1614         (read_structure_type): Restrict ICC workaround to ICC<14.
1615         * producer.c: Include selftest.h.
1616         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1617         New functions.
1618         * producer.h (producer_is_icc): New declaration.
1619
1620 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1621
1622         * Makefile.in (SFILES): Add producer.c.
1623         (COMMON_OBS): Add producer.o
1624         * amd64-tdep.c (producer.h): Add new include.
1625         * dwarf2read.c (producer.h): Add new include.
1626         * producer.c: New file.
1627         * producer.h: New file.
1628         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1629         producer.c.
1630         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1631         producer.h.
1632
1633 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1634
1635         * configure.ac: Search ncursesw before ncurses.
1636         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1637         * gdb_curses.h: Include <ncursesw/ncurses.h>
1638         * config.in, configure: Regenerate.
1639
1640 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1641
1642         PR gdb/22185
1643         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1644         obsolete.
1645         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1646         Remove i386sol2 support.
1647         * configure.nat <i386sol2>: Remove.
1648         <sol2-64>: Fold into ...
1649         <sol2>: ... this.
1650         Move common settings to default section.
1651         Add sol-thread.o.
1652         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1653         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1654         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1655         <i[34567]86-*-solaris*>: Remove.
1656         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1657
1658         * configure.ac: Remove wctype in libw check.
1659         (_MSE_INT_H): Don't define on Solaris 7-9.
1660         <solaris*>: Remove libthread_db.so.1 check.
1661         * configure: Regenerate.
1662         * config.in: Regenerate.
1663
1664         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1665         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1666         (gdb_ps_size_t): Remove.
1667         Use base types in users.
1668         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1669
1670         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1671
1672 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1673
1674         PR build/22206
1675         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1676         (adi_is_addr_mapped): Likewise.
1677         (PSR_ICC): Don't redefine.
1678         (PSR_IMPL): Likewise.
1679
1680 2017-09-25  Tom Tromey  <tom@tromey.com>
1681
1682         * regcache.c (regcache::dump): Use string_printf.
1683
1684 2017-09-25  Tom Tromey  <tom@tromey.com>
1685
1686         * regcache.c (class regcache_invalidator): New.
1687         (struct register_to_invalidate): Remove.
1688         (make_cleanup_regcache_invalidate): Remove.
1689         (regcache::raw_write): Use regcache_invalidator.
1690
1691 2017-09-25  Tom Tromey  <tom@tromey.com>
1692
1693         * spu-tdep.c (spu2ppu_sniffer): Update.
1694         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1695         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1696         Remove.
1697         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1698         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1699         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1700         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1701         (frame_pop): Update.
1702
1703 2017-09-25  Tom Tromey  <tom@tromey.com>
1704
1705         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1706         * regcache.h (regcache_xfree): Don't declare.
1707         * regcache.c (regcache_xfree): Remove.
1708         (do_regcache_xfree): Use delete.
1709         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1710         * linux-fork.c (free_fork): Use delete.
1711         (fork_save_infrun_state): Likewise.
1712         * jit.c (jit_dealloc_cache): Use delete.
1713         * infrun.c (discard_infcall_suspend_state): Use delete.
1714
1715 2017-09-25  Tom Tromey  <tom@tromey.com>
1716
1717         * regcache.h (regcache_xmalloc): Don't declare.
1718         (regcache_raw_set_cached_value): Update comment.
1719         * regcache.c (regcache_xmalloc): Remove.
1720         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1721         * jit.c (jit_frame_sniffer): Use new.
1722         * frame.c (frame_save_as_regcache): Use new.
1723
1724 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1725
1726         * NEWS: Advertise support for guarded-storage registers on IBM z.
1727
1728 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1729
1730         * s390-linux-nat.c (have_regset_gs): New static variable.
1731         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1732         control block and guarded-storage broadcast control regsets.
1733         (s390_read_description): Detect whether the target has
1734         guarded-storage support, return appropriate tdesc.
1735         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1736         (features/s390x-gs-linux64.c): Likewise.
1737         (struct gdbarch_tdep) <have_gs>: New field.
1738         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1739         (s390_gsbc_regset): New variables.
1740         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1741         and s390_gsbc_regset, if applicable.
1742         (s390_core_read_description): Check whether core file was from a
1743         target with guarded-storage support; include appropriate regsets.
1744         (s390_gdbarch_init): Add registers for guarded-storage support.
1745         (_initialize_s390_tdep): Initialize new target descriptions that
1746         include registers for guarded-storage support.
1747         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1748         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1749         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1750         (S390_NUM_REGS): Adjust macro definition.
1751         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1752         (tdesc_s390x_gs_linux64): New declarations.
1753
1754 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1755
1756         * features/s390-gs-linux64.xml: New file.
1757         * features/s390-gs.xml: New file.
1758         * features/s390-gsbc.xml: New file.
1759         * features/s390x-gs-linux64.xml: New file.
1760         * features/Makefile (WHICH): Add s390-gs-linux64 and
1761         s390x-gs-linux64.
1762         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1763         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1764         * features/s390-gs-linux64.c: New generated file.
1765         * features/s390x-gs-linux64.c: New file.
1766         * regformats/s390-gs-linux64.dat: New file.
1767         * regformats/s390x-gs-linux64.dat: New file.
1768
1769 2017-09-23  Tom Tromey  <tom@tromey.com>
1770
1771         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1772
1773 2017-09-22  Tom Tromey  <tom@tromey.com>
1774
1775         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1776         type to scoped_restore_tmpl.
1777         <scoped_input_handler>: Initialize m_quit_handler directly.
1778
1779 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1780
1781         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1782         (cd_command): Likewise.  Free "current_directory" before
1783         assigning to it.
1784         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1785         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1786         * top.c (gdb_dirbuf): Remove global declaration.
1787         * top.h (gdb_dirbuf): Likewise.
1788
1789 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1790
1791         * gnulib/aclocal.m4: Regenerate.
1792         * gnulib/config.in: Regenerate.
1793         * gnulib/configure: Regenerate.
1794         * gnulib/import/Makefile.am: Regenerate.
1795         * gnulib/import/Makefile.in: Regenerate.
1796         * gnulib/import/assure.h: New file.
1797         * gnulib/import/at-func.c: Likewise
1798         * gnulib/import/chdir-long.c: New file.
1799         * gnulib/import/chdir-long.h: New file.
1800         * gnulib/import/cloexec.c: New file.
1801         * gnulib/import/cloexec.h: New file.
1802         * gnulib/import/close.c: New file.
1803         * gnulib/import/closedir.c: New file.
1804         * gnulib/import/dirent-private.h: New file.
1805         * gnulib/import/dup-safer.c: New file.
1806         * gnulib/import/dup.c: New file.
1807         * gnulib/import/dup2.c: New file.
1808         * gnulib/import/error.c: New file.
1809         * gnulib/import/error.h: New file.
1810         * gnulib/import/exitfail.c: New file.
1811         * gnulib/import/exitfail.h: New file.
1812         * gnulib/import/fchdir.c: New file.
1813         * gnulib/import/fcntl.c: New file.
1814         * gnulib/import/fcntl.in.h: New file.
1815         * gnulib/import/fd-hook.c: New file.
1816         * gnulib/import/fd-hook.h: New file.
1817         * gnulib/import/fd-safer.c: New file.
1818         * gnulib/import/fdopendir.c: New file.
1819         * gnulib/import/filename.h: New file.
1820         * gnulib/import/filenamecat-lgpl.c: New file.
1821         * gnulib/import/filenamecat.h: New file.
1822         * gnulib/import/fstat.c: New file.
1823         * gnulib/import/fstatat.c: New file.
1824         * gnulib/import/getcwd-lgpl.c: New file.
1825         * gnulib/import/getcwd.c: New file.
1826         * gnulib/import/getdtablesize.c: New file.
1827         * gnulib/import/getlogin_r.c: New file.
1828         * gnulib/import/getprogname.c: New file.
1829         * gnulib/import/getprogname.h: New file.
1830         * gnulib/import/gettext.h: New file.
1831         * gnulib/import/glob-libc.h: New file.
1832         * gnulib/import/glob.c: New file.
1833         * gnulib/import/glob.in.h: New file.
1834         * gnulib/import/intprops.h: New file.
1835         * gnulib/import/m4/chdir-long.m4: New file.
1836         * gnulib/import/m4/close.m4: New file.
1837         * gnulib/import/m4/closedir.m4: New file.
1838         * gnulib/import/m4/d-ino.m4: New file.
1839         * gnulib/import/m4/d-type.m4: New file.
1840         * gnulib/import/m4/dup.m4: New file.
1841         * gnulib/import/m4/dup2.m4: New file.
1842         * gnulib/import/m4/error.m4: New file.
1843         * gnulib/import/m4/fchdir.m4: New file.
1844         * gnulib/import/m4/fcntl.m4: New file.
1845         * gnulib/import/m4/fcntl_h.m4: New file.
1846         * gnulib/import/m4/fdopendir.m4: New file.
1847         * gnulib/import/m4/filenamecat.m4: New file.
1848         * gnulib/import/m4/fstat.m4: New file.
1849         * gnulib/import/m4/fstatat.m4: New file.
1850         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1851         * gnulib/import/m4/getcwd-path-max.m4: New file.
1852         * gnulib/import/m4/getcwd.m4: New file.
1853         * gnulib/import/m4/getdtablesize.m4: New file.
1854         * gnulib/import/m4/getlogin_r.m4: New file.
1855         * gnulib/import/m4/getprogname.m4: New file.
1856         * gnulib/import/m4/glob.m4: New file.
1857         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1858         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1859         * gnulib/import/m4/mempcpy.m4: New file.
1860         * gnulib/import/m4/memrchr.m4: New file.
1861         * gnulib/import/m4/mode_t.m4: New file.
1862         * gnulib/import/m4/msvc-inval.m4: New file.
1863         * gnulib/import/m4/msvc-nothrow.m4: New file.
1864         * gnulib/import/m4/open.m4: New file.
1865         * gnulib/import/m4/openat.m4: New file.
1866         * gnulib/import/m4/opendir.m4: New file.
1867         * gnulib/import/m4/readdir.m4: New file.
1868         * gnulib/import/m4/realloc.m4: New file.
1869         * gnulib/import/m4/rewinddir.m4: New file.
1870         * gnulib/import/m4/save-cwd.m4: New file.
1871         * gnulib/import/m4/strdup.m4: New file.
1872         * gnulib/import/m4/strerror.m4: New file.
1873         * gnulib/import/m4/unistd-safer.m4: New file.
1874         * gnulib/import/mempcpy.c: New file.
1875         * gnulib/import/memrchr.c: New file.
1876         * gnulib/import/msvc-inval.c: New file.
1877         * gnulib/import/msvc-inval.h: New file.
1878         * gnulib/import/msvc-nothrow.c: New file.
1879         * gnulib/import/msvc-nothrow.h: New file.
1880         * gnulib/import/open.c: New file.
1881         * gnulib/import/openat-die.c: New file.
1882         * gnulib/import/openat-priv.h: New file.
1883         * gnulib/import/openat-proc.c: New file.
1884         * gnulib/import/openat.c: New file.
1885         * gnulib/import/openat.h: New file.
1886         * gnulib/import/opendir.c: New file.
1887         * gnulib/import/pipe-safer.c: New file.
1888         * gnulib/import/readdir.c: New file.
1889         * gnulib/import/realloc.c: New file.
1890         * gnulib/import/rewinddir.c: New file.
1891         * gnulib/import/save-cwd.c: New file.
1892         * gnulib/import/save-cwd.h: New file.
1893         * gnulib/import/strdup.c: New file.
1894         * gnulib/import/strerror-override.c: New file.
1895         * gnulib/import/strerror-override.h: New file.
1896         * gnulib/import/strerror.c: New file.
1897         * gnulib/import/unistd--.h: New file.
1898         * gnulib/import/unistd-safer.h: New file.
1899         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1900         "getcwd" and "glob".
1901         * ser-tcp.c: Undefine "close" before redefining it.
1902
1903 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1904
1905         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1906         get rid of res_val.
1907
1908 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1909
1910         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1911         <sol2,sparc>: Likewise.
1912         <sol2-64,i386>: Likewise.
1913
1914         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1915         -Wdeprecated-declarations on *-*-solaris*.
1916         * configure: Regenerate.
1917
1918         * procfs.c: Include "nat/inferior.h".
1919         (procfs_info_proc): Fix typo.
1920
1921 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1922
1923         * remote.c (vector): Include.
1924         (struct private_thread_info): Add field, thread_handle.
1925         (free_private_thread_info): Deallocate storage associated with
1926         thread handle.
1927         (get_private_info_thread): Initialize `thread_handle' field.
1928         (struct thread_item): Add field, thread_handle.
1929         (clear_threads_listing_context): Deallocate storage associated
1930         with thread handle.
1931         (start_thread): Add support for "handle" attribute.
1932         (thread_attributes): Add "handle".
1933         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1934         field.
1935         (remote_update_thread_list): Update thread_handle.
1936         (remote_thread_handle_to_thread_info): New function.
1937         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1938
1939 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1940
1941         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1942         function.
1943         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1944         * python/python-internal.h (thread_object_type): Declare.
1945
1946 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1947
1948         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1949         (target_thread_handle_to_thread_info): Declare.
1950         * target.c (target_thread_handle_to_thread_info): New function.
1951         * target-delegates.c: Regenerate.
1952         * gdbthread.h (find_thread_by_handle): Declare.
1953         * thread.c (find_thread_by_handle): New function.
1954         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1955         function.
1956         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1957
1958 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1959
1960         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1961
1962 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1963
1964         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1965
1966 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1967
1968         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1969         to gdb_target_obs.
1970
1971 2017-09-20  Tom Tromey  <tom@tromey.com>
1972
1973         * breakpoint.c (struct counted_command_line): Remove.
1974         (breakpoint_commands): Update.
1975         (alloc_counted_command_line, incref_counted_command_line)
1976         (decref_counted_command_line, do_cleanup_counted_command_line)
1977         (make_cleanup_decref_counted_command_line): Remove.
1978         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1979         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1980         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1981         (save_breakpoints): Update.
1982         * breakpoint.h (counted_command_line): Now a typedef to
1983         shared_ptr.
1984         (struct breakpoint) <commands>: Now a counted_command_line.
1985         (struct bpstats) <command>: Likewise.
1986
1987 2017-09-20  Tom Tromey  <tom@tromey.com>
1988
1989         * breakpoint.c (struct commands_info, do_map_commands_command):
1990         Remove.
1991         (commands_command_1): Update.
1992         (iterate_over_related_breakpoints): Take a function_view.
1993         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1994         (delete_command): Update.
1995         (map_breakpoint_numbers): Take a function_view.
1996         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1997         (disable_command): Update.
1998         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1999         (enable_command): Update.
2000         (struct disp_data, do_enable_breakpoint_disp)
2001         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2002         (do_map_enable_delete_breakpoint): Remove.
2003         (enable_once_command, enable_count_command, enable_delete_command)
2004         (delete_trace_variable_command): Update.
2005
2006 2017-09-20  Tom Tromey  <tom@tromey.com>
2007
2008         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2009         (bpstat_clear): Use delete.
2010         (bpstats): New constructors.
2011         (bpstat_copy, bpstat_stop_status): Use new.
2012         (dprintf_after_condition_true): Update.
2013         * breakpoint.h (bpstats::bpstats): Add constructors.
2014         (bpstats::~bpstats): Add destructor.
2015
2016 2017-09-20  Pedro Alves  <palves@redhat.com>
2017
2018         * eval.c (make_params): Delete, refactored as ...
2019         (class fake_method): ... this new type's ctor.
2020         (fake_method::~fake_method): New.
2021         (evaluate_subexp_standard): Use 'fake_method'.
2022
2023 2017-09-20  Tom Tromey  <tom@tromey.com>
2024
2025         * windows-nat.c (get_windows_debug_event, windows_wait)
2026         (do_initial_windows_stuff, windows_attach): Update.
2027         * utils.c (vwarning, internal_vproblem): Update.
2028         (ui_unregister_input_event_handler_cleanup)
2029         (prepare_to_handle_input): Remove.
2030         (class scoped_input_handler): New.
2031         (defaulted_query, prompt_for_continue): Update.
2032         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2033         Update.
2034         * top.c (undo_terminal_modifications_before_exit): Update.
2035         * target/target.h (target_terminal_init, target_terminal_inferior)
2036         (target_terminal_ours): Don't declare.
2037         (class target_terminal): New.
2038         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2039         (target_terminal_ours_for_output)
2040         (make_cleanup_restore_target_terminal): Don't declare.
2041         (target_terminal_info): Remove.
2042         * target.c (enum terminal_state, terminal_state): Remove.
2043         (target_terminal::terminal_state): Define.
2044         (target_terminal::init): Rename from target_terminal_init.
2045         (target_terminal::inferior): Rename from
2046         target_terminal_inferior.
2047         (target_terminal::ours): Rename from target_terminal_ours.
2048         (target_terminal::ours_for_output): Rename from
2049         target_terminal_ours_for_output.
2050         (target_terminal::info): New method.
2051         (cleanup_restore_target_terminal)
2052         (make_cleanup_restore_target_terminal): Remove.
2053         * solib.c (handle_solib_event): Update.
2054         * remote.c (remote_serial_quit_handler): Update.
2055         (remote_terminal_inferior, remote_wait_as): Update.
2056         * record-full.c (record_full_wait_1): Update.
2057         * nto-procfs.c (procfs_create_inferior): Update.
2058         * nat/fork-inferior.c (startup_inferior): Update.
2059         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2060         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2061         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2062         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2063         (mi_breakpoint_created, mi_breakpoint_deleted)
2064         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2065         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2066         (mi_user_selected_context_changed, report_initial_inferior):
2067         Update.
2068         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2069         (linux_nat_terminal_inferior): Update.
2070         * infrun.c (follow_fork_inferior)
2071         (handle_vfork_child_exec_or_exit, do_target_resume)
2072         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2073         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2074         Update.
2075         * inflow.c (child_terminal_init, info_terminal_command): Update.
2076         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2077         (attach_command): Update.
2078         * infcall.c (call_thread_fsm_should_stop): Update.
2079         * gnu-nat.c (gnu_attach): Update.
2080         * extension.c (struct active_ext_lang_state)
2081         (restore_active_ext_lang): Update.
2082         * exceptions.c (print_flush): Update.
2083         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2084         (struct quit_handler_cleanup_data, restore_quit_handler)
2085         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2086         Remove.
2087         * cp-support.c (gdb_demangle): Update.
2088         * breakpoint.c (update_inserted_breakpoint_locations)
2089         (insert_breakpoint_locations, handle_jit_event)
2090         (disable_breakpoints_in_unloaded_shlib): Update.
2091         * annotate.c (annotate_breakpoints_invalid)
2092         (annotate_frames_invalid): Update.
2093
2094 2017-09-20  Tom Tromey  <tom@tromey.com>
2095
2096         * main.c (catch_command_errors): Rename from
2097         catch_command_errors_const.
2098         (captured_main_1): Update.
2099
2100 2017-09-20  Pedro Alves  <palves@redhat.com>
2101
2102         * cli/cli-cmds.c (list_command): Use print_sal_location.
2103         (print_sal_location): New function.
2104         (ambiguous_line_spec): Use print_sal_location.
2105         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2106         * symtab.c (find_function_start_sal): Likewise.
2107         * symtab.h (symtab_and_line::symbol): New field.
2108
2109 2017-09-20  Pedro Alves  <palves@redhat.com>
2110
2111         * linespec.c (minsym_found): Handle non-text minsyms.
2112         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2113
2114 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2115
2116         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2117         backslash.
2118
2119 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2120
2121         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2122         vmovups instead vmovaps.
2123         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2124
2125 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2126
2127         * NEWS (Changes since GDB 8.0): Add starti.
2128         * infcmd.c (enum run_break): New.
2129         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2130         case.
2131         (run_command): Use enum run_how.
2132         (start_command): Likewise.
2133         (starti_command): New function.
2134         (RUN_ARGS_HELP): New macro.
2135         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2136         commands.  Add starti command.
2137
2138 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2139
2140         * Makefile.in (monitor.o): Remove the rule.
2141
2142 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2143
2144         * annotate.h (struct annotate_arg_emitter): Use
2145         DISABLE_COPY_AND_ASSIGN.
2146         * common/refcounted-object.h (refcounted_object): Likewise.
2147         * completer.h (struct completion_result): Likewise.
2148         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2149         * filename-seen-cache.h (filename_seen_cache): Likewise.
2150         * gdbcore.h (thread_section_name): Likewise.
2151         * gdb_regex.h (compiled_regex): Likewise.
2152         * gdbthread.h (scoped_restore_current_thread): Likewise.
2153         * inferior.h (scoped_restore_current_inferior): Likewise.
2154         * jit.c (jit_reader): Likewise.
2155         * linespec.h (struct linespec_result): Likewise.
2156         * mi/mi-parse.h (struct mi_parse): Likewise.
2157         * nat/fork-inferior.c (execv_argv): Likewise.
2158         * progspace.h (scoped_restore_current_program_space): Likewise.
2159         * python/python-internal.h (class gdbpy_enter): Likewise.
2160         * regcache.h (regcache): Likewise.
2161         * target-descriptions.c (struct tdesc_reg): Likewise.
2162         (struct tdesc_type): Likewise.
2163         (struct tdesc_feature): Likewise.
2164         * ui-out.h (ui_out_emit_type): Likewise.
2165
2166 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2167
2168         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2169         label abort_expression.
2170
2171 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2172
2173         * common/buffer.c (buffer_xml_printf): Adjust.
2174         * common/xml-utils.c (xml_escape_text): Change return type to
2175         std::string, update code accordingly.
2176         * common/xml-utils.h (xml_escape_text): Change return type to
2177         std::string.
2178         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2179         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2180         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2181         Adjust.
2182
2183 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2184
2185         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2186         (SUBDIR_UNITTESTS_OBS): Add new object file.
2187         * unittests/xml-utils-selftests.c: New file.
2188
2189 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2190
2191         * common/selftest.h (selftest): New struct/interface.
2192         (register_test): Add name parameter, add new overload.
2193         (run_tests): Add filter parameter.
2194         (for_each_selftest_ftype): New typedef.
2195         (for_each_selftest): New declaration.
2196         * common/selftest.c (tests): Change type to
2197         map<string, unique_ptr<selftest>>.
2198         (simple_selftest): New struct.
2199         (register_test): New function.
2200         (register_test): Add name parameter and use it.
2201         (run_tests): Add filter parameter and use it.  Add prints.
2202         Adjust to vector -> map change.
2203         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2204         registering selftests.
2205         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2206         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2207         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2208         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2209         * findvar.c (_initialize_findvar): Likewise.
2210         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2211         * maint.c (maintenance_selftest): Update call to run_tests.
2212         (maintenance_info_selftests): New function.
2213         (_initialize_maint_cmds): Register "maintenance info selftests"
2214         command.  Update "maintenance selftest" doc.
2215         * regcache.c (_initialize_regcache): Add names when registering
2216         selftests.
2217         * rust-exp.y (_initialize_rust_exp): Likewise.
2218         * selftest-arch.c (gdbarch_selftest): New struct.
2219         (gdbarch_tests): Remove.
2220         (register_test_foreach_arch): Add name parameter.  Call
2221         register_test.
2222         (tests_with_arch): Remove, move most content to
2223         gdbarch_selftest::operator().
2224         (_initialize_selftests_foreach_arch): Remove.
2225         * selftest-arch.h (register_test_foreach_arch): Add name
2226         parameter.
2227         (run_tests_with_arch): New declaration.
2228         * utils-selftests.c (_initialize_utils_selftests): Add names
2229         when registering selftests.
2230         * utils.c (_initialize_utils): Likewise.
2231         * unittests/array-view-selftests.c
2232         (_initialize_array_view_selftests): Likewise.
2233         * unittests/environ-selftests.c (_initialize_environ_selftests):
2234         Likewise.
2235         * unittests/function-view-selftests.c
2236         (_initialize_function_view_selftests): Likewise.
2237         * unittests/offset-type-selftests.c
2238         (_initialize_offset_type_selftests): Likewise.
2239         * unittests/optional-selftests.c
2240         (_initialize_optional_selftests): Likewise.
2241         * unittests/scoped_restore-selftests.c
2242         (_initialize_scoped_restore_selftests): Likewise.
2243         * NEWS: Document "maintenance selftest" and "maint info
2244         selftests".
2245
2246 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2249         scoped_restore.
2250
2251 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * mi/mi-main.c (mi_load_progress): Make uiout variable
2254         a unique_ptr.
2255
2256 2017-09-15  Pedro Alves  <palves@redhat.com>
2257
2258         * compile/compile-c-types.c (convert_enum, convert_int)
2259         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2260
2261 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2262
2263         * dwarf2read.c (copy_string): Remove.
2264         (parse_macro_definition): Replace copy_string with savestring.
2265
2266 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2267
2268         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2269         gdb_target_obs.
2270         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2271         Likewise.
2272         (i[34567]86-*-linux*): Likewise.
2273
2274 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2275
2276         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2277         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2278         <stack>: Change type to std::vector.
2279         <stack_len, stack_allocated>: Remove.
2280         <grow_stack>: Remove.
2281         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2282         (dwarf_expr_context::~dwarf_expr_context): Remove.
2283         (dwarf_expr_context::grow_stack): Remove.
2284         (dwarf_expr_context::push): Adjust.
2285         (dwarf_expr_context::pop): Adjust.
2286         (dwarf_expr_context::fetch): Adjust.
2287         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2288         (dwarf_expr_context::stack_empty_p): Adjust.
2289         (dwarf_expr_context::execute_stack_op): Adjust.
2290
2291 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2292
2293         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2294         return type to bool.
2295         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2296
2297 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2298
2299         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2300         Change type to bool.
2301         (dwarf_stack_value) <in_stack_memory>: Likewise.
2302         (dwarf_expr_context) <push_address>: Change parameter type to
2303         bool.
2304         <fetch_in_stack_memory>: Change return type to bool.
2305         <push>: Change parameter type to bool.
2306         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2307         to bool.
2308         (dwarf_expr_context::push_address): Likewise.
2309         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2310         to bool.
2311         (dwarf_expr_context::execute_stack_op): Adjust.
2312         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2313
2314 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2315
2316         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2317         (struct dwarf_expr_context) <n_pieces>: Remove.
2318         <pieces>: Change type to std::vector.
2319         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2320         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2321         pieces.
2322         (dwarf_expr_context::add_piece): Adjust.
2323         * dwarf2loc.c (struct piece_closure): Initialize fields.
2324         <n_pieces>: Remove.
2325         <pieces>: Change type to std::vector.
2326         (allocate_piece_closure): Adjust, change parameter to
2327         std::vector rvalue and std::move it to piece_closure.
2328         (rw_pieced_value): Adjust.
2329         (check_pieced_synthetic_pointer): Adjust.
2330         (indirect_synthetic_pointer): Adjust.
2331         (coerce_pieced_ref): Adjust.
2332         (free_pieced_value_closure):  Adjust.  Use delete to free
2333         piece_closure.
2334         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2335         to allocate_piece_closure.
2336         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2337
2338 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2339
2340         * probe.h (probe_ops_cp): Remove typedef.
2341         (DEF_VEC_P (probe_ops_cp)): Remove.
2342         (all_probe_ops): Change type to std::vector.
2343         * probe.c (info_probes_for_ops): Adjust to vector change.
2344         (probe_linespec_to_ops): Likewise.
2345         (all_probe_ops): Change type to std::vector.
2346         (_initialize_probe): Adjust to vector change.
2347         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2348         * elfread.c (elf_get_probes): Likewise.
2349         * stap-probe.c (_initialize_stap_probe): Likewise.
2350
2351 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2352
2353         * probe.h (struct bound_probe): Define constructors.
2354         * probe.c (bound_probe_s): Remove typedef.
2355         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2356         (collect_probes): Change return type to std::vector, remove
2357         cleanup.
2358         (compare_probes): Return bool, change parameter type.  Change
2359         semantic to "less than".
2360         (gen_ui_out_table_header_info): Change parameter to std::vector
2361         and update.
2362         (exists_probe_with_pops): Likewise.
2363         (info_probes_for_ops): Update to std::vector change.
2364         (enable_probes_command): Likewise.
2365         (disable_probes_command): Likewise.
2366
2367 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2368
2369         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2370         vec to std::vector.
2371         * probe.c (parse_probes_in_pspace): Update.
2372         (find_probes_in_objfile): Update.
2373         (find_probe_by_pc): Update.
2374         (collect_probes): Update.
2375         (probe_any_get_probes): Update.
2376         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2377         return type to reference to std::vector.
2378         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2379         std::vector and update.
2380         (dtrace_process_dof): Likewise.
2381         (dtrace_get_probes): Likewise.
2382         * elfread.c (elf_get_probes): Change return type to std::vector,
2383         store an std::vector in bfd_data.
2384         (probe_key_free): Update to std::vector.
2385         * stap-probe.c (handle_stap_probe): Change parameter to
2386         std::vector and update.
2387         (stap_get_probes): Likewise.
2388         * symfile-debug.c (debug_sym_get_probes): Change return type to
2389         std::vector and update.
2390
2391 2017-09-11  Tom Tromey  <tom@tromey.com>
2392
2393         * breakpoint.c (program_breakpoint_here_p): Update.
2394         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2395         from make_show_memory_breakpoints_cleanup.  Return a
2396         scoped_restore_tmpl<int>.
2397         (restore_show_memory_breakpoints): Remove.
2398         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2399         * mem-break.c (memory_validate_breakpoint): Update.
2400         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2401         (ia64_memory_remove_breakpoint): Update.
2402         (ia64_breakpoint_from_pc): Update.
2403         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2404         from make_show_memory_breakpoints_cleanup.
2405
2406 2017-09-11  Tom Tromey  <tom@tromey.com>
2407
2408         * d-namespace.c (d_lookup_symbol): Use std::string.
2409         (find_symbol_in_baseclass): Likewise.
2410
2411 2017-09-11  Tom Tromey  <tom@tromey.com>
2412
2413         * ctf.c (ctf_start): Use std::string.
2414
2415 2017-09-11  Tom Tromey  <tom@tromey.com>
2416
2417         * ada-lang.c (is_known_support_routine): Update.
2418         (ada_unhandled_exception_name_addr_from_raise): Update.
2419         * guile/scm-frame.c (gdbscm_frame_name): Update.
2420         * python/py-frame.c (frapy_name): Update.
2421         (frapy_function): Update.
2422         * stack.h (find_frame_funname): Update.
2423         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2424         (print_frame): Update.
2425
2426 2017-09-11  Tom Tromey  <tom@tromey.com>
2427
2428         * findcmd.c (put_bits): Take a gdb::byte_vector.
2429         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2430         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2431         cleanups.
2432         (find_command): Update.
2433
2434 2017-09-11  Tom Tromey  <tom@tromey.com>
2435
2436         * cli/cli-script.c (class scoped_restore_hook_in): New.
2437         (clear_hook_in_cleanup): Remove.
2438         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2439         scoped_restore_hook_in.
2440
2441 2017-09-11  Tom Tromey  <tom@tromey.com>
2442
2443         * cli/cli-script.c (restore_interp): Remove.
2444         (read_command_lines): Use scoped_restore_interp.
2445         * interps.c (scoped_restore_interp::set_temp): Rename from
2446         interp_set_temp.
2447         * interps.h (class scoped_restore_interp): New.
2448         (interp_set_temp): Remove.
2449
2450 2017-09-11  Tom Tromey  <tom@tromey.com>
2451
2452         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2453         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2454         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2455         scoped_restore.
2456         (mi_cmd_break_insert_1): Update.
2457         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2458         scoped_restore.
2459
2460 2017-09-11  Tom Tromey  <tom@tromey.com>
2461
2462         * demangle.c (demangle_command): Update.
2463         * breakpoint.c (disable_command): Update.
2464         (enable_command): Update.
2465         (find_location_by_number): Make "number" const.  Use
2466         get_number_trailer.
2467         * cli/cli-utils.c (extract_arg): Return std::string.
2468         * probe.c (parse_probe_linespec): Update.  Change types.
2469         (collect_probes): Take string arguments.
2470         (parse_probe_linespec): Likewise.
2471         (info_probes_for_ops): Update.
2472         (enable_probes_command): Update.
2473         (disable_probes_command): Update.
2474         * break-catch-sig.c (catch_signal_split_args): Update.
2475         * mi/mi-parse.c (mi_parse): Update.
2476
2477 2017-09-11  Tom Tromey  <tom@tromey.com>
2478
2479         * language.h (language_enum): Make argument const.
2480         * language.c (language_enum): Make argument const.
2481
2482 2017-09-11  Tom Tromey  <tom@tromey.com>
2483
2484         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2485         as function.
2486         (skip_to_space): Rename from skip_to_space_const.
2487         * common/common-utils.c (skip_to_space): New function.
2488         (skip_to_space): Rename from skip_to_space_const.
2489         * cli/cli-utils.h (get_number): Rename from get_number_const.
2490         (extract_arg): Rename from extract_arg_const.
2491         * cli/cli-utils.c (get_number): Rename from get_number_const.
2492         (extract_arg): Rename from extract_arg_const.
2493         (number_or_range_parser::get_number): Use ::get_number.
2494         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2495         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2496         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2497         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2498         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2499         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2500         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2501         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2502
2503 2017-09-11  Tom Tromey  <tom@tromey.com>
2504
2505         * python/python.c (do_start_initialization): Use
2506         py-event-types.def to initialize types.
2507         Define all object type structures.
2508         * python/python-internal.h: Don't declare event initialization
2509         functions.
2510         * python/py-threadevent.c (thread_event_object_type): Don't
2511         define.
2512         * python/py-stopevent.c (stop_event_object_type): Don't define.
2513         * python/py-signalevent.c (signal_event_object_type): Don't
2514         declare or define.
2515         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2516         (clear_objfiles_event_object_type): Don't declare or define.
2517         * python/py-infevents.c (inferior_call_pre_event_object_type)
2518         (inferior_call_post_event_object_type)
2519         (register_changed_event_object_type)
2520         (memory_changed_event_object_type): Don't declare or define.
2521         * python/py-inferior.c (new_thread_event_object_type)
2522         (new_inferior_event_object_type)
2523         (inferior_deleted_event_object_type): Don't declare or define.
2524         * python/py-exitedevent.c (exited_event_object_type): Don't
2525         declare or define.
2526         * python/py-evts.c (gdbpy_initialize_py_events): Use
2527         py-all-events.def.
2528         * python/py-events.h (thread_event_object_type): Don't declare.
2529         (events_object): Use py-all-events.def.
2530         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2531         py-event-types.def.
2532         * python/py-event-types.def: New file.
2533         * python/py-continueevent.c (create_continue_event_object): Don't
2534         declare or define.
2535         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2536         declare or define.
2537         * python/py-all-events.def: New file.
2538
2539 2017-09-11  Tom Tromey  <tom@tromey.com>
2540
2541         * python/py-threadevent.c (create_thread_event_object): Return
2542         gdbpy_ref.
2543         * python/py-stopevent.h (create_stop_event_object)
2544         (create_breakpoint_event_object, create_signal_event_object):
2545         Update.
2546         * python/py-stopevent.c (create_stop_event_object): Return
2547         gdbpy_ref.
2548         (emit_stop_event): Update.
2549         * python/py-signalevent.c (create_signal_event_object): Return
2550         gdbpy_ref.
2551         * python/py-infevents.c (create_inferior_call_event_object):
2552         Update.
2553         * python/py-event.h (create_event_object)
2554         (create_thread_event_object): Update.
2555         * python/py-event.c (create_event_object): Return gdbpy_ref.
2556         * python/py-continueevent.c: Return gdbpy_ref.
2557         * python/py-bpevent.c (create_breakpoint_event_object): Return
2558         gdbpy_ref.
2559
2560 2017-09-11  Tom Tromey  <tom@tromey.com>
2561
2562         PR python/15622:
2563         * NEWS: Add entry.
2564         * python/python.c (do_start_initialization): Initialize new event
2565         types.
2566         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2567         (gdbpy_initialize_inferior_deleted_event)
2568         (gdbpy_initialize_new_thread_event): Declare.
2569         * python/py-threadevent.c (create_thread_event_object): Add option
2570         "thread" parameter.
2571         * python/py-inferior.c (new_thread_event_object_type)
2572         (new_inferior_event_object_type)
2573         (inferior_deleted_event_object_type): Declare.
2574         (python_new_inferior, python_inferior_deleted): New functions.
2575         (add_thread_object): Emit new_thread event.
2576         (gdbpy_initialize_inferior): Attach new functions to corresponding
2577         observers.
2578         (new_thread, new_inferior, inferior_deleted): Define new event
2579         types.
2580         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2581         registries.
2582         * python/py-events.h (events_object) <new_inferior,
2583         inferior_deleted, new_thread>: New fields.
2584         * python/py-event.h (create_thread_event_breakpoint): Add optional
2585         "thread" parameter.
2586
2587 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2588
2589         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2590         check current_ui instead.
2591         (internal_vproblem): Likewise.
2592
2593 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2594
2595         * thread.c (print_thread_info_1): Remove unnecessary calls to
2596         uiout->is_mi_like_p.
2597
2598 2017-09-09  Tom Tromey  <tom@tromey.com>
2599
2600         * namespace.h (add_using_directive): Update.
2601         * namespace.c (add_using_directive): Change type of excludes to
2602         std::vector.
2603         * dwarf2read.c (read_import_statement): Use std::vector.
2604         (read_namespace): Update.
2605         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2606
2607 2017-09-09  Tom Tromey  <tom@tromey.com>
2608
2609         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2610
2611 2017-09-09  Tom Tromey  <tom@tromey.com>
2612
2613         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2614
2615 2017-09-09  Tom Tromey  <tom@tromey.com>
2616
2617         * stack.c (func_command): Use gdb::def_vector.
2618
2619 2017-09-09  Tom Tromey  <tom@tromey.com>
2620
2621         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2622         ui_out_emit_list, ui_out_emit_tuple.
2623         (mi_cmd_var_update): Likewise.
2624
2625 2017-09-09  Tom Tromey  <tom@tromey.com>
2626
2627         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2628         ui_out_redirect_pop.
2629         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2630         ui_out_redirect_pop.
2631         * utils.c (do_ui_out_redirect_pop)
2632         (make_cleanup_ui_out_redirect_pop): Remove.
2633         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2634         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2635         * ui-out.h (ui_out_redirect_pop): New class.
2636
2637 2017-09-09  Tom Tromey  <tom@tromey.com>
2638
2639         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2640         (list_available_thread_groups, mi_cmd_list_thread_groups)
2641         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2642         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2643         Likewise.
2644
2645 2017-09-09  Tom Tromey  <tom@tromey.com>
2646
2647         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2648         ui_out_emit_tuple.
2649
2650 2017-09-09  Tom Tromey  <tom@tromey.com>
2651
2652         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2653         * stack.c (print_frame): Use ui_out_emit_tuple.
2654         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2655         (info_spu_mailbox_command, info_spu_dma_command)
2656         (info_spu_proxydma_command): Likewise.
2657         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2658         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2659         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2660         ui_out_emit_tuple.
2661         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2662
2663 2017-09-09  Tom Tromey  <tom@tromey.com>
2664
2665         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2666         (class ui_out_emit_table): Update comment.
2667         * ui-out.c (do_cleanup_table_end)
2668         (make_cleanup_ui_out_table_begin_end): Remove.
2669         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2670         (info_spu_dma_cmdlist): Likewise.
2671         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2672         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2673         ui_out_emit_table.
2674
2675 2017-09-09  Tom Tromey  <tom@tromey.com>
2676
2677         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2678         ui_out_emit_list, gdb::optional.
2679
2680 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2681
2682         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2683         prototype.
2684         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2685         prototype.
2686         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2687         prototype.
2688         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2689         * ada-exp.y: Remove _initialize_ada_exp prototype.
2690         * ada-lang.c: Remove _initialize_ada_language prototype.
2691         * ada-tasks.c: Remove _initialize_tasks prototype.
2692         * addrmap.c: Remove _initialize_addrmap prototype.
2693         * agent.c: Remove _initialize_agent prototype.
2694         * aix-thread.c: Remove _initialize_aix_thread prototype.
2695         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2696         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2697         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2698         prototype.
2699         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2700         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2701         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2702         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2703         prototype.
2704         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2705         prototype.
2706         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2707         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2708         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2709         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2710         prototype.
2711         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2712         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2713         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2714         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2715         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2716         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2717         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2718         prototype.
2719         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2720         prototype.
2721         * annotate.c: Remove _initialize_annotate prototype.
2722         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2723         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2724         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2725         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2726         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2727         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2728         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2729         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2730         prototype.
2731         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2732         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2733         * auto-load.c: Remove _initialize_auto_load prototype.
2734         * auxv.c: Remove _initialize_auxv prototype.
2735         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2736         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2737         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2738         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2739         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2740         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2741         prototype.
2742         * break-catch-throw.c: Remove _initialize_break_catch_throw
2743         prototype.
2744         * breakpoint.c: Remove _initialize_breakpoint prototype.
2745         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2746         * btrace.c: Remove _initialize_btrace prototype.
2747         * charset.c: Remove _initialize_charset prototype.
2748         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2749         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2750         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2751         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2752         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2753         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2754         * coffread.c: Remove _initialize_coffread prototype.
2755         * compile/compile.c: Remove _initialize_compile prototype.
2756         * complaints.c: Remove _initialize_complaints prototype.
2757         * completer.c: Remove _initialize_completer prototype.
2758         * copying.awk: Remove _initialize_copying prototype.
2759         * copying.c: Regenerate.
2760         * core-regset.c: Remove _initialize_core_regset prototype.
2761         * corefile.c: Remove _initialize_core prototype.
2762         * corelow.c: Remove _initialize_corelow prototype.
2763         * cp-abi.c: Remove _initialize_cp_abi prototype.
2764         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2765         * cp-support.c: Remove _initialize_cp_support prototype.
2766         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2767         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2768         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2769         * ctf.c: Remove _initialize_ctf prototype.
2770         * d-lang.c: Remove _initialize_d_language prototype.
2771         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2772         prototype.
2773         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2774         * dbxread.c: Remove _initialize_dbxread prototype.
2775         * dcache.c: Remove _initialize_dcache prototype.
2776         * demangle.c: Remove _initialize_demangler prototype.
2777         * disasm-selftests.c: Remove _initialize_disasm_selftests
2778         prototype.
2779         * disasm.c: Remove _initialize_disasm prototype.
2780         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2781         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2782         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2783         prototype.
2784         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2785         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2786         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2787         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2788         * elfread.c: Remove _initialize_elfread prototype.
2789         * exec.c: Remove _initialize_exec prototype.
2790         * extension.c: Remove _initialize_extension prototype.
2791         * f-lang.c: Remove _initialize_f_language prototype.
2792         * f-valprint.c: Remove _initialize_f_valprint prototype.
2793         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2794         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2795         * filesystem.c: Remove _initialize_filesystem prototype.
2796         * findcmd.c: Remove _initialize_mem_search prototype.
2797         * fork-child.c: Remove _initialize_fork_child prototype.
2798         * frame-base.c: Remove _initialize_frame_base prototype.
2799         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2800         * frame.c: Remove _initialize_frame prototype.
2801         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2802         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2803         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2804         * gcore.c: Remove _initialize_gcore prototype.
2805         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2806         * gdbarch.c: Regenerate.
2807         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2808         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2809         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2810         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2811         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2812         * go-lang.c: Remove _initialize_go_language prototype.
2813         * go32-nat.c: Remove _initialize_go32_nat prototype.
2814         * guile/guile.c: Remove _initialize_guile prototype.
2815         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2816         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2817         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2818         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2819         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2820         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2821         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2822         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2823         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2824         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2825         prototype.
2826         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2827         prototype.
2828         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2829         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2830         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2831         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2832         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2833         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2834         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2835         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2836         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2837         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2838         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2839         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2840         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2841         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2842         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2843         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2844         prototype.
2845         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2846         prototype.
2847         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2848         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2849         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2850         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2851         * infcall.c: Remove _initialize_infcall prototype.
2852         * infcmd.c: Remove _initialize_infcmd prototype.
2853         * inferior.c: Remove _initialize_inferiors prototype.
2854         * inflow.c: Remove _initialize_inflow prototype.
2855         * infrun.c: Remove _initialize_infrun prototype.
2856         * interps.c: Remove _initialize_interpreter prototype.
2857         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2858         * jit.c: Remove _initialize_jit prototype.
2859         * language.c: Remove _initialize_language prototype.
2860         * linux-fork.c: Remove _initialize_linux_fork prototype.
2861         * linux-nat.c: Remove _initialize_linux_nat prototype.
2862         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2863         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2864         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2865         * m2-lang.c: Remove _initialize_m2_language prototype.
2866         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2867         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2868         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2869         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2870         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2871         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2872         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2873         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2874         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2875         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2876         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2877         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2878         * machoread.c: Remove _initialize_machoread prototype.
2879         * macrocmd.c: Remove _initialize_macrocmd prototype.
2880         * macroscope.c: Remove _initialize_macroscope prototype.
2881         * maint.c: Remove _initialize_maint_cmds prototype.
2882         * mdebugread.c: Remove _initialize_mdebugread prototype.
2883         * memattr.c: Remove _initialize_mem prototype.
2884         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2885         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2886         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2887         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2888         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2889         * microblaze-linux-tdep.c: Remove
2890         _initialize_microblaze_linux_tdep prototype.
2891         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2892         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2893         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2894         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2895         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2896         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2897         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2898         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2899         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2900         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2901         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2902         prototype.
2903         * mipsread.c: Remove _initialize_mipsread prototype.
2904         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2905         prototype.
2906         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2907         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2908         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2909         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2910         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2911         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2912         prototype.
2913         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2914         * nto-procfs.c: Remove _initialize_procfs prototype.
2915         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2916         * objc-lang.c: Remove _initialize_objc_language prototype.
2917         * objfiles.c: Remove _initialize_objfiles prototype.
2918         * observer.c: Remove observer_test_first_notification_function,
2919         observer_test_second_notification_function,
2920         observer_test_third_notification_function, and
2921         _initialize_observer prototypes.
2922         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2923         * osabi.c: Remove _initialize_gdb_osabi prototype.
2924         * osdata.c: Remove _initialize_osdata prototype.
2925         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2926         * parse.c: Remove _initialize_parse prototype.
2927         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2928         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2929         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2930         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2931         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2932         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2933         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2934         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2935         * printcmd.c: Remove _initialize_printcmd prototype.
2936         * probe.c: Remove _initialize_probe prototype.
2937         * proc-api.c: Remove _initialize_proc_api prototype.
2938         * proc-events.c: Remove _initialize_proc_events prototype.
2939         * proc-service.c: Remove _initialize_proc_service prototype.
2940         * procfs.c: Remove _initialize_procfs prototype.
2941         * psymtab.c: Remove _initialize_psymtab prototype.
2942         * python/python.c: Remove _initialize_python prototype.
2943         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2944         * record-btrace.c: Remove _initialize_record_btrace prototype.
2945         * record-full.c: Remove _initialize_record_full prototype.
2946         * record.c: Remove _initialize_record prototype.
2947         * regcache.c: Remove _initialize_regcache prototype.
2948         * reggroups.c: Remove _initialize_reggroup prototype.
2949         * remote-notif.c: Remove _initialize_notif prototype.
2950         * remote-sim.c: Remove _initialize_remote_sim prototype.
2951         * remote.c: Remove _initialize_remote prototype.
2952         * reverse.c: Remove _initialize_reverse prototype.
2953         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2954         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2955         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2956         prototype.
2957         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2958         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2959         * rust-exp.y: Remove _initialize_rust_exp prototype.
2960         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2961         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2962         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2963         * score-tdep.c: Remove _initialize_score_tdep prototype.
2964         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2965         prototype.
2966         * ser-go32.c: Remove _initialize_ser_dos prototype.
2967         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2968         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2969         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2970         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2971         * serial.c: Remove _initialize_serial prototype.
2972         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2973         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2974         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2975         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2976         * skip.c: Remove _initialize_step_skip prototype.
2977         * sol-thread.c: Remove _initialize_sol_thread prototype.
2978         * solib-aix.c: Remove _initialize_solib_aix prototype.
2979         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2980         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2981         * solib-frv.c: Remove _initialize_frv_solib prototype.
2982         * solib-spu.c: Remove _initialize_spu_solib prototype.
2983         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2984         * solib-target.c: Remove _initialize_solib_target prototype.
2985         * solib.c: Remove _initialize_solib prototype.
2986         * source.c: Remove _initialize_source prototype.
2987         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2988         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2989         prototype.
2990         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2991         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2992         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2993         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2994         prototype.
2995         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2996         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2997         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2998         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2999         prototype.
3000         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3001         prototype.
3002         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3003         prototype.
3004         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3005         prototype.
3006         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3007         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3008         prototype.
3009         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3010         prototype.
3011         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3012         prototype.
3013         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3014         prototype.
3015         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3016         prototype.
3017         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3018         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3019         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3020         * stabsread.c: Remove _initialize_stabsread prototype.
3021         * stack.c: Remove _initialize_stack prototype.
3022         * stap-probe.c: Remove _initialize_stap_probe prototype.
3023         * std-regs.c: Remove _initialize_frame_reg prototype.
3024         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3025         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3026         * symfile.c: Remove _initialize_symfile prototype.
3027         * symmisc.c: Remove _initialize_symmisc prototype.
3028         * symtab.c: Remove _initialize_symtab prototype.
3029         * target-dcache.c: Remove _initialize_target_dcache prototype.
3030         * target-descriptions.c: Remove _initialize_target_descriptions
3031         prototype.
3032         * thread.c: Remove _initialize_thread prototype.
3033         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3034         prototype.
3035         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3036         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3037         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3038         prototype.
3039         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3040         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3041         * tracefile.c: Remove _initialize_tracefile prototype.
3042         * tracepoint.c: Remove _initialize_tracepoint prototype.
3043         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3044         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3045         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3046         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3047         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3048         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3049         * tui/tui.c: Remove _initialize_tui prototype.
3050         * typeprint.c: Remove _initialize_typeprint prototype.
3051         * user-regs.c: Remove _initialize_user_regs prototype.
3052         * utils.c: Remove _initialize_utils prototype.
3053         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3054         * valarith.c: Remove _initialize_valarith prototype.
3055         * valops.c: Remove _initialize_valops prototype.
3056         * valprint.c: Remove _initialize_valprint prototype.
3057         * value.c: Remove _initialize_values prototype.
3058         * varobj.c: Remove _initialize_varobj prototype.
3059         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3060         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3061         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3062         * windows-nat.c: Remove _initialize_windows_nat,
3063         _initialize_check_for_gdb_ini, and _initialize_loadable
3064         prototypes.
3065         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3066         * xcoffread.c: Remove _initialize_xcoffread prototype.
3067         * xml-support.c: Remove _initialize_xml_support prototype.
3068         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3069         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3070         prototype.
3071         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3072         prototype.
3073         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3074
3075 2017-09-08  Keith Seitz  <keiths@redhat.com>
3076
3077         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3078         field.
3079
3080 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3081
3082         * f-valprint.c (f_val_print): Remove check for one byte
3083         sized integers. Remove printing of character type.
3084
3085 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3086             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3087             Bernhard Heckel  <bernhard.heckel@intel.com>
3088
3089         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3090         to maintain proper indentation when printing pointers/refs.
3091
3092 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3093
3094         GDB 8.0.1 released.
3095
3096 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3097
3098         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3099
3100 2017-09-05  Tom Tromey  <tom@tromey.com>
3101
3102         * parse.c (funcall_chain): Now a std::vector.
3103         (start_arglist, end_arglist): Simplify.
3104         (free_funcalls): Remove.
3105         (parse_exp_in_context_1): Remove cleanup.
3106
3107 2017-09-05  Tom Tromey  <tom@tromey.com>
3108
3109         * go-exp.y (go_parse): Don't create a cleanup.
3110
3111 2017-09-05  Tom Tromey  <tom@tromey.com>
3112
3113         * d-exp.y (PrimaryExpression): Use std::string.
3114         (d_parse): Don't create a cleanup.
3115
3116 2017-09-05  Tom Tromey  <tom@tromey.com>
3117
3118         * utils.c (do_clear_parser_state): Remove.
3119         (make_cleanup_clear_parser_state): Remove.
3120         * p-exp.y (pascal_parse): Use scoped_restore.
3121         * m2-exp.y (m2_parse): Use scoped_restore.
3122         * f-exp.y (f_parse): Use scoped_restore.
3123         * d-exp.y (d_parse): Use scoped_restore.
3124         * c-exp.y (c_parse): Use scoped_restore.
3125         * ada-exp.y (ada_parse): Use scoped_restore.
3126         * utils.h (make_cleanup_clear_parser_state): Remove.
3127
3128 2017-09-06  Keith Seitz  <keiths@redhat.com>
3129
3130         * dwarf2read.c (dw2_linkage_name_attr): New function.
3131         (dw2_linkage_name): New function.
3132         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3133         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3134         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3135
3136 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3137
3138         * config/djgpp/djconfig.sh: Correct shell portability issue.
3139
3140 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3141
3142         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3143
3144 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3145
3146         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3147         * NEWS: Mention new FreeBSD/mips native configuration.
3148         * configure.host: Add aarch64*-*-freebsd*.
3149         * configure.nat: Likewise.
3150         * aarch64-fbsd-nat.c: New file.
3151
3152 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3153
3154         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3155         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3156         * NEWS: Mention new FreeBSD/aarch64 target.
3157         * configure.tgt: Add aarch64*-*-freebsd*.
3158         * aarch64-fbsd-tdep.c: New file.
3159         * aarch64-fbsd-tdep.h: New file.
3160
3161 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3162
3163         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3164
3165 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3166
3167         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3168         of TLS symbols.
3169
3170 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3171
3172         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3173         call.
3174
3175 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3176
3177         * infrun.c (follow_exec): Call add_thread after
3178         target_find_description.
3179
3180 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3181
3182         * infrun.c (handle_inferior_event_1): When exec'ing, read
3183         stop_pc after follow_exec.
3184
3185 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3186
3187         * remote.c (process_g_packet): Update error message.
3188
3189 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3190
3191         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3192         targets.
3193
3194 2017-09-05  Pedro Alves  <palves@redhat.com>
3195
3196         * eval.c (eval_call, evaluate_funcall): New functions, factored
3197         out from ...
3198         (evaluate_subexp_standard): ... this.
3199
3200 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3201
3202         * amd64-tdep.c (amd64_target_description): Create target
3203         descriptions.
3204         (_initialize_amd64_tdep): Don't call functions
3205         initialize_tdesc_amd64_*.  Add self tests.
3206         * arch/amd64.c (amd64_create_target_description): Add parameter
3207         is_linux.  Call set_tdesc_osabi if is_linux is true.
3208         * arch/amd64.h (amd64_create_target_description): Update the
3209         declaration.
3210         * arch/i386.c (i386_create_target_description): Add parameter
3211         is_linux.  Call set_tdesc_osabi if is_linux is true.
3212         * arch/i386.h (i386_create_target_description): Update
3213         declaration.
3214         * configure.tgt: Add i386.o to gdb_target_obs.
3215         * features/Makefile (XMLTOC): Remove i386/*.xml.
3216         * features/i386/amd64-avx-avx512.c: Remove.
3217         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3218         * features/i386/amd64-avx-mpx.c: Remove.
3219         * features/i386/amd64-avx.c: Remove.
3220         * features/i386/amd64-mpx.c: Remove.
3221         * features/i386/amd64.c: Remove.
3222         * features/i386/i386-avx-avx512.c: Remove.
3223         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3224         * features/i386/i386-avx-mpx.c: Remove.
3225         * features/i386/i386-avx.c: Remove.
3226         * features/i386/i386-mmx.c: Remove.
3227         * features/i386/i386-mpx.c: Remove.
3228         * features/i386/i386.c: Remove.
3229         * i386-tdep.c: Don't include features/i386/i386*.c., include
3230         target-descriptions.h and arch/i386.h.
3231         (i386_target_description): Create target descriptions.
3232         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3233         functions.  Do self tests.
3234
3235 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3236
3237         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3238         * features/i386/amd64-avx-avx512-linux.c: Removed.
3239         * features/i386/amd64-avx-linux.c: Removed.
3240         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3241         * features/i386/amd64-avx-mpx-linux.c: Removed.
3242         * features/i386/amd64-linux.c: Removed.
3243         * features/i386/amd64-mpx-linux.c: Removed.
3244         * features/i386/x32-avx-avx512-linux.c: Removed.
3245         * features/i386/x32-avx-linux.c: Removed.
3246         * features/i386/x32-linux.c: Removed.
3247
3248 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3249
3250         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3251         features/i386/*.c.
3252         (amd64_linux_read_description): Call
3253         amd64_create_target_description.
3254         * arch/amd64.c: New file.
3255         * arch/amd64.h: New file.
3256         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3257         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3258
3259 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3260
3261         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3262         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3263         (amd64_linux_read_description): Create target descriptions.
3264         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3265         functions.  Add unit tests.
3266         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3267         x32-core.xml.
3268         * features/i386/64bit-avx.c: Generated.
3269         * features/i386/64bit-avx512.c: Generated.
3270         * features/i386/64bit-core.c: Generated.
3271         * features/i386/64bit-linux.c: Generated.
3272         * features/i386/64bit-mpx.c: Generated.
3273         * features/i386/64bit-pkeys.c: Generated.
3274         * features/i386/64bit-segments.c: Generated.
3275         * features/i386/64bit-sse.c: Generated.
3276         * features/i386/x32-core.c: Generated.
3277         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3278         c files for amd64-linux and x32-linux.
3279
3280 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3281
3282         * amd64-linux-tdep.c (amd64_linux_read_description): New
3283         function.
3284         (amd64_linux_core_read_description): Call
3285         amd64_linux_read_description.
3286         (amd64_linux_init_abi): Likewise.
3287         (amd64_x32_linux_init_abi): Likewise.
3288         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3289         * x86-linux-nat.c (x86_linux_read_description): Call
3290         amd64_linux_read_description.
3291
3292 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3293
3294         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3295         comments.
3296
3297 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3298
3299         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3300         * features/i386/i386-avx-avx512-linux.c: Remove.
3301         * features/i386/i386-avx-linux.c: Remove.
3302         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3303         * features/i386/i386-avx-mpx-linux.c: Remove.
3304         * features/i386/i386-linux.c: Remove.
3305         * features/i386/i386-mmx-linux.c: Remove.
3306         * features/i386/i386-mpx-linux.c: Remove.
3307
3308 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3309
3310         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3311         (SFILES): Add arch/i386.c.
3312         (HFILES_NO_SRCDIR): Add arch/i386.h.
3313         * arch/i386.c: New file.
3314         * arch/i386.h: New file.
3315         * arch/tdesc.h (allocate_target_description): Declare.
3316         (set_tdesc_architecture): Declare.
3317         (set_tdesc_osabi): Declare.
3318         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3319         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3320         include arch/i386.h.
3321         (i386_linux_read_description): Remove code and call
3322         i386_create_target_description.
3323         (set_tdesc_architecture): New function.
3324         (set_tdesc_osabi): New function.
3325         * target-descriptions.h (allocate_target_description): Remove.
3326
3327 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3328
3329         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3330         * target-descriptions.c (tdesc_create_feature): Likewise, and
3331         adjust code.
3332         * features/i386/32bit-avx.c: Re-generated.
3333         * features/i386/32bit-avx512.c: Re-generated.
3334         * features/i386/32bit-core.c: Re-generated.
3335         * features/i386/32bit-linux.c: Re-generated.
3336         * features/i386/32bit-mpx.c: Re-generated.
3337         * features/i386/32bit-pkeys.c: Re-generated.
3338         * features/i386/32bit-sse.c: Re-generated.
3339
3340 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3341
3342         * regformats/regdef.h (struct reg): Override operator == and !=.
3343
3344 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3345
3346         * arch/tdesc.h: New file.
3347         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3348         * target-descriptions.c: Update comments.
3349         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3350         declarations.
3351         * features/i386/32bit-avx.c: Re-generated.
3352         * features/i386/32bit-avx512.c: Re-generated.
3353         * features/i386/32bit-core.c: Re-generated.
3354         * features/i386/32bit-linux.c: Re-generated.
3355         * features/i386/32bit-mpx.c: Re-generated.
3356         * features/i386/32bit-pkeys.c: Re-generated.
3357         * features/i386/32bit-sse.c: Re-generated.
3358
3359 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3360
3361         * regformats/regdat.sh: Update generated code.
3362
3363 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3364
3365         * regformats/regdat.sh: Adjust code order.
3366
3367 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3368
3369         * expprint.c (dump_subexp_body_standard): Use constant format
3370         string in fprintf_filtered call.
3371
3372 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3373
3374         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3375         NetBSD/i386.
3376         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3377
3378 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3379
3380         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3381
3382 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3383
3384         * bsd-kvm.o: Define _KMEMUSER.
3385         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3386         * configure: Regenerate.
3387
3388 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3389
3390         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3391         * i386-fbsd-nat.c: Likewise.
3392
3393 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3394
3395         * unittests/array-view-selftests.c: Add include of <array>.
3396
3397 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3398
3399         * spu-tdep.c (flush_ea_cache): Add missing argument to
3400         call_function_by_hand.
3401
3402 2017-09-04  Pedro Alves  <palves@redhat.com>
3403
3404         * NEWS (Safer support for debugging with no debug info): New.
3405
3406 2017-09-04  Pedro Alves  <palves@redhat.com>
3407
3408         * c-exp.y (function_method, function_method_void): Add current
3409         instance flags to TYPE_INSTANCE.
3410         * dwarf2read.c (check_modifier): New.
3411         (compute_delayed_physnames): Assert that only C++ adds delayed
3412         physnames.  Mark fn_fields as const/volatile depending on
3413         physname.
3414         * eval.c (make_params): New type_instance_flags parameter.  Use
3415         it as the new type's instance flags.
3416         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3417         flags element and pass it to make_params.
3418         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3419         instance flags element.
3420         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3421         * gdbtypes.h: Include "enum-flags.h".
3422         (type_instance_flags): New enum-flags type.
3423         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3424         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3425         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3426         (follow_type_instance_flags): New function.
3427         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3428         * parser-defs.h (follow_type_instance_flags): Declare.
3429         * valops.c (value_struct_elt_for_reference): const/volatile must
3430         match too.
3431
3432 2017-09-04  Pedro Alves  <palves@redhat.com>
3433
3434         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3435         function/method scopes; lookup the nested name as a function local
3436         static variable.
3437
3438 2017-09-04  Pedro Alves  <palves@redhat.com>
3439
3440         (%type <voidval>): Add function_method.
3441         * c-exp.y (exp): New production for calls with no arguments.
3442         (function_method, function_method_void_or_typelist): New
3443         productions.
3444         (exp): New production for "method()::static_var".
3445         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3446         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3447         Handle OP_FUNC_STATIC_VAR.
3448         * parse.c (operator_length_standard):
3449         Handle OP_FUNC_STATIC_VAR.
3450
3451 2017-09-04  Pedro Alves  <palves@redhat.com>
3452
3453         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3454         handling.
3455         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3456         Ditto.
3457         * parse.c (operator_length_standard, operator_check_standard):
3458         Ditto.
3459         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3460
3461 2017-09-04  Pedro Alves  <palves@redhat.com>
3462
3463         * ax-gdb.c: Include "typeprint.h".
3464         (gen_expr_for_cast): New function.
3465         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3466         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3467         type is unknown.
3468         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3469         nodebug_data_symbol.
3470         * eval.c: Include "typeprint.h".
3471         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3472         Error out if symbol has unknown type.
3473         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3474         evaluate_subexp_for_cast.
3475         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3476         OP_VAR_MSYM_VALUE.
3477         (evaluate_subexp_for_cast): New function.
3478         * gdbtypes.c (init_nodebug_var_type): New function.
3479         (objfile_type): Use it to initialize types of variables with no
3480         debug info.
3481         * typeprint.c (error_unknown_type): New.
3482         * typeprint.h (error_unknown_type): New declaration.
3483         * compile/compile-c-types.c (convert_type_basic): Handle
3484         TYPE_CODE_ERROR; warn and fallback to int for variables with
3485         unknown type.
3486
3487 2017-09-04  Pedro Alves  <palves@redhat.com>
3488
3489         * eval.c (evaluate_var_value): New function, factored out from ...
3490         (evaluate_subexp_standard): ... here.
3491
3492 2017-09-04  Pedro Alves  <palves@redhat.com>
3493
3494         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3495         Remove useless assignments to 'op'.
3496
3497 2017-09-04  Pedro Alves  <palves@redhat.com>
3498
3499         * eval.c (eval_skip_value): New function.
3500         (evaluate_subexp_standard): Use it.
3501
3502 2017-09-04  Pedro Alves  <palves@redhat.com>
3503
3504         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3505         function name from symbol/minsym and pass it to
3506         error_call_unknown_return_type.
3507
3508 2017-09-04  Pedro Alves  <palves@redhat.com>
3509
3510         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3511         * ax-gdb.c (gen_msym_var_ref): New function.
3512         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3513         * eval.c (evaluate_var_msym_value): New function.
3514         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3515         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3516         to call_function_by_hand.
3517         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3518         Handle OP_VAR_MSYM_VALUE.
3519         (union exp_element) <msymbol>: New field.
3520         * minsyms.h (struct type): Forward declare.
3521         (find_minsym_type_and_address): Declare.
3522         * parse.c (write_exp_elt_msym): New function.
3523         (write_exp_msymbol): Delete, refactored as ...
3524         (find_minsym_type_and_address): ... this new function.
3525         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3526         (operator_length_standard, operator_check_standard): Handle
3527         OP_VAR_MSYM_VALUE.
3528         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3529
3530 2017-09-04  Pedro Alves  <palves@redhat.com>
3531
3532         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3533         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3534         unknown.
3535         * ada-typeprint.c (print_func_type): Handle functions with unknown
3536         return type.
3537         * c-typeprint.c (c_type_print_base): Handle functions and methods
3538         with unknown return type.
3539         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3540         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3541         * compile/compile-c-types.c: Include "objfiles.h".
3542         (convert_func): For functions with unknown return type, warn and
3543         default to int.
3544         * compile/compile-object-run.c (compile_object_run): Adjust call
3545         to call_function_by_hand_dummy.
3546         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3547         call_function_by_hand.
3548         * eval.c (evaluate_subexp_standard): Adjust calls to
3549         call_function_by_hand.  Handle functions and methods with unknown
3550         return type.  Pass expect_type to call_function_by_hand.
3551         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3552         return type.
3553         * gcore.c (call_target_sbrk): Adjust call to
3554         call_function_by_hand.
3555         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3556         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3557         an integer address type instead of nodebug.
3558         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3559         call_function_by_hand.
3560         * infcall.c (error_call_unknown_return_type): New function.
3561         (call_function_by_hand): New "default_return_type" parameter.
3562         Pass it down.
3563         (call_function_by_hand_dummy): New "default_return_type"
3564         parameter.  Use it instead of defaulting to int.  If there's no
3565         default and the return type is unknown, throw an error.  If
3566         there's a default return type, and the called function has no
3567         debug info, then assume the function is prototyped.
3568         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3569         New "default_return_type" parameter.
3570         (error_call_unknown_return_type): New declaration.
3571         * linux-fork.c (call_lseek): Cast return type of lseek.
3572         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3573         call_function_by_hand.
3574         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3575         calls to call_function_by_hand.
3576         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3577         return type.
3578         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3579         (value_nsstring, print_object_command): Adjust calls to
3580         call_function_by_hand.
3581         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3582         functions with unknown return type.
3583         (pascal_type_print_func_varspec_suffix): New function.
3584         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3585         TYPE_CODE_METHOD>: Use it.
3586         * python/py-value.c (valpy_call): Adjust call to
3587         call_function_by_hand.
3588         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3589         call_function_by_hand.
3590         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3591         call_function_by_hand.
3592         * valops.c (value_allocate_space_in_inferior): Adjust call to
3593         call_function_by_hand.
3594         * typeprint.c (type_print_unknown_return_type): New function.
3595         * typeprint.h (type_print_unknown_return_type): New declaration.
3596
3597 2017-09-04  Pedro Alves  <palves@redhat.com>
3598
3599         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3600         types with more than one parameter as prototyped.
3601
3602 2017-09-04  Pedro Alves  <palves@redhat.com>
3603
3604         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3605         (disassemble_command): Use gdb_disassembly_flags instead of bare
3606         int.
3607         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3608         (dump_insns, do_mixed_source_and_assembly_deprecated)
3609         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3610         Use gdb_disassembly_flags instead of bare int.
3611         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3612         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3613         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3614         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3615         (enum gdb_disassembly_flag): ... values of this new enumeration.
3616         (gdb_disassembly_flags): Define.
3617         (gdb_disassembly)
3618         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3619         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3620         gdb_disassembly_flags instead of bare int.
3621         * record-btrace.c (btrace_insn_history)
3622         (record_btrace_insn_history, record_btrace_insn_history_range)
3623         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3624         instead of bare int.
3625         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3626         Use gdb_disassembly_flags instead of bare int.
3627         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3628         Define.
3629         * target-delegates.c: Regenerate.
3630         * target.c (target_insn_history, target_insn_history_from)
3631         (target_insn_history_range): Use gdb_disassembly_flags instead of
3632         bare int.
3633         * target.h: Include "disasm.h".
3634         (struct target_ops) <to_insn_history, to_insn_history_from,
3635         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3636         int.
3637         (target_insn_history, target_insn_history_from)
3638         (target_insn_history_range): Use gdb_disassembly_flags instead of
3639         bare int.
3640
3641 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3642
3643         * cli/cli-script.c (build_command_line): For if/while commands,
3644         check whether args is empty.
3645
3646 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3647
3648         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3649         (enum command_control_type): Likewise.
3650         (struct command_line): Likewise.
3651         (free_command_lines): Likewise.
3652         (struct command_lines_deleter): Likewise.
3653         (command_line_up): Likewise.
3654         (read_command_lines): Likewise.
3655         (read_command_lines_1): Likewise.
3656         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3657         (enum command_control_type): Likewise.
3658         (struct command_line): Likewise.
3659         (free_command_lines): Likewise.
3660         (struct command_lines_deleter): Likewise.
3661         (command_line_up): Likewise.
3662         (read_command_lines): Likewise.
3663         (read_command_lines_1): Likewise.
3664         * breakpoint.h: Include cli/cli-script.h.
3665         * extension-priv.h: Likewise.
3666         * gdbcmd.h: Likewise.
3667
3668 2017-09-04  Pedro Alves  <palves@redhat.com>
3669
3670         * ada-lang.c (is_known_support_routine): Move sal declaration to
3671         where it is initialized.
3672         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3673         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3674         (clear_command, update_static_tracepoint): Remove init_sal
3675         references.  Move declarations closer to initializations.
3676         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3677         initializations.
3678         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3679         references.  Move sal declarations closer to initializations.
3680         * frame.c (find_frame_sal): Return a symtab_and_line via function
3681         return instead of output parameter.  Remove init_sal references.
3682         * frame.h (find_frame_sal): Return a symtab_and_line via function
3683         return instead of output parameter.
3684         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3685         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3686         instead of memset.
3687         (gdbscm_find_pc_line): Remove init_sal reference.
3688         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3689         references.  Move declarations closer to initializations.
3690         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3691         initializations.
3692         (finish_backward): Remove init_sal references.  Move declarations
3693         closer to initializations.
3694         * infrun.c (process_event_stop_test, handle_step_into_function)
3695         (insert_hp_step_resume_breakpoint_at_frame)
3696         (insert_step_resume_breakpoint_at_caller): Likewise.
3697         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3698         (symbol_to_sal): Likewise.
3699         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3700         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3701         to its initialization.
3702         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3703         init_sal references.  Move declarations closer to initializations.
3704         * source.c (get_current_source_symtab_and_line): Remove brace
3705         initialization.
3706         (set_current_source_symtab_and_line): Now takes the sal by const
3707         reference.  Remove brace initialization.
3708         (line_info): Remove init_sal reference.
3709         * source.h (set_current_source_symtab_and_line): Now takes a
3710         symtab_and_line via const reference.
3711         * stack.c (set_current_sal_from_frame): Adjust.
3712         (print_frame_info): Adjust.
3713         (get_last_displayed_sal): Return the sal via function return
3714         instead of via output parameter.  Simplify.
3715         (frame_info): Adjust.
3716         * stack.h (get_last_displayed_sal): Return the sal via function
3717         return instead of via output parameter.
3718         * symtab.c (init_sal): Delete.
3719         (find_pc_sect_line): Remove init_sal references.  Move
3720         declarations closer to initializations.
3721         (find_function_start_sal): Remove init_sal references.  Move
3722         declarations closer to initializations.
3723         * symtab.h (struct symtab_and_line): In-class initialize all
3724         fields.
3725         * tracepoint.c (set_traceframe_context)
3726         (print_one_static_tracepoint_marker): Remove init_sal references.
3727         Move declarations closer to initializations.
3728         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3729         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3730         declarations closer to initializations.
3731         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3732         init_sal references.  Adjust.
3733
3734 2017-09-04  Pedro Alves  <palves@redhat.com>
3735
3736         * ax-gdb.c (agent_command_1): Use range-for.
3737         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3738         * breakpoint.c: Include "common/array-view.h".
3739         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3740         parameter from struct symtabs_and_lines to
3741         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3742         (breakpoint_sals_to_pc): Change sals parameter from struct
3743         symtabs_and_lines to std::vector reference.
3744         (check_fast_tracepoint_sals): Change sals parameter from struct
3745         symtabs_and_lines to std::array_view.  Use range-for.
3746         (decode_static_tracepoint_spec): Return a std::vector instead of
3747         symtabs_and_lines.  Update.
3748         (create_breakpoint): Update.
3749         (break_range_command, until_break_command, clear_command): Update.
3750         (base_breakpoint_decode_location, bkpt_decode_location)
3751         (bkpt_probe_create_sals_from_location)
3752         (bkpt_probe_decode_location, tracepoint_decode_location)
3753         (tracepoint_probe_decode_location)
3754         (strace_marker_create_sals_from_location): Return a std::vector
3755         instead of symtabs_and_lines.
3756         (strace_marker_create_breakpoints_sal): Update.
3757         (strace_marker_decode_location): Return a std::vector instead of
3758         symtabs_and_lines.  Update.
3759         (update_breakpoint_locations): Change struct symtabs_and_lines
3760         parameters to gdb::array_view.  Adjust.
3761         (location_to_sals): Return a std::vector instead of
3762         symtabs_and_lines.  Update.
3763         (breakpoint_re_set_default): Use std::vector instead of struct
3764         symtabs_and_lines.
3765         (decode_location_default): Return a std::vector instead of
3766         symtabs_and_lines.  Update.
3767         * breakpoint.h: Include "common/array-view.h".
3768         (struct breakpoint_ops) <decode_location>: Now returns a
3769         std::vector instead of returning a symtabs_and_lines via output
3770         parameter.
3771         (update_breakpoint_locations): Change sals parameters to use
3772         gdb::array_view.
3773         * cli/cli-cmds.c (edit_command, list_command): Update to use
3774         std::vector and gdb::array_view.
3775         (ambiguous_line_spec): Adjust to use gdb::array_view and
3776         range-for.
3777         (compare_symtabs): Rename to ...
3778         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3779         const reference and adjust.
3780         (filter_sals): Rewrite using std::vector and standard algorithms.
3781         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3782         (jump_command): Update to use std::vector.
3783         * linespec.c (struct linespec_state) <canonical_names>: Update
3784         comment.
3785         (add_sal_to_sals_basic): Delete.
3786         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3787         (decode_line_2, create_sals_line_offset)
3788         (convert_address_location_to_sals, convert_linespec_to_sals)
3789         (convert_explicit_location_to_sals, parse_linespec)
3790         (event_location_to_sals, decode_line_full, decode_line_1)
3791         (decode_line_with_current_source)
3792         (decode_line_with_last_displayed, decode_objc)
3793         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3794         (linespec_result::~linespec_result): Adjust to use std::vector
3795         instead of symtabs_and_lines.
3796         * linespec.h (linespec_sals::sals): Now a std::vector.
3797         (struct linespec_result): Use std::vector, bool, and in-class
3798         initialization.
3799         (decode_line_1, decode_line_with_current_source)
3800         (decode_line_with_last_displayed): Return std::vector.
3801         * macrocmd.c (info_macros_command): Use std::vector.
3802         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3803         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3804         std::vector.
3805         * probe.h (parse_probes): Return a std::vector.
3806         * python/python.c (gdbpy_decode_line): Use std::vector and
3807         gdb::array_view.
3808         * source.c (select_source_symtab, line_info): Use std::vector.
3809         * stack.c (func_command): Use std::vector.
3810         * symtab.h (struct symtabs_and_lines): Delete.
3811         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3812
3813 2017-09-04  Pedro Alves  <palves@redhat.com>
3814
3815         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3816         unittests/array-view-selftests.c.
3817         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3818         * common/array-view.h: New file.
3819         * unittests/array-view-selftests.c: New file.
3820
3821 2017-09-04  Pedro Alves  <palves@redhat.com>
3822
3823         * cli/cli-cmds.c (edit_command): Pass message to
3824         ambiguous_line_spec.
3825         (list_command): Pass message to ambiguous_line_spec.  Say
3826         "first"/"last" instead of "start" and "end" to be consistent with
3827         the manual.
3828         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3829         them to print formatted message.
3830
3831 2017-09-04  Pedro Alves  <palves@redhat.com>
3832
3833         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3834         ftrace_update_insns by reference instead of pointer.
3835
3836 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3837
3838         * i386-go32-tdep.c: Include x86-xstate.h.
3839         (i386_go32_init_abi): Call i386_target_description.
3840         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3841         if xcr0 is X86_XSTATE_X87_MASK.
3842         * i386-tdep.h (tdesc_i386): Remove the declaration.
3843         (tdesc_i386_mmx): Likewise.
3844
3845 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3846
3847         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3848         X86_XSTATE_SSE_MASK instead of 0.
3849
3850 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3851
3852         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3853         i386_target_description.
3854         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3855         i386_target_description.
3856         * i386-tdep.c (i386_gdbarch_init): Likewise.
3857
3858 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3859
3860         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3861         (x86_darwin_init_abi_64): Call amd64_target_description.
3862         * amd64-dicos-tdep.c: Likewise.
3863         * amd64-fbsd-nat.c: Likewise.
3864         * amd64-fbsd-tdep.c: Likewise.
3865         * amd64-nbsd-tdep.c: Likewise.
3866         * amd64-obsd-tdep.c: Likewise.
3867         * amd64-sol2-tdep.c: Likewise.
3868         * amd64-windows-tdep.c: Likewise.
3869         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3870
3871 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3872
3873         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3874         (btrace_function) <insn>: Change type to use std::vector.
3875         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3876         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3877         ftrace_update_insns, ftrace_compute_global_level_offset,
3878         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3879         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3880         change to std::vector.
3881         (ftrace_update_insns): Adjust to change to std::vector, change
3882         type of INSN parameter.
3883         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3884         * record-btrace.c (btrace_call_history_insn_range,
3885         btrace_compute_src_line_range,
3886         record_btrace_frame_prev_register): Adjust to change to
3887         std::vector.
3888         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3889         to change to std::vector.
3890
3891 2017-09-03  Tom Tromey  <tom@tromey.com>
3892
3893         * corefile.c (reopen_exec_file): Use std::string.
3894
3895 2017-09-03  Tom Tromey  <tom@tromey.com>
3896
3897         * compile/compile.c (compile_register_name_mangled): Return
3898         std::string.
3899         * compile/compile-loc2c.c (pushf_register_address): Update.
3900         (pushf_register): Update.
3901         * compile/compile-c-types.c (convert_array): Update.
3902         * compile/compile-c-symbols.c (generate_vla_size): Update.
3903         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3904         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3905         (convert_one_symbol): Update.
3906         (generate_c_for_for_one_variable): Update.
3907         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3908         std::string.
3909         (generate_register_struct): Update.
3910         * compile/compile-internal.h (c_get_range_decl_name): Return a
3911         std::string.
3912         (compile_register_name_mangled): Return std::string.
3913
3914 2017-09-03  Tom Tromey  <tom@tromey.com>
3915
3916         * utils.c (perror_string): Return a std::string.
3917         (throw_perror_with_name, perror_warning_with_name): Update.
3918
3919 2017-09-03  Tom Tromey  <tom@tromey.com>
3920
3921         * demangle.c (demangle_command): Use std::string,
3922         unique_xmalloc_ptr.
3923
3924 2017-09-03  Tom Tromey  <tom@tromey.com>
3925
3926         * cli/cli-setshow.c (do_set_command): Use std::string.
3927
3928 2017-09-03  Tom Tromey  <tom@tromey.com>
3929
3930         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3931
3932 2017-09-03  Tom Tromey  <tom@tromey.com>
3933
3934         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3935
3936 2017-09-03  Tom Tromey  <tom@tromey.com>
3937
3938         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3939         gdb::unique_xmalloc_ptr.
3940
3941 2017-09-03  Tom Tromey  <tom@tromey.com>
3942
3943         * thread.c (print_thread_info_1): Use string_printf.
3944         (thread_apply_command, thread_apply_all_command): Use
3945         std::string.
3946
3947 2017-09-03  Tom Tromey  <tom@tromey.com>
3948
3949         * valprint.c (val_print_string): Update.
3950         * gdbcore.h (memory_error_message): Return std::string.
3951         * corefile.c (memory_error_message): Return std::string.
3952         (memory_error): Update.
3953         * breakpoint.c (insert_bp_location): Update.
3954
3955 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3956
3957         * target/waitstatus.h (target_waitstatus_to_string): Change
3958         return type to std::string.
3959         * target/waitstatus.c (target_waitstatus_to_string): Return
3960         std::string.
3961         * target.h (target_waitstatus_to_string): Remove declaration.
3962         * infrun.c (resume, clear_proceed_status_thread,
3963         print_target_wait_results, do_target_wait, save_waitstatus,
3964         stop_all_threads): Adjust.
3965         * record-btrace.c (record_btrace_wait): Adjust.
3966         * target-debug.h
3967         (target_debug_print_struct_target_waitstatus_p): Adjust.
3968
3969 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3970
3971         PR gdb/22046
3972         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3973         detection.
3974
3975 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3976
3977         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3978         for setting/unsetting environment variables on the remote target.
3979         (New remote packets): Add entries for QEnvironmentHexEncoded,
3980         QEnvironmentUnset and QEnvironmentReset.
3981         * common/environ.c (gdb_environ::operator=): Extend method to
3982         handle m_user_set_env_list and m_user_unset_env_list.
3983         (gdb_environ::clear): Likewise.
3984         (match_var_in_string): Change type of first parameter from 'char
3985         *' to 'const char *'.
3986         (gdb_environ::set): Extend method to handle
3987         m_user_set_env_list and m_user_unset_env_list.
3988         (gdb_environ::unset): Likewise.
3989         (gdb_environ::clear_user_set_env): New method.
3990         (gdb_environ::user_set_envp): Likewise.
3991         (gdb_environ::user_unset_envp): Likewise.
3992         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3993         m_user_unset_env_list on move constructor/assignment.
3994         (unset): Add new default parameter 'update_unset_list = true'.
3995         (clear_user_set_env): New method.
3996         (user_set_envp): Likewise.
3997         (user_unset_envp): Likewise.
3998         (m_user_set_env_list): New std::set.
3999         (m_user_unset_env_list): Likewise.
4000         * common/rsp-low.c (hex2str): New function.
4001         (bin2hex): New overload for bin2hex function.
4002         * common/rsp-low.c (hex2str): New prototype.
4003         (str2hex): New overload prototype.
4004         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4005         QEnvironmentUnset and QEnvironmentReset.
4006         (remote_protocol_features): Add QEnvironmentHexEncoded,
4007         QEnvironmentUnset and QEnvironmentReset packets.
4008         (send_environment_packet): New function.
4009         (extended_remote_environment_support): Likewise.
4010         (extended_remote_create_inferior): Call
4011         extended_remote_environment_support.
4012         (_initialize_remote): Add QEnvironmentHexEncoded,
4013         QEnvironmentUnset and QEnvironmentReset packet configs.
4014         * unittests/environ-selftests.c (gdb_selftest_env_var):
4015         New variable.
4016         (test_vector_initialization): New function.
4017         (test_init_from_host_environ): Likewise.
4018         (test_reinit_from_host_environ): Likewise.
4019         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4020         Likewise.
4021         (test_unset_set_empty_vector): Likewise.
4022         (test_vector_clear): Likewise.
4023         (test_std_move): Likewise.
4024         (test_move_constructor):
4025         (test_self_move): Likewise.
4026         (test_set_unset_reset): Likewise.
4027         (run_tests): Rewrite in terms of the functions above.
4028
4029 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4030
4031         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4032         (adi_available): Use a temp variable of type CORE_ADDR as argument
4033         3 when calling target_auxv_search.
4034         (adi_normalize_address): Use masks and xor operators to calculate
4035         normalized address.
4036         (adi_read_versions, adi_write_versions, adi_print_versions)
4037         (do_examine, do_assign): Use paddress.
4038
4039 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4040
4041         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4042         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4043         out of loop and add supply of FIR.
4044         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4045         add collect of FIR.
4046
4047 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4048
4049         PR gdb/21827
4050         * cli/cli-script.c (define_command): Don't convert command name
4051         to lower case.
4052
4053 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4054
4055         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4056         Update all callers accordingly. Remove all code blocks handling
4057         the case where DISPP is not NULL.
4058
4059 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4060
4061         PR symtab/22003
4062         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4063         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4064         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4065
4066 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4067
4068         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4069         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4070         (read_comp_units_from_section): New parameter abbrev_section, use
4071         read_and_check_comp_unit_head, allocate signatured_type if needed.
4072         (create_all_comp_units): Update read_comp_units_from_section caller.
4073
4074 2017-08-23  Pedro Alves  <palves@redhat.com>
4075
4076         PR remote/21852
4077         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4078         to null_ptid and switch to thread without reading the registers
4079         after adding the inferior.
4080
4081 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4082
4083         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4084         compile-gcc.
4085         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4086         (compile_to_object): Implement compile_gcc.
4087         (_initialize_compile): Install "set compile-gcc".  Initialize
4088         compile_gcc.
4089
4090 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4091
4092         * compile/compile.c (compile_to_object): Conditionally call
4093         set_verbose.  Conditionally call compile or compile_v0.
4094
4095 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4096
4097         * sparc64-tdep.h: (adi_normalize_address): New export.
4098         * sparc-nat.h: (open_adi_tag_fd): New export.
4099         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4100         * sparc64-linux-tdep.c:
4101         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4102         (sparc64_linux_handle_segmentation_fault): New function.
4103         (sparc64_linux_init_abi): Register
4104         sparc64_linux_handle_segmentation_fault
4105         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4106         (sparc64_addr_bits_remove): New function.
4107         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4108         (MAX_PROC_NAME_SIZE): New macro.
4109         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4110         (sparc64adilist): New variable.
4111         (adi_proc_list): New variable.
4112         (find_adi_info): New function.
4113         (add_adi_info): New function.
4114         (get_adi_info_proc): New function.
4115         (get_adi_info): New function.
4116         (info_adi_command): New function.
4117         (read_maps_entry): New function.
4118         (adi_available): New function.
4119         (adi_normalize_address): New function.
4120         (adi_align_address): New function.
4121         (adi_convert_byte_count): New function.
4122         (adi_tag_fd): New function.
4123         (adi_is_addr_mapped): New function.
4124         (adi_read_versions): New function.
4125         (adi_write_versions): New function.
4126         (adi_print_versions): New function.
4127         (do_examine): New function.
4128         (do_assign): New function.
4129         (adi_examine_command): New function.
4130         (adi_assign_command): New function.
4131         (_initialize_sparc64_adi_tdep): New function.
4132
4133 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4134
4135         * breakpoint.c (breakpoints_info): Rename to ...
4136         (info_breakpoints_command): ... this.
4137         (watchpoints_info): Rename to ...
4138         (info_watchpoints_command): ... this.
4139         (tracepoints_info): Rename to ...
4140         (info_tracepoints_command): ... this.
4141         (_initialize_breakpoint): Adjust.
4142         * dcache.c (dcache_info): Rename to ...
4143         (info_display_command): ... this.
4144         (_initialize_dcache): Adjust.
4145         * frame.h (args_info): Rename to ...
4146         (info_args_command): ... this.
4147         (locals_info): Rename to ...
4148         (info_locals_command): ... this.
4149         * infcmd.c (nofp_registers_info): Rename to ...
4150         (info_registers_command): ... this.
4151         (float_info): Rename to ...
4152         (info_float_command): ... this.
4153         (program_info): Rename to ...
4154         (info_program_command): ... this.
4155         (all_registers_info): Rename to ...
4156         (info_all_registers_command): ... this.
4157         (vector_info): Rename to ...
4158         (info_vector_command): ... this.
4159         (float_info): Rename to ...
4160         (info_float_command): ... this.
4161         (_initialize_infcmd): Adjust.
4162         * inferior.h (term_info): Rename to ...
4163         (info_terminal_command): ... this.
4164         * inflow.c (term_info): Rename to ...
4165         (info_terminal_command): ... this.
4166         (_initialize_inflow): Adjust.
4167         * infrun.c (signals_info): Rename to ...
4168         (info_signals_command): ... this.
4169         (_initialize_infrun): Adjust.
4170         * objc-lang.c (classes_info): Rename to ...
4171         (info_classes_command): ... this.
4172         (selectors_info): Rename to ...
4173         (info_selectors_command): ... this.
4174         (_initialize_objc_language): Adjust.
4175         * printcmd.c (sym_info): Rename to ...
4176         (info_symbol_command): ... this.
4177         (address_info): Rename to ...
4178         (info_address_command): ... this.
4179         (display_info): Rename to ...
4180         (info_display_command): ... this.
4181         (_initialize_printcmd): Adjust.
4182         * reverse.c (bookmarks_info): Rename to ...
4183         (info_breakpoints_command): ... this.
4184         (_initialize_reverse): Adjust.
4185         * ser-go32.c (dos_info): Rename to ...
4186         (info_serial_command): ... this.
4187         (_initialize_ser_dos): Adjust.
4188         * skip.c (skip_info): Rename to ...
4189         (info_skip_command): ... this.
4190         (_initialize_step_skip): Adjust.
4191         * source.c (line_info): Rename to ...
4192         (info_line_command): ... this.
4193         (source_info): Rename to ...
4194         (info_source_command)
4195         * stack.c (frame_info): Rename to ...
4196         (info_frame_command): ... this.
4197         (locals_info): Rename to ...
4198         (info_locals_command): ... this.
4199         (args_info): Rename to ...
4200         (info_args_command): ... this.
4201         (_initialize_stack): Adjust.
4202         * symtab.c (sources_info): Rename to ...
4203         (info_sources_command): ... this.
4204         (variables_info): Rename to ...
4205         (info_variables_command): ... this.
4206         (functions_info): Rename to ...
4207         (info_functions_command): ... this.
4208         (types_info): Rename to ...
4209         (info_types_command): ... this.
4210         (_initialize_symtab): Adjust.
4211         * target.c (target_info): Rename to ...
4212         (info_target_command): ... this.
4213         (initialize_targets): Adjust.
4214         * tracepoint.c (tvariables_info): Rename to ...
4215         (info_tvariables_command): ... this.
4216         (scope_info): Rename to ...
4217         (info_scope_command): ... this.
4218         (trace_dump_actions): Adjust.
4219         (_initialize_tracepoint): Adjust.
4220
4221 2017-08-22  Tom Tromey  <tom@tromey.com>
4222
4223         * breakpoint.h (install_breakpoint): Update.
4224         * breakpoint.c (add_solib_catchpoint): Update.
4225         (install_breakpoint): Change argument to a std::unique_ptr.
4226         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4227         (create_breakpoint_sal, create_breakpoint): Update.
4228         (watch_command_1, catch_exec_command_1)
4229         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4230         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4231         Return the breakpoint.
4232         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4233         (new_single_step_breakpoint): Update.
4234         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4235         std::unique_ptr.
4236         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4237         std::unique_ptr.
4238         * break-catch-sig.c (create_signal_catchpoint): Use
4239         std::unique_ptr.
4240         * ada-lang.c (create_ada_exception_catchpoint): Use
4241         std::unique_ptr.
4242
4243 2017-08-22  Tom Tromey  <tom@tromey.com>
4244
4245         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4246
4247 2017-08-22  Tom Tromey  <tom@tromey.com>
4248
4249         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4250         (lookup_partial_symbol): Update.
4251
4252 2017-08-22  Tom Tromey  <tom@tromey.com>
4253
4254         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4255         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4256         (find_and_open_source, symtab_to_fullname): Update.
4257         * psymtab.c (psymtab_to_fullname): Update.
4258
4259 2017-08-22  Tom Tromey  <tom@tromey.com>
4260
4261         * exec.c (exec_file_attach): Update.
4262         * linux-thread-db.c (try_thread_db_load): Update.
4263         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4264         * utils.c (gdb_realpath): Change return type.
4265         (gdb_realpath_keepfile): Update.
4266         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4267         (_initialize_utils): Register the new self test.
4268         * source.c (openp): Update.
4269         (find_and_open_source): Update.
4270         * nto-tdep.c (nto_find_and_open_solib): Update.
4271         * main.c (set_gdb_data_directory): Update.
4272         (captured_main_1): Update.
4273         * dwarf2read.c (dwarf2_get_dwz_file): Update
4274         (dw2_map_symbol_filenames): Update.
4275         * auto-load.c (auto_load_safe_path_vec_update): Update.
4276         (filename_is_in_auto_load_safe_path_vec): Change type of
4277         "filename_realp".
4278         (auto_load_objfile_script): Update.
4279         (file_is_auto_load_safe): Update.  Use std::string.
4280         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4281
4282 2017-08-22  Tom Tromey  <tom@tromey.com>
4283
4284         * utils.c (gdb_realpath_keepfile): Return a
4285         gdb::unique_xmalloc_ptr.
4286         * exec.c (exec_file_attach): Update.
4287         * utils.h (gdb_realpath_keepfile): Return a
4288         gdb::unique_xmalloc_ptr.
4289
4290 2017-08-22  Tom Tromey  <tom@tromey.com>
4291
4292         * compile/compile.c (compile_file_command): Use
4293         gdb::unique_xmalloc_ptr, std::string.
4294         * utils.c (gdb_abspath): Change return type.
4295         * source.c (openp): Update.
4296         * objfiles.c (allocate_objfile): Update.
4297         * main.c (set_gdb_data_directory): Update.
4298         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4299
4300 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4301
4302         * cli-cmds.c (list_commands): List actual code around more than
4303         one location.
4304
4305 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4306
4307         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4308
4309 2017-08-21  Pedro Alves  <palves@redhat.com>
4310
4311         PR gdb/19487
4312         * c-exp.y (variable production): Handle function aliases.
4313         * minsyms.c (msymbol_is_text): New function.
4314         * minsyms.h (msymbol_is_text): Declare.
4315         * symtab.c (find_function_alias_target): New function.
4316         * symtab.h (find_function_alias_target): Declare.
4317
4318 2017-08-21  Pedro Alves  <palves@redhat.com>
4319
4320         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4321         typedefs.
4322         * typeprint.c (whatis_exp): If handling "whatis", and expression
4323         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4324         typedefs here.
4325         * valops.c (value_cast): Save "to" type before resolving
4326         stubs/typedefs.  Use that type as resulting value's type.
4327
4328 2017-08-18  Tom Tromey  <tom@tromey.com>
4329             Pedro Alves  <palves@redhat.com>
4330
4331         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4332         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4333         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4334         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4335         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4336         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4337         (linux_get_siginfo_data): Add "thread" argument.  Use
4338         scoped_restore.
4339         * linux-nat.c (linux_child_follow_fork)
4340         (check_stopped_by_watchpoint): Use scoped_restore.
4341         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4342         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4343         (restore_inferior_ptid, save_inferior_ptid): Remove.
4344         * btrace.c (btrace_fetch): Use scoped_restore.
4345         * bsd-uthread.c (bsd_uthread_fetch_registers)
4346         (bsd_uthread_store_registers): Use scoped_restore.
4347         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4348         scoped_restore.
4349         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4350         (aix_thread_xfer_partial): Use scoped_restore.
4351         * inferior.h (save_inferior_ptid): Remove.
4352
4353 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4354
4355         PR tdep/21818
4356         * arm-tdep.c (gdb_print_insn_arm): Mark
4357         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4358
4359 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4360
4361         * NEWS: Mention GDBserver's new option "--selftest".
4362         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4363         * selftest.c: Move it to common/selftest.c.
4364         * selftest.h: Move it to common/selftest.h.
4365         * selftest-arch.c (reset): New function.
4366         (tests_with_arch): Call reset.
4367
4368 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4369
4370         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4371         instead of exception_fprintf and printf_filtered.
4372
4373 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4374
4375         * selftest.c (register_self_test): Rename it to
4376         selftests::register_test.
4377         (run_self_tests): selftest::run_tests.
4378         * selftest.h: Update declarations.
4379         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4380         selftests::register_test_foreach_arch.
4381         * selftest-arch.h: Update declaration.
4382         * aarch64-tdep.c: Update.
4383         * arm-tdep.c: Likewise.
4384         * disasm-selftests.c: Likewise.
4385         * dwarf2loc.c: Likewise.
4386         * dwarf2-frame.c: Likewise.
4387         * findvar.c: Likewise.
4388         * gdbarch-selftests.c: Likewise.
4389         * maint.c (maintenance_selftest): Likewise.
4390         * regcache.c: Likewise.
4391         * rust-exp.y: Likewise.
4392         * selftest-arch.c: Likewise.
4393         * unittests/environ-selftests.c: Likewise.
4394         * unittests/function-view-selftests.c: Likewise.
4395         * unittests/offset-type-selftests.c: Likewise.
4396         * unittests/optional-selftests.c: Likewise.
4397         * unittests/scoped_restore-selftests.c: Likewise.
4398         * utils-selftests.c: Likewise.
4399
4400 2017-08-17  Pedro Alves  <palves@redhat.com>
4401
4402         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4403         local.
4404
4405 2017-08-17  Pedro Alves  <palves@redhat.com>
4406
4407         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4408         field.
4409         (reset_die_in_process): Delete, replaced by ...
4410         (process_die_scope): ... this new class.  Make it responsible for
4411         freeing cu->line_header too.
4412         (process_die): Use process_die_scope.
4413         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4414         cu->line_header_die_owner.  Don't release the line header if it's
4415         owned by the CU.
4416         (setup_type_unit_groups): Make the CU/DIE own the line header.
4417         Don't release the line header here.
4418
4419 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4420
4421         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4422
4423 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4424
4425         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4426         Single-Key mode
4427
4428 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4429
4430         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4431         mode command list.
4432
4433 2017-08-15  Stafford Horne  <shorne@gmail.com>
4434
4435         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4436
4437 2017-08-15  Stafford Horne  <shorne@gmail.com>
4438
4439         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4440
4441 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4442
4443         PR gdb/21954
4444         * infcmd.c (unset_environment_command): Use the 'clear' method on
4445         the environment instead of resetting it.
4446
4447 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4448
4449         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4450         platforms.
4451
4452 2017-08-14  Tom Tromey  <tom@tromey.com>
4453
4454         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4455         (print_binary_chars): Likewise.
4456         (BITS_IN_BYTES): Remove.
4457
4458 2017-08-14  Tom Tromey  <tom@tromey.com>
4459
4460         PR gdb/21675
4461         * valprint.c (LOW_ZERO): Change value to 034.
4462         (print_octal_chars): Add static_asserts for octal constants.
4463         * printcmd.c (print_scalar_formatted): Add 'd' case.
4464
4465 2017-08-11  Tom Tromey  <tom@tromey.com>
4466
4467         * symfile.c (add_symbol_file_command): Use std::vector.
4468
4469 2017-08-14  Tom Tromey  <tom@tromey.com>
4470
4471         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4472         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4473         std::move.
4474         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4475
4476 2017-08-11  Pedro Alves  <palves@redhat.com>
4477
4478         * infrun.c (process_event_stop_test): Adjust
4479         function_name_is_marked_for_skip call.
4480         * skip.c: Include <list>.
4481         (skiplist_entry): Make it a class with private fields, and
4482         getters/setters.
4483         (skiplist_entry_chain): Delete.
4484         (skiplist_entries): New.
4485         (skiplist_entry_count): Delete.
4486         (highest_skiplist_entry_num): New.
4487         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4488         (add_skiplist_entry): Delete.
4489         (skiplist_entry::skiplist_entry): New.
4490         (skiplist_entry::add_entry): New.
4491         (skip_file_command, skip_function): Adjust.
4492         (compile_skip_regexp): Delete.
4493         (skip_command): Don't compile regexp here.  Adjust to use
4494         skiplist_entry::add_entry.
4495         (skip_info): Adjust to use range-for and getters.
4496         (skip_enable_command, skip_disable_command): Adjust to use
4497         range-for and setters.
4498         (skip_delete_command): Adjust to use std::list.
4499         (add_skiplist_entry): Delete.
4500         (skip_file_p): Delete, refactored as ...
4501         (skiplist_entry::do_skip_file_p): ... this new method.
4502         (skip_gfile_p): Delete, refactored as ...
4503         (skiplist_entry::do_gskip_file_p): ... this new method.
4504         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4505         (skiplist_entry::skip_function_p): ... this new method.
4506         (function_name_is_marked_for_skip): Now returns bool, and takes
4507         the function sal by const reference.  Adjust to use range-for and
4508         skiplist_entry methods.
4509         (_initialize_step_skip): Remove references to
4510         skiplist_entry_chain, skiplist_entry_count.
4511         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4512         takes the function sal by const reference.
4513
4514 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4515
4516         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4517         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4518         (dwarf2_frame_cache):
4519         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4520         RETURN_MASK_ALL and set *this_case to NULL.
4521         * frame-unwind.h: Update comments.
4522
4523 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4524
4525         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4526         (dwarf2_frame_state_copy_regs): Remove.
4527         (dwarf2_frame_state_free_regs): Remove.
4528         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4529         (dwarf2_restore_rule): Call method .alloc_regs instead of
4530         dwarf2_frame_state_alloc_regs.
4531         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4532         constructor.  Call std::move.
4533         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4534         (dwarf2_frame_cache): Likewise.
4535
4536         [GDB_SELF_TEST]: Include selftest.h and
4537         selftest-arch.h.
4538         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4539         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4540         execute_cfa_program_test.
4541
4542         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4543         copy ctor, assignment operator, move assignment.
4544         <alloc_regs>: New method.
4545         <swap>: New method.
4546         (struct dwarf2_frame_state): Delete dtor.
4547         (dwarf2_frame_state_alloc_regs): Remove declaration.
4548         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4549         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4550
4551 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4552
4553         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4554         (dwarf2_frame_state::dwarf2_frame_state): New.
4555         (dwarf2_frame_state::~dwarf2_frame_state): New.
4556         (dwarf2_fetch_cfa_info): Update.
4557         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4558         rather than a pointer.  Update code.
4559         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4560         dtor.
4561         <data_align, code_align, retaddr_column>: Change them to const.
4562         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4563         to bool.
4564
4565 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4566
4567         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4568         <loc.exp>: New field.
4569         * dwarf2-frame.c (execute_cfa_program): Update.
4570         (dwarf2_frame_prev_register): Update.
4571
4572 2017-08-10  Pedro Alves  <palves@redhat.com>
4573
4574         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4575
4576 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4577
4578         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4579         (fbsd_pending_children): Use std::list.
4580         (fbsd_remember_child): Likewise.
4581         (fbsd_is_child_pending): Likewise.
4582         (fbsd_pending_vfork_done): Use std::forward_list.
4583         (fbsd_add_vfork_done): Likewise.
4584         (fbsd_is_vfork_done_pending): Likewise.
4585         (fbsd_next_vfork_done): Likewise.
4586
4587 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4588
4589         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4590         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4591         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4592         for `mapfilename'.
4593         (fbsd_xfer_partial): Use gdb::byte_vector.
4594         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4595
4596 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4597
4598         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4599         "filestuff.h".
4600         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4601
4602 2017-08-09  Tom Tromey  <tom@tromey.com>
4603
4604         * skip.c (skiplist_entry): New constructor.
4605         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4606         (skiplist_entry::file_is_glob): Now bool.
4607         (skiplist_entry::file, skiplist_entry::function): Now
4608         std::string.
4609         (make_skip_entry): Return a unique_ptr.  Use new.
4610         (free_skiplist_entry, free_skiplist_entry_cleanup)
4611         (make_free_skiplist_entry_cleanup): Remove.
4612         (skip_command, skip_disable_command, add_skiplist_entry)
4613         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4614         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4615         (function_name_is_marked_for_skip): Update.
4616         (skip_delete_command): Update.  Use delete.
4617
4618 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4619
4620         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4621         (aarch64_linux_core_read_description): New function.
4622         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4623
4624 2017-08-09  Pedro Alves  <palves@redhat.com>
4625
4626         * cp-name-parser.y (cp_comp_to_string): Return a
4627         gdb::unique_xmalloc_ptr<char>.
4628         * cp-support.c (replace_typedefs_qualified_name)
4629         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4630         (cp_canonicalize_string_full): Use op= instead of explicit
4631         convertion.
4632         (cp_class_name_from_physname, method_name_from_physname)
4633         (cp_func_name, cp_remove_params): Adjust to use
4634         gdb::unique_xmalloc_ptr<char>.
4635         * cp-support.h (cp_comp_to_string): Return a
4636         gdb::unique_xmalloc_ptr<char>.
4637         * python/py-type.c (typy_lookup_type): Adjust to use
4638         gdb::unique_xmalloc_ptr<char>.
4639
4640 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4641
4642         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4643
4644 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4645             Yao Qi  <yao.qi@linaro.org>
4646
4647         * cp-support.c (cp_canonicalize_string_full): Use
4648         gdb::unique_xmalloc_ptr<char>.
4649         (cp_canonicalize_string): Likewise.
4650
4651 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4652
4653         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4654         * regformats/i386/amd64-avx-avx512.dat: Remove.
4655         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4656         * regformats/i386/amd64-avx-mpx.dat:Remove.
4657         * regformats/i386/amd64-avx.dat: Remove.
4658         * regformats/i386/amd64-mpx.dat: Remove.
4659         * regformats/i386/i386-avx-avx512.dat: Remove.
4660         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4661         * regformats/i386/i386-avx-mpx.dat: Remove.
4662         * regformats/i386/i386-mmx.dat: Remove.
4663         * regformats/i386/i386-mpx.dat: Remove.
4664
4665 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4666
4667         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4668         * amd64-tdep.c: Don't include features/i386/x32*.c.
4669         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4670         functions.
4671         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4672         and i386/x32-avx-avx512.
4673         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4674         and i386/x32.xml.
4675         * features/i386/x32-avx-avx512.c: Removed.
4676         * features/i386/x32-avx-avx512.xml: Removed.
4677         * features/i386/x32-avx.c: Removed.
4678         * features/i386/x32-avx.xml: Removed.
4679         * features/i386/x32.c: Removed.
4680         * features/i386/x32.xml: Removed.
4681         * regformats/i386/x32-avx-avx512.dat: Removed.
4682         * regformats/i386/x32-avx.dat: Removed.
4683         * regformats/i386/x32.dat: Removed.
4684
4685 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4686
4687         PR breakpoints/21886
4688         * mem-break.c (default_memory_insert_breakpoint): Use
4689         `->placed_address' rather than `->reqstd_address' for the
4690         breakpoint location.
4691
4692 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4693
4694         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4695         assertions.
4696
4697 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4698
4699         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4700         a union of `tdep_info', `tdesc_data' and `id'.
4701         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4702         rather than `info.tdep_info'.
4703         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4704         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4705         * i386-tdep.c (i386_gdbarch_init): Likewise.
4706         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4707         * mips-tdep.c (mips_gdbarch_init): Likewise.
4708         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4709         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4710         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4711         `info.tdep_info'.
4712         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4713         `info.tdep_info'.
4714         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4715         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4716         `info.tdep_info'.
4717         * spu-tdep.c (spu_gdbarch_init): Likewise.
4718         * gdbarch.h: Regenerate.
4719
4720 2017-08-07  Leszek Swirski  <leszeks@google.com>
4721
4722         PR symtab/20899
4723         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4724
4725 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4726
4727         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4728         (gdbsim_open): Rename gdb_argv args object to argv.
4729
4730 2017-08-05  Tom Tromey  <tom@tromey.com>
4731
4732         * compile/compile-object-load.c (compile_object_load): Use
4733         gdb::unique_xmalloc_ptr.
4734         * cli/cli-dump.c (scan_filename): Rename from
4735         scan_filename_with_cleanup.  Change return type.
4736         (scan_expression): Rename from scan_expression_with_cleanup.
4737         Change return type.
4738         (dump_memory_to_file, dump_value_to_file, restore_command):
4739         Use gdb::unique_xmalloc_ptr.  Update.
4740         * cli/cli-cmds.c (find_and_open_script): Use
4741         gdb::unique_xmalloc_ptr.
4742         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4743         * symmisc.c (maintenance_print_symbols)
4744         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4745         * symfile.c (symfile_bfd_open, generic_load)
4746         (add_symbol_file_command, remove_symbol_file_command): Use
4747         gdb::unique_xmalloc_ptr.
4748         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4749         * psymtab.c (maintenance_print_psymbols): Use
4750         gdb::unique_xmalloc_ptr.
4751         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4752         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4753         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4754         (reload_shared_libraries_1): Likewise.
4755
4756 2017-08-05  Tom Tromey  <tom@tromey.com>
4757
4758         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4759         (rust_op_vector, rust_set_vector): New typedefs.
4760         (current_parser): New global.
4761         (work_obstack): Change to pointer type.  Update all users.
4762         (rust_ast, pstate): Remove globals.
4763         (struct rust_parser): New.
4764         (%union) <params, field_inits>: Change type.
4765         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4766         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4767         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4768         (convert_params_to_types, convert_params_to_expression): Change
4769         type of "params".
4770         (ast_string): Change type of "fields".
4771         (rust_parse): Make a rust_parser.  Remove cleanups.
4772         (rust_lex_tests): Make and install an auto_obstack.
4773
4774 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4775
4776         * configure.srv (ipa_x32_linux_regobj): New.
4777         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4778         instead of X86_TDESC_AVX512.
4779         (initialize_low_tracepoint): Call
4780         init_registers_x32_avx_avx512_linux.
4781
4782 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4783
4784         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4785
4786 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4787
4788         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4789
4790 2017-08-03  Tom Tromey  <tom@tromey.com>
4791
4792         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4793         Remove.
4794         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4795
4796 2017-08-03  Tom Tromey  <tom@tromey.com>
4797
4798         * python/py-param.c (compute_enum_values): Use gdb_argv.
4799
4800 2017-08-03  Tom Tromey  <tom@tromey.com>
4801
4802         * utils.h (struct gdb_argv_deleter): New.
4803         (gdb_argv): New class.
4804         * utils.c (gdb_argv::reset): New method.
4805         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4806         * tracefile.c (tsave_command): Use gdb_argv.
4807         * top.c (new_ui_command): Use gdb_argv.
4808         * symmisc.c (maintenance_print_symbols)
4809         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4810         * symfile.c (symbol_file_command, generic_load)
4811         (remove_symbol_file_command): Use gdb_argv.
4812         * stack.c (backtrace_command): Use gdb_argv.
4813         * source.c (add_path, show_substitute_path_command)
4814         (unset_substitute_path_command, set_substitute_path_command):
4815         Use gdb_argv.
4816         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4817         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4818         * remote.c (extended_remote_run, remote_put_command)
4819         (remote_get_command, remote_delete_command): Use gdb_argv.
4820         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4821         (gdbsim_open): Use gdb_argv.
4822         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4823         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4824         * procfs.c (procfs_info_proc): Use gdb_argv.
4825         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4826         * infrun.c (handle_command): Use gdb_argv.
4827         * inferior.c (add_inferior_command, clone_inferior_command):
4828         Use gdb_argv.
4829         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4830         * exec.c (exec_file_command): Use gdb_argv.
4831         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4832         * compile/compile.c (build_argc_argv): Use gdb_argv.
4833
4834 2017-08-03  Tom Tromey  <tom@tromey.com>
4835
4836         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4837
4838 2017-08-03  Tom Tromey  <tom@tromey.com>
4839
4840         * python/python.c (compute_python_string): Return std::string.
4841         (gdbpy_eval_from_control_command): Update.
4842         (do_start_initialization): Use std::string.
4843         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4844         xstrprintf.
4845         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4846         xstrprintf.
4847
4848 2017-08-03  Tom Tromey  <tom@tromey.com>
4849
4850         * top.h (do_restore_instream_cleanup): Remove.
4851         * top.c (do_restore_instream_cleanup): Remove.
4852         (read_command_file): Use scoped_restore.
4853         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4854
4855 2017-08-03  Tom Tromey  <tom@tromey.com>
4856
4857         * cli/cli-script.c (execute_user_command)
4858         (execute_control_command): Use scoped_restore.
4859
4860 2017-08-03  Tom Tromey  <tom@tromey.com>
4861
4862         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4863         (execute_user_command): Remove user_call_depth; use
4864         user_args_stack's size instead.
4865
4866 2017-08-03  Tom Tromey  <tom@tromey.com>
4867
4868         * top.h (in_user_command): Remove.
4869         * top.c (in_user_command): Remove.
4870         * cli/cli-script.c (do_restore_user_call_depth)
4871         (execute_user_command): Update.
4872
4873 2017-08-03  Tom Tromey  <tom@tromey.com>
4874
4875         * valops.c (search_struct_method): Use gdb::byte_vector.
4876         * valarith.c (value_concat): Use std::vector.
4877         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4878         (simple_search_memory): Likewise.
4879         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4880         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4881         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4882         * elfread.c (elf_rel_plt_read): Use std::string.
4883         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4884         * cli/cli-dump.c (restore_section_callback): Use
4885         gdb::byte_vector.
4886
4887 2017-08-03  Tom Tromey  <tom@tromey.com>
4888
4889         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4890
4891 2017-08-03  Tom Tromey  <tom@tromey.com>
4892
4893         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4894         (tui_register_format): Use scoped_restore.
4895
4896 2017-08-03  Tom Tromey  <tom@tromey.com>
4897
4898         * reverse.c (exec_direction_default): Remove.
4899         (exec_reverse_once): Use scoped_restore.
4900         * remote.c (restore_remote_timeout): Remove.
4901         (remote_flash_erase, remote_flash_write, remote_flash_done)
4902         (readchar, remote_serial_write): Use scoped_restore.
4903         * cli/cli-script.c (struct source_cleanup_lines_args)
4904         (source_cleanup_lines): Remove.
4905         (script_from_file): Use scoped_restore.
4906         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4907         (source_command): Use scoped_restore.
4908
4909 2017-08-03  Tom Tromey  <tom@tromey.com>
4910
4911         * utils.h (make_cleanup_free_so): Remove.
4912         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4913         * solist.h (struct so_deleter): New.
4914         (so_list_up): New typedef.
4915         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4916
4917 2017-08-03  Tom Tromey  <tom@tromey.com>
4918
4919         * utils.h (make_cleanup_restore_current_language): Remove.
4920         * utils.c (do_restore_current_language)
4921         (make_cleanup_restore_current_language): Remove.
4922         * parse.c (parse_exp_in_context_1)
4923         (parse_expression_with_language): Use
4924         scoped_restore_current_language.
4925         * mi/mi-main.c (mi_cmd_execute): Use
4926         scoped_restore_current_language.
4927         * language.h (scoped_restore_current_language): New class.
4928
4929 2017-08-03  Tom Tromey  <tom@tromey.com>
4930
4931         * compile/compile.c (cleanup_unlink_file): Remove.
4932         (compile_to_object): Use gdb::unlinker.
4933         (eval_compile_command): Likewise.
4934
4935 2017-08-03  Tom Tromey  <tom@tromey.com>
4936
4937         * utils.h (make_cleanup_fclose): Remove.
4938         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4939
4940 2017-08-03  Tom Tromey  <tom@tromey.com>
4941
4942         * top.c (open_terminal_stream): Return gdb_file_up.
4943         (new_ui_command): Update.
4944
4945 2017-08-03  Tom Tromey  <tom@tromey.com>
4946
4947         * source.c (print_source_lines_base, forward_search_command)
4948         (reverse_search_command): Use gdb_file_up.
4949
4950 2017-08-03  Tom Tromey  <tom@tromey.com>
4951
4952         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4953
4954 2017-08-03  Tom Tromey  <tom@tromey.com>
4955
4956         * cli/cli-cmds.c (find_and_open_script): Change return type.
4957         Remove "streamp" and "full_path" parameters.
4958         (source_script_with_search): Update.
4959         * auto-load.c (source_script_file): Update.
4960         * cli/cli-cmds.h (find_and_open_script): Change type.
4961         (open_script): New struct.
4962
4963 2017-08-03  Tom Tromey  <tom@tromey.com>
4964
4965         * xml-support.c (xml_fetch_content_from_file): Update.
4966         * ui-file.c (stdio_file::open): Update.
4967         * tracefile-tfile.c (tfile_start): Update.
4968         * remote.c (remote_file_put, remote_file_get): Update.
4969         * nat/linux-procfs.c (linux_proc_get_int)
4970         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4971         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4972         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4973         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4974         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4975         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4976         * linux-nat.c (linux_proc_pending_signals): Update.
4977         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4978         (file_closer): Remove.
4979         * compile/compile.c (compile_to_object): Update.
4980         * common/filestuff.h (struct gdb_file_deleter): New.
4981         (gdb_file_up): New typedef.
4982         (gdb_fopen_cloexec): Change return type.
4983         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4984         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4985         (dump_binary_file, restore_binary_file): Update.
4986         * auto-load.c (auto_load_objfile_script_1): Update.
4987
4988 2017-08-03  Tom Tromey  <tom@tromey.com>
4989
4990         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4991         (info_static_tracepoint_markers_command): Likewise.
4992         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4993         * skip.c (skip_info): Use ui_out_emit_table.
4994         * progspace.c (print_program_space): Use ui_out_emit_table.
4995         * osdata.c (info_osdata): Use ui_out_emit_table.
4996         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4997         ui_out_emit_table.
4998         * linux-thread-db.c (info_auto_load_libthread_db): Use
4999         ui_out_emit_table.
5000         * inferior.c (print_inferior): Use ui_out_emit_table.
5001         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5002         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5003         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5004         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5005         * ui-out.h (class ui_out_emit_table): New.
5006
5007 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5008
5009         * mips-tdep.c (mips_fpu_type_str): New function.
5010         (mips_dump_tdep): Call it.
5011
5012 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5013
5014         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5015         `->mips_fpu_type'.
5016
5017 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5018
5019         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5020
5021 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5022
5023         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5024
5025 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5026
5027         * cli/cli-cmds.c (maintenancechecklist): New variable.
5028         * gdbcmd.h (maintenancechecklist): Declare it.
5029         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5030         Call i386_linux_read_description with different masks.
5031         * maint.c (maintenance_check_command): New function.
5032         (_initialize_maint_cmds): Call add_prefix_cmd.
5033         * target-descriptions.c (tdesc_reg): override operator != and ==.
5034         (tdesc_type): Likewise.
5035         (tdesc_feature): Likewise.
5036         (target_desc): Likewise.
5037         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5038         (maintenance_check_xml_descriptions): New function.
5039         (_initialize_target_descriptions) Add command "xml-descriptions".
5040         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5041
5042 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5043
5044         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5045         Include features/i386/32bit-*.c.
5046         (i386_linux_read_description): Generate target description if it
5047         doesn't exist.
5048         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5049         functions.
5050         * features/i386/32bit-linux.c: Re-generated.
5051         * features/i386/32bit-sse.c: Likewise.
5052         * target-descriptions.c (print_c_feature::visit): Print code to
5053         set register number if needed.
5054         (print_c_feature) <m_next_regnum>: New field.
5055
5056 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5057
5058         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5059         (FEATURE_XMLFILES): New.
5060         (FEATURE_CFILES): New.
5061         New rules.
5062         (clean-cfiles): Remove generated c files.
5063         * features/i386/32bit-avx.c: Generated.
5064         * features/i386/32bit-avx512.c: Generated.
5065         * features/i386/32bit-core.c: Generated.
5066         * features/i386/32bit-linux.c: Generated.
5067         * features/i386/32bit-mpx.c: Generated.
5068         * features/i386/32bit-pkeys.c: Generated.
5069         * features/i386/32bit-sse.c: Generated.
5070         * target-descriptions.c: Include algorithm.
5071         (tdesc_element_visitor): Add method visit_end.
5072         (print_c_tdesc): Implement visit_end.
5073         (print_c_tdesc:: m_filename_after_features): Move it to
5074         protected.
5075         (print_c_feature): New class.
5076         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5077         name starts with "i386/32bit-".
5078
5079 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5080
5081         * target-descriptions.c (tdesc_element_visitor): New class.
5082         (tdesc_element): New class.
5083         (tdesc_reg): Inherit from tdesc_element.
5084         (tdesc_reg::accept): New function.
5085         (tdesc_type): Inherit from tdesc_element.
5086         (tdesc_type::accept): New function.
5087         (tdesc_feature): Inherit from tdesc_element.
5088         (tdesc_feature::accept): New function.
5089         (target_desc): Inherit from tdesc_element.
5090         (target_desc::target_desc): New.
5091         (target_desc::~target_desc): New.
5092         (target_desc::accept): New.
5093         (allocate_target_description): Use new.
5094         (free_target_description): Use delete.
5095         (print_c_tdesc): New class.
5096         (maint_print_c_tdesc_cmd): Adjust.
5097
5098         * features/aarch64.c: Re-generated.
5099         * features/arc-arcompact.c: Re-generated.
5100         * features/arc-v2.c: Re-generated.
5101         * features/arm/arm-with-iwmmxt.c: Re-generated.
5102         * features/arm/arm-with-m.c: Re-generated.
5103         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5104         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5105         * features/arm/arm-with-neon.c: Re-generated.
5106         * features/arm/arm-with-vfpv2.c: Re-generated.
5107         * features/arm/arm-with-vfpv3.c: Re-generated.
5108         * features/i386/amd64-avx-avx512.c: Re-generated.
5109         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5110         * features/i386/amd64-avx.c: Re-generated.
5111         * features/i386/amd64-avx-linux.c: Re-generated.
5112         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5113         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5114         * features/i386/amd64-avx-mpx.c: Re-generated.
5115         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5116         * features/i386/amd64.c: Re-generated.
5117         * features/i386/amd64-linux.c: Re-generated.
5118         * features/i386/amd64-mpx.c: Re-generated.
5119         * features/i386/amd64-mpx-linux.c: Re-generated.
5120         * features/i386/i386-avx-avx512.c: Re-generated.
5121         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5122         * features/i386/i386-avx.c: Re-generated.
5123         * features/i386/i386-avx-linux.c: Re-generated.
5124         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5125         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5126         * features/i386/i386-avx-mpx.c: Re-generated.
5127         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5128         * features/i386/i386.c: Re-generated.
5129         * features/i386/i386-linux.c: Re-generated.
5130         * features/i386/i386-mmx.c: Re-generated.
5131         * features/i386/i386-mmx-linux.c: Re-generated.
5132         * features/i386/i386-mpx.c: Re-generated.
5133         * features/i386/i386-mpx-linux.c: Re-generated.
5134         * features/i386/x32-avx-avx512.c: Re-generated.
5135         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5136         * features/i386/x32-avx.c: Re-generated.
5137         * features/i386/x32-avx-linux.c: Re-generated.
5138         * features/i386/x32.c: Re-generated.
5139         * features/i386/x32-linux.c: Re-generated.
5140         * features/microblaze.c: Re-generated.
5141         * features/microblaze-with-stack-protect.c: Re-generated.
5142         * features/mips64-dsp-linux.c: Re-generated.
5143         * features/mips64-linux.c: Re-generated.
5144         * features/mips-dsp-linux.c: Re-generated.
5145         * features/mips-linux.c: Re-generated.
5146         * features/nds32.c: Re-generated.
5147         * features/nios2.c: Re-generated.
5148         * features/nios2-linux.c: Re-generated.
5149         * features/rs6000/powerpc-32.c: Re-generated.
5150         * features/rs6000/powerpc-32l.c: Re-generated.
5151         * features/rs6000/powerpc-403.c: Re-generated.
5152         * features/rs6000/powerpc-403gc.c : Re-generated.
5153         * features/rs6000/powerpc-405.c: Re-generated.
5154         * features/rs6000/powerpc-505.c: Re-generated.
5155         * features/rs6000/powerpc-601.c: Re-generated.
5156         * features/rs6000/powerpc-602.c: Re-generated.
5157         * features/rs6000/powerpc-603.c: Re-generated.
5158         * features/rs6000/powerpc-604.c: Re-generated.
5159         * features/rs6000/powerpc-64.c: Re-generated.
5160         * features/rs6000/powerpc-64l.c: Re-generated.
5161         * features/rs6000/powerpc-7400.c: Re-generated.
5162         * features/rs6000/powerpc-750.c: Re-generated.
5163         * features/rs6000/powerpc-860.c: Re-generated.
5164         * features/rs6000/powerpc-altivec32.c: Re-generated.
5165         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5166         * features/rs6000/powerpc-altivec64.c: Re-generated.
5167         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5168         * features/rs6000/powerpc-cell32l.c: Re-generated.
5169         * features/rs6000/powerpc-cell64l.c: Re-generated.
5170         * features/rs6000/powerpc-e500.c: Re-generated.
5171         * features/rs6000/powerpc-e500l.c: Re-generated.
5172         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5173         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5174         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5175         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5176         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5177         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5178         * features/rs6000/powerpc-vsx32.c: Re-generated.
5179         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5180         * features/rs6000/powerpc-vsx64.c: Re-generated.
5181         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5182         * features/rs6000/rs6000.c: Re-generated.
5183         * features/s390-linux32.c: Re-generated.
5184         * features/s390-linux32v1.c: Re-generated.
5185         * features/s390-linux32v2.c: Re-generated.
5186         * features/s390-linux64.c: Re-generated.
5187         * features/s390-linux64v1.c: Re-generated.
5188         * features/s390-linux64v2.c: Re-generated.
5189         * features/s390-te-linux64.c: Re-generated.
5190         * features/s390-tevx-linux64.c: Re-generated.
5191         * features/s390-vx-linux64.c: Re-generated.
5192         * features/s390x-linux64.c: Re-generated.
5193         * features/s390x-linux64v1.c: Re-generated.
5194         * features/s390x-linux64v2.c: Re-generated.
5195         * features/s390x-te-linux64.c: Re-generated.
5196         * features/s390x-tevx-linux64.c: Re-generated.
5197         * features/s390x-vx-linux64.c: Re-generated.
5198         * features/sparc/sparc32-solaris.c: Re-generated.
5199         * features/sparc/sparc64-solaris.c: Re-generated.
5200         * features/tic6x-c62x.c: Re-generated.
5201         * features/tic6x-c62x-linux.c: Re-generated.
5202         * features/tic6x-c64x.c: Re-generated.
5203         * features/tic6x-c64x-linux.c: Re-generated.
5204         * features/tic6x-c64xp.c: Re-generated.
5205         * features/tic6x-c64xp-linux.c: Re-generated.
5206
5207 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5208
5209         * i386-linux-tdep.c (i386_linux_read_description): New function.
5210         (i386_linux_core_read_description): Call
5211         i386_linux_read_description.
5212         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5213         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5214         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5215         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5216         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5217         * x86-linux-nat.c (x86_linux_read_description): Call
5218         i386_linux_read_description.
5219
5220 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5221
5222         * NEWS: Mention it.
5223         * features/Makefile (%.c: %.xml): Pass the xml file name to
5224         command "maint print c-tdesc".
5225         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5226         name from 'arg'.
5227
5228 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5229
5230         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5231         in-class initialization.
5232         (tdesc_create_feature): Call new instead of XCNEW.
5233         (free_target_description): Ue delete.
5234
5235 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5236
5237         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5238
5239 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5240
5241         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5242         constant.
5243         (amd64_x32_init_abi): Likewise.
5244         * amd64-tdep.h (amd64_init_abi): Update declaration.
5245         (amd64_x32_init_abi): Likewise.
5246
5247 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5248
5249         PR tdep/21717
5250         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5251         condition for FPSCR.
5252         (arm_linux_store_inferior_registers): Likewise.
5253
5254 2017-07-22  Tom Tromey  <tom@tromey.com>
5255
5256         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5257         <syscalls_counts>: Now a std::vector.
5258         (get_catch_syscall_inferior_data): Use "new".
5259         (catch_syscall_inferior_data_cleanup): Use "delete".
5260         (insert_catch_syscall, remove_catch_syscall)
5261         (clear_syscall_counts): Update.
5262
5263 2017-07-22  Tom Tromey  <tom@tromey.com>
5264
5265         * break-catch-syscall.c (syscall_catchpoint)
5266         <syscalls_to_be_caught>: Now a std::vector<int>
5267         (~syscall_catchpoint): Remove.
5268         (insert_catch_syscall, remove_catch_syscall)
5269         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5270         (print_mention_catch_syscall, print_recreate_catch_syscall):
5271         Update.
5272         (create_syscall_event_catchpoint): Change type of "filter"
5273         parameter.
5274         (catch_syscall_split_args): Return a std::vector.
5275         (catch_syscall_command_1, catching_syscall_number_1): Update.
5276
5277 2017-07-22  Tom Tromey  <tom@tromey.com>
5278
5279         * break-catch-throw.c (struct exception_catchpoint)
5280         <exception_rx>: Now a std::string.
5281         (~exception_catchpoint): Remove.
5282         (print_one_detail_exception_catchpoint): Update.
5283         (handle_gnu_v3_exceptions): Change type of except_rx.
5284         (extract_exception_regexp): Return a std::string.
5285         (catch_exception_command_1): Update.
5286
5287 2017-07-22  Tom Tromey  <tom@tromey.com>
5288
5289         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5290         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5291         std::vector.
5292         <catch_all>: Now a bool.
5293         (~signal_catchpoint): Remove.
5294         (signal_catchpoint_insert_location)
5295         (signal_catchpoint_remove_location)
5296         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5297         (signal_catchpoint_print_mention)
5298         (signal_catchpoint_print_recreate)
5299         (signal_catchpoint_explains_signal): Update.
5300         (create_signal_catchpoint): Change type of "filter" and
5301         "catch_all".
5302         (catch_signal_split_args): Return a std::vector.  Change type of
5303         "catch_all".
5304         (catch_signal_command): Update.
5305
5306 2017-07-20  Pedro Alves  <palves@redhat.com>
5307
5308         * ada-lang.c (ada_language_defn): Make extern.
5309         (_initialize_ada_language): Remove add_language call.
5310         * c-lang.c (c_language_defn, cplus_language_defn)
5311         (asm_language_defn, minimal_language_defn): Make extern.
5312         (_initialize_c_language): Delete.
5313         * completer.c (compare_cstrings): Delete, moved to utils.h.
5314         * d-lang.c (d_language_defn): Make extern.
5315         (_initialize_d_language): Remove add_language calls.
5316         * defs.h (enum language): Add comment.
5317         * f-lang.c (f_language_defn): Make extern.
5318         (_initialize_f_language): Remove add_language call.
5319         * go-lang.c (go_language_defn): Make extern.
5320         (_initialize_go_language): Remove add_language call.
5321         * language.c: Include <algorithm>.
5322         (languages): Redefine as const array.
5323         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5324         (set_language_command): Handle "local".  Use for-range loop.
5325         (set_language): Remove loop.
5326         (language_enum): Rewrite.
5327         (language_def, language_str): Remove loops.
5328         (add_language): Delete.
5329         (add_set_language_command): New, based on add_languages.
5330         (skip_language_trampoline): Adjust.
5331         (local_language_defn): Delete.
5332         (language_gdbarch_post_init): Adjust.
5333         (_initialize_language): Remove add_language calls.  Call
5334         add_set_language_command.
5335         * language.h (add_language): Delete.
5336         (auto_language_defn)
5337         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5338         (asm_language_defn, c_language_defn, cplus_language_defn)
5339         (d_language_defn, f_language_defn, go_language_defn)
5340         (m2_language_defn, objc_language_defn, opencl_language_defn)
5341         (pascal_language_defn, rust_language_defn): Declare.
5342         * m2-lang.c (m2_language_defn): Make extern.
5343         (_initialize_m2_language): Remove add_language call.
5344         * objc-lang.c (objc_language_defn): Make extern.
5345         (_initialize_objc_language): Remove add_language call.
5346         * opencl-lang.c (opencl_language_defn): Make extern.
5347         (_initialize_opencl_language): Remove add_language call.
5348         * p-lang.c (pascal_language_defn): Make extern.
5349         (_initialize_pascal_language): Delete.
5350         * rust-lang.c (rust_language_defn): Make extern.
5351         (_initialize_rust_language): Delete.
5352         * utils.h (compare_cstrings): New static inline function.
5353
5354 2017-07-20  Pedro Alves  <palves@redhat.com>
5355
5356         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5357         (get_var_value): Constify parameters.
5358         (get_int_var_value): Change prototype.
5359         (to_fixed_range_type): Adjust.
5360         * ada-lang.h (get_int_var_value): Change prototype.
5361
5362 2017-07-20  Pedro Alves  <palves@redhat.com>
5363
5364         * dwarf2read.c (dw2_lookup_symbol): Use
5365         SYMBOL_MATCHES_SEARCH_NAME.
5366         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5367
5368 2017-07-20  Pedro Alves  <palves@redhat.com>
5369
5370         * block.c (block_iter_name_step, block_iter_name_first)
5371         (block_iter_name_next): Delete.
5372         (block_lookup_symbol_primary): Adjust to use
5373         dict_iter_match_first/dict_iter_match_next.
5374         * block.h (block_iter_name_first, block_iter_name_next): Delete
5375         declarations.
5376         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5377         dict_iter_match_first/dict_iter_match_next.
5378
5379 2017-07-20  Pedro Alves  <palves@redhat.com>
5380
5381         * cp-support.c (cp_find_first_component_aux): Add missing case for
5382         end of string.
5383
5384 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5385
5386         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5387         of dwo_cu's dwo_file.
5388
5389 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5390
5391         * remote.c (store_registers_using_G): Remove one line comment.
5392
5393 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5394
5395         * regcache.c (regcache_cpy): Simplify it.
5396         (regcache::cpy_no_passthrough): Remove it.
5397         * regcache.h (cpy_no_passthrough): Remove it.
5398         (regcache_dup, regcache_cpy): Update comments.
5399
5400 2017-07-18  Pedro Alves  <palves@redhat.com>
5401
5402         * remote-sim.c (sim_command_completer): Adjust to work with a
5403         completion_tracker instead of a VEC.
5404
5405 2017-07-17  Pedro Alves  <palves@redhat.com>
5406
5407         * completer.c (complete_source_filenames): New function.
5408         (complete_address_and_linespec_locations): New function.
5409         (location_completer): Use complete_address_and_linespec_locations.
5410         (completion_tracker::build_completion_result): Honor the tracker's
5411         request to suppress append.
5412         * completer.h (completion_tracker::suppress_append_ws)
5413         (completion_tracker::set_suppress_append_ws): New methods.
5414         (completion_tracker::m_suppress_append_ws): New field.
5415         (complete_source_filenames): New declaration.
5416         * linespec.c (linespec_complete_what): New.
5417         (struct ls_parser) <complete_what, completion_word,
5418         completion_quote_char, completion_quote_end, completion_tracker>:
5419         New fields.
5420         (string_find_incomplete_keyword_at_end): New.
5421         (linespec_lexer_lex_string): Record quote char.  If in completion
5422         mode, don't throw.
5423         (linespec_lexer_consume_token): Advance the completion word point.
5424         (linespec_lexer_peek_token): Save/restore completion info.
5425         (save_stream_and_consume_token): New.
5426         (set_completion_after_number): New.
5427         (linespec_parse_basic): Set what to complete next depending on
5428         token.  Handle function and label completions specially.
5429         (parse_linespec): Disable objc shortcut in completion mode.  Set
5430         what to complete next depending on token type.  Skip keyword if in
5431         completion mode.
5432         (complete_linespec_component, linespec_complete): New.
5433         * linespec.h (linespec_complete): Declare.
5434
5435 2017-07-17  Pedro Alves  <palves@redhat.com>
5436
5437         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5438         Handle 'operator<' / 'operator<<'.
5439
5440 2017-07-17  Pedro Alves  <palves@redhat.com>
5441
5442         * completer.c (collect_explicit_location_matches): Handle
5443         MATCH_LABEL.
5444         (convert_explicit_location_to_linespec): New, factored out from
5445         ...
5446         (convert_explicit_location_to_sals): ... this.
5447         (complete_label): New.
5448         (linespec_complete_label, find_label_symbols_in_block): New.
5449         (find_label_symbols): Add completion_mode parameter and adjust to
5450         call find_label_symbols_in_block.
5451         * linespec.h (linespec_complete_label): Declare.
5452
5453 2017-07-17  Pedro Alves  <palves@redhat.com>
5454
5455         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5456         complete_symbol_mode parameter.
5457         * cli/cli-cmds.c (complete_command): Get the completion result out
5458         of the handle_brkchars tracker if used a custom word point.
5459         * completer.c: Include "linespec.h".
5460         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5461         (advance_to_expression_complete_word_point): New.
5462         (completion_tracker::completes_to_completion_word): New.
5463         (complete_files_symbols): Pass down
5464         complete_symbol_mode::EXPRESSION.
5465         (explicit_options, probe_options): New.
5466         (collect_explicit_location_matches): Complete on the
5467         explictit_loc->foo instead of word.  Use
5468         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5469         keyword and options completions.
5470         (backup_text_ptr): Delete.
5471         (skip_keyword): New.
5472         (complete_explicit_location): Remove 'word' parameter.  Add
5473         language, quoted_arg_start and quoted_arg_end parameters.
5474         Rewrite, parsing left to right.
5475         (location_completer): Rewrite.
5476         (location_completer_handle_brkchars): New function.
5477         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5478         (enum complete_line_internal_reason): Adjust comments.
5479         (completion_tracker::discard_completions): New.
5480         (completer_handle_brkchars_func_for_completer): Handle
5481         location_completer.
5482         (gdb_custom_word_point_brkchars)
5483         (gdb_org_rl_basic_quote_characters): New.
5484         (gdb_completion_word_break_characters_throw)
5485         (completion_find_completion_word): Handle trackers that use a
5486         custom word point.
5487         (completion_tracker::advance_custom_word_point_by): New.
5488         (completion_tracker::build_completion_result): Don't rely on
5489         readline appending the quote char.
5490         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5491         use a custom word point.
5492         (gdb_rl_attempted_completion_function): Restore
5493         rl_basic_quote_characters.
5494         * completer.h (class completion_tracker): Extend intro comment.
5495         (completion_tracker::set_quote_char)
5496         (completion_tracker::quote_char)
5497         (completion_tracker::set_use_custom_word_point)
5498         (completion_tracker::use_custom_word_point)
5499         (completion_tracker::custom_word_point)
5500         (completion_tracker::set_custom_word_point)
5501         (completion_tracker::advance_custom_word_point_by)
5502         (completion_tracker::completes_to_completion_word)
5503         (completion_tracker::discard_completions): New methods.
5504         (completion_tracker::m_quote_char)
5505         (completion_tracker::m_use_custom_word_point)
5506         (completion_tracker::m_custom_word_point): New fields.
5507         (advance_to_expression_complete_word_point): Declare.
5508         * f-lang.c (f_collect_symbol_completion_matches): Add
5509         complete_symbol_mode parameter.
5510         * language.h (struct language_defn)
5511         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5512         parameter.
5513         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5514         (linespec_complete_function): New function.
5515         (linespec_lexer_lex_keyword): Adjust.
5516         * linespec.h (linespec_keywords, linespec_complete_function): New
5517         declarations.
5518         * location.c (find_end_quote): New function.
5519         (explicit_location_lex_one): Add explicit_completion_info
5520         parameter.  Save quoting info.  Don't throw if being called for
5521         completion.  Don't handle Ada operators here.
5522         (is_cp_operator, skip_op_false_positives, first_of)
5523         (explicit_location_lex_one_function): New function.
5524         (string_to_explicit_location): Replace 'dont_throw' parameter with
5525         an explicit_completion_info pointer parameter.  Handle it.  Don't
5526         use explicit_location_lex_one to lex function names.  Use
5527         explicit_location_lex_one_function instead.
5528         * location.h (struct explicit_completion_info): New.
5529         (string_to_explicit_location): Replace 'dont_throw' parameter with
5530         an explicit_completion_info pointer parameter.
5531         * symtab.c (default_collect_symbol_completion_matches_break_on):
5532         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5533         (default_collect_symbol_completion_matches)
5534         (collect_symbol_completion_matches): Add complete_symbol_mode
5535         parameter.
5536         (collect_symbol_completion_matches_type): Pass down
5537         complete_symbol_mode::EXPRESSION.
5538         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5539         parameter.  Handle LINESPEC mode.
5540         * symtab.h (complete_symbol_mode): New.
5541         (default_collect_symbol_completion_matches_break_on)
5542         (default_collect_symbol_completion_matches)
5543         (collect_symbol_completion_matches)
5544         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5545         parameter.
5546
5547 2017-07-17  Pedro Alves  <palves@redhat.com>
5548
5549         * utils.c (enum class strncmp_iw_mode): New.
5550         (strcmp_iw): Rename to ...
5551         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5552         parameters.  Handle them.
5553         (strncmp_iw): New.
5554         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5555         * utils.h (strncmp_iw): Declare.
5556         (strcmp_iw): Move describing comments here.
5557
5558 2017-07-17  Pedro Alves  <palves@redhat.com>
5559
5560         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5561         CP_OPERATOR_STR.
5562         * c-typeprint.c (is_type_conversion_operator): Use
5563         CP_OPERATOR_STR.
5564         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5565         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5566         CP_OPERATOR_LEN.
5567         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5568         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5569         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5570         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5571         CP_OPERATOR_STR.
5572         * location.c: Include "cp-support.h".
5573         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5574         CP_OPERATOR_STR.
5575         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5576         CP_OPERATOR_LEN.
5577
5578 2017-07-17  Pedro Alves  <palves@redhat.com>
5579
5580         * cli/cli-cmds.c (complete_command): Use a completion tracker
5581         along with completion_find_completion_word for handle_brkchars
5582         phase.
5583         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5584         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5585         (struct gdb_rl_completion_word_info): New.
5586         (gdb_rl_find_completion_word): New.
5587         (completion_find_completion_word): New.
5588         * completer.h (completion_find_completion_word): Declare.
5589
5590 2017-07-17  Pedro Alves  <palves@redhat.com>
5591
5592         * ada-lang.c (symbol_completion_match): Adjust comments.
5593         (symbol_completion_add): Replace vector parameter with
5594         completion_tracker parameter.  Use it.
5595         (ada_make_symbol_completion_list): Rename to...
5596         (ada_collect_symbol_completion_matches): ... this.  Add
5597         completion_tracker parameter and use it.
5598         (ada_language_defn): Adjust.
5599         * break-catch-syscall.c (catch_syscall_completer): Adjust
5600         prototype and work with completion_tracker instead of VEC.
5601         * breakpoint.c (condition_completer): Adjust prototype and work
5602         with completion_tracker instead of VEC.
5603         * c-lang.c (c_language_defn, cplus_language_defn)
5604         (asm_language_defn, minimal_language_defn): Adjust to renames.
5605         * cli/cli-cmds.c (complete_command): Rework using
5606         completion_tracker.  Catch exceptions when completing.
5607         * cli/cli-decode.c (integer_unlimited_completer)
5608         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5609         with completion_tracker instead of VEC.
5610         * command.h (struct completion_tracker): Forward declare.
5611         (completer_ftype, completer_handle_brkchars_ftype): Change
5612         types.
5613         (complete_on_cmdlist, complete_on_enum): Adjust.
5614         * completer.c: Include <algorithm>.
5615         (struct gdb_completer_state): New.
5616         (current_completion): New global.
5617         (readline_line_completion_function): Delete.
5618         (noop_completer, filename_completer)
5619         (filename_completer_handle_brkchars, complete_files_symbols)
5620         (linespec_location_completer): Adjust to work with a
5621         completion_tracker instead of a VEC.
5622         (string_or_empty): New.
5623         (collect_explicit_location_matches): Adjust to work with a
5624         completion_tracker instead of a VEC.
5625         (explicit_location_completer): Rename to ...
5626         (complete_explicit_location): ... this and adjust to work with a
5627         completion_tracker instead of a VEC.
5628         (location_completer): Adjust to work with a completion_tracker
5629         instead of a VEC.
5630         (add_struct_fields): Adjust to work with a completion_list instead
5631         of VEC.
5632         (expression_completer): Rename to ...
5633         (complete_expression): ... this and adjust to work with a
5634         completion_tracker instead of a VEC.  Use complete_files_symbols.
5635         (expression_completer): Reimplement on top of complete_expression.
5636         (symbol_completer): Adjust to work with a completion_tracker
5637         instead of a VEC.
5638         (enum complete_line_internal_reason): Add describing comments.
5639         (complete_line_internal_normal_command): Adjust to work with a
5640         completion_tracker instead of a VEC.
5641         (complete_line_internal): Rename to ...
5642         (complete_line_internal_1): ... this and adjust to work with a
5643         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5644         handle_brkchars phase.
5645         (new_completion_tracker): Delete.
5646         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5647         complete_line_internal_1.
5648         (free_completion_tracker): Delete.
5649         (INITIAL_COMPLETION_HTAB_SIZE): New.
5650         (completion_tracker::completion_tracker)
5651         (completion_tracker::~completion_tracker): New.
5652         (maybe_add_completion): Delete.
5653         (completion_tracker::maybe_add_completion)
5654         (completion_tracker::add_completion)
5655         (completion_tracker::add_completions): New.
5656         (throw_max_completions_reached_error): Delete.
5657         (complete_line): Adjust to work with a completion_tracker instead
5658         of a VEC.  Don't create a completion_tracker_t or check for max
5659         completions here.
5660         (command_completer, command_completer_handle_brkchars)
5661         (signal_completer, reg_or_group_completer_1)
5662         (reg_or_group_completer, default_completer_handle_brkchars):
5663         Adjust to work with a completion_tracker.
5664         (gdb_completion_word_break_characters_throw): New.
5665         (gdb_completion_word_break_characters): Reimplement.
5666         (line_completion_function): Delete.
5667         (completion_tracker::recompute_lowest_common_denominator)
5668         (expand_preserving_ws)
5669         (completion_tracker::build_completion_result)
5670         (completion_result::completion_result)
5671         (completion_result::completion_result)
5672         (completion_result::~completion_result)
5673         (completion_result::completion_result)
5674         (completion_result::release_match_list, compare_cstrings)
5675         (completion_result::sort_match_list)
5676         (completion_result::reset_match_list)
5677         (gdb_rl_attempted_completion_function_throw)
5678         (gdb_rl_attempted_completion_function): New.
5679         * completer.h (completion_list, struct completion_result)
5680         (class completion_tracker): New.
5681         (complete_line): Add completion_tracker parameter.
5682         (readline_line_completion_function): Delete.
5683         (gdb_rl_attempted_completion_function): New.
5684         (noop_completer, filename_completer, expression_completer)
5685         (location_completer, symbol_completer, command_completer)
5686         (signal_completer, reg_or_group_completer): Update prototypes.
5687         (completion_tracker_t, new_completion_tracker)
5688         (make_cleanup_free_completion_tracker): Delete.
5689         (enum maybe_add_completion_enum): Delete.
5690         (maybe_add_completion): Delete.
5691         (throw_max_completions_reached_error): Delete.
5692         * corefile.c (complete_set_gnutarget): Adjust to work with a
5693         completion_tracker instead of a VEC.
5694         * cp-abi.c (cp_abi_completer): Adjust to work with a
5695         completion_tracker instead of a VEC.
5696         * d-lang.c (d_language_defn): Adjust.
5697         * disasm.c (disassembler_options_completer): Adjust to work with a
5698         completion_tracker instead of a VEC.
5699         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5700         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5701         with a completion_tracker instead of a VEC.
5702         (f_language_defn): Adjust.
5703         * go-lang.c (go_language_defn): Adjust.
5704         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5705         Adjust to work with a completion_tracker instead of a VEC.
5706         * infrun.c (handle_completer): Likewise.
5707         * interps.c (interpreter_completer): Likewise.
5708         * interps.h (interpreter_completer): Likewise.
5709         * language.c (unknown_language_defn, auto_language_defn)
5710         (local_language_defn): Adjust.
5711         * language.h (language_defn::la_make_symbol_completion_list):
5712         Rename to ...
5713         (language_defn::la_collect_symbol_completion_matches): ... this
5714         and adjust to work with a completion_tracker instead of a VEC.
5715         * m2-lang.c (m2_language_defn): Adjust.
5716         * objc-lang.c (objc_language_defn): Adjust.
5717         * opencl-lang.c (opencl_language_defn): Adjust.
5718         * p-lang.c (pascal_language_defn): Adjust.
5719         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5720         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5721         with a completion_tracker.
5722         * rust-lang.c (rust_language_defn): Adjust.
5723         * symtab.c (free_completion_list, do_free_completion_list)
5724         (return_val, completion_tracker): Delete.
5725         (completion_list_add_name, completion_list_add_symbol)
5726         (completion_list_add_msymbol, completion_list_objc_symbol)
5727         (completion_list_add_fields, add_symtab_completions): Add
5728         completion_tracker parameter and use it.
5729         (default_make_symbol_completion_list_break_on_1): Rename to...
5730         (default_collect_symbol_completion_matches_break_on): ... this.
5731         Add completion_tracker parameter and use it instead of allocating
5732         a completion tracker here.
5733         (default_make_symbol_completion_list_break_on): Delete old
5734         implementation.
5735         (default_make_symbol_completion_list): Delete.
5736         (default_collect_symbol_completion_matches): New.
5737         (make_symbol_completion_list): Delete.
5738         (collect_symbol_completion_matches): New.
5739         (make_symbol_completion_type): Rename to ...
5740         (collect_symbol_completion_matches_type): ... this.  Add
5741         completion_tracker parameter and use it instead of VEC.
5742         (make_file_symbol_completion_list_1): Rename to...
5743         (collect_file_symbol_completion_matches): ... this.  Add
5744         completion_tracker parameter and use it instead of VEC.
5745         (make_file_symbol_completion_list): Delete.
5746         (add_filename_to_list): Use completion_list instead of a VEC.
5747         (add_partial_filename_data::list): Now a completion_list.
5748         (make_source_files_completion_list): Work with a completion_list
5749         instead of a VEC.
5750         * symtab.h: Include "completer.h".
5751         (default_make_symbol_completion_list_break_on)
5752         (default_make_symbol_completion_list, make_symbol_completion_list)
5753         (make_symbol_completion_type, make_file_symbol_completion_list)
5754         (make_source_files_completion_list): Delete.
5755         (default_collect_symbol_completion_matches_break_on)
5756         (default_collect_symbol_completion_matches)
5757         (collect_symbol_completion_matches)
5758         (collect_symbol_completion_matches_type)
5759         (collect_file_symbol_completion_matches)
5760         (make_source_files_completion_list): New.
5761         * top.c (init_main): Don't install a rl_completion_entry_function
5762         hook.  Install a rl_attempted_completion_function hook instead.
5763         * tui/tui-layout.c (layout_completer): Adjust to work with a
5764         completion_tracker.
5765         * tui/tui-regs.c (tui_reggroup_completer):
5766         * tui/tui-win.c (window_name_completer, focus_completer)
5767         (winheight_completer): Adjust to work with a completion_tracker.
5768         * value.c: Include "completer.h".
5769         (complete_internalvar): Adjust to work with a completion_tracker.
5770         * value.h (complete_internalvar): Likewise.
5771
5772 2017-07-17  Pedro Alves  <palves@redhat.com>
5773
5774         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5775         renames.
5776         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5777         comments to completer_ftype's declaration.
5778         <completer_handle_brkchars>: Change type to
5779         completer_handle_brkchars_ftype.
5780         * command.h (completer_ftype): Add describing comment and give
5781         names to parameters.
5782         (completer_ftype_void): Rename to ...
5783         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5784         (set_cmd_completer_handle_brkchars): Adjust.
5785         * completer.c (filename_completer_handle_brkchars): New function.
5786         (complete_line_internal_normal_command): New function, factored
5787         out from ...
5788         (complete_line_internal): ... here.
5789         (command_completer_handle_brkchars)
5790         (default_completer_handle_brkchars)
5791         (completer_handle_brkchars_func_for_completer): New functions.
5792         * completer.h (set_gdb_completion_word_break_characters): Delete
5793         declaration.
5794         (completer_handle_brkchars_func_for_completer): New declaration.
5795         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5796         completer_handle_brkchars_func_for_completer.
5797
5798 2017-07-17  Pedro Alves  <palves@redhat.com>
5799
5800         * completer.c (symbol_completer): New function, based on
5801         make_symbol_completion_list_fn.
5802         * completer.h (symbol_completer): New declaration.
5803         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5804         * python/py-cmd.c (completers): Adjust.
5805         * symtab.c (make_symbol_completion_list_fn): Delete.
5806         * symtab.h (make_symbol_completion_list_fn): Delete.
5807         * cli/cli-decode.c (add_cmd): Adjust.
5808
5809 2017-07-17  Pedro Alves  <palves@redhat.com>
5810
5811         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5812         * dwarf2read.c: Include "filename-seen-cache.h".
5813         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5814         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5815         * filename-seen-cache.c: New file.
5816         * filename-seen-cache.h: New file.
5817         * symtab.c: Include "filename-seen-cache.h".
5818         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5819         (create_filename_seen_cache, clear_filename_seen_cache)
5820         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5821         to filename-seen-cache.h/filename-seen-cache.c.
5822         (output_source_filename, sources_info)
5823         (maybe_add_partial_symtab_filename)
5824         (make_source_files_completion_list): Adjust to use
5825         filename_seen_cache.
5826
5827 2017-07-17  Pedro Alves  <palves@redhat.com>
5828
5829         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5830         fields.
5831         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5832         dwarf2_debug_sections*)): New.
5833         (dwarf2_per_objfile::dwarf2_per_objfile(const
5834         dwarf2_per_objfile&)): Declare as deleted.
5835         (dwarf2_per_objfile::operator=): Declare as deleted.
5836         (dwarf2_per_objfile::dwarf2_per_objfile)
5837         (dwarf2_per_objfile::~dwarf2_per_objfile)
5838         (dwarf2_per_objfile::free_cached_comp_units): New.
5839         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5840         ctor.  Call dwarf2_per_objfile's ctor manually.
5841         (dwarf2_locate_sections): Deleted/refactored as ...
5842         (dwarf2_per_objfile::locate_sections): ... this new method.
5843         (free_cached_comp_units): Defer to
5844         dwarf2_per_objfile::free_cached_comp_units.
5845         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5846
5847 2017-07-14  Tom Tromey  <tom@tromey.com>
5848
5849         PR rust/21764:
5850         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5851         parameter.
5852         <UNOP_SIZEOF>: Split into separate case.
5853         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5854
5855 2017-07-14  Tom Tromey  <tom@tromey.com>
5856
5857         PR rust/21763:
5858         * symtab.c (symbol_matches_domain): Add language_rust to special
5859         case.
5860         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5861         treat LOC_TYPEDEF symbols as variables.
5862
5863 2017-07-14  Pedro Alves  <palves@redhat.com>
5864
5865         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5866         symtabs matching all symtabs with SRCFILE as file name instead of
5867         only considering the first hit, with lookup_symtab.
5868
5869 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5870
5871         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5872         operator_name parameters.
5873         (gen_expr): Update function call.
5874
5875 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5876
5877         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5878         parameter.
5879         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5880         Likewise.
5881         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5882         parameter, use agent_expr::gdbarch instead, update function
5883         calls.
5884         (locexpr_tracepoint_var_ref): Likewise.
5885         (loclist_tracepoint_var_ref): Likewise.
5886         * ax-gdb.c (gen_trace_static_fields): Likewise.
5887         (gen_traced_pop): Likewise.
5888         (gen_frame_args_address): Likewise.
5889         (gen_frame_locals_address): Likewise.
5890         (gen_var_ref): Likewise.
5891         (gen_struct_ref_recursive): Likewise.
5892         (gen_static_field): Likewise.
5893         (gen_maybe_namespace_elt): Likewise.
5894         (gen_expr): Likewise.
5895         (gen_trace_for_var): Likewise.
5896         (gen_trace_for_expr): Likewise.
5897         (gen_trace_for_return_address): Likewise.
5898
5899 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5900
5901         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5902         parameter.
5903         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5904
5905 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5906
5907         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5908         from ax, update calls.
5909         (gen_usual_arithmetic): Likewise.
5910         (gen_integral_promotions): Likewise.
5911         (gen_bitfield_ref): Likewise.
5912         (gen_primitive_field): Likewise.
5913         (gen_struct_ref_recursive): Likewise.
5914         (gen_struct_ref): Likewise.
5915         (gen_maybe_namespace_elt): Likewise.
5916         (gen_struct_elt_for_reference): Likewise.
5917         (gen_namespace_elt): Likewise.
5918         (gen_aggregate_elt_ref): Likewise.
5919         (gen_expr): Get gdbarch from ax, update calls.
5920         (gen_expr_binop_rest): Likewise.
5921
5922 2017-07-13  Pedro Alves  <palves@redhat.com>
5923
5924         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5925         as default tdesc.
5926         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5927         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5928         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5929         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5930         tdep.
5931         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5932         Get final tdesc from the tdep.
5933         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5934         default tdesc.
5935         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5936         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5937         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5938         Use it as default tdesc.
5939         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5940         down to amd_init_abi.  No longer handle fallback tdesc here.
5941         * amd64-tdep.h (tdesc_x32): Declare.
5942         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5943         parameter.
5944         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5945         as default tdesc.
5946
5947 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5948
5949         * s390-linux-tdep.c (s390_process_record): Add support for
5950         instructions new in arch12.
5951
5952 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5953
5954         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5955         PT_GETFSBASE and PT_GETGSBASE.
5956         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5957         PT_SETGSBASE.
5958
5959 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5960
5961         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5962         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5963         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5964         those rules.
5965         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5966         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5967         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5968         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5969         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5970         * features/i386/amd64.xml: Add 64bit-segments.xml.
5971         * features/i386/amd64-avx-avx512.c: Regenerated.
5972         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5973         * features/i386/amd64-avx-mpx.c: Regenerated.
5974         * features/i386/amd64-avx.c: Regenerated.
5975         * features/i386/amd64-mpx.c: Regenerated.
5976         * features/i386/amd64.c: Regenerated.
5977         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5978         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5979         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5980         * regformats/i386/amd64-avx.dat: Regenerated.
5981         * regformats/i386/amd64-mpx.dat: Regenerated.
5982         * regformats/i386/amd64.dat: Regenerated.
5983
5984 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5985
5986         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5987         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5988
5989 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5990
5991         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5992         unsetenv.
5993         * gnulib/aclocal.m4: Regenerate.
5994         * gnulib/config.in: Regenerate.
5995         * gnulib/configure: Regenerate.
5996         * gnulib/import/Makefile.am: Regenerate.
5997         * gnulib/import/Makefile.in: Regenerate.
5998         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5999         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6000         * gnulib/import/m4/environ.m4: New file.
6001         * gnulib/import/m4/setenv.m4: New file.
6002         * gnulib/import/setenv.c: New file.
6003         * gnulib/import/unsetenv.c: New file.
6004
6005 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6006
6007         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6008         address when op is DW_OP_addr.
6009
6010 2017-07-09  Tom Tromey  <tom@tromey.com>
6011
6012         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6013         check and apply to outer type.
6014
6015 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6016
6017         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6018         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6019         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6020         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6021
6022 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6023
6024         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6025
6026 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6027
6028         * corelow.c (get_core_siginfo): Remove.
6029         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6030         instead of get_core_siginfo.
6031         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6032         * gdbarch.h: Re-generate.
6033         * gdbarch.c: Re-generate.
6034         * linux-tdep.c (linux_core_xfer_siginfo): New.
6035         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6036
6037 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6038
6039         * corelow.c (thread_section_name): Move to ...
6040         * gdbcore.h (thread_section_name): ... here.
6041
6042 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6043
6044         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6045         (struct siginfo32): New.
6046         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6047         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6048         via ptrace(PT_LWPINFO).
6049
6050 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6051
6052         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6053         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6054         (fbsd_get_siginfo_type): New.
6055         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6056         (_initialize_fbsd_tdep): New.
6057
6058 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6059
6060         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6061         a singular dwo_unit*) to support multiple CUs in the same way that
6062         multiple TUs are supported.
6063         (create_cus_hash_table): Replace create_dwo_cu with a function for
6064         parsing multiple CUs from a DWO file.
6065         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6066         create_dwo_cu.
6067         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6068         htab_find, rather than comparing the signature to a singleton CU in
6069         the dwo_file.
6070
6071 2017-07-06  Pedro Alves  <palves@redhat.com>
6072
6073         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6074
6075 2017-07-04  Pedro Alves  <palves@redhat.com>
6076
6077         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6078         * gdbtypes.h (TYPE_STATIC): Delete.
6079         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6080         is_synchronized, is_native>: Delete.
6081         <dummy>: Bump.
6082         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6083         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6084         (TYPE_FN_FIELD_ABSTRACT): Delete.
6085
6086 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6087
6088         * buffer.h (buffer_finish): Fix spelling mistakes.
6089
6090 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6091
6092         * .dir-locals.el: Automatically switch to C-style comments in
6093         versions of Emacs that support the feature.
6094
6095 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6096             Pedro Alves  <palves@redhat.com>
6097
6098         PR cli/21688
6099         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6100         (process_next_line): New variable 'inline_cmd'.
6101         Adjust 'if' clauses for "python", "compile" and "guile" to use
6102         'command_name_equals' and check for '!inline_cmd'.
6103
6104 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6105
6106         PR cli/21688
6107         * cli/cli-script.c (command_name_equals_not_inline): New function.
6108         (process_next_line): Adjust 'if' clauses for "python", "compile"
6109         and "guile" to use command_name_equals_not_inline.
6110
6111 2017-06-29  Pedro Alves  <palves@redhat.com>
6112
6113         * completer.c (expression_completer): Call
6114         linespec_location_completer instead of location_completer.
6115
6116 2017-06-29  Pedro Alves  <palves@redhat.com>
6117
6118         * completer.c (expression_completer): Remove code that recomputes
6119         'text' from 'word'.
6120
6121 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6122
6123         * regformats/regdat.sh: Generate code with
6124         "ifndef IN_PROCESS_AGENT".
6125
6126 2017-06-28  Pedro Alves  <palves@redhat.com>
6127
6128         * command.h: Include "common/scoped_restore.h".
6129
6130 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6131
6132         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6133         instead of obstack_grow.
6134
6135 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6136
6137         PR gdb/21337
6138         * symfile.c (reread_symbols): Call objfiles_changed just before
6139         read_symbols.
6140
6141 2017-06-27  Pedro Alves  <palves@redhat.com>
6142
6143         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6144         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6145         (completion_list_add_symbol, completion_list_add_msymbol):
6146         ... these new functions.
6147         (add_symtab_completions)
6148         (default_make_symbol_completion_list_break_on_1): Adjust.
6149
6150 2017-06-27  Pedro Alves  <palves@redhat.com>
6151
6152         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6153         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6154         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6155         dtor.
6156         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6157         'storage_obstack' field an auto_obstack.  In-class initialize all
6158         non-bitfield fields.  Make minsyms_read bool.
6159         * symfile.c (read_symbols): Adjust.
6160
6161 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6162
6163         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6164         (gdbsim_store_register): Likewise.
6165
6166 2017-06-27  Pedro Alves  <palves@redhat.com>
6167
6168         * c-exp.y (name_obstack): Now an auto_obstack.
6169         (yylex): Use auto_obstack::clear.
6170         (c_parse): Use auto_obstack::clear instead of reinitializing and
6171         freeing the obstack.
6172         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6173         * d-exp.y (name_obstack): Now an auto_obstack.
6174         (yylex): Use auto_obstack::clear.
6175         (d_parse): Use auto_obstack::clear instead of reinitializing and
6176         freeing the obstack.
6177         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6178         auto_obstack.
6179         * dwarf2read.c (create_addrmap_from_index)
6180         (dwarf2_build_psymtabs_hard)
6181         (update_enumeration_type_from_children): Likewise.
6182         * gdb_obstack.h (auto_obstack): New type.
6183         * go-exp.y (name_obstack): Now an auto_obstack.
6184         (build_packaged_name): Use auto_obstack::clear.
6185         (go_parse): Use auto_obstack::clear instead of reinitializing and
6186         freeing the obstack.
6187         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6188         auto_obstack.
6189         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6190         * rust-exp.y (work_obstack): Now an auto_obstack.
6191         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6192         reinitializing and freeing the obstack.
6193         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6194         (host_char_to_target): Use auto_obstack.
6195         * utils.h (make_cleanup_obstack_free): Delete declaration.
6196         * valprint.c (generic_emit_char, generic_printstr): Use
6197         auto_obstack.
6198
6199 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6200
6201         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6202         thread.
6203         (darwin_init_thread_list): Don't update dummy thread.
6204         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6205
6206 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6207
6208         * record-full.c (netorder16): Remove.
6209
6210 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6211
6212         * common/diagnostics.h: Define macros for GCC.
6213         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6214         * common/vec.h: Include diagnostics.h.
6215         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6216         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6217         warning.
6218
6219 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6220
6221         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6222         New macro.
6223         * ada-lex.l: Ignore deprecated register warnings.
6224
6225 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6226
6227         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6228         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6229
6230 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6231
6232         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6233         its own line.
6234
6235 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6236
6237         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6238
6239 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6240
6241         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6242         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6243         (xtensa_register_read_masked): Likewise.
6244
6245 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6246
6247         * common/environ.c (gdb_environ::unset): Update comment.
6248
6249 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6250
6251         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6252         registers.
6253
6254 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6255
6256         * record-full.c (record_full_exec_insn): Use byte_vector.
6257
6258 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6259
6260         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6261         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6262
6263 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6264
6265         * remote.c (cached_reg): Move from here...
6266         * regcache.h (cached_reg): ...to here.
6267         * python/py-unwind.c (struct reg_info): Remove.
6268         (cached_frame_info): Use cached_reg_t.
6269         (pyuw_prev_register): Likewise.
6270         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6271         (pyuw_dealloc_cache): Free all registers.
6272
6273 2017-06-22  Pedro Alves  <palves@redhat.com>
6274             Simon Marchi  <simon.marchi@ericsson.com>
6275
6276         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6277         warning.
6278         * common/diagnostics.h: New file.
6279
6280 2017-06-22  Pedro Alves  <palves@redhat.com>
6281
6282         * common/agent.h: Add include guards.
6283
6284 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6285
6286         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6287         talk about addressable units instead of bytes.
6288
6289 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6290
6291         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6292         of '::const_iterator'.
6293
6294 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6295
6296         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6297         'unittests/environ-selftests.c'.
6298         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6299         * charset.c (find_charset_names): Declare object 'iconv_env'.
6300         Update code to use 'iconv_env' object.  Remove call to
6301         'free_environ'.
6302         * common/environ.c: Include <utility>.
6303         (make_environ): Delete function.
6304         (free_environ): Delete function.
6305         (gdb_environ::clear): New function.
6306         (gdb_environ::operator=): New function.
6307         (gdb_environ::get): Likewise.
6308         (environ_vector): Delete function.
6309         (set_in_environ): Delete function.
6310         (gdb_environ::set): New function.
6311         (unset_in_environ): Delete function.
6312         (gdb_environ::unset): New function.
6313         (gdb_environ::envp): Likewise.
6314         * common/environ.h: Include <vector>.
6315         (struct gdb_environ): Delete; transform into...
6316         (class gdb_environ): ... this class.
6317         (free_environ): Delete prototype.
6318         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6319         environ_vector): Likewise.
6320         * infcmd.c (run_command_1): Update code to call
6321         'envp' from 'gdb_environ' class.
6322         (environment_info): Update code to call methods from 'gdb_environ'
6323         class.
6324         (unset_environment_command): Likewise.
6325         (path_info): Likewise.
6326         (path_command): Likewise.
6327         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6328         (inferior::inferior): Initialize 'environment' using the host's
6329         information.
6330         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6331         Include "environ.h".
6332         (class inferior) <environment>: Change type from 'struct
6333         gdb_environ' to 'gdb_environ'.
6334         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6335         methods from 'gdb_environ' class.
6336         * solib.c (solib_find_1): Likewise
6337         * unittests/environ-selftests.c: New file.
6338
6339 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6340
6341         * features/i386/i386-linux.xml: Exchange the order of including
6342         32bit-linux.xml and 32bit-sse.xml.
6343         * features/i386/i386-linux.c: Regenerated.
6344
6345 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6346
6347         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6348         Delete copy ctor and assignment operator.
6349         (tdesc_type): Likewise.
6350         (tdesc_feature): Likewise.
6351         (tdesc_free_reg): Remove.
6352         (tdesc_create_reg): Use new.
6353         (tdesc_free_type): Remove.
6354         (tdesc_create_vector): Use new.
6355         (tdesc_create_union): Likewise.
6356         (tdesc_create_flags): Likewise.
6357         (tdesc_create_enum): Likewise.
6358         (tdesc_free_feature): Delete.
6359         (free_target_description): Use delete.
6360
6361 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6362
6363         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6364         registers.
6365
6366 2017-06-19  Pedro Alves  <palves@redhat.com>
6367
6368         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6369         after gdb::unlinker.
6370
6371 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6372
6373         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6374         gdb_environ to access an environment variable.
6375
6376 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6377
6378         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6379         gdb_byte*.
6380
6381 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6382
6383         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6384
6385 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6386
6387         * configure: Re-generate.
6388         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6389
6390 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6391
6392         * configure: Re-generate.
6393         * warning.m4: Pass -Werror to compiler when checking for
6394         supported warning flags.
6395
6396 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6397
6398         * Makefile.in (COMPILE.pre): Add "-x c++".
6399
6400 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6401             Pedro Alves  <palves@redhat.com>
6402             Yao Qi  <yao.qi@linaro.org>
6403
6404         * defs.h (RequireLongest): New.
6405         (extract_integer): Declare function template.
6406         (extract_signed_integer): Remove the declaration, but define it
6407         static inline.
6408         (extract_unsigned_integer): Likewise.
6409         (store_integer): Declare function template.
6410         (store_signed_integer): Remove the declaration, but define it
6411         static inline.
6412         (store_unsigned_integer): Likewise.
6413         * findvar.c (extract_integer): New function template.
6414         (extract_signed_integer): Remove.
6415         (extract_unsigned_integer): Remove.
6416         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6417         instantiations.
6418         (store_integer): New function template.
6419         (store_signed_integer): Remove.
6420         (store_unsigned_integer): Remove.
6421         (store_integer): Explicit instantiations.
6422         * regcache.c (regcache_raw_read_signed): Update.
6423         (regcache::raw_read): New function.
6424         (regcache::raw_read_signed): Remove.
6425         (regcache::raw_read_unsigned): Remove.
6426         (regcache_raw_read_unsigned): Update.
6427         (regcache_raw_write_unsigned): Update.
6428         (regcache::raw_write_signed): Remove.
6429         (regcache::raw_write): New function.
6430         (regcache_cooked_read_signed): Update.
6431         (regcache::raw_write_unsigned): Remove.
6432         (regcache::cooked_read_signed): Remove.
6433         (regcache_cooked_read_unsigned): Update.
6434         (regcache::cooked_read_unsigned): Remove.
6435         (regcache_cooked_write_signed): Update.
6436         (regcache_cooked_write_unsigned): Update.
6437         * regcache.h (regcache) <raw_read_signed>: Remove.
6438         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6439         <raw_read, raw_write>: New.
6440         <cooked_read_signed, cooked_write_signed>: Remove.
6441         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6442         <cooked_read, cooked_write>: New.
6443         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6444         (sh64_pseudo_register_write): Update.
6445
6446 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6447
6448         * arc-tdep.c (arc_disassembler_options): New variable.
6449         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6450         of default_print_insn.
6451         (arc_delayed_print_insn): Set info->section when needed,
6452         use default_print_insn to retrieve a disassembler.
6453
6454 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6455
6456         PR gdb/21574
6457         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6458         to mention $SHELL and startup-with-shell.
6459
6460 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6461
6462         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6463
6464 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6465
6466         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6467         default_print_insn instead of print_insn_aarch64.
6468         * arm-tdep.c (gdb_print_insn_arm): Call
6469         default_print_insn instead of print_insn_big_arm
6470         and print_insn_little_arm.
6471         * i386-tdep.c (i386_print_insn): Call default_print_insn
6472         instead of print_insn_i386.
6473         * ia64-tdep.c (ia64_print_insn): Call
6474         default_print_insn instead of print_insn_ia64.
6475         * mips-tdep.c (gdb_print_insn_mips): Call
6476         default_print_insn instead of print_insn_big_mips
6477         and print_insn_little_mips.
6478         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6479         instead of print_insn_spu.
6480
6481 2017-06-14  Pedro Alves  <palves@redhat.com>
6482
6483         * ada-lang.c: Include "common/byte-vector.h".
6484         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6485         * charset.c (wchar_iterator::iterate): Resize the vector instead
6486         of reserving it.
6487         * common/byte-vector.h: Include "common/def-vector.h".
6488         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6489         * cli/cli-dump.c: Include "common/byte-vector.h".
6490         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6491         * common/byte-vector.h: New file.
6492         * common/def-vector.h: New file.
6493         * common/default-init-alloc.h: New file.
6494         * dwarf2loc.c: Include "common/byte-vector.h".
6495         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6496         instead of reserving it.
6497         * dwarf2read.c: Include "common/byte-vector.h".
6498         (data_buf::m_vec): Now a gdb::byte_vector.
6499         * gdb_regex.c: Include "common/def-vector.h".
6500         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6501         * mi/mi-main.c: Include "common/byte-vector.h".
6502         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6503         * printcmd.c: Include "common/byte-vector.h".
6504         (print_scalar_formatted): Use gdb::byte_vector.
6505         * valprint.c: Include "common/byte-vector.h".
6506         (maybe_negate_by_bytes, print_decimal_chars): Use
6507         gdb::byte_vector.
6508
6509 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6510
6511         * darwin-nat.c: Include "nat/fork-inferior.h".
6512
6513 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6514
6515         * configure.nat: Factor out Darwin bits that are not
6516         architecture-specific.  Add fork-inferior.o.
6517
6518 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6519
6520         * configure.nat: Factor out AIX bits that are not
6521         architecture-specific.  Add fork-inferior.o.
6522
6523 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6524
6525         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6526         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6527         wrappers that just call rw_pieced_value.
6528
6529 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6530
6531         * dwarf2loc.c (write_pieced_value): When writing the data for a
6532         memory piece, use write_memory_with_notification instead of
6533         write_memory.
6534
6535 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6536
6537         * valops.c (read_value_memory): Change embedded_offset to
6538         represent a bit offset instead of a byte offset.
6539         * value.h (read_value_memory): Adjust comment.
6540
6541 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6542
6543         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6544         dest_offset_bits and source_offset_bits.
6545         (write_pieced_value): Likewise.
6546
6547 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6548
6549         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6550         given by DW_OP_bit_piece.
6551         (write_pieced_value): Likewise.
6552
6553 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6554
6555         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6556         some other preparations to the places where sufficient information
6557         is available.
6558         (write_pieced_value): Likewise.
6559
6560 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6561
6562         * dwarf2loc.c (bits_to_bytes): New function.
6563         (read_pieced_value): Fix offset calculations for register pieces
6564         on big-endian targets.
6565         (write_pieced_value): Likewise.
6566
6567 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6568
6569         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6570         (write_pieced_value): Likewise.
6571
6572 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6573
6574         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6575         transfer the source value's least significant bits, instead of its
6576         lowest-addressed ones.  Rename type_len to max_offset.
6577         (read_pieced_value): Mirror above changes to write_pieced_value as
6578         applicable.
6579
6580 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6581
6582         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6583         truncate full bytes from dest_offset_bits before using it as an
6584         offset into the buffer.
6585
6586 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6587
6588         * dwarf2loc.c (write_pieced_value): Include transfer size in
6589         byte-wise check.
6590
6591 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6592
6593         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6594         calculation of this_size.
6595
6596 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6597
6598         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6599         when targeting a bit-field.
6600         (write_pieced_value): Likewise.
6601
6602 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6603
6604         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6605         (allocate_piece_closure): Drop addr_size parameter.
6606         (dwarf2_evaluate_loc_desc_full): Adjust call to
6607         allocate_piece_closure.
6608
6609 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6610
6611         PR gdb/21226
6612         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6613         the LSB end, independent of endianness.
6614
6615 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6616
6617         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6618         size capping.
6619
6620 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6621
6622         * mips-linux-nat.c: Move include features/mips*-linux.c to
6623         mips-linux-tdep.c.
6624         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6625         to mips-linux-tdep.c.
6626         * mips-linux-tdep.c: Include features/mips*-linux.c
6627         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6628         functions.
6629         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6630         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6631         (tdesc_mips64_dsp_linux): Declare.
6632
6633 2017-06-12  Tom Tromey  <tom@tromey.com>
6634
6635         * valprint.h (val_print_type_code_int): Remove.
6636         * valprint.c (generic_val_print_int): Always call
6637         val_print_scalar_formatted.
6638         (val_print_type_code_int): Remove.
6639         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6640         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6641         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6642         * ada-valprint.c (ada_val_print_num): Use
6643         val_print_scalar_formatted.
6644
6645 2017-06-12  Tom Tromey  <tom@tromey.com>
6646
6647         * printcmd.c (print_scalar_formatted): Unify the two switches.
6648         Don't convert scalars to LONGEST.
6649
6650 2017-06-12  Tom Tromey  <tom@tromey.com>
6651
6652         PR exp/16225:
6653         * valprint.h (print_decimal_chars): Update.
6654         * valprint.c (maybe_negate_by_bytes): New function.
6655         (print_decimal_chars): Add "is_signed" argument.
6656         * printcmd.c (print_scalar_formatted): Update.
6657
6658 2017-06-12  Tom Tromey  <tom@tromey.com>
6659
6660         PR exp/16225:
6661         * valprint.h (print_binary_chars, print_hex_chars): Update.
6662         * valprint.c (val_print_type_code_int): Update.
6663         (print_binary_chars): Add "zero_pad" argument.
6664         (emit_octal_digit): New function.
6665         (print_octal_chars): Don't zero-pad.
6666         (print_decimal_chars): Likewise.
6667         (print_hex_chars): Add "zero_pad" argument.
6668         * sh64-tdep.c (sh64_do_fp_register): Update.
6669         * regcache.c (regcache::dump): Update.
6670         * printcmd.c (print_scalar_formatted): Update.
6671         * infcmd.c (default_print_one_register_info): Update.
6672
6673 2017-06-12  Pedro Alves  <palves@redhat.com>
6674             Alan Hayward  <alan.hayward@arm.com>
6675
6676         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6677         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6678         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6679         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6680         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6681
6682 2017-06-12  Pedro Alves  <palves@redhat.com>
6683
6684         * dwarf2read.c (mapped_symtab::data): Now a vector of
6685         symtab_index_entry instead of vector of
6686         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6687         whether an element's name is NULL instead of checking whether the
6688         element itself is NULL.
6689         (find_slot): Change return type.  Adjust.
6690         (hash_expand, , add_index_entry, uniquify_cu_indices)
6691         (write_hash_table): Adjust.
6692
6693 2017-06-12  Pedro Alves  <palves@redhat.com>
6694
6695         * dwarf2read.c (recursively_count_psymbols): New function.
6696         (write_psymtabs_to_index): Call it to compute number of psyms and
6697         pass estimate size of psyms_seen to unordered_set's ctor.
6698
6699 2017-06-12  Pedro Alves  <palves@redhat.com>
6700
6701         * dwarf2read.c (write_hash_table): Check if key already exists
6702         before emplacing.
6703
6704 2017-06-12  Pedro Alves  <palves@redhat.com>
6705
6706         * dwarf2read.c (data_buf::append_space): Rename to...
6707         (data_buf::grow): ... this, and make private.  Adjust all callers.
6708         (data_buf::append_uint): New method.
6709         (add_address_entry, write_one_signatured_type)
6710         (write_psymtabs_to_index): Use it.
6711
6712 2017-06-12  Pedro Alves  <palves@redhat.com>
6713
6714         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6715         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6716         (data_buf::file_write): Call ::fwrite directly.
6717
6718 2017-06-12  Pedro Alves  <palves@redhat.com>
6719
6720         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6721         std::vector::erase.
6722
6723 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6724
6725         Code cleanup: C++ify .gdb_index producer.
6726         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6727         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6728         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6729         (create_strtab, add_string): Remove.
6730         (file_write, data_buf): New.
6731         (struct symtab_index_entry): Use std::vector for cu_indices.
6732         (struct mapped_symtab): Use std::vector for data.
6733         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6734         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6735         Remove.
6736         (find_slot): Change return type.  Update it to the new data structures.
6737         (hash_expand, add_index_entry): Update it to the new data structures.
6738         (offset_type_compare): Remove.
6739         (uniquify_cu_indices): Update it to the new data structures.
6740         (c_str_view, c_str_view_hasher, vector_hasher): New.
6741         (add_indices_to_cpool): Remove.
6742         (write_hash_table): Update it to the new data structures.
6743         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6744         (eq_psymtab_cu_index): Remove.
6745         (psym_index_map): New typedef.
6746         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6747         reference and std::unordered_map for cu_index_htab.
6748         (add_address_entry, add_address_entry_worker, write_address_map)
6749         (write_psymbols): Update it to the new data structures.
6750         (write_obstack): Remove.
6751         (struct signatured_type_index_data): Change types_list to a data_buf
6752         reference and psyms_seen to a std::unordered_set reference.
6753         (write_one_signatured_type, recursively_write_psymbols)
6754         (write_psymtabs_to_index): Update it to the new data structures.
6755
6756 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6757
6758         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6759         separate-debug-file commands.
6760         * symfile.h (separate_debug_file_debug): New global.
6761         * symfile.c (separate_debug_file_debug): New global.
6762         (separate_debug_file_exists, find_separate_debug_file): Add
6763         debug output.
6764         (_initialize_symfile): Add "set debug separate-debug-file"
6765         command.
6766         * build-id.c (build_id_to_debug_bfd,
6767         find_separate_debug_file_by_buildid): Add debug output.
6768
6769 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6770
6771         * gdbarch.sh (displaced_step_free_closure): Remove.
6772         * gdbarch.h, gdbarch.c: Re-generate.
6773         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6774         displaced_step_free_closure.
6775         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6776         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6777         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6778         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6779         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6780         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6781         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6782         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6783         * infrun.c (displaced_step_clear): Call xfree instead of
6784         gdbarch_displaced_step_free_closure.
6785
6786 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6787
6788         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6789         NULL".
6790
6791 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6792
6793         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6794         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6795         (mn10300_push_dummy_call): Likewise.
6796
6797 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6798
6799         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6800
6801 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6802
6803         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6804
6805 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6806
6807         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6808         able to start inferiors using a shell.
6809         (New remote packets): Announce new packet "QStartupWithShell".
6810         * remote.c: Add PACKET_QStartupWithShell.
6811         (extended_remote_create_inferior): Handle new
6812         PACKET_QStartupWithShell.
6813         (remote_protocol_features) <QStartupWithShell>: New entry for
6814         PACKET_QStartupWithShell.
6815         (_initialize_remote): Call "add_packet_config_cmd" for
6816         QStartupShell.
6817
6818 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6819             Pedro Alves  <palves@redhat.com>
6820
6821         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6822         and "nat/fork-inferior.h".
6823         * common/common-inferior.h: New file, with contents from
6824         "gdb/inferior.h".
6825         * commom/common-utils.c: Include "common-utils.h".
6826         (stringify_argv): New function.
6827         * common/common-utils.h (stringify_argv): New prototype.
6828         * configure.nat: Add "fork-inferior.o" as a dependency for
6829         "*linux*", "fbsd*" and "nbsd*" hosts.
6830         * corefile.c (get_exec_file): Update comment.
6831         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6832         instead of "startup_inferior".
6833         (darwin_create_inferior): Call "add_thread_silent" after
6834         "fork_inferior".
6835         * fork-child.c: Cleanup unnecessary includes.
6836         (SHELL_FILE): Move to "common/common-fork-child.c".
6837         (environ): Likewise.
6838         (exec_wrapper): Initialize.
6839         (get_exec_wrapper): New function.
6840         (breakup_args): Move to "common/common-fork-child.c"; rename to
6841         "breakup_args_for_exec".
6842         (escape_bang_in_quoted_argument): Move to
6843         "common/common-fork-child.c".
6844         (saved_ui): New variable.
6845         (prefork_hook): New function.
6846         (postfork_hook): Likewise.
6847         (postfork_child_hook): Likewise.
6848         (gdb_startup_inferior): Likewise.
6849         (fork_inferior): Move to "common/common-fork-child.c".  Update
6850         function to support gdbserver.
6851         (startup_inferior): Likewise.
6852         * gdbcore.h (get_exec_file): Remove declaration.
6853         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6854         instead of "startup_inferior".  Call "add_thread_silent" after
6855         "fork_inferior".
6856         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6857         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6858         instead of "startup_inferior".  Call "add_thread_silent" after
6859         "fork_inferior".
6860         * inferior.h: Include "common-inferior.h".
6861         (trace_start_error): Move to "common/common-utils.h".
6862         (trace_start_error_with_name): Likewise.
6863         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6864         (startup_inferior): Likewise.
6865         (gdb_startup_inferior): New prototype.
6866         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6867         * nat/fork-inferior.h: New file.
6868         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6869         instead of "startup_inferior".  Call "add_thread_silent" after
6870         "fork_inferior".
6871         * target.h (target_terminal_init): Move prototype to
6872         "target/target.h".
6873         (target_terminal_inferior): Likewise.
6874         (target_terminal_ours): Likewise.
6875         * target/target.h (target_terminal_init): New prototype, moved
6876         from "target.h".
6877         (target_terminal_inferior): Likewise.
6878         (target_terminal_ours): Likewise.
6879         * utils.c (gdb_flush_out_err): New function.
6880
6881 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6882
6883         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6884         * common/common-gdbthread.h: New file, with parts from
6885         "gdb/gdbthread.h".
6886         * gdbthread.h: Include "common-gdbthread.h".
6887         (switch_to_thread): Moved to "common/common-gdbthread.h".
6888
6889 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6890
6891         * Makefile.in (SFILES): Add "common/job-control.c".
6892         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6893         (COMMON_OBS): Add "job-control.o".
6894         * common/job-control.c: New file, with contents from
6895         "gdb/inflow.c".
6896         * common/job-control.h: New file, with contents from "terminal.h".
6897         * fork-child.c: Include "job-control.h".
6898         * inflow.c: Include "job-control.h".
6899         (gdb_setpgid): Move to "common/common-inflow.c".
6900         (_initialize_inflow): Move setting of "job_control" to
6901         "handle_job_control".
6902         * terminal.h (job_control): Moved to "common/common-terminal.h".
6903         (gdb_setpgid): Likewise.
6904         * top.c: Include "job_control.h".
6905         * utils.c: Likewise.
6906         (job_control): Moved to "job-control.c".
6907
6908 2017-06-07  Pedro Alves  <palves@redhat.com>
6909
6910         * Makefile.in (SFILES): Add gdb_regex.c.
6911         (COMMON_OBS): Add gdb_regex.o.
6912         * ada-lang.c (ada_add_standard_exceptions)
6913         (ada_add_exceptions_from_frame, name_matches_regex)
6914         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6915         parameter type to compiled_regex.  Adjust.
6916         (ada_exceptions_list): Use compiled_regex.
6917         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6918         std::unique_ptr<compiled_regex>.
6919         (exception_catchpoint::~exception_catchpoint): Remove regfree
6920         call.
6921         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6922         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6923         * breakpoint.c (solib_catchpoint::compiled): Now a
6924         std::unique_ptr<compiled_regex>.
6925         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6926         (check_status_catch_solib): Adjust to use compiled_regex.
6927         (add_solib_catchpoint): Adjust to use compiled_regex.
6928         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6929         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6930         compiled_regex reference.  Adjust to use it.
6931         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6932         declaration.  Include "gdb_regex.h".
6933         (apropos_cmd): Change regex parameter to compiled_regex reference.
6934         * gdb_regex.c: New file.
6935         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6936         declarations.
6937         (class compiled_regex): New.
6938         * linux-tdep.c: Include "common/gdb_optional.h".
6939         (struct mapping_regexes): New, factored out from
6940         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6941         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6942         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6943         * probe.c: Include "common/gdb_optional.h".
6944         (collect_probes): Use compiled_regex and gdb::optional and remove
6945         cleanups.
6946         * skip.c: Include "common/gdb_optional.h".
6947         (skiplist_entry::compiled_function_regexp): Now a
6948         gdb::optional<compiled_regex>.
6949         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6950         (free_skiplist_entry): Remove regfree call.
6951         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6952         compiled_regex and gdb::optional.
6953         * symtab.c: Include "common/gdb_optional.h".
6954         (search_symbols): Use compiled_regex and gdb::optional.
6955         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6956         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6957         to gdb_regex.c.
6958
6959 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6960
6961         * regcache.c (regcache::save): Avoid buffer use.
6962         (regcache::dump): Likewise.
6963
6964 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6965
6966         * sh-tdep.c (sh_pseudo_register_read): Remove
6967         MAX_REGISTER_SIZE.
6968         (sh_pseudo_register_write): Likewise.
6969         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6970         (sh64_pseudo_register_write): Likewise
6971
6972 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6973
6974         * aarch64-tdep.c (aarch64_store_return_value): Use
6975         V_REGISTER_SIZE.
6976         (aarch64_pseudo_read_value): Likewise.
6977         (aarch64_pseudo_write): Likewise.
6978
6979 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6980
6981         * regformats/regdef.h (set_register_cache): Remove the
6982         declaration.
6983
6984 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6985
6986         * frame.c (frame_unwind_register_signed): Use
6987         frame_unwind_register_value.
6988
6989 2017-06-06  Pedro Alves  <palves@redhat.com>
6990
6991         PR breakpoints/21553
6992         * breakpoint.c (create_breakpoints_sal_default)
6993         (init_breakpoint_sal, create_breakpoint_sal): Use
6994         gdb::unique_xmalloc_ptr for string parameters.
6995         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6996         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6997         (base_breakpoint_create_breakpoints_sal)
6998         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6999         (strace_marker_create_breakpoints_sal)
7000         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7001         string parameters.
7002         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7003         gdb::unique_xmalloc_ptr for string parameters.
7004         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7005         parameters.
7006
7007 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7008
7009         * alpha-tdep.c (alpha_register_to_value): Use
7010         get_frame_register_value.
7011         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7012
7013 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7014
7015         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7016         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7017         (ia64_value_to_register): Likewise.
7018         (ia64_extract_return_value): Likewise.
7019         (ia64_store_return_value): Likewise.
7020         (ia64_push_dummy_call): Likewise.
7021
7022 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7023
7024         GDB 8.0 released.
7025
7026 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7027
7028         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7029
7030 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7031
7032         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7033         parameter.
7034         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7035
7036 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7037
7038         * event-loop.c (poll_timers): Unallocate timer using delete
7039         instead of xfree.
7040
7041 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7042
7043         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7044         (struct breakpoint) <~breakpoint>: New.
7045         (struct watchpoint): Inherit from breakpoint.
7046         <~watchpoint>: New.
7047         <base>: Remove.
7048         (struct tracepoint): Inherit from breakpoint.
7049         <base>: Remove.
7050         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7051         (struct longjmp_breakpoint): Inherit from breakpoint.
7052         <~longjmp_breakpoint>: New.
7053         <base>: Remove.
7054         (new_breakpoint_from_type): Remove casts.
7055         (watchpoint_in_thread_scope): Remove reference to base field.
7056         (watchpoint_del_at_next_stop): Likewise.
7057         (update_watchpoint): Likewise.
7058         (watchpoint_check): Likewise.
7059         (bpstat_check_watchpoint): Likewise.
7060         (set_longjmp_breakpoint): Likewise.
7061         (struct fork_catchpoint): Inherit from breakpoint.
7062         <base>: Remove.
7063         (struct solib_catchpoint): Inherit from breakpoint.
7064         <~solib_catchpoint>: New.
7065         <base>: Remove.
7066         (dtor_catch_solib): Change to ...
7067         (solib_catchpoint::~solib_catchpoint): ... this.
7068         (breakpoint_hit_catch_solib): Remove reference to base field.
7069         (add_solib_catchpoint): Likewise.
7070         (create_fork_vfork_event_catchpoint): Likewise.
7071         (struct exec_catchpoint): Inherit from breakpoint.
7072         <~exec_catchpoint>: New.
7073         <base>: Remove.
7074         (dtor_catch_exec): Change to ...
7075         (exec_catchpoint::~exec_catchpoint): ... this.
7076         (dtor_watchpoint): Change to ...
7077         (watchpoint::~watchpoint): ... this.
7078         (watch_command_1): Remove reference to base field.
7079         (catch_exec_command_1): Likewise.
7080         (base_breakpoint_dtor): Change to ...
7081         (breakpoint::~breakpoint): ... this.
7082         (base_breakpoint_ops): Remove dtor field value.
7083         (longjmp_bkpt_dtor): Change to ...
7084         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7085         (strace_marker_create_breakpoints_sal): Remove reference to base
7086         field.
7087         (delete_breakpoint): Don't manually call breakpoint destructor.
7088         (create_tracepoint_from_upload): Remove reference to base field.
7089         (trace_pass_set_count): Likewise.
7090         (initialize_breakpoint_ops): Don't initialize
7091         momentary_breakpoint_ops, don't set dtors.
7092         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7093         <~ada_catchpoint>: New.
7094         <base>: Remove.
7095         (create_excep_cond_exprs): Remove reference to base field.
7096         (dtor_exception): Change to ...
7097         (ada_catchpoint::~ada_catchpoint): ... this.
7098         (dtor_catch_exception): Remove.
7099         (dtor_catch_exception_unhandled): Remove.
7100         (dtor_catch_assert): Remove.
7101         (create_ada_exception_catchpoint): Remove reference to base
7102         field.
7103         (initialize_ada_catchpoint_ops): Don't set dtors.
7104         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7105         breakpoint.
7106         <~signal_catchpoint>: New.
7107         <base>: Remove.
7108         (signal_catchpoint_dtor): Change to ...
7109         (signal_catchpoint::~signal_catchpoint): ... this.
7110         (create_signal_catchpoint): Remove reference to base field.
7111         (initialize_signal_catchpoint_ops): Don't set dtor.
7112         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7113         from breakpoint.
7114         <~syscall_catchpoint>: New.
7115         <base>: Remove.
7116         (dtor_catch_syscall): Change to ...
7117         (syscall_catchpoint::~syscall_catchpoint): ... this.
7118         (create_syscall_event_catchpoint): Remove reference to base
7119         field.
7120         (initialize_syscall_catchpoint_ops): Don't set dtor.
7121         * break-catch-throw.c (struct exception_catchpoint): Inherit
7122         from breakpoint.
7123         <~exception_catchpoint>: New.
7124         <base>: Remove.
7125         (dtor_exception_catchpoint): Change to ...
7126         (exception_catchpoint::~exception_catchpoint): ... this.
7127         (handle_gnu_v3_exceptions): Remove reference to base field.
7128         (initialize_throw_catchpoint_ops): Don't set dtor.
7129         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7130         field.
7131         * remote.c (remote_get_tracepoint_status): Likewise.
7132         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7133         * tracefile.c (tracefile_fetch_registers): Likewise.
7134         * tracepoint.c (actions_command): Likewise.
7135         (validate_actionline): Likewise.
7136         (tfind_1): Likewise.
7137         (get_traceframe_location): Likewise.
7138         (find_matching_tracepoint_location): Likewise.
7139         (parse_tracepoint_status): Likewise.
7140         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7141
7142 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7143
7144         * breakpoint.c (struct longjmp_breakpoint): New struct.
7145         (is_tracepoint_type): Change return type to bool.
7146         (is_longjmp_type): New function.
7147         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7148         (set_raw_breakpoint_without_location): Use
7149         new_breakpoint_from_type.
7150         (set_raw_breakpoint): Likewise.
7151
7152 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7153
7154         * breakpoint.c (new_breakpoint_from_type): New function.
7155         (create_breakpoint_sal): Use new_breakpoint_from_type and
7156         unique_ptr.
7157         (create_breakpoint): Likewise.
7158
7159 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7160
7161         * memattr.c (mem_info_command): Rename to ...
7162         (info_mem_command): ... this.
7163         (mem_enable_command): Rename to ...
7164         (enable_mem_command): ... this.
7165         (mem_disable_command): Rename to ...
7166         (disable_mem_command): ... this.
7167         (mem_delete_command): Rename to ...
7168         (delete_mem_command): ... this.
7169         (_initialize_mem): Adjust function names.
7170
7171 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7172
7173         * btrace.c (handle_pt_insn_events): New.
7174         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7175         STATUS.  Split into this and ...
7176         (handle_pt_insn_event_flags): ... this.
7177
7178 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7179
7180         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7181         and struct pt_insn.resynced.
7182         * configure: Regenerated.
7183         * config.in: Regenerated.
7184
7185 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7186
7187         * btrace.c (ftrace_find_call_by_number): New function.
7188         (ftrace_new_function): Store objects, not pointers.
7189         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7190         ftrace_new_gap, ftrace_update_function,
7191         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7192         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7193         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7194         btrace_ends_with_single_insn, btrace_call_get): Account for
7195         btrace_thread_info::functions now storing objects.
7196         * btrace.h (struct btrace_thread_info): Add constructor.
7197         (struct btrace_thread_info) <functions>: Make std::vector.
7198         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7199         Initialize with default values.
7200         * record-btrace.c (record_btrace_frame_sniffer): Account for
7201         btrace_thread_info::functions now storing objects.
7202
7203 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7204
7205         * btrace.c: Remove typedef bfun_s.
7206         (ftrace_new_gap): Directly add gaps to the list of gaps.
7207         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7208         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7209         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7210         instead of gdb VEC.
7211
7212 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7213
7214         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7215         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7216         with btrace_thread_info::next_segment and
7217         btrace_thread_info::prev_segment.
7218         * btrace.h: Remove struct btrace_func_link.
7219         (struct btrace_function): Replace pair of function segment pointers
7220         with pair of indices.
7221         * python/py-record-btrace.c (btpy_call_prev_sibling,
7222         btpy_call_next_sibling): Replace references to
7223         btrace_thread_info::segment with btrace_thread_info::next_segment and
7224         btrace_thread_info::prev_segment.
7225         * record-btrace.c (record_btrace_frame_this_id): Use
7226         btrace_find_call_by_number.
7227
7228 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7229
7230         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7231         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7232         btrace_insn_next, btrace_insn_prev): Remove references to
7233         btrace_thread_info::flow.
7234         * btrace.h (struct btrace_function): Remove FLOW.
7235
7236 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7237
7238         * btrace.c (ftrace_find_call_by_number): New function.
7239         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7240         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7241         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7242         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7243         index.
7244         * btrace.h (struct btrace_function): Turn UP into an index.
7245         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7246         as an index.
7247         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7248         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7249         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7250
7251 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7252
7253         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7254         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7255         ftrace_update_function, ftrace_compute_global_level_offset,
7256         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7257         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7258         btrace_insn_end, btrace_is_empty): Remove references to
7259         btrace_thread_info::begin and btrace_thread_info::end.
7260         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7261         (struct btrace_thread_info) <functions>: Adjust comment.
7262         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7263         btrace_thread_info::begin.
7264
7265 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7266
7267         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7268         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7269         ftrace_update_function): Remove arguments that implicitly were always
7270         BTINFO->END.
7271         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7272         Don't pass BTINFO->END.
7273
7274 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7275
7276         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7277         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7278         btrace_find_insn_by_number): Replace function segment pointer with
7279         index.
7280         (btrace_insn_cmp): Simplify.
7281         * btrace.h: (struct btrace_insn_iterator) Rename index to
7282         insn_index.  Replace function segment pointer with index into function
7283         segment vector.
7284         * record-btrace.c (record_btrace_call_history): Replace function
7285         segment pointer use with index.
7286         (record_btrace_frame_sniffer): Retrieve function call segment through
7287         vector.
7288         (record_btrace_set_replay): Remove defunc't safety check.
7289
7290 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7291
7292         * btrace.c (btrace_ends_with_single_insn): New function.
7293         (btrace_call_get, btrace_call_number, btrace_call_begin,
7294         btrace_call_end, btrace_call_next, btrace_call_prev,
7295         btrace_find_call_by_number): Use index into call segment vector
7296         instead of pointer.
7297         (btrace_call_cmp): Simplify.
7298         * btrace.h (struct btrace_call_iterator): Replace function call segment
7299         pointer with index into vector.
7300         * record-btrace.c (record_btrace_call_history): Use index instead of
7301         pointer.
7302
7303 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7304
7305         * btrace.c (btrace_insn_begin, btrace_insn_end,
7306         btrace_find_insn_by_number): Add btinfo to iterator.
7307         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7308
7309 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7310
7311         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7312         and save pointers directly.
7313         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7314         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7315         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7316         changed signature of functions.
7317         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7318         (btrace_fetch): Remove code that adds btrace_function pointers to
7319         vector of btrace_functions.
7320         (btrace_clear): Simplify freeing vector of btrace_functions.
7321
7322 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7323
7324         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7325         Replace VEC_* with std::vector functions.
7326         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7327         (struct btrace_thread_info)<functions>: Change type to std::vector.
7328
7329 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7330
7331         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7332         "Removed targets and native configurations" up.  Merge duplicate
7333         "New commands" sub-sections.  Add "New options" sub-sections.
7334
7335 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7336
7337         * defs.h (copy_integer_to_size): New declaration.
7338         * findvar.c (copy_integer_to_size): New function.
7339         (do_cint_test): New selftest function.
7340         (copy_integer_to_size_test): Likewise.
7341         (_initialize_findvar): Likewise.
7342         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7343         (mips_fbsd_collect_reg): Use raw_collect_integer.
7344         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7345         (mips64_fill_gregset): Use raw_collect_integer
7346         (mips64_fill_fpregset): Use raw_supply_integer.
7347         * regcache.c (regcache::raw_supply_integer): New function.
7348         (regcache::raw_collect_integer): Likewise.
7349         * regcache.h: (regcache::raw_supply_integer): New declaration.
7350         (regcache::raw_collect_integer): Likewise.
7351
7352 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7353
7354         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7355         (COMMON_OBS): Add gdbarch-selftests.o.
7356         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7357         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7358         * gdbarch-selftests.c: New file.
7359         * regcache.h (regcache) <~regcache>: Mark it virtual if
7360         GDB_SELF_TEST.
7361         <raw_write>: Likewise.
7362
7363 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7364
7365         * regcache.c (current_regcache): Change it to
7366         regcache::current_regcache.
7367         (regcache_observer_target_changed): Update.
7368         (regcache_thread_ptid_changed): Make it a regcache static
7369         method.
7370         (regcache_thread_ptid_changed): Update.
7371         (class regcache_access): New.
7372         (current_regcache_test): Update.
7373         (_initialize_regcache): Update.
7374         * regcache.h: Include forward_list.
7375         (regcache): Declare regcache_thread_ptid_changed and declare
7376         registers_changed_ptid as friend.
7377
7378 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7379
7380         * i387-tdep.c (i387_register_to_value): Use register_size
7381         instead of TYPE_LENGTH.
7382         * m68k-tdep.c (m68k_register_to_value): Likewise.
7383
7384 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7385
7386         * i387-tdep.c (i387_convert_register_p): Return false if type
7387         code isn't TYPE_CODE_FLT.
7388
7389 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7390
7391         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7392         length is 4.
7393         (alpha_register_to_value): Remove type length check.
7394         (alpha_value_to_register): Likewise.
7395
7396 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7397
7398         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7399         TYPE_CODE_FLT.
7400
7401 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7402
7403         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7404         TYPE_CODE_FLT or not.
7405
7406 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7407
7408         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7409         * avr-tdep.c (avr_gdbarch_init): Likewise.
7410         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7411         * cris-tdep.c (cris_gdbarch_init): Likewise.
7412         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7413         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7414         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7415         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7416         * mep-tdep.c (mep_gdbarch_init): Likewise.
7417         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7418         * mips-tdep.c (mips_gdbarch_init): Likewise.
7419         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7420         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7421         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7422         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7423         * v850-tdep.c (v850_gdbarch_init): Likewise.
7424
7425 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7426
7427         * selftest-arch.c (tests_with_arch): Call registers_changed
7428         and reinit_frame_cache.
7429         * selftest.c (run_self_tests): Likewise.
7430
7431 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7432
7433         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7434         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7435
7436 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7437
7438         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7439         set_gdbarch_print_insn.
7440
7441 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7442
7443         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7444         set_gdbarch_print_insn.
7445
7446 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7447
7448         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7449         set_gdbarch_print_insn.
7450         * arc-tdep.c (arc_gdbarch_init): Likewise.
7451         * arch-utils.c: include dis-asm.h.
7452         (default_print_insn): New function.
7453         * arch-utils.h (default_print_insn): Declare.
7454         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7455         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7456         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7457         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7458         * frv-tdep.c (frv_gdbarch_init): Likewise.
7459         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7460         * gdbarch.sh (print_insn): Use default_print_insn.
7461         * gdbarch.c: Regenerated.
7462         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7463         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7464         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7465         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7466         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7467         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7468         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7469         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7470         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7471         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7472         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7473         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7474         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7475         * mt-tdep.c (mt_gdbarch_init): Likewise.
7476         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7477         * nios2-tdep.c (nios2_print_insn): Remove.
7478         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7479         * rx-tdep.c (rx_gdbarch_init): Likewise.
7480         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7481         * score-tdep.c (score_print_insn): Remove.
7482         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7483         * sh-tdep.c (sh_gdbarch_init): Likewise.
7484         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7485         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7486         * tic6x-tdep.c (tic6x_print_insn): Remove.
7487         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7488         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7489         * v850-tdep.c (v850_gdbarch_init): Likewise.
7490         * vax-tdep.c (vax_gdbarch_init): Likewise.
7491         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7492         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7493
7494 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7495
7496         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7497         (MIPS_FP0_REGNUM): Remove.
7498         (MIPS_FSR_REGNUM): Remove.
7499         (mips_fbsd_supply_fpregs): Use mips_regnum.
7500         (mips_fbsd_supply_gregs): Likewise.
7501         (mips_fbsd_collect_fpregs): Likewise.
7502         (mips_fbsd_collect_gregs): Likewise.
7503
7504 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7505
7506         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7507         (getpfpregs_supplies): New function.
7508         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7509         getfpregs_supplies.
7510         (mips_fbsd_store_inferior_registers): Likewise.
7511
7512 2017-05-22  Pedro Alves <palves@redhat.com>
7513
7514         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7515         maintainer.
7516
7517 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7518
7519         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7520         (store_register): Likewise.
7521         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7522         (get_decimal_float_return_value): Likewise.
7523         (do_ppc_sysv_return_value): Likewise.
7524         (ppc64_sysv_abi_push_integer): Likewise.
7525         (ppc64_sysv_abi_push_freg): Likewise.
7526         (ppc64_sysv_abi_return_value_base): Likewise.
7527         (ppc64_sysv_abi_return_value): Likewise.
7528         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7529         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7530         * rs6000-nat.c: Likewise.
7531         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7532         (rs6000_value_to_register): Likewise.
7533         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7534
7535 2017-05-21  Tom Tromey  <tom@tromey.com>
7536
7537         PR rust/21466:
7538         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7539         arrays as "[T]", not "[T; ]".
7540
7541 2017-05-19  Tom Tromey  <tom@tromey.com>
7542
7543         PR rust/21484:
7544         * rust-lang.c (exp_descriptor_rust): New function.
7545         (rust_language_defn): Use it.
7546         * p-lang.c (pascal_language_defn): Update.
7547         * opencl-lang.c (opencl_language_defn): Update.
7548         * objc-lang.c (objc_language_defn): Update.
7549         * m2-lang.c (m2_language_defn): Update.
7550         * language.h (struct language_defn)
7551         <la_watch_location_expression>: New member.
7552         * language.c (unknown_language_defn, auto_language_defn)
7553         (local_language_defn): Update.
7554         * go-lang.c (go_language_defn): Update.
7555         * f-lang.c (f_language_defn): Update.
7556         * d-lang.c (d_language_defn): Update.
7557         * c-lang.h (c_watch_location_expression): Declare.
7558         * c-lang.c (c_watch_location_expression): New function.
7559         (c_language_defn, cplus_language_defn, asm_language_defn)
7560         (minimal_language_defn): Use it.
7561         * breakpoint.c (watch_command_1): Call
7562         la_watch_location_expression.
7563         * ada-lang.c (ada_language_defn): Update.
7564
7565 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7566
7567         PR tui/21482
7568         * gdb_curses.h (NOMACROS): Define.
7569         (NCURSES_NOMACROS): Define.
7570
7571 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7572
7573         PR tui/21482
7574         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7575         arg to char *.
7576         * tui/tui-wingeneral.c (box_win): Likewise.
7577         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7578         (tui_show_source_line): Likewise.
7579         (tui_show_exec_info_content): Likewise.
7580
7581 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7582
7583         * sparc-tdep.c (sparc_structure_return_p)
7584         (sparc_arg_on_registers_p): New functions.
7585         (sparc32_store_arguments): Use them.
7586         * sparc64-tdep.c (sparc64_16_byte_align_p)
7587         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7588         Handle TYPE_CODE_ARRAY.
7589
7590 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7591
7592         * cli/cli-decode.c (add_alias_cmd): New function.
7593         * command.h (add_alias_cmd): Declare.
7594         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7595         instead call add_alias_cmd.
7596
7597 2017-05-17  Pedro Alves  <palves@redhat.com>
7598
7599         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7600         (nat_makefile_frag): ... this.  All references updated.
7601         * configure.ac: Likewise.
7602         * configure.nat: Likewise.  Enhance comments.
7603         * configure: Regenerate.
7604
7605 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7606
7607         * procfs.c (procfs_create_inferior): Change prototype to match
7608         definition.
7609
7610 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7611
7612         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7613         C++ compiler warning.
7614
7615 2017-05-12  Tom Tromey  <tom@tromey.com>
7616
7617         PR rust/21483:
7618         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7619         recurse, just call value_struct_elt directly.
7620
7621 2017-05-12  Tom Tromey  <tom@tromey.com>
7622
7623         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7624         OP_RUST_ARRAY>: Fix.
7625
7626 2017-05-12  Tom Tromey  <tom@tromey.com>
7627
7628         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7629
7630 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7631
7632         * regcache.c: Include <forward_list>.
7633         (struct regcache_list): Remove.
7634         (current_regcache): Update.
7635         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7636         (regcache_thread_ptid_changed): Likewise.
7637         (registers_changed_ptid): Likewise.
7638         (current_regcache_size): Likewise.
7639
7640 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7641
7642         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7643         (current_regcache_size): New function.
7644         (current_regcache_test): New function.
7645         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7646
7647 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7648
7649         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7650         (print_gp_register_row): Use get_frame_register_value.
7651
7652 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7653
7654         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7655         (mips_supply_fpregset): Likewise.
7656         (mips64_supply_gregset): Likewise.
7657
7658 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7659
7660         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7661         regcache->raw_supply_zeroed.
7662
7663 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7664
7665         * configure.nat: Rearrange 'case' statements to match
7666         host before cpu.
7667
7668 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7669
7670         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7671         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7672         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7673         "@nat_extra_makefile_frag@".
7674         (Makefile): Remove dependency on "@frags@".
7675         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7676         (data-directory/Makefile): Likewise.
7677         * config/aarch64/linux.mh: Deleted; moved contents to
7678         "gdb/configure.nat".
7679         * config/alpha/alpha-linux.mh: Likewise.
7680         * config/alpha/nbsd.mh: Likewise.
7681         * config/arm/linux.mh: Likewise.
7682         * config/arm/nbsdelf.mh: Likewise.
7683         * config/i386/cygwin.mh: Likewise.
7684         * config/i386/cygwin64.mh: Likewise.
7685         * config/i386/darwin.mh: Likewise.
7686         * config/i386/fbsd.mh: Likewise.
7687         * config/i386/fbsd64.mh: Likewise.
7688         * config/i386/go32.mh: Likewise.
7689         * config/i386/i386gnu.mh: Likewise.
7690         * config/i386/i386sol2.mh: Likewise.
7691         * config/i386/linux.mh: Likewise.
7692         * config/i386/linux64.mh: Likewise.
7693         * config/i386/mingw.mh: Likewise.
7694         * config/i386/mingw64.mh: Likewise.
7695         * config/i386/nbsd64.mh: Likewise.
7696         * config/i386/nbsdelf.mh: Likewise.
7697         * config/i386/nto.mh: Likewise.
7698         * config/i386/obsd.mh: Likewise.
7699         * config/i386/obsd64.mh: Likewise.
7700         * config/i386/sol2-64.mh: Likewise.
7701         * config/ia64/linux.mh: Likewise.
7702         * config/m32r/linux.mh: Likewise.
7703         * config/m68k/linux.mh: Likewise.
7704         * config/m68k/nbsdelf.mh: Likewise.
7705         * config/m68k/obsd.mh: Likewise.
7706         * config/m88k/obsd.mh: Likewise.
7707         * config/mips/fbsd.mh: Likewise.
7708         * config/mips/linux.mh: Likewise.
7709         * config/mips/nbsd.mh: Likewise.
7710         * config/mips/obsd64.mh: Likewise.
7711         * config/pa/linux.mh: Likewise.
7712         * config/pa/nbsd.mh: Likewise.
7713         * config/pa/obsd.mh: Likewise.
7714         * config/powerpc/aix.mh: Likewise.
7715         * config/powerpc/fbsd.mh: Likewise.
7716         * config/powerpc/linux.mh: Likewise.
7717         * config/powerpc/nbsd.mh: Likewise.
7718         * config/powerpc/obsd.mh: Likewise.
7719         * config/powerpc/ppc64-linux.mh: Likewise.
7720         * config/powerpc/spu-linux.mh: Likewise.
7721         * config/s390/linux.mh: Likewise.
7722         * config/sh/nbsd.mh: Likewise.
7723         * config/sparc/fbsd.mh: Likewise.
7724         * config/sparc/linux.mh: Likewise.
7725         * config/sparc/linux64.mh: Likewise.
7726         * config/sparc/nbsd64.mh: Likewise.
7727         * config/sparc/nbsdelf.mh: Likewise.
7728         * config/sparc/obsd64.mh: Likewise.
7729         * config/sparc/sol2.mh: Likewise.
7730         * config/tilegx/linux.mh: Likewise.
7731         * config/vax/nbsdelf.mh: Likewise.
7732         * config/vax/obsd.mh: Likewise.
7733         * config/xtensa/linux.mh: Likewise.
7734         * config/i386/i386gnu.mn: New file, with excerpts from
7735         "config/i386/i386gnu.mh".
7736         * configure: Regenerate.
7737         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7738         *.mh files under "gdb/config".
7739         * configure.nat: New file, with contents from the
7740         "gdb/config/*/*.mh" files.
7741
7742 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7743
7744         * btrace.c (btrace_clear): Free insn vector.
7745
7746 2017-05-05  Pedro Alves  <palves@redhat.com>
7747
7748         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7749         * configure: Regenerate.
7750
7751 2017-05-04  Pedro Alves  <palves@redhat.com>
7752
7753         * Makefile.in (SFILES): Add progspace-and-thread.c.
7754         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7755         (COMMON_OBS): Add progspace-and-thread.o.
7756         * breakpoint.c: Include "progspace-and-thread.h".
7757         (update_inserted_breakpoint_locations)
7758         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7759         Use scoped_restore_current_pspace_and_thread.
7760         (create_std_terminate_master_breakpoint): Use
7761         scoped_restore_current_program_space.
7762         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7763         (print_breakpoint_location): Use
7764         scoped_restore_current_program_space.
7765         (bp_loc_is_permanent): Use
7766         scoped_restore_current_pspace_and_thread.
7767         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7768         (download_tracepoint_locations): Use
7769         scoped_restore_current_pspace_and_thread.
7770         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7771         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7772         (enum step_over_calls_kind): Moved from inferior.h.
7773         (class scoped_restore_current_thread): New class.
7774         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7775         declaration.
7776         (scoped_restore_current_thread): New class.
7777         * infcmd.c: Include "common/gdb_optional.h".
7778         (continue_1, proceed_after_attach): Use
7779         scoped_restore_current_thread.
7780         (notice_new_inferior): Use scoped_restore_current_thread.
7781         * inferior.c: Include "progspace-and-thread.h".
7782         (restore_inferior, save_current_inferior): Delete.
7783         (add_inferior_command, clone_inferior_command): Use
7784         scoped_restore_current_pspace_and_thread.
7785         * inferior.h (scoped_restore_current_inferior): New class.
7786         * infrun.c: Include "progspace-and-thread.h" and
7787         "common/gdb_optional.h".
7788         (follow_fork_inferior): Use
7789         scoped_restore_current_pspace_and_thread.
7790         (scoped_restore_exited_inferior): New class.
7791         (handle_vfork_child_exec_or_exit): Use
7792         scoped_restore_exited_inferior,
7793         scoped_restore_current_pspace_and_thread,
7794         scoped_restore_current_thread and scoped_restore.
7795         (fetch_inferior_event): Use scoped_restore_current_thread.
7796         * linespec.c (decode_line_full, decode_line_1): Use
7797         scoped_restore_current_program_space.
7798         * mi/mi-main.c: Include "progspace-and-thread.h".
7799         (exec_continue): Use scoped_restore_current_thread.
7800         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7801         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7802         * proc-service.c (ps_pglobal_lookup): Use
7803         scoped_restore_current_program_space.
7804         * progspace-and-thread.c: New file.
7805         * progspace-and-thread.h: New file.
7806         * progspace.c (release_program_space, clone_program_space): Use
7807         scoped_restore_current_program_space.
7808         (restore_program_space, save_current_program_space)
7809         (save_current_space_and_thread): Delete.
7810         (switch_to_program_space_and_thread): Moved to
7811         progspace-and-thread.c.
7812         * progspace.h (save_current_program_space)
7813         (save_current_space_and_thread): Delete declarations.
7814         (scoped_restore_current_program_space): New class.
7815         * remote.c (remote_btrace_maybe_reopen): Use
7816         scoped_restore_current_thread.
7817         * symtab.c: Include "progspace-and-thread.h".
7818         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7819         * thread.c (print_thread_info_1): Use
7820         scoped_restore_current_thread.
7821         (struct current_thread_cleanup): Delete.
7822         (do_restore_current_thread_cleanup)
7823         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7824         (scoped_restore_current_thread::~scoped_restore_current_thread):
7825         ... this new dtor.
7826         (make_cleanup_restore_current_thread): Rename/convert to ...
7827         (scoped_restore_current_thread::scoped_restore_current_thread):
7828         ... this new ctor.
7829         (thread_apply_all_command): Use scoped_restore_current_thread.
7830         (thread_apply_command): Use scoped_restore_current_thread.
7831         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7832         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7833
7834 2017-05-04  Pedro Alves  <palves@redhat.com>
7835
7836         * thread.c (make_cleanup_restore_current_thread): Move
7837         find_thread_ptid call before the is_stopped call.  Assert that the
7838         thread is found.  Replace is_stopped call by checking the thread's
7839         state directly.  Remove unnecessary NULL-thread check.
7840
7841 2017-05-04  Pedro Alves  <palves@redhat.com>
7842
7843         * corelow.c (thread_section_name): New class.
7844         (get_core_register_section, get_core_siginfo): Use it.
7845
7846 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7847
7848         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7849         (get_core_register_section): Remove xfree of NULL pointer.
7850
7851 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7852
7853         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7854         * regcache.c (regcache::raw_supply_zeroed): New function.
7855         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7856
7857 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7858
7859         * gdbarch.sh: Remove commented out definition of
7860         TARGET_CHAR_BIT.
7861         * gdbarch.h: Re-generate.
7862
7863 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7864
7865         * configure: Regenerate.
7866
7867 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7868
7869         * solib-target.c (solib_target_relocate_section_addresses):
7870         Remove num_section_bases, num_bases, segment_bases variables.
7871
7872 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7873
7874         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7875
7876 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7877
7878         * solib-target.c: Include <vector>
7879         (struct lm_info_target) <~lm_info_target>: Remove.
7880         <segment_bases, section_bases>: Change type to
7881         std::vector<CORE_ADDR>.
7882         (library_list_start_segment, library_list_start_section,
7883         library_list_end_library,
7884         solib_target_relocate_section_addresses): Adjust.
7885
7886 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7887
7888         * gdbarch.sh (software_single_step): Change return type to
7889         std::vector<CORE_ADDR>.
7890         * gdbarch.c, gdbarch.h: Re-generate.
7891         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7892         Adjust.
7893         (arm_deal_with_atomic_sequence_raw): Adjust.
7894         (thumb_get_next_pcs_raw): Adjust.
7895         (arm_get_next_pcs_raw): Adjust.
7896         (arm_get_next_pcs): Adjust.
7897         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7898         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7899         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7900         (alpha_software_single_step): Adjust.
7901         * alpha-tdep.h (alpha_software_single_step): Adjust.
7902         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7903         * arm-tdep.c (arm_software_single_step): Adjust.
7904         (arm_breakpoint_kind_from_current_state): Adjust.
7905         * arm-tdep.h (arm_software_single_step): Adjust.
7906         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7907         * cris-tdep.c (cris_software_single_step): Adjust.
7908         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7909         (micromips_deal_with_atomic_sequence): Adjust.
7910         (deal_with_atomic_sequence): Adjust.
7911         (mips_software_single_step): Adjust.
7912         * mips-tdep.h (mips_software_single_step): Adjust.
7913         * moxie-tdep.c (moxie_software_single_step): Adjust.
7914         * nios2-tdep.c (nios2_software_single_step): Adjust.
7915         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7916         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7917         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7918         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7919         * sparc-tdep.c (sparc_software_single_step): Adjust.
7920         * spu-tdep.c (spu_software_single_step): Adjust.
7921         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7922
7923 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7924
7925         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7926         * gdbarch.h: Re-generate.
7927
7928 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7929
7930         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7931         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7932         * python/py-instruction.c, python/py-instruction.h: New file.
7933         * python/py-record.c: Add py-instruction.h include.
7934         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7935         gdb.RecordInstruction.
7936         * python/python-internal.h: Add gdbpy_initialize_instruction
7937         declaration.
7938         * python/python.c (do_start_initialization): Add
7939         gdbpy_initialize_instruction.
7940
7941 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7942
7943         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7944         Remove.
7945         (btrace_func_from_recpy_func): New function.
7946         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7947         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7948         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7949         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7950         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7951         Also, use new helper functions.
7952         (btpy_list_item): Use new helper functions.
7953         (recpy_bt_function_call_history): Use new type name.
7954         (btpy_call_getset): Remove.
7955         (gdbpy_initialize_btrace): Remove code to initialize
7956         gdb.BtraceFunctionCall.
7957         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7958         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7959         recpy_bt_func_prev, recpy_bt_func_next): New export.
7960         * python/py-record.c (recpy_func_type): New static object.
7961         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7962         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7963         recpy_func_next): New function.
7964         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7965         (recpy_func_getset): New static object.
7966         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7967         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7968
7969 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7970
7971         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7972         (btpy_object, btpy_insn_type, btpy_new): Remove.
7973         (btpy_list_object): Use gdb.RecordInstruction type instead of
7974         gdb.BtraceInstruction type.
7975         (btrace_insn_from_recpy_insn): New function.
7976         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7977         btpy_new.
7978         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7979         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7980         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7981         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7982         instead of btpy_object.
7983         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7984         btpy_insn_data, btpy_insn_decode): Rename to ...
7985         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7986         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7987         recpy_bt_insn_decode): This.  Also, use new helper functions.
7988         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7989         recpy_insn_type.
7990         (btpy_insn_getset): Remove.
7991         (gdbpy_initialize_btrace): Remove code to initialize
7992         gdb.BtraceInstruction.  Use recpy_element_object.
7993         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7994         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7995         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7996         * python/py-record.c (recpy_insn_type): New static object.
7997         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7998         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7999         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8000         New function.
8001         (recpy_insn_getset): New static object.
8002         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8003         * python/py-record.h (recpy_element_object): New typedef.
8004         (recpy_insn_type, recpy_insn_new): New export.
8005
8006 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8007
8008         * py-record-btrace.c (btpy_insn_new): Removed.
8009         (btpy_insn_or_gap_new): New function.
8010         (btpy_insn_error): Removed.
8011         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8012         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8013         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8014         btpy_insn_or_gap_new instead of btpy_insn_new.
8015         (btpy_insn_getset): Remove btpy_insn_error.
8016         * py-record.c (recpy_gap_type): New static object.
8017         (recpy_gap_object): New typedef.
8018         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8019         recpy_gap_reason_string): New function.
8020         (recpy_gap_getset): New static object.
8021         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8022         * py-record.h (recpy_gap_new): New export.
8023
8024 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8025
8026         * python/py-record.c (recpy_ptid): Remove.
8027         (recpy_record_getset): Remove recpy_ptid.
8028
8029 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8030
8031         * btrace.c (btrace_fetch): Set inferior_ptid.
8032         * python/py-record-btrace.c: Add "py-record.h" include.
8033         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8034         recpy_bt_end, recpy_bt_instruction_history,
8035         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8036         in gdb.Record object instead of current ptid.
8037         * python/py-record.c: Include new "py-record.h" file.
8038         (recpy_record_object): Moved to py-record.h.
8039         * python/py-record.h: New file.
8040
8041 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8042
8043         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8044         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8045         indentation.
8046
8047 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8048
8049         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8050         the past maintainers section.
8051
8052 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8053
8054         * infcmd.c (get_return_value): Use regcache ctor, and remove
8055         cleanup.
8056
8057 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8058             Pedro Alves  <palves@redhat.com>
8059
8060         * regcache.c (regcache::regcache): New tag dispatch ctor.
8061         (do_cooked_read): Moved above.
8062         (regcache_dup): Use the tag dispatch ctor..
8063         * regcache.h (regcache): Declare ctor, delete copy ctor and
8064         assignment operator, remove friend regcache_dup.
8065
8066 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8067
8068         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8069         call method save instead of regcache_cpy.
8070         * regcache.h (struct regcache): Make regcache_dup a friend.
8071
8072 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8073
8074         * regcache.c (struct regcache): Move to regcache.h
8075         (regcache::arch): New method.
8076         (regcache_get_ptid): Update.
8077         (get_regcache_arch): Call arch method.
8078         (get_regcache_aspace): Call method aspace.
8079         (register_buffer): Change it to method.
8080         (regcache_save): Change it to regcache::save.
8081         (regcache_restore): Likewise.
8082         (regcache_cpy_no_passthrough): Remove the declaration.
8083         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8084         (regcache_cpy_no_passthrough): Change it to method
8085         cpy_no_passthrough.
8086         (regcache_register_status): Change it to method
8087         get_register_status.
8088         (regcache_invalidate): Change it to method invalidate.
8089         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8090         (regcache_raw_update): Change it to method raw_update.
8091         (regcache_raw_read): Likewise.
8092         (regcache_raw_read_signed): Likewise.
8093         (regcache_raw_read_unsigned): Likewise.
8094         (regcache_raw_write_signed): Likewise.
8095         (regcache_raw_write_unsigned): Likewise.
8096         (regcache_cooked_read): Likewise.
8097         (regcache_cooked_read_value): Likewise.
8098         (regcache_cooked_read_signed): Likewise.
8099         (regcache_cooked_read_unsigned): Likewise.
8100         (regcache_cooked_write_signed): Likewise.
8101         (regcache_cooked_write_unsigned): Likewise.
8102         (regcache_raw_set_cached_value): Likewise.
8103         (regcache_raw_write): Likewise.
8104         (regcache_cooked_write): Likewise.
8105         (regcache_xfer_part): Likewise.
8106         (regcache_raw_read_part): Likewise.
8107         (regcache_raw_write_part): Likewise.
8108         (regcache_cooked_read_part): Likewise.
8109         (regcache_cooked_write_part): Likewise.
8110         (regcache_raw_supply): Likewise.
8111         (regcache_raw_collect): Likewise.
8112         (regcache_transfer_regset): Likewise.
8113         (regcache_supply_regset): Likewise.
8114         (regcache_collect_regset): Likewise.
8115         (regcache_debug_print_register): Likewise.
8116         (enum regcache_dump_what): Move it to regcache.h.
8117         (regcache_dump): Change it to method dump.
8118         * regcache.h (enum regcache_dump_what): New.
8119         (class regcache): New.
8120         * target.c (target_fetch_registers): Call method
8121         debug_print_register.
8122         (target_store_registers): Likewise.
8123
8124 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8125
8126         * windows-nat.c (struct lm_info_windows): Initialize field.
8127         (windows_make_so): Allocate lm_info_windows with new.
8128         (windows_free_so): Free lm_info_windows with delete.
8129
8130 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8131
8132         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8133         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8134         cleanup.
8135         (darwin_free_so): Free lm_info_darwin with delete.
8136
8137 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8138
8139         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8140         <l_addr_p>: Change type to bool.
8141         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8142         (svr4_free_so): Free lm_info_svr4 with delete.
8143         (svr4_copy_library_list): Replace memcpy with call to copy
8144         constructor.
8145         (library_list_start_library, svr4_default_sos): Allocate
8146         lm_info_svr4 with new.
8147
8148 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8149
8150         * solib-target.c (struct lm_info_target): Add destructor,
8151         initialize fields.
8152         <name>: Change type to std::string.
8153         (library_list_start_library): Allocate lm_info_target with new.
8154         (solib_target_free_library_list): Free lm_info_target with
8155         delete.
8156         (solib_target_current_sos): Adapt to std::string.
8157         (solib_target_free_so): Free lm_info_target with delete.
8158
8159 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8160
8161         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8162         fields.
8163         (frv_current_sos): Allocate lm_info_frv with new.
8164         (frv_relocate_main_executable): Free lm_info_frv with delete,
8165         allocate with new.
8166         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8167
8168 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8169
8170         * solib-frv.c (struct lm_info_frv): Fix indentation.
8171
8172 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8173
8174         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8175         map field.
8176         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8177         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8178         and allocate with new.
8179         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8180
8181 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8182
8183         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8184         <filename, member_name>: Change type to std::string.
8185         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8186         (library_list_start_library): Allocate lm_info_aix with new.
8187         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8188         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8189         with copy constructor.
8190
8191 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8192
8193         * solist.h (struct lm_info): Remove.
8194         (struct lm_info_base): New class.
8195         (struct so_list) <lm_info>: Change type to lm_info_base *.
8196         * nto-tdep.c (struct lm_info): Remove.
8197         (lm_addr): Adjust.
8198         * solib-aix.c (struct lm_info): Rename to ...
8199         (struct lm_info_aix): ... this.  Extend lm_info_base.
8200         (lm_info_p): Rename to ...
8201         (lm_info_aix_p): ... this, and adjust.
8202         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8203         solib_aix_parse_libraries, library_list_start_library,
8204         solib_aix_free_library_list, solib_aix_parse_libraries,
8205         solib_aix_get_library_list,
8206         solib_aix_relocate_section_addresses, solib_aix_free_so,
8207         solib_aix_get_section_offsets,
8208         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8209         Adjust.
8210         (struct solib_aix_inferior_data) <library_list>: Adjust.
8211         * solib-darwin.c (struct lm_info): Rename to ...
8212         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8213         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8214         * solib-dsbt.c (struct lm_info): Rename to ...
8215         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8216         (struct dsbt_info) <main_executable_lm_info): Adjust.
8217         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8218         dsbt_relocate_section_addresses): Adjust.
8219         * solib-frv.c (struct lm_info): Rename to ...
8220         (struct lm_info_frv): ... this.  Extend lm_info_base.
8221         (main_executable_lm_info): Adjust.
8222         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8223         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8224         find_canonical_descriptor_in_load_object,
8225         frv_fdpic_find_canonical_descriptor): Adjust.
8226         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8227         to lm_info_svr4.
8228         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8229         svr4_clear_so, svr4_copy_library_list,
8230         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8231         svr4_current_sos, svr4_fetch_objfile_link_map,
8232         solist_update_incremental): Adjust.
8233         * solib-svr4.h (struct lm_info_svr4): Move here from
8234         solib-svr4.c.
8235         * solib-target.c (struct lm_info): Rename to ...
8236         (struct lm_info_target): ... this.  Extend lm_info_base.
8237         (lm_info_p): Rename to ...
8238         (lm_info_target_p): ... this.
8239         (solib_target_parse_libraries, library_list_start_segment,
8240         library_list_start_section, library_list_start_library,
8241         library_list_end_library, solib_target_free_library_list,
8242         solib_target_current_sos, solib_target_free_so,
8243         solib_target_relocate_section_addresses): Adjust.
8244         * windows-nat.c (struct lm_info): Rename to ...
8245         (struct lm_info_windows): ... this.  Extend lm_info_base.
8246         (windows_make_so, handle_load_dll, handle_unload_dll,
8247         windows_xfer_shared_libraries): Adjust.
8248
8249 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8250
8251         * solib-darwin.c (struct darwin_so_list): Remove.
8252         (darwin_current_sos): Allocate an so_list object instead of a
8253         darwin_so_list, separately allocate an lm_info object.
8254         (darwin_free_so): Free lm_info.
8255
8256 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8257
8258         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8259         with fprintf_filtered.
8260
8261 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8262
8263         * regcache.c (regcache::regcache): New function.
8264         (regcache::~regcache): New function.
8265         (regcache_xmalloc_1): Remove.
8266         (regcache_xmalloc): Call new regcache.
8267         (regcache_xfree): Call delete regcache.
8268         (get_thread_arch_aspace_regcache): Call new regcache.
8269
8270 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8271
8272         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8273         lwp instead of ptid_get_lwp.
8274
8275 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8276
8277         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8278         lwp_info instead of getting from inferior_ptid.
8279
8280 2017-04-27  Keith Seitz  <keiths@redhat.com>
8281
8282         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8283         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8284         (CV_CONVERSION_BADNESS): Define.
8285         (rank_one_type): Remove overly restrictive rvalue reference
8286         rank checks.
8287         Add cv-qualifier checks and subranks for type equality.
8288         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8289         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8290         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8291
8292 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8293
8294         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8295         count when creating the object.
8296
8297 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8298             Ulrich Weigand  <uweigand@de.ibm.com>
8299
8300         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8301         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8302         is used in AIX.
8303         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8304         (process_xcoff_symbol): Likewise.
8305         (scan_xcoff_symtab): Likewise.
8306
8307 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8308
8309         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8310         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8311         (ia64_access_reg): Use get_frame_register_unsigned.
8312         (ia64_access_rse_reg): Likewise.
8313         (ia64_libunwind_frame_prev_register): Likewise.
8314
8315 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8316
8317         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8318         * gdbarch.c: Regenerated.
8319         * gdbarch.h: Regenerated.
8320         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8321         visibility external.
8322         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8323         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8324         (enum cfa_how_kind): Move to ...
8325         (struct dwarf2_frame_state_reg_info): Likewise.
8326         (struct dwarf2_frame_state): Likewise.
8327         * dwarf2-frame.h: ... here.
8328         (dwarf2_frame_state_alloc_regs): New declaration.
8329         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8330         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8331
8332 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8333
8334         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8335         regcache_raw_read_unsigned.
8336         (xtensa_pseudo_register_write): Likewise.
8337
8338 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8339
8340         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8341         (nds32_pseudo_register_write): Likewise.
8342
8343 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8344
8345         * regcache.c (struct regcache) <readonly_p>: Change its type
8346         to bool.
8347         (regcache_xmalloc_1): Update parameter type and callers update.
8348
8349 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8350
8351         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8352         set_gdbarch_wchar_bit.
8353         * arm-tdep.c (arm_gdbarch_init): Likewise.
8354
8355 2017-04-25  Pedro Alves  <palves@redhat.com>
8356
8357         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8358         (BothAreRelocatable, memcopy, memmove): Don't define.
8359         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8360         macros.
8361
8362 2017-04-25  Pedro Alves  <palves@redhat.com>
8363
8364         * common/common-defs.h: Include "common/poison.h".
8365         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8366         and adjust.
8367         * common/poison.h: New file.
8368         * common/traits.h: Include <type_traits>.
8369         (Not, Or, Requires): New, moved from common/function-view.h.
8370
8371 2017-04-25  Pedro Alves  <palves@redhat.com>
8372
8373         * breakpoint.h (struct breakpoint): In-class initialize all
8374         fields.  Make boolean fields "bool".
8375         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8376         memset call and initializations no longer necessary.
8377
8378 2017-04-25  Pedro Alves  <palves@redhat.com>
8379
8380         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8381         reference.
8382         (pt_btrace_insn): New function.
8383         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8384
8385 2017-04-25  Pedro Alves  <palves@redhat.com>
8386
8387         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8388         "base" field and inherit from "bp_location" instead.  Add
8389         non-default ctor.
8390         (allocate_location_exception): Use new non-default ctor.
8391         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8392         (init_bp_location): Convert to ...
8393         (bp_location::bp_location): ... this new ctor, and remove memset
8394         call.
8395         (base_breakpoint_allocate_location): Use the new non-default ctor.
8396         * breakpoint.h (bp_location): Now a class.  Declare default and
8397         non-default ctors.  In-class initialize all members.
8398         (init_bp_location): Remove declaration.
8399
8400 2017-04-25  Pedro Alves  <palves@redhat.com>
8401
8402         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8403         assignment operator.
8404
8405 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8406
8407         * doublest.c (convert_doublest_to_floatformat): Call
8408         floatformat_totalsize_bytes.
8409
8410 2017-04-22  Tom Tromey  <tom@tromey.com>
8411
8412         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8413         ui_out_emit_list.
8414         * stack.c (print_frame): Use ui_out_emit_list.
8415         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8416         ui_out_emit_list.
8417         * mi/mi-main.c (print_one_inferior)
8418         (mi_cmd_data_list_register_names)
8419         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8420         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8421         ui_out_emit_list.
8422         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8423         (mi_output_solib_attribs): Use ui_out_emit_list,
8424         ui_out_emit_tuple.
8425         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8426         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8427         (mi_cmd_stack_list_args, list_args_or_locals): Use
8428         ui_out_emit_list.
8429         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8430         * breakpoint.c (print_solib_event, output_thread_groups): Use
8431         ui_out_emit_list.
8432
8433 2017-04-22  Tom Tromey  <tom@tromey.com>
8434
8435         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8436         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8437         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8438
8439 2017-04-22  Tom Tromey  <tom@tromey.com>
8440
8441         * tracepoint.c (tvariables_info_1)
8442         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8443
8444 2017-04-22  Tom Tromey  <tom@tromey.com>
8445
8446         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8447         annotate_arg_emitter.
8448         * breakpoint.c (print_mention_watchpoint)
8449         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8450         * annotate.h (struct annotate_arg_emitter): New.
8451
8452 2017-04-22  Tom Tromey  <tom@tromey.com>
8453
8454         * record-btrace.c (record_btrace_insn_history)
8455         (record_btrace_insn_history_range, record_btrace_call_history)
8456         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8457         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8458         ui_out_emit_tuple.
8459         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8460         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8461         * skip.c (skip_info): Use ui_out_emit_tuple.
8462         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8463         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8464         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8465         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8466         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8467         ui_out_emit_tuple.
8468         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8469         (output_register, mi_cmd_data_read_memory)
8470         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8471         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8472         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8473         Use ui_out_emit_tuple.
8474         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8475         ui_out_emit_tuple.
8476         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8477         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8478         * linux-thread-db.c (info_auto_load_libthread_db): Use
8479         ui_out_emit_tuple.
8480         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8481         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8482         * disasm.c (do_mixed_source_and_assembly_deprecated)
8483         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8484         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8485         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8486         * breakpoint.c (print_one_breakpoint_location)
8487         (print_one_breakpoint): Use ui_out_emit_tuple.
8488         * auto-load.c (print_script, info_auto_load_cmd): Use
8489         ui_out_emit_tuple.
8490         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8491
8492 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8493
8494         * thread.c (print_thread_info_1): Remove dead code.
8495
8496 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8497
8498         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8499         GDB_SELF_TEST.
8500         * arm-tdep.c (selftests::arm_record_test): Likewise.
8501
8502 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8503
8504         * regcache.c (regcache_restore): Remove argument 2.  Replace
8505         argument 3 with regcache.  Get register status from
8506         src->register_status and get register contents from
8507         register_buffer (src, regnum).
8508         (regcache_cpy): Update.
8509
8510 2017-04-19  Pedro Alves  <palves@redhat.com>
8511
8512         * gdbthread.h (thread): Add missing closing parenthesis in
8513         comment.
8514
8515 2017-04-19  Pedro Alves  <palves@redhat.com>
8516
8517         * common/refcounted-object.h: New file.
8518         * gdbthread.h: Include "common/refcounted-object.h".
8519         (thread_info): Inherit from refcounted_object and add comments.
8520         (thread_info::incref, thread_info::decref)
8521         (thread_info::m_refcount): Delete.
8522         (thread_info::deletable): Use the refcounted_object::refcount()
8523         method.
8524         * inferior.c (current_inferior_): Add comment.
8525         (set_current_inferior): Increment/decrement refcounts.
8526         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8527         not-deletable instead of comparing with the current inferior.
8528         (initialize_inferiors): Increment the initial inferior's refcount.
8529         * inferior.h (struct inferior): Forward declare.
8530         Include "common/refcounted-object.h".
8531         (current_inferior, set_current_inferior): Move declaration to
8532         before struct inferior's definition, and fix comment.
8533         (inferior): Inherit from refcounted_object.  Add comments.
8534         * thread.c (switch_to_thread_no_regs): Reference the thread's
8535         inferior pointer directly instead of doing a ptid lookup.
8536         (switch_to_no_thread): New function.
8537         (switch_to_thread(thread_info *)): New function, factored out
8538         from ...
8539         (switch_to_thread(ptid_t)): ... this.
8540         (restore_current_thread): Delete.
8541         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8542         fields, and add 'inf' field.
8543         (do_restore_current_thread_cleanup): Check whether old->inf is
8544         alive instead of looking up an inferior by ptid.  Use
8545         switch_to_thread and switch_to_no_thread.
8546         (restore_current_thread_cleanup_dtor): Use old->inf directly
8547         instead of lookup up an inferior by id.  Decref the inferior.
8548         Don't restore 'removable'.
8549         (make_cleanup_restore_current_thread): Same the inferior pointer
8550         in old, instead of the inferior number.  Incref the inferior.
8551         Don't save/clear 'removable'.
8552
8553 2017-04-19  Pedro Alves  <palves@redhat.com>
8554
8555         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8556         unittests/scoped_restore-selftests.c.
8557         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8558         * common/scoped_restore.h (scoped_restore_base): Make "class".
8559         (scoped_restore_base::release): New public method.
8560         (scoped_restore_base::scoped_restore_base): New protected ctor.
8561         (scoped_restore_base::m_saved_var): New protected field.
8562         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8563         scoped_restore_base base class instead of m_saved_var directly.
8564         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8565         (scoped_restore_tmpl::scoped_restore_tmpl(const
8566         scoped_restore_tmpl<T>&)): Likewise.
8567         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8568         method.
8569         (scoped_restore_tmpl::saved_var): New method.
8570         (scoped_restore_tmpl::m_saved_var): Delete.
8571         * inferior.h (inferior::detaching): Now a bool.
8572         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8573         cleanup.
8574         * unittests/scoped_restore-selftests.c: New file.
8575
8576 2017-04-19  Pedro Alves  <palves@redhat.com>
8577
8578         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8579         Re-sort in alphabetic order.
8580
8581 2017-04-18  Pedro Alves  <palves@redhat.com>
8582
8583         * xml-support.c (obstack_xml_printf): Delete.
8584         * xml-support.h (obstack_xml_printf): Delete.
8585
8586 2017-04-18  Pedro Alves  <palves@redhat.com>
8587
8588         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8589         vdebug, verror, body_text, start_element, end_element, name,
8590         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8591         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8592         is_xinclude>: Make private and add m_ prefix.
8593         (gdb_xml_parser::body_text): New method, based on ...
8594         (gdb_xml_body_text): ... this.  Adjust.
8595         (gdb_xml_parser::vdebug): New method, based on ...
8596         (gdb_xml_debug): ... this.  Adjust.
8597         (gdb_xml_parser::verror): New method, based on ...
8598         (gdb_xml_error): ... this.  Adjust.
8599         (gdb_xml_parser::start_element): New method, based on ...
8600         (gdb_xml_start_element): ... this.  Adjust.
8601         (gdb_xml_start_element_wrapper): Defer to
8602         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8603         (gdb_xml_parser::end_element): New method, based on ...
8604         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8605         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8606         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8607         (gdb_xml_parser::use_dtd): New method, based on ...
8608         (gdb_xml_use_dtd): ... this.  Adjust.
8609         (gdb_xml_parser::parse): New method, based on ...
8610         (gdb_xml_parse): ... this.  Adjust.
8611         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8612         (xinclude_start_include): Adjust to call the parser's name method.
8613         (xml_xinclude_default, xml_xinclude_start_doctype)
8614         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8615         method.
8616         (xml_process_xincludes): Adjust to call parser methods.
8617         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8618         declarations.
8619
8620 2017-04-18  Pedro Alves  <palves@redhat.com>
8621
8622         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8623         gdb::optional<std::string>.
8624         * xml-support.c: Include <string>.
8625         (scope_level::scope_level(scope_level &&))
8626         (scope_level::~scope_level): Delete.
8627         (scope_level::body): Now a std::string.
8628         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8629         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8630         parameter.
8631         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8632         (xinclude_parsing_data::output): Now a std::string reference.
8633         (xinclude_start_include): Adjust.
8634         (xml_xinclude_default): Adjust.
8635         (xml_process_xincludes): Add 'output' parameter, and return bool.
8636         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8637         and return bool.
8638         * xml-tdesc.c: Include <unordered_map> and <string>.
8639         (tdesc_xml_cache): Delete.
8640         (tdesc_xml_cache_s): Delete.
8641         (xml_cache): Now an std::unordered_map.
8642         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8643         (target_fetch_description_xml): Change return type to
8644         gdb::optional<std::string>, and adjust.
8645         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8646         (target_fetch_description_xml): Change return type to
8647         gdb::optional<std::string>.
8648
8649 2017-04-18  Pedro Alves  <palves@redhat.com>
8650
8651         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8652         unittests/optional-selftests.c.
8653         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8654         * unittests/optional-selftests.c: New file.
8655         * unittests/optional/assignment/1.cc: New file.
8656         * unittests/optional/assignment/2.cc: New file.
8657         * unittests/optional/assignment/3.cc: New file.
8658         * unittests/optional/assignment/4.cc: New file.
8659         * unittests/optional/assignment/5.cc: New file.
8660         * unittests/optional/assignment/6.cc: New file.
8661         * unittests/optional/assignment/7.cc: New file.
8662         * unittests/optional/cons/copy.cc: New file.
8663         * unittests/optional/cons/default.cc: New file.
8664         * unittests/optional/cons/move.cc: New file.
8665         * unittests/optional/cons/value.cc: New file.
8666         * unittests/optional/in_place.cc: New file.
8667         * unittests/optional/observers/1.cc: New file.
8668         * unittests/optional/observers/2.cc: New file.
8669
8670 2017-04-18  Pedro Alves  <palves@redhat.com>
8671
8672         * common/gdb_optional.h: Include common/traits.h.
8673         (in_place_t): New type.
8674         (in_place): New constexpr variable.
8675         (optional::optional): Remove member initialization of
8676         m_instantiated.
8677         (optional::optional(in_place_t...)): New constructor.
8678         (optional::~optional): Use reset.
8679         (optional::optional(const optional&)): New.
8680         (optional::optional(const optional&&)): New.
8681         (optional::optional(T &)): New.
8682         (optional::optional(T &&)): New.
8683         (operator::operator=(const optional &)): New.
8684         (operator::operator=(optional &&)): New.
8685         (operator::operator= (const T &))
8686         (operator::operator= (T &&))
8687         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8688         (operator::reset): New.
8689         (operator::m_instantiated):: Add in-class initializer.
8690         * common/traits.h: Include <type_traits>.
8691         (struct And): New types.
8692
8693 2017-04-18  Pedro Alves  <palves@redhat.com>
8694
8695         * xml-support.c: Include <vector>.
8696         (scope_level::scope_level(const gdb_xml_element *))
8697         (scope_level::scope_level(scope_level&&)): New.
8698         (scope_level::~scope_level): New.
8699         (scope_level_s): Delete.
8700         (gdb_xml_parser::scopes): Now a std::vector.
8701         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8702         Use std::vector.
8703         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8704         scope cleanup code.
8705         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8706         of the scopes member.  Use std::vector::emplace_back.
8707
8708 2017-04-18  Pedro Alves  <palves@redhat.com>
8709
8710         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8711         a bool.
8712         (gdb_xml_end_element): Change type of first parameter.
8713         (gdb_xml_cleanup): Rename to ...
8714         (gdb_xml_parser::~gdb_xml_parser): ... this.
8715         (gdb_xml_create_parser_and_cleanup): Delete with ...
8716         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8717         to this new ctor.
8718         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8719         using gdb_xml_create_parser_and_cleanup.
8720         (xinclude_parsing_data): Add ctor/dtor.
8721         (xml_xinclude_cleanup): Delete.
8722         (xml_process_xincludes): Create a local xinclude_parsing_data
8723         instead of heap-allocating one.  Create a local gdb_xml_parser
8724         instead of heap-allocating one with
8725         gdb_xml_create_parser_and_cleanup.
8726
8727 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8728
8729         PR threads/20743
8730         * fbsd-nat.c (resume_one_thread_cb): Remove.
8731         (resume_all_threads_cb): Remove.
8732         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8733         iterate_over_threads.
8734
8735 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8736
8737         * NEWS: Create a new section for the next release branch.
8738         Rename the section of the current branch, now that it has
8739         been cut.
8740
8741 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8742
8743         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8744         * version.in: Bump version to 8.0.50.DATE-git.
8745
8746 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8747
8748         PR gdb/21385
8749         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8750         independently of the host, and fix build breakage on Cygwin.
8751
8752 2017-04-13  Pedro Alves  <palves@redhat.com>
8753
8754         * inferior.c (free_inferior): Convert to ...
8755         (inferior::~inferior): ... this dtor.
8756         (inferior::inferior): New ctor, factored out from ...
8757         (add_inferior_silent): ... here.  Allocate the inferior with a new
8758         expression.
8759         (delete_inferior): Call delete instead of free_inferior.
8760         * inferior.h (gdb_environ, continuation): Forward declare.
8761         (inferior): Now a class.  Add in-class initialization to all
8762         members.  Make boolean fields bool, except 'detaching'.
8763         (inferior::inferior): New explicit ctor.
8764         (inferior::~inferior): New.
8765
8766 2017-04-13  Pedro Alves  <palves@redhat.com>
8767
8768         * inferior.c (init_inferior_list): Delete.
8769         * inferior.h (init_inferior_list): Delete.
8770
8771 2017-04-13  Pedro Alves  <palves@redhat.com>
8772
8773         PR threads/13217
8774         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8775         (top level): Call it twice, with different thread sets.
8776
8777 2017-04-13  Pedro Alves  <palves@redhat.com>
8778
8779         * thread.c: Include <algorithm>.
8780         (thread_array_cleanup): Delete.
8781         (scoped_inc_dec_ref): New class.
8782         (live_threads_count): New function.
8783         (set_thread_refcount): Delete.
8784         (tp_array_compar_ascending): Now a bool.
8785         (tp_array_compar): Convert to a std::sort comparison function.
8786         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8787         and live_threads_count.
8788
8789 2017-04-13  Pedro Alves  <palves@redhat.com>
8790
8791         * infrun.c (follow_fork_inferior): Also switch the current
8792         inferior.
8793
8794 2017-04-13  Pedro Alves  <palves@redhat.com>
8795
8796         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8797         before calling create_internal_breakpoint.
8798
8799 2017-04-13  Pedro Alves  <palves@redhat.com>
8800
8801         * fork-child.c (execv_argv): New class.
8802         (breakup_args): Refactored as ...
8803         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8804         Copy arguments to storage and replace separators with NULL
8805         terminators in place.
8806         (escape_bang_in_quoted_argument): Adjust to return bool.
8807         (execv_argv::execv_argv): New ctor.
8808         (execv_argv::init_for_shell): New method, factored out from
8809         fork_inferior.  Don't strdup strings into the vector.
8810         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8811         Remove free_vector_argv call.
8812
8813 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8814
8815         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8816         tdep->rx_psw_type.
8817
8818 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8819
8820         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8821         * rx-tdep.c (rx_gdbarch_init): Likewise.
8822
8823 2017-04-13  Pedro Alves  <palves@redhat.com>
8824
8825         * breakpoint.h (struct breakpoint): Reindent.
8826
8827 2017-04-13  Pedro Alves  <palves@redhat.com>
8828
8829         * breakpoint.c (bp_location): Rename to ...
8830         (bp_locations): ... this.  All references updated.
8831         (bp_location_count): Rename to ...
8832         (bp_locations_count): ... this.  All references updated.
8833         (bp_location_placed_address_before_address_max): Rename to ...
8834         (bp_locations_placed_address_before_address_max): ... this.  All
8835         references updated.
8836         (bp_location_shadow_len_after_address_max): Rename to ...
8837         (bp_locations_shadow_len_after_address_max): ... this.  All
8838         references updated.
8839         (bp_location_compare_addrs): Rename to ...
8840         (bp_locations_compare_addrs): ... this.  All references updated.
8841         (bp_location_compare):Rename to ...
8842         (bp_locations_compare): ... this.  All references updated.
8843         (bp_location_target_extensions_update): Rename to ...
8844         (bp_locations_target_extensions_update): ... this.  All references
8845         updated.
8846
8847 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8848
8849         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8850         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8851         'sgtty.h'.
8852         * common/gdb_termios.h: New file, with parts of "terminal.h".
8853         * inflow.c: Include "gdb_termios.h".
8854         * ser-unix.c: Include "gdb_termios.h".
8855         * terminal.h: Move terminal-related defines to
8856         "common/gdb_termios.h".
8857
8858 2017-04-12  Tom Tromey  <tom@tromey.com>
8859
8860         * probe.c (parse_probes): Update.
8861         * location.h (delete_event_location): Don't declare.
8862         (event_location_deleter::operator()): Update.
8863         * location.c (event_location_deleter::operator()): Rename from
8864         delete_event_location.
8865         * linespec.h (linespec_result) <location>: Change type to
8866         event_location_up.
8867         * linespec.c (canonicalize_linespec, event_location_to_sals)
8868         (decode_objc): Update.
8869         (linespec_result): Don't call delete_event_location.
8870         * breakpoint.c (create_breakpoints_sal)
8871         (bkpt_probe_create_sals_from_location)
8872         (strace_marker_create_sals_from_location): Update.
8873
8874 2017-04-12  Tom Tromey  <tom@tromey.com>
8875
8876         * linespec.h (struct linespec_result): Add constructor and
8877         destructor.
8878         (init_linespec_result, destroy_linespec_result)
8879         (make_cleanup_destroy_linespec_result): Don't declare.
8880         * linespec.c (init_linespec_result): Remove.
8881         (linespec_result::~linespec_result): Rename from
8882         destroy_linespec_result.  Update.
8883         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8884         Remove.
8885         * breakpoint.c (create_breakpoint, break_range_command)
8886         (decode_location_default): Update.
8887         * ax-gdb.c (agent_command_1): Update.
8888
8889 2017-04-12  Tom Tromey  <tom@tromey.com>
8890
8891         * remote.c (remote_download_tracepoint): Update.
8892         * python/py-breakpoint.c (bppy_get_location): Update.
8893         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8894         (gdbscm_breakpoint_location): Update.
8895         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8896         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8897         Change type to event_location_up.
8898         * breakpoint.c (create_overlay_event_breakpoint)
8899         (create_longjmp_master_breakpoint)
8900         (create_std_terminate_master_breakpoint)
8901         (create_exception_master_breakpoint)
8902         (breakpoint_event_location_empty_p, print_breakpoint_location)
8903         (print_one_breakpoint_location, create_thread_event_breakpoint)
8904         (init_breakpoint_sal, create_breakpoint)
8905         (print_recreate_ranged_breakpoint, break_range_command)
8906         (init_ada_exception_breakpoint, say_where): Update.
8907         (base_breakpoint_dtor): Don't call delete_event_location.
8908         (bkpt_print_recreate, tracepoint_print_recreate)
8909         (dprintf_print_recreate, update_static_tracepoint)
8910         (breakpoint_re_set_default): Update.
8911
8912 2017-04-12  Tom Tromey  <tom@tromey.com>
8913
8914         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8915         type of "to_do".  Update.
8916         (compute_stack_depth): Use std::vector.
8917
8918 2017-04-12  Tom Tromey  <tom@tromey.com>
8919
8920         * printcmd.c (find_instruction_backward): Use std::vector.
8921
8922 2017-04-12  Tom Tromey  <tom@tromey.com>
8923
8924         * symfile.c (objfilep): Remove typedef.
8925         (reread_symbols): Use a std::vector.
8926
8927 2017-04-12  Tom Tromey  <tom@tromey.com>
8928
8929         * mi/mi-main.c (exec_direction_forward): Remove.
8930         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8931         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8932         scoped_restore.
8933         * guile/guile.c (guile_repl_command, guile_command)
8934         (gdbscm_execute_gdb_command): Use scoped_restore.
8935         * go-exp.y (go_parse): Use scoped_restore.
8936         * d-exp.y (d_parse): Use scoped_restore.
8937         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8938         * c-exp.y (c_parse): Use scoped_restore.
8939
8940 2017-04-12  Tom Tromey  <tom@tromey.com>
8941
8942         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8943         (mi_parse): Update return type.
8944         (mi_parse_free): Remove.
8945         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8946         (mi_parse::~mi_parse): Rename from mi_parse_free.
8947         (mi_parse_cleanup): Remove.
8948         (mi_parse): Return a unique_ptr.  Use new.
8949         * mi/mi-main.c (mi_execute_command): Update.
8950
8951 2017-04-12  Tom Tromey  <tom@tromey.com>
8952
8953         * location.c (explicit_location_lex_one): Return a
8954         unique_xmalloc_ptr.
8955         (string_to_explicit_location): Update.  Remove cleanups.
8956
8957 2017-04-12  Tom Tromey  <tom@tromey.com>
8958
8959         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8960         (compare_value_and_voffset): Change type.  Update.
8961         (compute_vtable_size): Change type of "offset_vec".
8962         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8963         (gnuv3_get_typeid): Remove extraneous declaration.
8964
8965 2017-04-12  Tom Tromey  <tom@tromey.com>
8966
8967         * charset.h (wchar_iterator): Fix comment.
8968
8969 2017-04-12  Tom Tromey  <tom@tromey.com>
8970
8971         * charset.c (iconv_wrapper): New class.
8972         (cleanup_iconv): Remove.
8973         (convert_between_encodings): Use it.
8974
8975 2017-04-12  Tom Tromey  <tom@tromey.com>
8976
8977         * symfile.h (increment_reading_symtab): Update type.
8978         * symfile.c (decrement_reading_symtab): Remove.
8979         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8980         * psymtab.c (psymtab_to_symtab): Update.
8981         * dwarf2read.c (dw2_instantiate_symtab): Update.
8982
8983 2017-04-12  Tom Tromey  <tom@tromey.com>
8984
8985         * jit.c (struct jit_reader): Declare separately.  Add constructor
8986         and destructor.  Change type of "handle".
8987         (loaded_jit_reader): Define separately.
8988         (jit_reader_load): Update.  New "new".
8989         (jit_reader_unload_command): Use "delete".
8990         * gdb-dlfcn.h (struct dlclose_deleter): New.
8991         (gdb_dlhandle_up): New typedef.
8992         (gdb_dlopen, gdb_dlsym): Update types.
8993         (gdb_dlclose): Remove.
8994         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8995         (gdb_dlsym): Change type of "handle".
8996         (make_cleanup_dlclose): Remove.
8997         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8998         * compile/compile-c-support.c (load_libcc): Update.
8999
9000 2017-04-12  Tom Tromey  <tom@tromey.com>
9001
9002         * symtab.h (find_pcs_for_symtab_line): Change return type.
9003         * symtab.c (find_pcs_for_symtab_line): Change return type.
9004         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9005         type of "vec".  Update.
9006         (ltpy_get_pcs_for_line): Update.
9007         * linespec.c (decode_digits_ordinary): Update.
9008
9009 2017-04-12  Tom Tromey  <tom@tromey.com>
9010
9011         * tracepoint.c (actions_command): Update.
9012         * python/python.c (python_command, python_interactive_command):
9013         Update.
9014         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9015         * guile/guile.c (guile_command): Update.
9016         * defs.h (read_command_lines, read_command_lines_1): Return
9017         command_line_up.
9018         (command_lines_deleter): New struct.
9019         (command_line_up): New typedef.
9020         * compile/compile.c (compile_code_command)
9021         (compile_print_command): Update.
9022         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9023         command_line_up.
9024         (make_cleanup_free_command_lines): Remove.
9025         * cli/cli-script.c (get_command_line, read_command_lines_1)
9026         (copy_command_lines): Return command_line_up.
9027         (while_command, if_command, read_command_lines, define_command)
9028         (document_command): Update.
9029         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9030         Remove.
9031         * breakpoint.h (breakpoint_set_commands): Change type of
9032         "commands".
9033         * breakpoint.c (breakpoint_set_commands): Change type of
9034         "commands".  Update.
9035         (do_map_commands_command, update_dprintf_command_list)
9036         (create_tracepoint_from_upload): Update.
9037
9038 2017-04-12  Tom Tromey  <tom@tromey.com>
9039
9040         * tracepoint.c (scope_info): Update.
9041         * spu-tdep.c (spu_catch_start): Update.
9042         * python/python.c (gdbpy_decode_line): Update.
9043         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9044         * python/py-breakpoint.c (bppy_init): Update.
9045         * probe.c (parse_probes): Update.
9046         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9047         * location.h (event_location_deleter): New struct.
9048         (event_location_up): New typedef.
9049         (new_linespec_location, new_address_location, new_probe_location)
9050         (new_explicit_location, copy_event_location)
9051         (string_to_event_location, string_to_event_location_basic)
9052         (string_to_explicit_location): Update return type.
9053         (make_cleanup_delete_event_location): Remove.
9054         * location.c (new_linespec_location, new_address_location)
9055         (new_probe_location, new_explicit_location, copy_event_location):
9056         Return event_location_up.
9057         (delete_event_location_cleanup)
9058         (make_cleanup_delete_event_location): Remove.
9059         (string_to_explicit_location, string_to_event_location_basic)
9060         (string_to_event_location): Return event_location_up.
9061         * linespec.c (canonicalize_linespec, event_location_to_sals)
9062         (decode_line_with_current_source)
9063         (decode_line_with_last_displayed, decode_objc): Update.
9064         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9065         * completer.c (location_completer): Update.
9066         * cli/cli-cmds.c (edit_command, list_command): Update.
9067         * breakpoint.c (create_overlay_event_breakpoint)
9068         (create_longjmp_master_breakpoint)
9069         (create_std_terminate_master_breakpoint)
9070         (create_exception_master_breakpoint)
9071         (create_thread_event_breakpoint): Update.
9072         (init_breakpoint_sal): Update.  Remove some dead code.
9073         (create_breakpoint_sal): Change type of "location".  Update.
9074         (create_breakpoints_sal, create_breakpoint, break_command_1)
9075         (dprintf_command, break_range_command, until_break_command)
9076         (init_ada_exception_breakpoint)
9077         (strace_marker_create_sals_from_location)
9078         (update_static_tracepoint, trace_command, ftrace_command)
9079         (strace_command, create_tracepoint_from_upload): Update.
9080         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9081         * ax-gdb.c (agent_command_1): Update.
9082
9083 2017-04-12  Pedro Alves  <palves@redhat.com>
9084
9085         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9086         * configure.tgt: Handle i[34567]86-*-go32* and
9087         i[34567]86-*-msdosdjgpp*.
9088         * i386-tdep.c (i386_svr4_reg_to_regnum):
9089         Make extern.
9090         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9091         i386-go32-tdep.c.
9092         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9093         * i386-go32-tdep.c: New file.
9094         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9095         declarations.
9096
9097 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9098
9099         * aix-thread.c (pd_status2str): Change return type to const char *.
9100
9101 2017-04-12  Pedro Alves  <palves@redhat.com>
9102
9103         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9104         calls to set_gdbarch_gnu_triplet_regexp.
9105
9106 2017-04-12  Pedro Alves  <palves@redhat.com>
9107
9108         PR gdb/21323
9109         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9110         New enum value.
9111         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9112         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9113         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9114         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9115         * gdbarch.h, gdbarch.c: Regenerate.
9116         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9117         gdbarch_wchar_bit and gdbarch_wchar_signed.
9118         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9119         * arm-tdep.c (arm_gdbarch_init): Likewise.
9120         * avr-tdep.c (avr_gdbarch_init): Likewise.
9121         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9122         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9123         * i386-tdep.c (i386_go32_init_abi): Likewise.
9124         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9125         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9126         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9127         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9128         * sh-tdep.c (sh_gdbarch_init): Likewise.
9129         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9130         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9131         * windows-tdep.c (windows_init_abi): Likewise.
9132         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9133
9134 2017-04-12  Pedro Alves  <palves@redhat.com>
9135
9136         PR c++/21323
9137         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9138         cplus_primitive_type_char32_t>: New enum values.
9139         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9140         and cplus_primitive_type_char32_t.
9141         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9142         32, use the archtecture's built-in type for char16_t and char32_t,
9143         respectively.  Otherwise, fallback to init_integer_type as before,
9144         but make the type unsigned, and issue a complaint.
9145         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9146
9147 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9148
9149         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9150         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9151
9152 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9153
9154         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9155         'const char *'.
9156
9157 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9158
9159         * common/common-utils.c (free_vector_argv): New function.
9160         * common/common-utils.h: Include <vector>.
9161         (free_vector_argv): New prototype.
9162         * darwin-nat.c (darwin_create_inferior): Rewrite function
9163         prototype in order to constify "exec_file" and accept a
9164         "std::string" for "allargs".
9165         * fork-child.c: Include <vector>.
9166         (breakup_args): Rewrite function, using C++.
9167         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9168         and accept "std::string" for "allargs".  Update the code to
9169         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9170         and "execvp".
9171         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9172         order to constify "exec_file" and accept a "std::string" for
9173         "allargs".
9174         * go32-nat.c (go32_create_inferior): Likewise.
9175         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9176         * infcmd.c (run_command_1): Constify "exec_file".  Use
9177         "std::string" for inferior arguments.
9178         * inferior.h (fork_inferior): Update prototype.
9179         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9180         prototype in order to constify "exec_file" and accept a
9181         "std::string" for "allargs".
9182         * nto-procfs.c (procfs_create_inferior): Likewise.
9183         * procfs.c (procfs_create_inferior): Likewise.
9184         * remote-sim.c (gdbsim_create_inferior): Likewise.
9185         * remote.c (extended_remote_run): Update code to accept
9186         "std::string" as argument.
9187         (extended_remote_create_inferior): Rewrite function prototype in
9188         order to constify "exec_file" and accept a "std::string" for
9189         "allargs".
9190         * rs6000-nat.c (super_create_inferior): Likewise.
9191         (rs6000_create_inferior): Likewise.
9192         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9193         * windows-nat.c (windows_create_inferior): Likewise.
9194
9195 2017-04-11  Pedro Alves  <palves@redhat.com>
9196
9197         * thread.c: Fix whitespace throughout.
9198
9199 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9200
9201         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9202
9203 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9204
9205         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9206
9207 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9208
9209         PR gdb/21364
9210         * osdata.c (info_osdata): Check if 'type' is an empty string
9211         instead of NULL.
9212
9213 2017-04-10  Pedro Alves  <palves@redhat.com>
9214
9215         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9216         (ptid_to_global_thread_id, in_thread_list)
9217         (do_captured_list_thread_ids, set_resumed, set_running)
9218         (set_executing, set_stop_requested, finish_thread_state)
9219         (validate_registers_access, can_access_registers_ptid)
9220         (print_thread_info_1, switch_to_thread)
9221         (do_restore_current_thread_cleanup)
9222         (make_cleanup_restore_current_thread, thread_command)
9223         (thread_name_command): Use operator== instead of ptid_equal.
9224
9225 2017-04-10  Pedro Alves  <palves@redhat.com>
9226
9227         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9228         (current_thread_cleanup_chain): Delete.
9229         (restore_current_thread_cleanup_dtor)
9230         (make_cleanup_restore_current_thread): Remove references to
9231         current_thread_cleanup_chain.
9232
9233 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9234
9235         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9236         REG_UNKNOWN.
9237
9238 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9239
9240         PR gdb/19942
9241         * gdbthread.h (thread_info::deletable): New method.
9242         (thread_info::incref): New method.
9243         (thread_info::decref): New method.
9244         (thread_info::refcount): Move it to private.
9245         * infrun.c (save_stop_context): Call inc_refcount.
9246         (release_stop_context_cleanup): Likewise.
9247         * thread.c (set_thread_exited): New function.
9248         (init_thread_list): Delete "tp" only it is deletable, otherwise
9249         call set_thread_exited.
9250         (delete_thread_1): Call set_thread_exited.
9251         (current_thread_cleanup) <inferior_pid>: Remove.
9252         <thread>: New field.
9253         (restore_current_thread_ptid_changed): Removed.
9254         (do_restore_current_thread_cleanup): Adjust.
9255         (restore_current_thread_cleanup_dtor): Don't call
9256         find_thread_ptid.
9257         (set_thread_refcount): Use dec_refcount.
9258         (make_cleanup_restore_current_thread): Adjust.
9259         (thread_apply_all_command): Call inc_refcount.
9260         (_initialize_thread): Don't call
9261         observer_attach_thread_ptid_changed.
9262
9263 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9264
9265         * thread.c (delete_thread_1): Hoist code on marking thread as
9266         exited.
9267
9268 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9269
9270         * windows-nat.c (windows_detach): Initialize ptid with
9271         minus_one_ptid.
9272
9273 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9274
9275         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9276
9277 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9278
9279         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9280         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9281         (bfin_pseudo_register_write): Likewise
9282
9283 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9284
9285         * common/ptid.h (struct ptid): Change to...
9286         (class ptid_t): ... this.
9287         <ptid_t>: New constructors.
9288         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9289         matches>: New methods.
9290         <make_null, make_minus_one>: New static methods.
9291         <pid>: Rename to...
9292         <m_pid>: ...this.
9293         <lwp>: Rename to...
9294         <m_lwp>: ...this.
9295         <tid>: Rename to...
9296         <m_tid>: ...this.
9297         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9298         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9299         as references, move comment to class ptid_t.
9300         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9301         ptid_t static methods.
9302         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9303         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9304         Take ptid arguments as references, implement using ptid_t methods.
9305         * unittests/ptid-selftests.c: New file.
9306         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9307         unittests/ptid-selftests.c.
9308         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9309
9310 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9311
9312         * python/python.c (python_run_simple_file): Cast mode literal to
9313         non-const char pointer as expected by PyFile_FromString.
9314
9315 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9316
9317         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9318         minus_one_ptid and null_ptid.
9319
9320 2017-04-05  Pedro Alves  <palves@redhat.com>
9321
9322         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9323         * configure: Regenerate.
9324
9325 2017-04-05  Pedro Alves  <palves@redhat.com>
9326
9327         * ada-exp.y (yyerror): Constify.
9328         * ada-lang.c (bound_name, get_selections)
9329         (ada_variant_discrim_type)
9330         (ada_variant_discrim_name, ada_value_struct_elt)
9331         (ada_lookup_struct_elt_type, is_unchecked_variant)
9332         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9333         (catch_ada_exception_command_split)
9334         (catch_ada_assert_command_split, catch_assert_command)
9335         (ada_op_name): Constify.
9336         * ada-lang.h (ada_yyerror, get_selections)
9337         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9338         * arc-tdep.c (arc_print_frame_cache): Constify.
9339         * arm-tdep.c (arm_skip_stub): Constify.
9340         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9341         (gen_aggregate_elt_ref): Constify.
9342         * bcache.c (print_bcache_statistics): Constify.
9343         * bcache.h (print_bcache_statistics): Constify.
9344         * break-catch-throw.c (catch_exception_command_1):
9345         * breakpoint.c (struct ep_type_description::description):
9346         Constify.
9347         (add_solib_catchpoint): Constify.
9348         (catch_fork_command_1): Add cast.
9349         (add_catch_command): Constify.
9350         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9351         Constify.
9352         * bsd-uthread.c (bsd_uthread_state): Constify.
9353         * buildsym.c (patch_subfile_names): Constify.
9354         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9355         Constify.
9356         * c-exp.y (yyerror): Constify.
9357         (token::oper): Constify.
9358         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9359         * c-varobj.c (cplus_describe_child): Constify.
9360         * charset.c (find_charset_names): Add cast.
9361         (find_charset_names): Constify array and add const_cast.
9362         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9363         (edit_command): Constify.
9364         * cli/cli-decode.c (lookup_cmd): Constify.
9365         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9366         Constify.
9367         (struct dump_context): Constify.
9368         (add_dump_command, restore_command): Constify.
9369         * cli/cli-script.c (get_command_line): Constify.
9370         * cli/cli-script.h (get_command_line): Constify.
9371         * cli/cli-utils.c (check_for_argument): Constify.
9372         * cli/cli-utils.h (check_for_argument): Constify.
9373         * coff-pe-read.c (struct read_pe_section_data): Constify.
9374         * command.h (lookup_cmd): Constify.
9375         * common/print-utils.c (decimal2str): Constify.
9376         * completer.c (gdb_print_filename): Constify.
9377         * corefile.c (set_gnutarget): Constify.
9378         * cp-name-parser.y (yyerror): Constify.
9379         * cp-valprint.c (cp_print_class_member): Constify.
9380         * cris-tdep.c (cris_register_name, crisv32_register_name):
9381         Constify.
9382         * d-exp.y (yyerror): Constify.
9383         (struct token::oper): Constify.
9384         * d-lang.h (d_yyerror): Constify.
9385         * dbxread.c (struct header_file_location::name): Constify.
9386         (add_old_header_file, add_new_header_file, last_function_name)
9387         (dbx_next_symbol_text, add_bincl_to_list)
9388         (find_corresponding_bincl_psymtab, set_namestring)
9389         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9390         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9391         * defs.h (command_line_input, print_address_symbolic)
9392         (deprecated_readline_begin_hook): Constify.
9393         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9394         Constify.
9395         * event-top.c (handle_line_of_input): Constify and add cast.
9396         * exceptions.c (catch_errors): Constify.
9397         * exceptions.h (catch_errors): Constify.
9398         * expprint.c (print_subexp_standard, op_string, op_name)
9399         (op_name_standard, dump_raw_expression, dump_raw_expression):
9400         * expression.h (op_name, op_string, dump_raw_expression):
9401         Constify.
9402         * f-exp.y (yyerror): Constify.
9403         (struct token::oper): Constify.
9404         (struct f77_boolean_val::name): Constify.
9405         * f-lang.c (f_word_break_characters): Constify.
9406         * f-lang.h (f_yyerror): Constify.
9407         * fork-child.c (fork_inferior): Add cast.
9408         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9409         (new_variant): Constify.
9410         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9411         * gdbarch.c: Regenerate.
9412         * gdbcore.h (set_gnutarget): Constify.
9413         * go-exp.y (yyerror): Constify.
9414         (token::oper): Constify.
9415         * go-lang.h (go_yyerror): Constify.
9416         * go32-nat.c (go32_sysinfo): Constify.
9417         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9418         * guile/scm-cmd.c (cmdscm_function): Constify.
9419         * guile/scm-param.c (pascm_param_value): Constify.
9420         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9421         (h8300sx_register_name): Constify.
9422         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9423         Constify.
9424         * ia64-tdep.c (ia64_register_names): Constify.
9425         * infcmd.c (construct_inferior_arguments): Constify.
9426         (path_command, attach_post_wait): Constify.
9427         * language.c (show_range_command, show_case_command)
9428         (unk_lang_error): Constify.
9429         * language.h (language_defn::la_error)
9430         (language_defn::la_name_of_this): Constify.
9431         * linespec.c (decode_line_2): Constify.
9432         * linux-thread-db.c (thread_db_err_str): Constify.
9433         * lm32-tdep.c (lm32_register_name): Constify.
9434         * m2-exp.y (yyerror): Constify.
9435         * m2-lang.h (m2_yyerror): Constify.
9436         * m32r-tdep.c (m32r_register_names): Constify and make static.
9437         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9438         * m88k-tdep.c (m88k_register_name): Constify.
9439         * macroexp.c (appendmem): Constify.
9440         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9441         (upgrade_type, parse_external, parse_partial_symbols)
9442         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9443         (new_symbol): Constify.
9444         * memattr.c (mem_info_command): Constify.
9445         * mep-tdep.c (register_name_from_keyword): Constify.
9446         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9447         Constify.
9448         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9449         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9450         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9451         cast.
9452         (mi_execute_async_cli_command): Constify.
9453         * mips-tdep.c (mips_register_name): Constify.
9454         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9455         (am33_register_name, am33_2_register_name)
9456         * moxie-tdep.c (moxie_register_names): Constify.
9457         * nat/linux-osdata.c (osdata_type): Constify fields.
9458         * nto-tdep.c (nto_parse_redirection): Constify.
9459         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9460         (lookup_child_selector): Constify.
9461         (objc_methcall::name): Constify.
9462         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9463         (lookup_struct_typedef): Constify.
9464         * objfiles.c (pc_in_section): Constify.
9465         * objfiles.h (pc_in_section): Constify.
9466         * p-exp.y (struct token::oper): Constify.
9467         (yyerror): Constify.
9468         * p-lang.h (pascal_yyerror): Constify.
9469         * parser-defs.h (op_name_standard): Constify.
9470         (op_print::string): Constify.
9471         (exp_descriptor::op_name): Constify.
9472         * printcmd.c (print_address_symbolic): Constify.
9473         * psymtab.c (print_partial_symbols): Constify.
9474         * python/py-breakpoint.c (stop_func): Constify.
9475         (bppy_get_expression): Constify.
9476         * python/py-cmd.c (cmdpy_completer::name): Constify.
9477         (cmdpy_function): Constify.
9478         * python/py-event.c (evpy_add_attribute)
9479         (gdbpy_initialize_event_generic): Constify.
9480         * python/py-event.h (evpy_add_attribute)
9481         (gdbpy_initialize_event_generic): Constify.
9482         * python/py-evts.c (add_new_registry): Constify.
9483         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9484         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9485         * python/py-inferior.c (get_buffer): Add cast.
9486         * python/py-param.c (parm_constant::name): Constify.
9487         * python/py-unwind.c (fprint_frame_id): Constify.
9488         * python/python.c (gdbpy_parameter_value): Constify.
9489         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9490         * remote.c (memory_packet_config::name): Constify.
9491         (show_packet_config_cmd, remote_write_bytes)
9492         (remote_buffer_add_string):
9493         * reverse.c (exec_reverse_once): Constify.
9494         * rs6000-tdep.c (variant::name, variant::description): Constify.
9495         * rust-exp.y (rustyyerror): Constify.
9496         * rust-lang.c (rust_op_name): Constify.
9497         * rust-lang.h (rustyyerror): Constify.
9498         * serial.h (serial_ops::name): Constify.
9499         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9500         (sh_sh3e_register_name, sh_sh2e_register_name)
9501         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9502         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9503         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9504         (sh_sh4al_dsp_register_name): Constify.
9505         * sh64-tdep.c (sh64_register_name): Constify.
9506         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9507         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9508         * stabsread.c (patch_block_stabs, read_type_number)
9509         (ref_map::stabs, ref_add, process_reference)
9510         (symbol_reference_defined, define_symbol, define_symbol)
9511         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9512         (read_one_struct_field, read_struct_fields, read_baseclasses)
9513         (read_tilde_fields, read_struct_type, read_array_type)
9514         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9515         (read_huge_number, read_range_type, read_args, common_block_start)
9516         (find_name_end): Constify.
9517         * stabsread.h (common_block_start, define_symbol)
9518         (process_one_symbol, symbol_reference_defined, ref_add):
9519         * symfile.c (get_section_index, add_symbol_file_command):
9520         * symfile.h (get_section_index): Constify.
9521         * target-descriptions.c (tdesc_type::name): Constify.
9522         (tdesc_free_type): Add cast.
9523         * target.c (find_default_run_target):
9524         (add_deprecated_target_alias, find_default_run_target)
9525         (target_announce_detach): Constify.
9526         (do_option): Constify.
9527         * target.h (add_deprecated_target_alias): Constify.
9528         * thread.c (print_thread_info_1): Constify.
9529         * top.c (deprecated_readline_begin_hook, command_line_input):
9530         Constify.
9531         (init_main): Add casts.
9532         * top.h (handle_line_of_input): Constify.
9533         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9534         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9535         (tfind_command): Rename to ...
9536         (tfind_command_1): ... this and constify.
9537         (tfind_command): New function.
9538         (tfind_end_command, tfind_start_command): Adjust.
9539         (encode_source_string): Constify.
9540         * tracepoint.h (encode_source_string): Constify.
9541         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9542         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9543         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9544         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9545         * tui/tui-win.c (parse_scrolling_args): Constify.
9546         * tui/tui-windata.c (tui_erase_data_content): Constify.
9547         * tui/tui-windata.h (tui_erase_data_content): Constify.
9548         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9549         * tui/tui.c (tui_enable): Add cast.
9550         * utils.c (defaulted_query): Constify.
9551         (init_page_info): Add cast.
9552         (puts_debug, subset_compare): Constify.
9553         * utils.h (subset_compare): Constify.
9554         * varobj.c (varobj_format_string): Constify.
9555         * varobj.h (varobj_format_string): Constify.
9556         * vax-tdep.c (vax_register_name): Constify.
9557         * windows-nat.c (windows_detach): Constify.
9558         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9559         * xml-support.c (gdb_xml_end_element): Constify.
9560         * xml-tdesc.c (tdesc_start_reg): Constify.
9561         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9562         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9563         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9564
9565 2017-04-05  Pedro Alves  <palves@redhat.com>
9566
9567         * proc-api.c (struct trans): Constify.
9568         (procfs_note): Constify.
9569         * proc-events.c (struct trans, syscall_table):
9570         * proc-flags.c (struct trans): Constify.
9571         * proc-utils.h (procfs_note): Constify.
9572         * proc-why.c (struct trans): Constify.
9573         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9574         (procfs_detach): Constify.
9575         * sol-thread.c (struct string_map): Constify.
9576         (td_err_string, td_state_string): Constify.
9577
9578 2017-04-05  Pedro Alves  <palves@redhat.com>
9579
9580         * proc-api.c (procfs_filename): Don't initialize
9581         procfs_filename.
9582         (prepare_to_trace): Assume procfs_filename is non-NULL.
9583         (_initialize_proc_api): Give procfs_filename a default value here.
9584
9585 2017-04-05  Pedro Alves  <palves@redhat.com>
9586
9587         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9588         'cond_string' parameter.
9589         (extract_exception_regexp): Constify 'string' parameter.
9590         (catch_exception_command_1): Constify.
9591         * breakpoint.c (init_catchpoint)
9592         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9593         parameter.
9594         (ep_parse_optional_if_clause, catch_fork_command_1)
9595         (catch_exec_command_1): Constify.
9596         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9597         parameter.
9598         (ep_parse_optional_if_clause): Constify.
9599         * cli/cli-utils.c (remove_trailing_whitespace)
9600         (check_for_argument): Constify.
9601         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9602         non-const overload.
9603         (check_for_argument): Likewise.
9604
9605 2017-04-05  Pedro Alves  <palves@redhat.com>
9606
9607         * event-top.c (command_line_handler): Add cast to execute_command
9608         call.
9609         * record-btrace.c (cmd_record_btrace_bts_start)
9610         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9611         (cmd_record_btrace_start): Add cast to execute_command call.
9612         * record-full.c (record_full_goto_insn):
9613         * record.c (record_start, record_stop): Add cast to
9614         execute_command_to_string calls.
9615         (cmd_record_start): Add cast to execute_command calls.
9616
9617 2017-04-05  Pedro Alves  <palves@redhat.com>
9618
9619         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9620         static inline function.
9621         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9622         array and use gdb_PyArg_ParseTupleAndKeywords.
9623         * python/py-cmd.c (cmdpy_init): Likewise.
9624         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9625         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9626         (infpy_search_memory): Likewise.
9627         * python/py-objfile.c (objfpy_add_separate_debug_file)
9628         (gdbpy_lookup_objfile): Likewise.
9629         * python/py-symbol.c (gdbpy_lookup_symbol)
9630         (gdbpy_lookup_global_symbol): Likewise.
9631         * python/py-type.c (gdbpy_lookup_type): Likewise.
9632         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9633         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9634         Likewise.
9635
9636 2017-04-05  Pedro Alves  <palves@redhat.com>
9637
9638         * python/python-internal.h (gdb_PyGetSetDef): New type.
9639         * python/py-block.c (block_object_getset)
9640         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9641         * python/py-event.c (event_object_getset)
9642         (finish_breakpoint_object_getset): Likewise.
9643         * python/py-inferior.c (inferior_object_getset): Likewise.
9644         * python/py-infthread.c (thread_object_getset): Likewise.
9645         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9646         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9647         * python/py-objfile.c (objfile_getset): Likewise.
9648         * python/py-progspace.c (pspace_getset): Likewise.
9649         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9650         Likewise.
9651         * python/py-record.c (recpy_record_getset): Likewise.
9652         * python/py-symbol.c (symbol_object_getset): Likewise.
9653         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9654         Likewise.
9655         * python/py-type.c (type_object_getset, field_object_getset):
9656         Likewise.
9657         * python/py-value.c (value_object_getset): Likewise.
9658
9659 2017-04-05  Pedro Alves  <palves@redhat.com>
9660
9661         * python/python-internal.h (gdb_PyObject_CallMethod)
9662         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9663         New functions.
9664         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9665         (PySys_GetObject, PySys_SetPath): New macros.
9666
9667 2017-04-05  Pedro Alves  <palves@redhat.com>
9668
9669         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9670         info_osdata_command.
9671         * osdata.c (info_osdata_command): Rename to ...
9672         (info_osdata): ... this.  Constify 'type' parameter, and remove
9673         the 'from_tty' parameter.  Accept NULL TYPE.
9674         (info_osdata_command): New function.
9675         * osdata.h (info_osdata_command): Remove declaration.
9676         (info_osdata): New declaration.
9677
9678 2017-04-05  Pedro Alves  <palves@redhat.com>
9679
9680         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9681         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9682         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9683         parameter.
9684         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9685         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9686         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9687         parameter.
9688         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9689         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9690         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9691         (mi_cmd_file_list_exec_source_files)
9692         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9693         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9694         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9695         parameter.
9696         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9697         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9698         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9699         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9700         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9701         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9702         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9703         'command' parameter.
9704         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9705         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9706         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9707         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9708         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9709         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9710         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9711         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9712         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9713         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9714         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9715         parameter.
9716         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9717         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9718         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9719         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9720         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9721         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9722         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9723         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9724         (mi_cmd_data_list_changed_registers)
9725         (mi_cmd_data_write_register_values)
9726         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9727         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9728         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9729         (mi_cmd_list_features, mi_cmd_list_target_features)
9730         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9731         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9732         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9733         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9734         (mi_cmd_trace_frame_collected): Constify 'command'
9735         parameter.
9736         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9737         'command' parameter.
9738
9739 2017-04-05  Pedro Alves  <palves@redhat.com>
9740
9741         * ada-lang.c (ada_completer_word_break_characters): Now a const
9742         array.
9743         (ada_get_gdb_completer_word_break_characters): Constify.
9744         * completer.c (gdb_completer_command_word_break_characters)
9745         (gdb_completer_file_name_break_characters)
9746         (gdb_completer_quote_characters): Now const arrays.
9747         (get_gdb_completer_quote_characters): Constify.
9748         (set_rl_completer_word_break_characters): New function.
9749         (set_gdb_completion_word_break_characters)
9750         (complete_line_internal): Use it.
9751         * completer.h (get_gdb_completer_quote_characters): Constify.
9752         (set_rl_completer_word_break_characters): Declare.
9753         * f-lang.c (f_word_break_characters): Constify.
9754         * language.c (default_word_break_characters): Constify.
9755         * language.h (language_defn::la_word_break_characters): Constify.
9756         (default_word_break_characters): Constify.
9757         * top.c (init_main): Use set_rl_completer_word_break_characters.
9758
9759 2017-04-05  Pedro Alves  <palves@redhat.com>
9760
9761         * aix-thread.c (aix_thread_pid_to_str)
9762         (aix_thread_extra_thread_info): Constify.
9763         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9764         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9765         (bsd_uthread_pid_to_str): Constify.
9766         * corelow.c (core_pid_to_str): Constify.
9767         * darwin-nat.c (darwin_pid_to_str): Constify.
9768         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9769         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9770         Constify.
9771         * gnu-nat.c (gnu_pid_to_str): Constify.
9772         * go32-nat.c (go32_pid_to_str): Constify.
9773         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9774         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9775         * inferior.c (inferior_pid_to_str): Constify.
9776         * linux-nat.c (linux_nat_pid_to_str): Constify.
9777         * linux-tdep.c (linux_core_pid_to_str): Constify.
9778         * linux-thread-db.c (thread_db_pid_to_str)
9779         (thread_db_extra_thread_info): Constify.
9780         * nto-tdep.c (nto_extra_thread_info): Constify.
9781         * nto-tdep.h (nto_extra_thread_info): Constify.
9782         * obsd-nat.c (obsd_pid_to_str): Constify.
9783         * procfs.c (procfs_pid_to_str): Constify.
9784         * ravenscar-thread.c (ravenscar_extra_thread_info)
9785         (ravenscar_pid_to_str): Constify.
9786         * remote-sim.c (gdbsim_pid_to_str): Constify.
9787         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9788         Constify.
9789         * sol-thread.c (solaris_pid_to_str): Constify.
9790         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9791         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9792         * target.c (default_pid_to_str, target_pid_to_str)
9793         (normal_pid_to_str, default_pid_to_str): Constify.
9794         * target.h (target_ops::to_pid_to_str)
9795         (target_ops::to_extra_thread_info): Constify.
9796         (target_pid_to_str, normal_pid_to_str): Constify.
9797         * windows-nat.c (windows_pid_to_str): Constify.
9798         * gdbarch.sh (core_pid_to_str): Constify.
9799         * target-delegates.c: Regenerate.
9800         * gdbarch.h, gdbarch.c: Regenerate.
9801
9802 2017-04-05  Pedro Alves  <palves@redhat.com>
9803
9804         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9805         the memory of the temporary warning_pre_print override.
9806         * utils.c (warning_pre_print): Constify.
9807         * utils.h (warning_pre_print): Constify.
9808
9809 2017-04-05  Pedro Alves  <palves@redhat.com>
9810
9811         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9812         (shell_command): New function.
9813         (make_command): Use std::string.
9814         (init_cli_cmds): Register shell_command instead of shell_escape.
9815
9816 2017-04-05  Pedro Alves  <palves@redhat.com>
9817
9818         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9819         * tracepoint.c (default_collect): Don't initialize.
9820
9821 2017-04-05  Pedro Alves  <palves@redhat.com>
9822
9823         * macroexp.c (macro_buffer::shared): Now a bool.
9824         (init_buffer): Update.
9825         (init_shared_buffer): Constify 'addr' parameter.
9826         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9827         casts.
9828
9829 2017-04-05  Pedro Alves  <palves@redhat.com>
9830
9831         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9832         * disasm.c (set_disassembler_options): Constify local.
9833         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9834
9835 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9836
9837         PR gdb/21352
9838         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9839         option.
9840
9841 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9842
9843         * frame.c (frame_unwind_register_unsigned): Call
9844         frame_unwind_register_value.
9845
9846 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9847
9848         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9849         Use gdb_test_multiple, and don't match anchor.
9850
9851 2017-04-05  Pedro Alves  <palves@redhat.com>
9852
9853         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9854         (Write After Approval): Remove Simon Marchi.
9855
9856 2017-04-05  Pedro Alves  <palves@redhat.com>
9857
9858         * common/gdb_optional.h (optional::optional): Make constexpr and
9859         initialize m_dummy.
9860
9861 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9862
9863         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9864         (amd64fbsd_jmp_buf_reg_offset): Remove.
9865         (amd64fbsd_supply_uthread): Remove function.
9866         (amd64fbsd_collect_uthread): Remove function.
9867         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9868         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9869         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9870         (fbsd-nat.c): Update comment.
9871         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9872         (i386fbsd_jmp_buf_reg_offset): Remove.
9873         (i386fbsd_supply_uthread): Remove function.
9874         (i386fbsd_collect_uthread): Remove function.
9875         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9876
9877 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9878
9879         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9880         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9881         * NEWS: Mention that support for FreeBSD/alpha was removed.
9882         * alpha-fbsd-tdep.c: Delete file.
9883         * config/alpha/fbsd.mh: Delete file.
9884         * configure.host: Delete alpha*-*-freebsd* and
9885         alpha*-*-kfreebsd*-gnu.
9886         * configure.tgt: Delete alpha*-*-freebsd* and
9887         alpha*-*-kfreebsd*-gnu.
9888
9889 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9890
9891         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9892         amd64bsd_store_inferior_registers): Use ptid from regcache.
9893
9894 2017-04-04  Pedro Alves  <palves@redhat.com>
9895
9896         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9897         data fields, make them private and add "m_" prefixes.
9898         (lnp_state_machine::lnp_state_machine): New ctor.
9899         (record_line, check_line_address, handle_set_discriminator)
9900         (handle_set_address, handle_advance_pc, handle_special_opcode)
9901         (handle_advance_line, handle_set_file, handle_negate_stmt)
9902         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9903         (end_sequence, advance_line): New methods.
9904         (m_gdbarch, m_record_lines_p): New fields.
9905         (lnp_reader_state): Delete.
9906         (dwarf_record_line): Rename to ...
9907         (lnp_state_machine::record_line): ... adjust.
9908         (init_lnp_state_machine): Delete.
9909         (lnp_state_machine::lnp_state_machine): New.
9910         (check_line_address): Rename to ...
9911         (lnp_state_machine::check_line_address): This.
9912         (dwarf_decode_lines_1): Remove reference to "reader_state".
9913         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9914         State machine internal state manipulation moved to
9915         lnp_state_machine methods.
9916
9917 2017-04-04  Pedro Alves  <palves@redhat.com>
9918
9919         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9920         unittests/offset-type-selftests.c.
9921         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9922         * common/offset-type.h: New file.
9923         * common/preprocessor.h: New file.
9924         * common/traits.h: New file.
9925         * common/valid-expr.h: New file.
9926         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9927         sect_offset and cu_offset strong typedefs throughout.
9928         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9929         typedefs throughout.
9930         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9931         sect_offset and cu_offset strong typedefs throughout.
9932         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9933         typedefs throughout.
9934         * gdbtypes.h: Include "common/offset-type.h".
9935         (cu_offset): Now an offset type (strong typedef) instead of a
9936         struct.
9937         (sect_offset): Likewise.
9938         (union call_site_parameter_u): Rename "param_offset" field to
9939         "param_cu_off".
9940         * unittests/offset-type-selftests.c: New file.
9941
9942 2017-04-04  Pedro Alves  <palves@redhat.com>
9943
9944         * common/underlying.h: New file.
9945         * dwarf2read.c: Include "common/gdb_optional.h" and
9946         "common/underlying.h".
9947         (dir_index, file_name_index): New types.
9948         (file_entry): Use them.
9949         (file_entry::include): Use to_underlying.
9950         (line_header::add_file_name): Use dir_index.
9951         (read_formatted_entries): Use gdb::optional.  Read form before
9952         writting to file_entry.
9953         (dwarf_decode_line_header): Use dir_index.
9954         (lnp_state_machine::current_file): Use to_underlying.
9955         (lnp_state_machine::file): Change type to file_name_index.
9956         (dwarf_record_line): Use to_underlying.
9957         (init_lnp_state_machine): Use file_name_index.
9958         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9959
9960 2017-04-04  Pedro Alves  <palves@redhat.com>
9961
9962         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9963         operator bool, has_value and get methods.
9964
9965 2017-04-04  Pedro Alves  <palves@redhat.com>
9966
9967         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9968         fields.
9969         (line_header): Initialize all data fields.  Change type of
9970         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9971         Change type of include_dirs to std::vector<const char *>.  Remove
9972         num_include_dirs, include_dirs_size.  Change type of file_names to
9973         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9974         (line_header::line_header): New.
9975         (line_header::add_include_dir, line_header::add_file_name): New
9976         methods.
9977         (line_header::include_dir_at): Remove NULL check.
9978         (line_header::file_name_at): Add const overload.
9979         (line_header_up): New unique_ptr typedef.
9980         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9981         std::vector.  Remove free_line_header call.
9982         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9983         free_line_header call.
9984         (free_cu_line_header): Delete.
9985         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9986         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9987         Adjust to use std::vector.
9988         (free_line_header): Delete.
9989         (free_line_header_voidp): Use delete.
9990         (add_include_dir): Replace with ...
9991         (line_header::add_include_dir): ... this method.  Use std::vector.
9992         (add_file_name): Replace with ...
9993         (line_header::add_file_name): ... this method.  Use std::vector.
9994         (add_include_dir_stub): Delete.
9995         (read_formatted_entries): Remove memset.
9996         (dwarf_decode_line_header): Return a line_header_up instead of a
9997         raw pointer.  Remove cleanup handling.  Pass lambdas to
9998         read_formatted_entries.  Adjust to use line_header methods.
9999         (dwarf_decode_lines_1): Adjust to use line_header methods.
10000         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10001         use std::vector.
10002
10003 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10004
10005         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10006         instead of struct ptid.
10007
10008 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10009
10010         * frame.c (get_frame_register_bytes): Unwind using value.
10011         (put_frame_register_bytes): Likewise.
10012
10013 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10014
10015         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10016         aggregate-like.
10017
10018 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10019
10020         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10021
10022 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10023
10024         * gdbthread.h (struct thread_info): Declare constructor and
10025         destructor.  Add some in-class member initializers.
10026         * thread.c (free_thread): Remove.
10027         (init_thread_list): Call delete instead of free_thread.
10028         (new_thread): Call thread_info constructor.
10029         (thread_info::thread_info): New function.
10030         (thread_info::~thread_info): New function.
10031         (delete_thread_1): Call delete instead of free_thread.
10032         (make_cleanup_restore_current_thread): Move tp and frame to
10033         inner block.
10034
10035 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10036
10037         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10038         (arc_skip_prologue): Likewise.
10039         (arc_make_frame_cache): Likewise.
10040         (arc_pv_get_operand): New function.
10041         (arc_is_in_prologue): Likewise.
10042         (arc_analyze_prologue): Likewise.
10043         (arc_print_frame_cache): Likewise.
10044         (MAX_PROLOGUE_LENGTH): New constant.
10045
10046 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10047
10048         * configure.tgt: Add arc-insn.o.
10049         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10050         (dump_arc_instruction_command): New function.
10051         (arc_fprintf_disasm): Likewise.
10052         (arc_disassemble_info): Likewise.
10053         (arc_insn_get_operand_value): Likewise.
10054         (arc_insn_get_operand_value_signed): Likewise.
10055         (arc_insn_get_memory_base_reg): Likewise.
10056         (arc_insn_get_memory_offset): Likewise.
10057         (arc_insn_get_branch_target): Likewise.
10058         (arc_insn_dump): Likewise.
10059         (arc_insn_get_linear_next_pc): Likewise.
10060         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10061         (arc_disassemble_info): Likewise.
10062         (arc_insn_get_branch_target): Likewise.
10063         (arc_insn_get_linear_next_pc): Likewise.
10064         * NEWS: Mention new "maint print arc arc-instruction".
10065
10066 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10067
10068         * arc-tdep (maintenance_print_arc_list): New variable.
10069         (maintenance_print_arc_command): New function.
10070
10071 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10072
10073         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10074         Add "limm" and "reserved".
10075         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10076         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10077         * arc-tdep.h (arc_regnum): Likewise.
10078
10079 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10080
10081         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10082         for THREADPTR register.
10083         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10084         register.
10085         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10086         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10087         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10088
10089 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10090
10091         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10092         registers above gdbarch_num_regs (gdbarch) as privileged in
10093         call0 ABI.
10094
10095 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10096
10097         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10098         for a single specified register or for all registers in
10099         a0_base..a0_base + C0_NREGS range.
10100         (supply_gregset_reg): Call regcache_raw_supply for a single
10101         specified register or for all registers in a0_base..a0_base +
10102         C0_NREGS range.
10103
10104 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10105
10106         * arch/xtensa.h (C0_NREGS): Add definition.
10107         * xtensa-tdep.c (C0_NREGS): Remove definition.
10108
10109 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10110
10111         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10112         Drop xtensa_default_isa initialization.
10113         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10114
10115 2017-03-27  Pedro Alves  <palves@redhat.com>
10116
10117         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10118         (file_entry::include_dir): New method.
10119         (line_header::include_dir_at, line_header::file_name_at): New
10120         methods.
10121         (setup_type_unit_groups, setup_type_unit_groups)
10122         (psymtab_include_file_name): Simplify using the new methods.
10123         (lnp_state_machine) <the_line_header>: New field.
10124         <file>: Add comment.
10125         (lnp_state_machine::current_file): New method.
10126         (dwarf_record_line): Simplify using the new methods.
10127         (init_lnp_state_machine): Initialize the "the_line_header" field.
10128         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10129         Simplify using the new methods.
10130
10131 2017-03-27  Pedro Alves  <palves@redhat.com>
10132
10133         * cp-name-parser.y (make_empty): Delete.
10134         (demangler_special, nested_name, ptr_operator, array_indicator)
10135         (direct_declarator, declarator_1): Use fill_comp instead of
10136         make_empty.
10137
10138 2017-03-27  Pedro Alves  <palves@redhat.com>
10139
10140         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10141         to ATTRIBUTE_PRINTF.
10142         * solib-target.c (library_list_start_list): Print "string" not
10143         "version".
10144         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10145         gdb_xml_error call.
10146
10147 2017-03-27  Pedro Alves  <palves@redhat.com>
10148
10149         * dwarf2read.c (struct file_and_directory): New.
10150         (dwarf2_get_dwz_file): Adjust to use std::string.
10151         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10152         (find_file_and_directory): Adjust to return a file_and_directory
10153         object.
10154         (read_file_scope): Adjust to use file_and_directory.  Remove
10155         make_cleanup/do_cleanups calls.
10156         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10157         make_cleanup/do_cleanups calls.
10158         * python/python.c (do_start_initialization): Adjust to ldirname
10159         returning a std::string.
10160         * utils.c (ldirname): Now returns a std::string.
10161         * utils.h (ldirname): Change return type to std::string.
10162         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10163         returning a std::string.
10164         * xml-tdesc.c (file_read_description_xml): Likewise.
10165
10166 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10167
10168         * regcache.c (regcache_debug_print_register): New function.
10169         * regcache.h (regcache_debug_print_register): New declaration.
10170         * target.c (debug_print_register): Remove.
10171         (target_fetch_registers): Call regcache_debug_print_register.
10172         (target_store_registers): Likewise.
10173
10174 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10175
10176         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10177         reference beyond the 'lh->include_dirs' array before accessing to
10178         it.
10179         (psymtab_include_file_name): Likewise.
10180         (dwarf_decode_lines_1): Likewise.
10181         (dwarf_decode_lines): Likewise.
10182         (file_file_name): Likewise.
10183
10184 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10185
10186         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10187         inferior_ptid.
10188         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10189         ps_lsetfpregs): Likewise.
10190         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10191         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10192         ps_lsetfpregs): Likewise.
10193         * target.c (target_fetch_registers, target_store_registers):
10194         Remove asserts.
10195
10196 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10197
10198         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10199
10200 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10201
10202         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10203         (_initialize_aarch64_tdep): Register it.
10204         (aarch64_record_load_store): Handle PRFM instruction.
10205         (aarch64_process_record_test): New function.
10206
10207 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10208
10209         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10210         indentation.
10211
10212 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10213
10214         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10215
10216 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10217
10218         python/python.c (do_start_initialization): Fix memory leak.
10219
10220 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10221
10222         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10223         using get_ptrace_pid.
10224         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10225         inferior_ptid.
10226         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10227         inferior_ptid instead of pid.
10228
10229 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10230
10231         * aarch64-tdep.c: Wrap locally used classes in anonymous
10232         namespace.
10233         * arm-tdep.c: Likewise.
10234         * linespec.c: Likewise.
10235         * ui-out.c: Likewise.
10236
10237 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10238
10239         PR gdb/19637
10240         * python/lib/gdb/printer/bound_registers.py: Import sys.
10241
10242 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10243
10244         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10245         windows_thread_info parameter and use it instead of
10246         current_thread.
10247         (windows_fetch_inferior_registers): Don't set current_thread,
10248         pass the thread to do_windows_fetch_inferior_registers.  Use
10249         ptid from regcache instead of inferior_ptid.
10250         (do_windows_store_inferior_registers): Add windows_thread_info
10251         parameter and use it instead of current_thread.
10252         (windows_store_inferior_registers): Don't set current_thread,
10253         pass the thread to do_windows_store_inferior_registers.  Use
10254         ptid from regcache instead of inferior_ptid.
10255
10256 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10257
10258         * ser-mingw.c (ser_windows_raw): Remove reference to
10259         struct serial::current_timeout.
10260
10261 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10262
10263         PR tdep/20928
10264         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10265         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10266         (sparc64_fsr_type): Fix %fsr decoding.
10267
10268 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10269
10270         * python/py-record-btrace.c (btpy_insn_data): Change return type
10271         for Python 2.
10272
10273 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10274
10275         * spu-linux-nat.c (spu_fetch_inferior_registers,
10276         spu_store_inferior_registers): Use ptid from regcache, set and
10277         restore inferior_ptid.
10278         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10279         Likewise.
10280
10281 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10282
10283         * i386-linux-nat.c (fetch_register, store_register,
10284         i386_linux_fetch_inferior_registers,
10285         i386_linux_store_inferior_registers): Use ptid from regcache.
10286         * ia64-linux-nat.c (ia64_linux_fetch_register,
10287         ia64_linux_store_register): Likewise.
10288         * inf-ptrace.c (inf_ptrace_fetch_register,
10289         inf_ptrace_store_register): Likewise.
10290         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10291         m32r_linux_store_inferior_registers): Likewise.
10292         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10293         m68kbsd_store_inferior_registers): Likewise.
10294         * m68k-linux-nat.c (fetch_register, store_register,
10295         m68k_linux_fetch_inferior_registers,
10296         m68k_linux_store_inferior_registers): Likewise.
10297         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10298         m88kbsd_store_inferior_registers): Likewise.
10299         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10300         mips_fbsd_store_inferior_registers): Likewise.
10301         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10302         mips64_linux_regsets_store_registers): Likewise.
10303         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10304         mipsnbsd_store_inferior_registers): Likewise.
10305         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10306         mips64obsd_store_inferior_registers): Likewise.
10307         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10308         Likewise.
10309         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10310         ppcfbsd_store_inferior_registers): Likewise.
10311         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10312         ppc_linux_store_inferior_registers): Likewise.
10313         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10314         ppcnbsd_store_inferior_registers): Likewise.
10315         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10316         ppcobsd_store_registers): Likewise.
10317         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10318         Likewise.
10319         * ravenscar-thread.c (ravenscar_fetch_registers,
10320         ravenscar_store_registers, ravenscar_prepare_to_store):
10321         Likewise.
10322         * record-btrace.c (record_btrace_fetch_registers,
10323         record_btrace_store_registers, record_btrace_prepare_to_store):
10324         Likewise.
10325         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10326         Lookup inferior using ptid from regcache, instead of
10327         current_inferior.
10328         * remote.c (remote_fetch_registers, remote_store_registers): Use
10329         ptid from regcache.
10330         * rs6000-nat.c (fetch_register, store_register): Likewise.
10331         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10332         s390_linux_store_inferior_registers): Likewise.
10333         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10334         shnbsd_store_inferior_registers): Likewise.
10335         * sol-thread.c (sol_thread_fetch_registers,
10336         sol_thread_store_registers): Likewise.
10337         * sparc-nat.c (sparc_fetch_inferior_registers,
10338         sparc_store_inferior_registers): Likewise.
10339         * tilegx-linux-nat.c (fetch_inferior_registers,
10340         store_inferior_registers): Likewise.
10341         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10342         vaxbsd_store_inferior_registers): Likewise.
10343         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10344         store_xtregs): Likewise.
10345
10346 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10347
10348         PR gdb/14441
10349         * NEWS: Mention support for rvalue references in GDB and python.
10350         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10351         supports both lvalue and rvalue references.
10352
10353 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10354
10355         PR gdb/14441
10356         * gdbtypes.c (rank_one_type): Implement overloading
10357         resolution rules regarding rvalue references.
10358
10359 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10360
10361         PR gdb/14441
10362         * aarch64-tdep.c (aarch64_type_align)
10363         (aarch64_extract_return_value, aarch64_store_return_value): Change
10364         lvalue reference type checks to general reference type checks.
10365         * amd64-tdep.c (amd64_classify): Likewise.
10366         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10367         Likewise.
10368         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10369         (arm_store_return_value): Likewise.
10370         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10371         * c-typeprint.c (c_print_type): Likewise.
10372         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10373         (cplus_number_of_children, cplus_describe_child): Likewise.
10374         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10375         * completer.c (expression_completer): Likewise.
10376         * cp-support.c (make_symbol_overload_list_adl_namespace):
10377         Likewise.
10378         * darwin-nat-info.c (info_mach_region_command): Likewise.
10379         * dwarf2loc.c (entry_data_value_coerce_ref)
10380         (value_of_dwarf_reg_entry): Likewise.
10381         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10382         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10383         Likewise.
10384         * findvar.c (extract_typed_address, store_typed_address):
10385         Likewise.
10386         * gdbtypes.c (rank_one_type): Likewise.
10387         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10388         * infcall.c (value_arg_coerce): Likewise.
10389         * language.c (pointer_type): Likewise.
10390         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10391         Likewise.
10392         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10393         * mn10300-tdep.c (mn10300_type_align): Likewise.
10394         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10395         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10396         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10397         Likewise.
10398         * printcmd.c (print_formatted, x_command): Likewise.
10399         * python/py-type.c (typy_get_composite, typy_template_argument):
10400         Likewise.
10401         * python/py-value.c (valpy_referenced_value)
10402         (valpy_get_dynamic_type, value_has_field): Likewise.
10403         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10404         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10405         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10406         * spu-tdep.c (spu_scalar_value_p): Likewise.
10407         * symtab.c (lookup_symbol_aux): Likewise.
10408         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10409         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10410         Likewise.
10411         * valops.c (value_cast_pointers, value_cast)
10412         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10413         (value_struct_elt, value_struct_elt_bitpos)
10414         (value_find_oload_method_list, find_overload_match)
10415         (value_rtti_indirect_type): Likewise.
10416         * valprint.c (val_print_scalar_type_p, generic_val_print):
10417         Likewise.
10418         * value.c (value_actual_type, value_as_address, unpack_long)
10419         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10420         (coerce_ref): Likewise.
10421         * varobj.c (varobj_get_value_type): Likewise.
10422
10423 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10424
10425         PR gdb/14441
10426         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10427         table of constants.
10428         * python/lib/gdb/command/explore.py: Support exploring values
10429         of rvalue reference types.
10430         * python/lib/gdb/types.py: Implement get_basic_type() for
10431         rvalue reference types.
10432         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10433         constant.
10434         * python/py-value.c (valpy_getitem): Add an rvalue reference
10435         check.
10436         (valpy_reference_value): Add new parameter "refcode".
10437         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10438         New wrappers for valpy_reference_value().
10439         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10440         (gdbpy_invoke_xmethod): Likewise.
10441
10442 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10443
10444         PR gdb/14441
10445         * dwarf2read.c (process_die, read_type_die_1): Handle the
10446         DW_TAG_rvalue_reference_type DIE.
10447         (read_tag_reference_type): Add new parameter "refcode".
10448
10449 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10450
10451         PR gdb/14441
10452         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10453         (c_type_print_modifier, c_type_print_varspec_suffix)
10454         (c_type_print_base): Support printing rvalue reference types.
10455         * c-valprint.c (c_val_print, c_value_print): Support printing
10456         rvalue reference values.
10457
10458 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10459
10460         PR gdb/14441
10461         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10462         typename.
10463         * cp-support.c (replace_typedefs): Handle
10464         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10465         * python/py-type.c (typy_lookup_type): Likewise.
10466
10467 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10468
10469         PR gdb/14441
10470         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10471         * parse.c (insert_type): Change assert statement.
10472         (follow_types): Handle rvalue reference types.
10473         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10474         constant.
10475
10476 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10477
10478         PR gdb/14441
10479         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10480         value_ref() interface.
10481         * c-valprint.c (c_value_print): Likewise.
10482         * infcall.c (value_arg_coerce): Likewise.
10483         * python/py-value.c (valpy_reference_value): Likewise.
10484         * valops.c (value_cast, value_reinterpret_cast)
10485         (value_dynamic_cast, typecmp): Likewise.
10486         (value_ref): Parameterize by kind of return value reference type.
10487         * value.h (value_ref): Add new parameter "refcode".
10488
10489 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10490
10491         PR gdb/14441
10492         * dwarf2read.c (read_tag_reference_type): Use
10493         lookup_lvalue_reference_type() instead of lookup_reference_type().
10494         * eval.c (evaluate_subexp_standard): Likewise.
10495         * f-exp.y: Likewise.
10496         * gdbtypes.c (make_reference_type, lookup_reference_type):
10497         Generalize with rvalue reference types.
10498         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10499         convenience wrappers for lookup_reference_type().
10500         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10501         reference kind parameter.
10502         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10503         wrappers for lookup_reference_type().
10504         * guile/scm-type.c (gdbscm_type_reference): Use
10505         lookup_lvalue_reference_type() instead of lookup_reference_type().
10506         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10507         * parse.c (follow_types): Likewise.
10508         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10509         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10510         Likewise.
10511         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10512         (gdbpy_invoke_xmethod): Likewise.
10513         * stabsread.c: Provide extra argument to make_reference_type()
10514         call.
10515         * valops.c (value_ref, value_rtti_indirect_type): Use
10516         lookup_lvalue_reference_type() instead of lookup_reference_type().
10517
10518 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10519
10520         PR gdb/14441
10521         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10522         (TYPE_IS_REFERENCE): New macro.
10523         (struct type): Add rvalue_reference_type field.
10524         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10525
10526 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10527
10528         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10529         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10530         New function definition.
10531         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10532         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10533         New function declaration.
10534         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10535         * mi/mi-interp.h: New file.
10536         * solib.c (info_sharedlibrary_command): Replace for loop with
10537         ALL_SO_LIBS macro
10538         * solib.h (update_solib_list): New function declaration.
10539         (so_list_head): Move macro.
10540         * solist.h (ALL_SO_LIBS): New macro.
10541
10542 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10543
10544         * infcmd.c (post_create_inferior): Remove unused argument in
10545         call to solib_add.
10546         * remote.c (remote_start_remote): Likewise.
10547         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10548         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10549         (enable_break): Likewise.
10550         * solib.c (update_solib_list): Remove unused target argument
10551         and its documentation.
10552         (solib_add): Remove unused target argument.  Remove unused
10553         argument in call to update_solib_list.
10554         (info_sharedlibrary_command): Remove unused argument in call
10555         to update_solib_list.
10556         (sharedlibrary_command): Remove unused argument in call to
10557         solib_add.
10558         (handle_solib_event): Likewise.
10559         (reload_shared_libraries): Likewise.
10560         * solib.h (solib_add): Remove unused target argument.
10561
10562 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10563
10564         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10565         (s390_displaced_step_fixup): Cover relative branches with the
10566         default fixup handling.  This fixes lack of support for some
10567         relative branch instructions.
10568
10569 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10570
10571         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10572         ptid from regcache.
10573
10574 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10575
10576         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10577         i386_darwin_store_inferior_registers): Use ptid from regcache.
10578
10579 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10580
10581         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10582         i386bsd_store_inferior_registers): Use ptid from regcache.
10583
10584 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10585
10586         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10587         hppaobsd_store_registers): Use ptid from regcache.
10588
10589 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10590
10591         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10592         hppanbsd_store_registers): Use ptid from regcache.
10593
10594 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10595
10596         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10597         from regcache.  Use get_ptrace_pid.
10598
10599 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10600
10601         * corelow.c (get_core_register_section): Use ptid from regcache,
10602         update doc.
10603
10604 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10605
10606         * bsd-uthread.c (bsd_uthread_fetch_registers,
10607         bsd_uthread_store_registers): Use ptid from regcache, set and
10608         restore inferior_ptid.
10609
10610 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10611
10612         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10613         fetch_fp_regs, store_register, store_regs, store_fp_register,
10614         store_fp_regs): Use ptid from regcache.
10615
10616 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10617
10618         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10619         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10620         store_vfp_regs): Use ptid from regcache.
10621
10622 2017-03-17  Pedro Alves  <palves@redhat.com>
10623
10624         PR remote/21188
10625         * ser-base.c (ser_base_wait_for): Add comment.
10626         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10627         version.
10628         * ser-unix.c (hardwire_raw): Remove reference to
10629         scb->current_timeout.
10630         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10631         (hardwire_ops): Install ser_base_readchar instead of
10632         hardwire_readchar.
10633         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10634         Remove fields.
10635
10636 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10637
10638         PR gdb/19637
10639         * python/lib/gdb/printer/bound_registers.py: Add support for
10640         Python 3.
10641
10642 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10643
10644         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10645         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10646         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10647         byte_offset to subobj_byte_offset.  Fix the handling of
10648         DWARF_VALUE_STACK on big-endian targets when coming via an
10649         implicit pointer.
10650         (dwarf2_evaluate_loc_desc): Adjust call to
10651         dwarf2_evaluate_loc_desc_full.
10652         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10653         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10654
10655 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10656
10657         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10658         and REVSH instructions.
10659
10660 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10661
10662         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10663         (arm_record_test): Declare.
10664         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10665         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10666         align with the manual.
10667         (thumb_record_misc): Adjust the code order to align with the
10668         manual.
10669         (thumb2_record_decode_insn_handler): Fix instruction matching.
10670         (instruction_reader_thumb): New class.
10671         (arm_record_test): New function.
10672
10673 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10674
10675         * arm-tdep.c (abstract_memory_reader): New class.
10676         (instruction_reader): New class.
10677         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10678         (decode_insn): Likewise.
10679
10680 2017-03-16  Doug Evans  <dje@google.com>
10681
10682         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10683         member.  Change type of TYPE member to SCM.  All uses updated.
10684         (lsscm_make_lazy_string_smob): Add assert.
10685         (lsscm_make_lazy_string): Flag bad length values.
10686         (lsscm_elt_type): New function.
10687         (gdbscm_lazy_string_to_value): Rewrite to use
10688         lsscm_safe_lazy_string_to_value.
10689         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10690         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10691         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10692         in incoming type.
10693         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10694         * guile/scm-type.c (tyscm_scm_to_type): New function.
10695
10696 2017-03-15  Doug Evans  <dje@google.com>
10697
10698         PR python/17728, python/18439, python/18779
10699         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10700         member.  Change type of TYPE member to PyObject *.  All uses updated.
10701         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10702         (gdbpy_create_lazy_string_object): Flag bad length values.
10703         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10704         Handle typedefs in incoming type.
10705         (stpy_lazy_string_elt_type): New function.
10706         (gdbpy_extract_lazy_string): Call it.
10707         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10708         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10709         typedefs in incoming type.
10710
10711 2017-03-16  Doug Evans  <dje@google.com>
10712
10713         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10714         * guile/scm-type.c (tyscm_scm_to_type): New function.
10715
10716 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10717
10718         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10719         "ULONGEST" for "skip".
10720
10721 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10722
10723         PR gdb/21220
10724         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10725         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10726         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10727         over ptrace peek/poke until end of buffer or error.
10728
10729 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10730
10731         * parse.c (length_of_subexp): Make static.
10732         * parser-defs.h (length_of_subexp): Remove.
10733
10734 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10735
10736         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10737         as well.
10738
10739 2017-03-14  Pedro Alves  <palves@redhat.com>
10740
10741         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10742         (main): Use std::unique_ptr.  Remove calls to
10743         cp_demangled_name_parse_free.
10744
10745 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10746
10747         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10748         alphabsd_store_inferior_registers): Use regcache->ptid instead
10749         of inferior_ptid.
10750
10751 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10752
10753         * aix-thread.c (aix_thread_fetch_registers,
10754         aix_thread_store_registers): Use regcache->ptid instead of
10755         inferior_ptid.
10756
10757 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10758
10759         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10760         store_gregs_to_thread, fetch_fpregs_from_thread,
10761         store_fpregs_to_thread): Use regcache->ptid instead of
10762         inferior_ptid.
10763
10764 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10765
10766         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10767         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10768         instead of inferior_ptid.
10769
10770 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10771
10772         * target.c (target_fetch_registers, target_store_registers): Add
10773         assert.
10774
10775 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10776
10777         * regcache.h (regcache_get_ptid): New function.
10778         * regcache.c (regcache_get_ptid): New function.
10779
10780 2017-03-13  Mark Wielaard  <mark@klomp.org>
10781
10782         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10783
10784 2017-03-10  Keith Seitz  <keiths@redhat.com>
10785
10786         PR c++/8218
10787         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10788
10789 2017-03-08  Pedro Alves  <palves@redhat.com>
10790
10791         PR gdb/18360
10792         * infrun.c (start_step_over, do_target_resume, resume)
10793         (restart_threads): Assert we're not resuming a thread that is
10794         meant to be stopped.
10795         (infrun_thread_stop_requested_callback): Delete.
10796         (infrun_thread_stop_requested): If the thread is internally
10797         stopped, queue a pending stop event and clear the thread's
10798         inline-frame state.
10799         (handle_stop_requested): New function.
10800         (handle_syscall_event, handle_inferior_event_1): Use
10801         handle_stop_requested.
10802         (handle_stop_requested): New function.
10803         (handle_signal_stop): Set the thread's stop_signal here instead of
10804         at caller.
10805         (finish_step_over): Clear step over info unconditionally.
10806         (handle_signal_stop): If the user had interrupted the event
10807         thread, consider the stop a random signal.
10808         (handle_signal_stop) <signal arrived while stepping over
10809         breakpoint>: Don't restart threads here.
10810         (stop_waiting): Don't clear step-over info here.
10811
10812 2017-03-08  Pedro Alves  <palves@redhat.com>
10813
10814         PR 21206
10815         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10816         goes to argument 2, not 1.
10817
10818 2017-03-08  Pedro Alves  <palves@redhat.com>
10819
10820         PR cli/21218
10821         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10822         display_gdb_prompt.
10823         (command_line_input): Add comment.
10824
10825 2017-03-08  Pedro Alves  <palves@redhat.com>
10826
10827         PR tui/21216
10828         * tui/tui-file.c (tui_file::write): New.
10829         * tui/tui-file.h (tui_file): Override "write".
10830         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10831         factored out from ...
10832         (tui_puts): ... here.
10833         (tui_putc): Use them.
10834         (tui_write): New function.
10835         * tui/tui-io.h (tui_write): Declare.
10836
10837 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10838
10839         * Makefile.in (SFILES): Replace "environ.c" with
10840         "common/environ.c".
10841         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10842         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10843         to...
10844         * common/environ.c: ... here.
10845         * environ.h: Moved to...
10846         * common/environ.h: ... here.
10847
10848 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10849
10850         * gdbarch.sh (pstring_ptr): New static function.
10851         (gdbarch_disassembler_options): Use it.
10852         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10853         not valid_disassembler_option->name.
10854         * gdbarch.c: Regenerate.
10855
10856 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10857
10858         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10859
10860 2017-03-07  Pedro Alves  <palves@redhat.com>
10861
10862         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10863
10864 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10865
10866         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10867         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10868         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10869         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10870
10871 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10872
10873         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10874
10875 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10876
10877         * remote.c (remote_add_target_side_commands): Use range-based
10878         for loop.
10879
10880 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10881
10882         PR gdb/21165
10883         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10884         value is lazy.
10885         * valprint.c (common_val_print): Likewise.
10886
10887 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10888
10889         * NEWS: Mention new set/show disassembler-options commands.
10890         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10891         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10892         (prospective_options): New static variable.
10893         (gdb_disassembler::gdb_disassembler): Initialize
10894         m_di.disassembler_options.
10895         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10896         (get_disassembler_options): New function.
10897         (set_disassembler_options): Likewise.
10898         (set_disassembler_options_sfunc): Likewise.
10899         (show_disassembler_options_sfunc): Likewise.
10900         (disassembler_options_completer): Likewise.
10901         (_initialize_disasm): Likewise.
10902         * disasm.h (get_disassembler_options): New prototype.
10903         (set_disassembler_options): Likewise.
10904         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10905         (gdbarch_verify_disassembler_options): Likewise.
10906         * gdbarch.c: Regenerate.
10907         * gdbarch.h: Likewise.
10908         * arm-tdep.c (num_disassembly_options): Delete.
10909         (set_disassembly_style): Likewise.
10910         (arm_disassembler_options): New static variable.
10911         (set_disassembly_style_sfunc): Convert short style name into long
10912         option name.  Call set_disassembler_options.
10913         (show_disassembly_style_sfunc): New function.
10914         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10915         set_gdbarch_verify_disassembler_options.
10916         (_initialize_arm_tdep): Delete regnames variable and update callers.
10917         (arm_disassembler_options): Initialize.
10918         (disasm_options): New variable.
10919         (num_disassembly_options): Rename from this...
10920         (num_disassembly_styles): ...to this.  Compute by scanning through
10921         disasm_options.
10922         (valid_disassembly_styles): Initialize using disasm_options.
10923         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10924         set_arm_regname_option.
10925         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10926         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10927         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10928         set_gdbarch_verify_disassembler_options.
10929         * s390-tdep.c (s390_disassembler_options): New static variable.
10930         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10931         set_gdbarch_verify_disassembler_options.
10932
10933 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10934
10935         * remote.c (remote_add_target_side_condition): Remove "struct"
10936         keyword from range-based for loop.
10937
10938 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10939
10940         * remote.c (remote_add_target_side_condition): Use range-based
10941         for loop.  Update comment.
10942
10943 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10944
10945         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10946
10947 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10948
10949         * regcache.c (regcache_raw_update): New function.
10950         (regcache_raw_read): Move code to regcache_raw_update.
10951         * regcache.h (regcache_raw_update): New declaration.
10952         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10953
10954 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10955
10956         * dwarf2read.c (create_debug_type_hash_table): Initialize
10957         header.signature and header.type_offset_in_tu.
10958
10959 2017-02-24  Pedro Alves  <palves@redhat.com>
10960
10961         * symtab.c (make_file_symbol_completion_list_1): Use
10962         add_symtab_completions.
10963
10964 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10965
10966         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10967
10968 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10969
10970         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10971         I386_MAX_REGISTER_SIZE.
10972         (i386_pseudo_register_write): Likewise.
10973         (i386_process_record): Likewise.
10974         * i387-tdep.c (i387_supply_xsave): Likewise.
10975         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10976         (store_register): Likewise.
10977
10978 2017-02-23  Pedro Alves  <palves@redhat.com>
10979
10980         * ada-lang.c: Include "common/function-view.h".
10981         (ada_iterate_over_symbols): Adjust to use function_view as
10982         callback type.
10983         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10984         (ada_make_symbol_completion_list): Use a lambda.
10985         (ada_exc_search_name_matches): Delete.
10986         (name_matches_regex): New.
10987         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10988         * compile/compile-c-support.c: Include "common/function-view.h".
10989         (print_one_macro): Change prototype to accept a ui_file pointer.
10990         (write_macro_definitions): Use a lambda.
10991         * dwarf2read.c: Include "common/function-view.h".
10992         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10993         (dw2_expand_symtabs_matching): Adjust to use function_view as
10994         callback type.
10995         * language.h: Include "common/function-view.h".
10996         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10997         function_view as callback type.
10998         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10999         * linespec.c: Include "common/function-view.h".
11000         (collect_info::add_symbol): New method.
11001         (struct symbol_and_data_callback, iterate_inline_only, struct
11002         symbol_matcher_data, iterate_name_matcher): Delete.
11003         (iterate_over_all_matching_symtabs): Adjust to use function_view
11004         as callback type and lambdas.
11005         (iterate_over_file_blocks): Adjust to use function_view as
11006         callback type.
11007         (decode_compound_collector): Now a class with private fields.
11008         (decode_compound_collector::release_symbols): New method.
11009         (collect_one_symbol): Rename to...
11010         (decode_compound_collector::operator()): ... this and adjust.
11011         (lookup_prefix_sym): decode_compound_collector construction bits
11012         move to decode_compound_collector ctor.  Pass the
11013         decode_compound_collector object directly as callback.  Remove
11014         cleanups and use decode_compound_collector::release_symbols
11015         instead.
11016         (symtab_collector): Now a class with private fields.
11017         (symtab_collector::release_symtabs): New method.
11018         (add_symtabs_to_list): Rename to...
11019         (symtab_collector::operator()): ... this and adjust.
11020         (collect_symtabs_from_filename): symtab_collector construction
11021         bits move to symtab_collector ctor.  Pass the symtab_collector
11022         object directly as callback.  Remove cleanups and use
11023         symtab_collector::release_symtabs instead.
11024         (collect_symbols): Delete.
11025         (add_matching_symbols_to_info): Use lambdas.
11026         * macrocmd.c (print_macro_callback): Delete.
11027         (info_macro_command): Use a lambda.
11028         (info_macros_command): Pass print_macro_definition as callable
11029         directly.
11030         (print_one_macro): Remove 'ignore' parameter.
11031         (macro_list_command): Adjust.
11032         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11033         (macro_for_each_data::user_data): Delete field.
11034         (foreach_macro): Adjust to call the function_view.
11035         (macro_for_each): Adjust to use function_view as callback type.
11036         (foreach_macro_in_scope): Adjust to call the function_view.
11037         (macro_for_each_in_scope): Adjust to use function_view as callback
11038         type.
11039         * macrotab.h: Include "common/function-view.h".
11040         (macro_callback_fn): Declare a prototype instead of a pointer.
11041         Remove "user_data" parameter.
11042         (macro_for_each, macro_for_each_in_scope): Adjust to use
11043         function_view as callback type.
11044         * psymtab.c (partial_map_expand_apply)
11045         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11046         Adjust to use function_view as callback type and to return bool.
11047         (psym_expand_symtabs_matching): Adjust to use function_view as
11048         callback types.
11049         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11050         to use function_view as callback type and to return bool.
11051         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11052         callback types.
11053         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11054         as callback types.
11055         * symfile.h: Include "common/function-view.h".
11056         (expand_symtabs_file_matcher_ftype)
11057         (expand_symtabs_symbol_matcher_ftype)
11058         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11059         return bool.
11060         (quick_symbol_functions::map_symtabs_matching_filename)
11061         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11062         function_view as callback type and return bool.
11063         (expand_symtabs_matching): Adjust to use function_view as callback
11064         type.
11065         (maintenance_expand_name_matcher)
11066         (maintenance_expand_file_matcher): Delete.
11067         (maintenance_expand_symtabs): Use lambdas.
11068         * symtab.c (iterate_over_some_symtabs): Adjust to use
11069         function_view as callback types and return bool.
11070         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11071         of a cleanup.
11072         (lookup_symtab_callback): Delete.
11073         (lookup_symtab): Use a lambda.
11074         (iterate_over_symbols): Adjust to use function_view as callback
11075         type.
11076         (struct search_symbols_data, search_symbols_file_matches)
11077         (search_symbols_name_matches): Delete.
11078         (search_symbols): Use a pair of lambdas.
11079         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11080         (symtab_expansion_callback): Delete.
11081         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11082         * symtab.h: Include "common/function-view.h".
11083         (iterate_over_some_symtabs): Adjust to use function_view as
11084         callback type and return bool.
11085         (iterate_over_symtabs): Adjust to use function_view as callback
11086         type.
11087         (symbol_found_callback_ftype): Remove 'data' parameter and return
11088         bool.
11089         (iterate_over_symbols): Adjust to use function_view as callback
11090         type.
11091
11092 2017-02-23  Pedro Alves  <palves@redhat.com>
11093
11094         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11095         (%.o) <unittests/%.c>: New pattern.
11096         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11097         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11098         * common/function-view.h: New file.
11099         * unittests/function-view-selftests.c: New file.
11100         * configure: Regenerate.
11101
11102 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11103
11104         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11105         inferior_ptid.
11106         * go32-nat.c (go32_thread_alive): Likewise.
11107
11108 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11109
11110         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11111         delete.
11112
11113 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11114
11115         * varobj.c (varobj_clear_saved_item): Use delete instead of
11116         xfree.
11117         (update_dynamic_varobj_children): Likewise.
11118
11119 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11120
11121         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11122
11123 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11124
11125         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11126         m_enum_value to 0 in default constructor.
11127
11128 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11129
11130         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11131         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11132         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11133         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11134         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11135         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11136         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11137         IS_STORE_CONDITIONAL_INSN.
11138
11139 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11140
11141         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11142
11143 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11144
11145         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11146
11147 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11148
11149         * dwarf2read.c (skip_one_die, read_attribute_value)
11150         (dwarf2_const_value_attr, dump_die_shallow)
11151         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11152         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11153
11154 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11155
11156         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11157         (dwarf_parse_macro_header): Accept DWARF version 5.
11158         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11159
11160 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11161
11162         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11163         DW_AT_GNU_*.
11164         * common/common-exceptions.h (enum errors): Likewise.
11165         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11166         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11167         (dwarf_expr_context::execute_stack_op): Likewise.
11168         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11169         Likewise.
11170         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11171         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11172         (show_entry_values_debug, call_site_to_target_addr)
11173         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11174         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11175         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11176         (value_of_dwarf_block_entry, indirect_pieced_value)
11177         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11178         (disassemble_dwarf_expression): Likewise.
11179         * dwarf2read.c (process_die, inherit_abstract_dies)
11180         (read_call_site_scope): Likewise.
11181         * gdbtypes.h (struct func_type, struct call_site_parameter)
11182         (struct call_site): Likewise.
11183         * stack.c (read_frame_arg): Likewise.
11184         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11185
11186 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11187
11188         * defs.h (read_unsigned_leb128): New declaration.
11189         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11190         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11191         (dwarf2_find_location_expression): Call also
11192         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11193         * dwarf2loc.h (dwarf2_version): New declaration.
11194         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11195         rnglists.
11196         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11197         .debug_rnglists.
11198         (struct dwop_section_names): Add loclists_dwo.
11199         (dwop_section_names): Add .debug_loclists.dwo.
11200         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11201         (struct dwarf2_per_cu_data): Add dwarf_version.
11202         (struct dwo_sections): Add loclists.
11203         (struct attr_abbrev): Add implicit_const.
11204         (read_indirect_line_string): New declaration.
11205         (read_unsigned_leb128): Delete declaration.
11206         (rcuh_kind): New definition.
11207         (read_and_check_comp_unit_head): Change parameter
11208         is_debug_types_section to section_kind.
11209         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11210         (read_comp_unit_head): Change parameter abfd to section, add parameter
11211         section_kind.  Handle DWARF-5.
11212         (error_check_comp_unit_head): Accept also DWARF version 5.
11213         (read_and_check_comp_unit_head): Change parameter
11214         is_debug_types_section to section_kind.
11215         (read_and_check_type_unit_head): Delete function.
11216         (read_abbrev_offset): Handle DWARF-5.
11217         (create_debug_type_hash_table): Add parameter section_kind.  Process
11218         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11219         comp_unit_head.
11220         (create_debug_types_hash_table): Update create_debug_type_hash_table
11221         caller.
11222         (create_all_type_units): Call create_debug_type_hash_table.
11223         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11224         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11225         caller.
11226         (skip_one_die): Handle DW_FORM_implicit_const.
11227         (dwarf2_rnglists_process): New function.
11228         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11229         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11230         (read_attribute_value): Handle DW_FORM_implicit_const,
11231         DW_FORM_line_strp.
11232         (read_attribute): Handle DW_FORM_implicit_const.
11233         (read_indirect_string_at_offset_from): New function from
11234         read_indirect_string_at_offset.
11235         (read_indirect_string_at_offset): Call
11236         read_indirect_string_at_offset_from.
11237         (read_indirect_line_string_at_offset): New function.
11238         (read_indirect_string): New function comment.
11239         (read_indirect_line_string): New function.
11240         (read_unsigned_leb128): Make it global.
11241         (dwarf2_string_attr): Handle DWARF-5.
11242         (add_include_dir_stub, read_formatted_entries): New functions.
11243         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11244         Handle DWARF-5.
11245         (per_cu_header_read_in): Update read_comp_unit_head caller.
11246         (dwarf2_version): New function.
11247         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11248         rnglists.
11249         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11250         fields.
11251
11252 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11253
11254         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11255
11256 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11257
11258         * dwarf2read.c (dwarf2_ranges_process): New function from
11259         dwarf2_ranges_read.
11260         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11261         dwarf2_ranges_process.
11262
11263 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11264
11265         * dwarf2read.c (create_debug_type_hash_table): New function from
11266         create_debug_types_hash_table.
11267         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11268         (create_all_type_units, open_and_init_dwo_file): Update
11269         create_debug_types_hash_table callers.
11270
11271 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11272
11273         PR gdb/16188
11274         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11275         refer to 'ap', not 'args'.
11276
11277 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11278             Pedro Alves  <palves@redhat.com>
11279
11280         PR gdb/16188
11281         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11282         calls succeeded.
11283         * fork-child.c (trace_start_error): New function.
11284         (trace_start_error_with_name): Likewise.
11285         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11286         * inf-ptrace.c (inf_ptrace_me): Likewise.
11287         * inferior.h (trace_start_error): New prototype.
11288         (trace_start_error_with_name): Likewise.
11289
11290 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11291
11292         PR gdb/21164
11293         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11294         NULL before using it.
11295         * symmisc.c (maintenance_print_symbols): Likewise.
11296         (maintenance_print_msymbols): Likewise.
11297
11298 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11299
11300         * NEWS: Add record Python bindings entry.
11301
11302 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11303
11304         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11305         py-record-full.o.
11306         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11307         * python/py-record-btrace.c, python/py-record-btrace.h,
11308         python/py-record-full.c, python/py-record-full.h: New file.
11309         * python/py-record.c: Add include for py-record-btrace.h and
11310         py-record-full.h.
11311         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11312         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11313         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11314         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11315         New definition.
11316         (gdbpy_initialize_btrace): New export.
11317         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11318
11319 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11320
11321         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11322         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11323         * python/py-record.c: New file.
11324         * python/python-internal.h (gdbpy_start_recording,
11325         gdbpy_current_recording, gdpy_stop_recording,
11326         gdbpy_initialize_record): New export.
11327         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11328         (python_GdbMethods): Add gdbpy_start_recording,
11329         gdbpy_current_recording and gdbpy_stop_recording.
11330
11331 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11332
11333         * record-btrace.c (record_btrace_record_method): New function.
11334         (init_record_btrace_ops): Initialize to_record_method.
11335         * record-full.c (record_full_record_method): New function.
11336         (init_record_full_ops, init_record_full_core_ops): Add
11337         record_full_record_method.
11338         * record.h (enum record_method): New enum.
11339         * target-debug.h (target_debug_print_enum_record_method: New define.
11340         * target-delegates.c: Regenerate.
11341         * target.c (target_record_method): New function.
11342         * target.h: Include record.h.
11343         (struct target_ops) <to_record_method>: New field.
11344         (target_record_method): New export.
11345
11346 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11347
11348         * record.h (record_start, record_stop): New export.
11349         * record.c (record_start, record_stop): New function.
11350
11351 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11352
11353         * btrace.c (btrace_fetch): Copy function call segments pointer
11354         into a vector.
11355         (btrace_clear): Clear the vector.
11356         (btrace_find_insn_by_number): Use binary search to find the correct
11357         function call segment.
11358         * btrace.h (brace_fun_p): New typedef.
11359         (struct btrace_thread_info) <functions>: New field.
11360
11361 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11362
11363         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11364         * btrace.c (btrace_decode_error): ... here.  New function.
11365         * btrace.h (btrace_decode_error): New export.
11366
11367 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11368
11369         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11370         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11371         btrace_find_insn_by_number): Remove special case for gaps.
11372         * btrace.h (btrace_insn_get_error): New export.
11373         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11374         * record-btrace.c (btrace_insn_history): Print number for gaps.
11375         (record_btrace_info, record_btrace_goto): Handle gaps.
11376
11377 2017-02-14  Tom Tromey  <tom@tromey.com>
11378
11379         PR python/13598:
11380         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11381         event.
11382         * python/py-evts.c (gdbpy_initialize_py_events): Add
11383         before_prompt registry.
11384         * python/py-events.h (events_object) <before_prompt>: New field.
11385
11386 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11387
11388         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11389
11390 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11391
11392         * symfile (_initialize_symfile): Add usage text to the load command's
11393         help text.
11394
11395 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * utils.c (defaulted_query): Don't query on secondary UIs.
11398
11399 2017-02-10  Tom Tromey  <tom@tromey.com>
11400
11401         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11402
11403 2017-02-10  Tom Tromey  <tom@tromey.com>
11404
11405         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11406         "cleanup" local.
11407         * python/py-type.c (typy_legacy_template_argument): Remove
11408         unnecessary "cleanup" local.
11409
11410 2017-02-10  Tom Tromey  <tom@tromey.com>
11411
11412         * python/python.c (do_start_initialization): New function, from
11413         _initialize_python.
11414         (_initialize_python): Call do_start_initialization.
11415         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11416         goto.
11417
11418 2017-02-10  Tom Tromey  <tom@tromey.com>
11419
11420         * python/py-prettyprint.c (pretty_print_one_value): Use
11421         gdbpy_ref.
11422
11423 2017-02-10  Tom Tromey  <tom@tromey.com>
11424
11425         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11426         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11427         gdbpy_ref.
11428         * python/py-type.c (field_new): Use gdbpy_ref.
11429         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11430         gdbpy_ref.
11431         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11432         (py_free_pspace): Likewise.
11433         (pspace_to_pspace_object): Likewise.
11434         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11435         (py_free_objfile): Likewise.
11436         (objfile_to_objfile_object): Likewise.
11437         * python/py-inferior.c (delete_thread_object): Use
11438         gdbpy_ref.
11439         (infpy_read_memory): Likewise.
11440         (py_free_inferior): Likewise.
11441         * python/py-evtregistry.c (create_eventregistry_object): Use
11442         gdbpy_ref.
11443         * python/py-event.c (create_event_object): Use gdbpy_ref.
11444
11445 2017-02-10  Tom Tromey  <tom@tromey.com>
11446
11447         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11448         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11449         used.
11450         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11451         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11452         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11453         python/py-framefilter.c, python/py-function.c,
11454         python/py-inferior.c, python/py-infevents.c,
11455         python/py-linetable.c, python/py-newobjfileevent.c,
11456         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11457         python/py-signalevent.c, python/py-stopevent.c,
11458         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11459         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11460         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11461         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11462
11463 2017-02-10  Tom Tromey  <tom@tromey.com>
11464
11465         * ui-out.h (ui_out_emit_type): New class.
11466         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11467         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11468         and ui_out_emit_tuple.
11469         (enumerate_locals): Likewise.
11470         (py_mi_print_variables, py_print_locals, py_print_args): Use
11471         ui_out_emit_list.
11472         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11473         ui_out_emit_list.
11474         * common/gdb_optional.h: New file.
11475
11476 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11477
11478         * MAINTAINERS (Write After Approval): Update my e-mail address.
11479
11480 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11481
11482         PR gdb/21122
11483         * breakpoint.c (_initialize_breakpoint): Update the help description
11484         of the 'commands' command to indicate that it takes a list argument.
11485
11486 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11487
11488         * interps.c (current_interp_set_logging): Remove "return".
11489
11490 2017-02-09  Gary Benson  <gbenson@redhat.com>
11491
11492         * symtab.c (add_symtab_completions): Prevent NULL pointer
11493         dereference.
11494
11495 2017-02-08  Pedro Alves  <palves@redhat.com>
11496
11497         * interps.c (interp::interp): Remove reference to quiet_p.
11498         (interp_set): Make static.  Remove dead "Switching to" output
11499         code.
11500         (interp_quiet_p, interp_set_quiet): Delete.
11501         (interpreter_exec_cmd): Don't set the interpreter quiet.
11502         * interps.h (interp_quiet_p): Make static.
11503         (class interp) <quiet_p>: Remove field
11504
11505 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11506
11507         * cli/cli-decode.c (find_command_name_length): Make it extern.
11508         * cli/cli-decode.h (find_command_name_length): Declare.
11509         * cli/cli-script.c (command_name_equals, line_first_arg):
11510         New functions.
11511         (process_next_line): Use cli-decode to parse command names.
11512         (build_command_line): Make args a constant pointer.
11513
11514 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11515
11516         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11517         Remove case-insensitive search.
11518
11519 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11520
11521         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11522         at the end of the line.  Avoids an ARI warning.
11523
11524 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11525
11526         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11527         rdseed instructions.
11528         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11529
11530 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11531
11532         PR tdep/20936
11533         Provide and use sparc32 and sparc64 target description XML files.
11534         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11535         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11536         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11537         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11538         * features/sparc/sparc32-solaris.xml: New file.
11539         * features/sparc/sparc64-solaris.xml: New file.
11540         * features/sparc/sparc32-solaris.c: Generated.
11541         * features/sparc/sparc64-solaris.c: Generated.
11542         * sparc-tdep.h: Account for differences in target descriptions.
11543         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11544         (sparc32_register_type): Use target provided registers.
11545         (validate_tdesc_registers): New function.
11546         (sparc32_gdbarch_init): Use tdesc_has_registers.
11547         Set pseudoregister functions.
11548         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11549         (sparc64_register_type): Use target provided registers.
11550         (sparc64_init_abi): Set pseudoregister functions.
11551
11552 2017-02-03  Tom Tromey  <tom@tromey.com>
11553
11554         PR rust/21097:
11555         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11556         with a single member.
11557
11558 2017-02-03  Pedro Alves  <palves@redhat.com>
11559
11560         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11561         (cli_interp_base::~cli_interp_base): New.
11562         (cli_interp): New struct.
11563         (as_cli_interp): Cast the interp itself to cli_interp.
11564         (cli_interpreter_pre_command_loop): Rename to ...
11565         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11566         parameter.
11567         (cli_interpreter_init): Rename to ...
11568         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11569         boolean.  Make extern.
11570         (cli_interpreter_resume): Rename to ...
11571         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11572         extern.
11573         (cli_interpreter_suspend): Rename to ...
11574         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11575         extern.
11576         (cli_interpreter_exec): Rename to ...
11577         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11578         extern.
11579         (cli_interpreter_supports_command_editing): Rename to ...
11580         (cli_interp_base::supports_command_editing): ... this.  Remove
11581         'interp' parameter.  Make extern.
11582         (cli_ui_out): Rename to ...
11583         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11584         Make extern.
11585         (cli_set_logging): Rename to ...
11586         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11587         parameter.  Make extern.
11588         (cli_interp_procs): Delete.
11589         (cli_interp_factory): Adjust to use "new".
11590         * cli/cli-interp.h: Include "interps.h".
11591         (struct cli_interp_base): New struct.
11592         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11593         (interp_new): Delete.
11594         (interp::interp, interp::~interp): New.
11595         (interp_set): Use bool, and return void.  Assume the interpreter
11596         has suspend, init and resume methods, and that the all return
11597         void.
11598         (set_top_level_interpreter): interp_set returns void.
11599         (interp_ui_out): Adapt.
11600         (current_interp_set_logging): Adapt.
11601         (interp_data): Delete.
11602         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11603         (interp_exec): Adapt.
11604         (top_level_interpreter_data): Delete.
11605         * interps.h (interp_init_ftype, interp_resume_ftype)
11606         (interp_suspend_ftype, interp_exec_ftype)
11607         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11608         (class interp): New.
11609         (interp_new): Delete.
11610         (interp_set): Now returns void.  Use bool.
11611         (interp_data, top_level_interpreter_data): Delete.
11612         * mi/mi-common.h: Include interps.h.
11613         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11614         init, resume, suspect, exec, interp_ui_out, set_logging and
11615         pre_command_loop methods.
11616         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11617         (mi_interpreter_init): Rename to ...
11618         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11619         bool, return void and make extern.  Adjust.
11620         (mi_interpreter_resume): ... Rename to ...
11621         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11622         return void and make extern.  Adjust.
11623         (mi_interpreter_suspend): ... Rename to ...
11624         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11625         return void and make extern.  Adjust.
11626         (mi_interpreter_exec): ... Rename to ...
11627         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11628         extern.  Adjust.
11629         (mi_interpreter_pre_command_loop): ... Rename to ...
11630         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11631         parameter and make extern.
11632         (mi_on_normal_stop_1): Adjust.
11633         (mi_ui_out): Rename to ...
11634         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11635         parameter and make extern.  Adjust.
11636         (mi_set_logging): Rename to ...
11637         (mi_interp::set_logging): ... this.  Remove the 'interp'
11638         parameter and make extern.  Adjust.
11639         (mi_interp_procs): Delete.
11640         (mi_interp_factory): Adjust to use 'new'.
11641         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11642         (mi_print_exception, mi_execute_command, mi_load_progress):
11643         Adjust.
11644         * tui/tui-interp.c (tui_interp): New class.
11645         (as_tui_interp): Return a tui_interp pointer.
11646         (tui_on_normal_stop, tui_on_signal_received)
11647         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11648         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11649         to use interp::interp_ui_out.
11650         (tui_init): Rename to ...
11651         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11652         bool, return void and make extern.  Adjust.
11653         (tui_resume): Rename to ...
11654         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11655         return void and make extern.  Adjust.
11656         (tui_suspend): Rename to ...
11657         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11658         return void and make extern.  Adjust.
11659         (tui_ui_out): Rename to ...
11660         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11661         parameter, and make extern.  Adjust.
11662         (tui_exec): Rename to ...
11663         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11664         make extern.
11665         (tui_interp_procs): Delete.
11666         (tui_interp_factory): Use "new".
11667
11668 2017-02-02  Tom Tromey  <tom@tromey.com>
11669
11670         * rust-exp.y (ends_raw_string, space_then_number)
11671         (rust_identifier_start_p): Return bool.
11672         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11673         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11674         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11675         (rust_chartype_p): Return bool.
11676         (val_print_struct, rust_print_struct_def, rust_print_type):
11677         Update.
11678         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11679         Return bool.
11680
11681 2017-02-02  Tom Tromey  <tom@tromey.com>
11682
11683         * rust-lang.c: Reindent.
11684
11685 2017-02-02  Tom Tromey  <tom@tromey.com>
11686
11687         * rust-lang.h (rust_crate_for_block): Update.
11688         * rust-lang.c (rust_crate_for_block): Return std::string.
11689         (rust_get_disr_info): Use std:;string, not
11690         gdb::unique_xmalloc_ptr.
11691         * rust-exp.y (crate_name): Update.
11692
11693 2017-02-02  Pedro Alves  <palves@redhat.com>
11694
11695         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11696         field out of gdb_disassembler_test and make it static.
11697
11698 2017-02-02  Pedro Alves  <palves@redhat.com>
11699
11700         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11701         mi1_interp and mi_interp fields.
11702
11703 2017-02-02  Pedro Alves  <palves@redhat.com>
11704
11705         * cli/cli-interp.c (struct saved_output_files, saved_output):
11706         Moved from cli/cli-logging.c.
11707         (cli_set_logging): New function.
11708         (cli_interp_procs): Install cli_set_logging.
11709         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11710         Declare.
11711         * cli/cli-logging.c (struct saved_output_files, saved_output):
11712         Moved to cli/cli-interp.c.
11713         (pop_output_files): Don't save outputs here.
11714         (make_logging_output): New function.
11715         (handle_redirections): Don't build tee nor save previous outputs
11716         here.
11717         * interps.c (current_interp_set_logging): Change prototype.
11718         Assume there's always a set_logging_proc method installed.
11719         * interps.h (interp_set_logging_ftype): Change prototype.
11720         (current_interp_set_logging): Change prototype and adjust comment.
11721         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11722         use make_logging_output.
11723         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11724 2017-02-02  Pedro Alves  <palves@redhat.com>
11725
11726         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11727         from ...
11728         (set_logging_overwrite): ... here.
11729         (logging_no_redirect_file): Delete.
11730         (set_logging_redirect): Don't handle redirection on the fly.
11731         Instead warn that "logging off" / "logging on" is necessary.
11732         (pop_output_files): Delete references to logging_no_redirect_file.
11733         (show_logging_command): Always speak in terms of what will happen
11734         once logging is reenabled.
11735
11736 2017-02-02  Pedro Alves  <palves@redhat.com>
11737
11738         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11739
11740 2017-02-02  Pedro Alves  <palves@redhat.com>
11741
11742         * disasm.c (gdb_pretty_print_insn): Rename to ...
11743         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11744         Remove gdbarch parameter.  Adapt to clear the object's buffers
11745         instead of allocating new buffers, and to print using the object's
11746         gdb_disassembler instead of calling gdb_print_insn.
11747         (dump_insns): Use gdb_pretty_print_disassembler.
11748         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11749         (gdb_pretty_print_disassembler): New class.
11750         * record-btrace.c (btrace_insn_history): Use
11751         gdb_pretty_print_disassembler.
11752
11753 2017-02-02  Pedro Alves  <palves@redhat.com>
11754
11755         * ada-lang.c (type_as_string): Use string_file.
11756         * ada-valprint.c (ada_print_floating): Use string_file.
11757         * ada-varobj.c (ada_varobj_scalar_image)
11758         (ada_varobj_get_value_image): Use string_file.
11759         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11760         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11761         * breakpoint.c (update_inserted_breakpoint_locations)
11762         (insert_breakpoint_locations, reattach_breakpoints)
11763         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11764         (print_it_watchpoint): Use string_file.
11765         (save_breakpoints): Use stdio_file.
11766         * c-exp.y (oper): Use string_file.
11767         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11768         tee_file.
11769         (pop_output_files): Use delete.
11770         (handle_redirections): Use stdio_file and tee_file.
11771         * cli/cli-setshow.c (do_show_command): Use string_file.
11772         * compile/compile-c-support.c (c_compute_program): Use
11773         string_file.
11774         * compile/compile-c-symbols.c (generate_vla_size): Take a
11775         'string_file &' instead of a 'ui_file *'.
11776         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11777         of a 'ui_file *'.  Use string_file.
11778         (generate_c_for_variable_locations): Take a 'string_file &'
11779         instead of a 'ui_file *'.
11780         * compile/compile-internal.h (generate_c_for_for_one_variable):
11781         Take a 'string_file &' instead of a 'ui_file *'.
11782         * compile/compile-loc2c.c (push, pushf, unary, binary)
11783         (print_label, pushf_register_address, pushf_register)
11784         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11785         'ui_file *'.  Adjust.
11786         * compile/compile.c (compile_to_object): Use string_file.
11787         * compile/compile.h (compile_dwarf_expr_to_c)
11788         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11789         'ui_file *'.
11790         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11791         (replace_typedefs_qualified_name): Use string_file and
11792         obstack_copy0.
11793         * disasm.c (gdb_pretty_print_insn): Use string_file.
11794         (gdb_disassembly): Adjust reference the null_stream global.
11795         (do_ui_file_delete): Delete.
11796         (gdb_insn_length): Use null_stream.
11797         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11798         * dwarf2loc.c (dwarf2_compile_property_to_c)
11799         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11800         'string_file &' instead of a 'ui_file *'.
11801         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11802         * dwarf2read.c (do_ui_file_peek_last): Delete.
11803         (dwarf2_compute_name): Use string_file.
11804         * event-top.c (gdb_setup_readline): Use stdio_file.
11805         * gdbarch.sh (verify_gdbarch): Use string_file.
11806         * gdbtypes.c (safe_parse_type): Use null_stream.
11807         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11808         string_file.
11809         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11810         'string_file *' instead of a 'ui_file *'.
11811         (gdbscm_arch_disassemble): Use string_file.
11812         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11813         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11814         inherits from ui_file.
11815         (ioscm_file_port_delete, ioscm_file_port_rewind)
11816         (ioscm_file_port_put): Delete.
11817         (ioscm_file_port_write): Rename to ...
11818         (ioscm_file_port::write): ... this.  Remove file_port_magic
11819         checks.
11820         (ioscm_file_port_new): Delete.
11821         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11822         ui_file_up.
11823         * guile/scm-type.c (tyscm_type_name): Use string_file.
11824         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11825         Use string_file.
11826         * infcmd.c (print_return_value_1): Use string_file.
11827         * infrun.c (print_target_wait_results): Use string_file.
11828         * language.c (add_language): Use string_file.
11829         * location.c (explicit_to_string_internal): Use string_file.
11830         * main.c (captured_main_1): Use null_file.
11831         * maint.c (maintenance_print_architecture): Use stdio_file.
11832         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11833         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11834         event_channel>: Change type to mi_console_file pointer.
11835         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11836         (mi_console_file_delete): Delete.
11837         (struct mi_console_file): Delete.
11838         (mi_console_file_magic): Delete.
11839         (mi_console_file_new): Delete.
11840         (mi_console_file::mi_console_file): New.
11841         (mi_console_file_delete): Delete.
11842         (mi_console_file_fputs): Delete.
11843         (mi_console_file::write): New.
11844         (mi_console_raw_packet): Delete.
11845         (mi_console_file::flush): New.
11846         (mi_console_file_flush): Delete.
11847         (mi_console_set_raw): Rename to ...
11848         (mi_console_file::set_raw): ... this.
11849         * mi/mi-console.h (class mi_console_file): New class.
11850         (mi_console_file_new, mi_console_set_raw): Delete.
11851         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11852         (mi_set_logging): Use delete and tee_file.  Adjust.
11853         * mi/mi-main.c (output_register): Use string_file.
11854         (mi_cmd_data_evaluate_expression): Use string_file.
11855         (mi_cmd_data_read_memory): Use string_file.
11856         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11857         * mi/mi-out.c (mi_ui_out::main_stream): New.
11858         (mi_ui_out::rewind): Use main_stream and
11859         string_file.
11860         (mi_ui_out::put): Use main_stream and string_file.
11861         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11862         Allocate a 'string_file' instead.
11863         (mi_out_new): Don't allocate a mem_fileopen stream here.
11864         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11865         (mi_ui_out::main_stream): Declare method.
11866         * printcmd.c (eval_command): Use string_file.
11867         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11868         * python/py-arch.c (archpy_disassemble): Use string_file.
11869         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11870         * python/py-frame.c (frapy_str): Use string_file.
11871         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11872         Use string_file.
11873         * python/py-type.c (typy_str): Use string_file.
11874         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11875         * python/py-value.c (valpy_str): Use string_file.
11876         * record-btrace.c (btrace_insn_history): Use string_file.
11877         * regcache.c (regcache_print): Use stdio_file.
11878         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11879         * remote.c (escape_buffer): Use string_file.
11880         * rust-lang.c (rust_get_disr_info): Use string_file.
11881         * serial.c (serial_open_ops_1): Use stdio_file.
11882         (do_serial_close): Use delete.
11883         * stack.c (print_frame_arg): Use string_file.
11884         (print_frame_args): Remove local mem_fileopen stream, not used.
11885         (print_frame): Use string_file.
11886         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11887         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11888         Take a 'string_file *' instead of a 'ui_file *'.
11889         * top.c (new_ui): Use stdio_file and stderr_file.
11890         (free_ui): Use delete.
11891         (execute_command_to_string): Use string_file.
11892         (quit_confirm): Use string_file.
11893         * tracepoint.c (collection_list::append_exp): Use string_file.
11894         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11895         * tui/tui-file.c: Don't include "ui-file.h".
11896         (enum streamtype, struct tui_stream): Delete.
11897         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11898         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11899         (tui_file::tui_file): New method.
11900         (tui_file_fputs): Delete.
11901         (tui_file_get_strbuf): Delete.
11902         (tui_file::puts): New method.
11903         (tui_file_adjust_strbuf): Delete.
11904         (tui_file_flush): Delete.
11905         (tui_file::flush): New method.
11906         * tui/tui-file.h: Tweak intro comment.
11907         Include ui-file.h.
11908         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11909         (tui_file_adjust_strbuf): Delete declarations.
11910         (class tui_file): New class.
11911         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11912         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11913         (tui_register_format): Use string_stream.
11914         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11915         (tui_get_function_from_frame): Use string_file.
11916         * typeprint.c (type_to_string): Use string_file.
11917         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11918         (null_stream): New global.
11919         (ui_file_delete): Delete.
11920         (ui_file::ui_file): New.
11921         (null_file_isatty): Delete.
11922         (ui_file::~ui_file): New.
11923         (null_file_rewind): Delete.
11924         (ui_file::printf): New.
11925         (null_file_put): Delete.
11926         (null_file_flush): Delete.
11927         (ui_file::putstr): New.
11928         (null_file_write): Delete.
11929         (ui_file::putstrn): New.
11930         (null_file_read): Delete.
11931         (ui_file::putc): New.
11932         (null_file_fputs): Delete.
11933         (null_file_write_async_safe): Delete.
11934         (ui_file::vprintf): New.
11935         (null_file_delete): Delete.
11936         (null_file::write): New.
11937         (null_file_fseek): Delete.
11938         (null_file::puts): New.
11939         (ui_file_data): Delete.
11940         (null_file::write_async_safe): New.
11941         (gdb_flush, ui_file_isatty): Adjust.
11942         (ui_file_put, ui_file_rewind): Delete.
11943         (ui_file_write): Adjust.
11944         (ui_file_write_for_put): Delete.
11945         (ui_file_write_async_safe, ui_file_read): Adjust.
11946         (ui_file_fseek): Delete.
11947         (fputs_unfiltered): Adjust.
11948         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11949         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11950         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11951         (set_ui_file_data): Delete.
11952         (string_file::~string_file, string_file::write)
11953         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11954         (do_ui_file_as_string, ui_file_as_string): Delete.
11955         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11956         (struct mem_file): Delete.
11957         (mem_file_new): Delete.
11958         (stdio_file::stdio_file): New.
11959         (mem_file_delete): Delete.
11960         (stdio_file::stdio_file): New.
11961         (mem_fileopen): Delete.
11962         (stdio_file::~stdio_file): New.
11963         (mem_file_rewind): Delete.
11964         (stdio_file::set_stream): New.
11965         (mem_file_put): Delete.
11966         (stdio_file::open): New.
11967         (mem_file_write): Delete.
11968         (stdio_file_magic, struct stdio_file): Delete.
11969         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11970         (stdio_file::flush): New.
11971         (stdio_file_read): Rename to ...
11972         (stdio_file::read): ... this.  Adjust.
11973         (stdio_file_write): Rename to ...
11974         (stdio_file::write): ... this.  Adjust.
11975         (stdio_file_write_async_safe): Rename to ...
11976         (stdio_file::write_async_safe) ... this.  Adjust.
11977         (stdio_file_fputs): Rename to ...
11978         (stdio_file::puts) ... this.  Adjust.
11979         (stdio_file_isatty): Delete.
11980         (stdio_file_fseek): Delete.
11981         (stdio_file::isatty): New.
11982         (stderr_file_write): Rename to ...
11983         (stderr_file::write) ... this.  Adjust.
11984         (stderr_file_fputs): Rename to ...
11985         (stderr_file::puts) ... this.  Adjust.
11986         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11987         (stderr_file::stderr_file): New.
11988         (tee_file_magic): Delete.
11989         (struct tee_file): Delete.
11990         (tee_file::tee_file): New.
11991         (tee_file_new): Delete.
11992         (tee_file::~tee_file): New.
11993         (tee_file_delete): Delete.
11994         (tee_file_flush): Rename to ...
11995         (tee_file::flush): ... this.  Adjust.
11996         (tee_file_write): Rename to ...
11997         (tee_file::write): ... this.  Adjust.
11998         (tee_file::write_async_safe): New.
11999         (tee_file_fputs): Rename to ...
12000         (tee_file::puts): ... this.  Adjust.
12001         (tee_file_isatty): Rename to ...
12002         (tee_file::isatty): ... this.  Adjust.
12003         * ui-file.h (struct obstack, struct ui_file): Don't
12004         forward-declare.
12005         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12006         (ui_file_write_ftype)
12007         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12008         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12009         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12010         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12011         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12012         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12013         (set_ui_file_fseek): Delete.
12014         (ui_file_data, ui_file_delete, ui_file_rewind)
12015         (struct ui_file): New.
12016         (ui_file_up): New.
12017         (class null_file): New.
12018         (null_stream): Declare.
12019         (ui_file_write_for_put, ui_file_put): Delete.
12020         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12021         Delete.
12022         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12023         (gdb_fopen, tee_file_new): Delete.
12024         (struct string_file): New.
12025         (struct stdio_file): New.
12026         (stdio_file_up): New.
12027         (struct stderr_file): New.
12028         (class tee_file): New.
12029         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12030         of a 'ui_file *'.  Adjust.
12031         * ui-out.h (class ui_out) <field_stream>: Likewise.
12032         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12033         (null_stream): Delete.
12034         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12035         Adjust.
12036         * utils.h (struct ui_file): Delete forward declaration..
12037         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12038         (error_stream): Take a 'string_file &' instead of a
12039         'ui_file *'.
12040         * varobj.c (varobj_value_get_print_value): Use string_file.
12041         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12042         * gdbarch.c: Regenerate.
12043
12044 2017-02-02  Pedro Alves  <palves@redhat.com>
12045
12046         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12047         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12048         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12049         Adjust to call gdb_print_insn instead of
12050         gdb_disassembler::print_insn.
12051         (dump_insns, do_mixed_source_and_assembly_deprecated)
12052         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12053         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12054         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12055         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12056         declaration.
12057         (gdb_pretty_print_insn): Re-add declaration.
12058         * record-btrace.c (btrace_insn_history): Don't allocate a
12059         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12060
12061 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12062
12063         * disasm.h (gdb_disassembly): Remove file_string parameter.
12064         * disasm.c (gdb_disassembly): Likewise.
12065         * cli/cli-cmds.c (print_disassembly): Adapt.
12066         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12067         * stack.c (do_gdb_disassembly): Likewise.
12068
12069 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12070
12071         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12072         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12073         targets.  And if the implicit value is longer than needed, extract
12074         the first bytes instead of the "least significant" ones.
12075
12076 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12077
12078         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12079         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12080         (btrace_fetch): Assert can_access_registers_ptid.
12081         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12082         validate_registers_access.
12083
12084 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12085
12086         * gdbthread.h (can_access_registers_ptid): New.
12087         * thread.c (can_access_registers_ptid): New.
12088
12089 2017-02-01  Pedro Alves  <palves@redhat.com>
12090
12091         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12092
12093 2017-01-31  Pedro Alves  <palves@redhat.com>
12094
12095         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12096         Fix typos.
12097
12098 2017-01-31  Pedro Alves  <palves@redhat.com>
12099
12100         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12101         not used.
12102
12103 2017-01-31  Pedro Alves  <palves@redhat.com>
12104
12105         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12106
12107 2017-01-31  Pedro Alves  <palves@redhat.com>
12108
12109         * common/scoped_restore.h
12110         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12111         change the value's parameter type to T2.
12112         (make_scoped_restore): Likewise.
12113
12114 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12115             Richard Henderson  <rth@redhat.com>
12116
12117         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12118         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12119         GS_BASE for older kernels.
12120         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12121         GS_BASE for older kernels.
12122         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12123         and GS_BASE to the offset table.
12124         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12125         system register group.
12126         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12127         for older kernels.
12128         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12129         amd64 ABI.
12130         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12131         AMD64_GSBASE_REGNUM.
12132         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12133         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12134         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12135         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12136         i386/64bit-segments.xml in those rules.
12137         * features/i386/64bit-segments.xml: New file.
12138         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12139         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12140         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12141         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12142         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12143         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12144         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12145         * features/i386/amd64-avx-linux.c: Regenerated.
12146         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12147         * features/i386/amd64-avx-mpx.c: Regenerated.
12148         * features/i386/amd64-avx512-linux.c: Regenerated.
12149         * features/i386/amd64-linux.c: Regenerated.
12150         * features/i386/amd64-mpx-linux.c: Regenerated.
12151         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12152         * features/i386/i386-avx-mpx.c: Regenerated.
12153         * features/i386/x32-avx-linux.c: Regenerated.
12154         * features/i386/x32-avx512-linux.c: Regenerated.
12155         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12156         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12157         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12158         * regformats/i386/amd64-linux.dat: Regenerated.
12159         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12160         * regformats/i386/x32-avx-linux.dat: Regenerated.
12161         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12162         * regformats/i386/x32-linux.dat: Regenerated.
12163
12164 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12165
12166         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12167         Set to AMD64_NUM_REGS.
12168
12169 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12170
12171         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12172         that checks validity of a register number.
12173
12174 2017-01-27  Kees Cook  <keescook@google.com>
12175
12176         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12177         fetch_fpregs if target has fpa registers.
12178         (arm_linux_store_inferior_registers): Call store_fpregs if target
12179         has fpa registers.
12180
12181 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12182
12183         * cris-tdep.c (cris_gdbarch_init): Remove check for
12184         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12185
12186 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12187
12188         * corelow.c (get_core_register_section): Check for regset
12189         existence before checking for REGSET_VARIABLE_SIZE.
12190
12191 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12192             Pedro Alves  <palves@redhat.com>
12193
12194         PR gdb/20939
12195         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12196         call memory_error, save memaddr instead.
12197         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12198         negative, cal memory_error.
12199         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12200
12201 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12202
12203         * disasm-selftests.c (memory_error_test): New function.
12204         (_initialize_disasm_selftests): Register memory_error_test.
12205
12206 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12207
12208         * Makefile.in (SFILES): Add disasm-selftests.c and
12209         selftest-arch.c.
12210         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12211         * disasm-selftests.c: New file.
12212         * selftest-arch.c: New file.
12213         * selftest-arch.h: New file.
12214
12215 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12216
12217         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12218         to bfd_arch_mep.  Don't return 0 if section is not
12219         found.  Call print_insn_mep.
12220
12221 2017-01-26  Pedro Alves  <palves@redhat.com>
12222             Yao Qi  <yao.qi@linaro.org>
12223
12224         * arm-tdep.c: Include "disasm.h".
12225         (gdb_print_insn_arm): Update code to get gdbarch.
12226         * disasm.c (dis_asm_read_memory): Change it to
12227         gdb_disassembler::dis_asm_read_memory.
12228         (dis_asm_memory_error): Likewise.
12229         (dis_asm_print_address): Likewise.
12230         (gdb_pretty_print_insn): Change it to
12231         gdb_disassembler::pretty_print_insn.
12232         (dump_insns): Add one argument gdb_disassemlber.  All
12233         callers updated.
12234         (do_mixed_source_and_assembly_deprecated): Likewise.
12235         (do_mixed_source_and_assembly): Likewise.
12236         (do_assembly_only): Likewise.
12237         (gdb_disassembler::gdb_disassembler): New.
12238         (gdb_disassembler::print_insn): New.
12239         * disasm.h (class gdb_disassembler): New.
12240         (gdb_pretty_print_insn): Remove declaration.
12241         (gdb_disassemble_info): Likewise.
12242         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12243         (gdbscm_disasm_read_memory_worker): Update.
12244         (gdbscm_disasm_read_memory): Update.
12245         (gdbscm_disasm_memory_error): Remove.
12246         (gdbscm_disasm_print_address): Remove.
12247         (gdbscm_disassembler::gdbscm_disassembler): New.
12248         (gdbscm_print_insn_from_port): Update.
12249         * mips-tdep.c: Include disasm.h.
12250         (gdb_print_insn_mips): Update code to get gdbarch.
12251         * record-btrace.c (btrace_insn_history): Update.
12252         * spu-tdep.c: Include disasm.h.
12253         (struct spu_dis_asm_data): Remove.
12254         (struct spu_dis_asm_info): New.
12255         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12256         SPU id.
12257         (gdb_print_insn_spu): Cast disassemble_info to
12258         spu_dis_asm_info.
12259
12260 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12261
12262         * disasm.c (do_ui_file_delete): Delete.
12263         (gdb_insn_length): Move code creating stream to ...
12264         * utils.c (null_stream): ... here.  New function.
12265         * utils.h (null_stream): Declare.
12266
12267 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12268
12269         * python/py-inferior.c (find_thread_object): Return directly
12270         from the loop.  Remove "found" variable.
12271
12272 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12273
12274         GDB 7.12.1 released.
12275
12276 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12277
12278         * python/py-function.c (fnpy_call): Reorder declarations to have
12279         the gdbpy_enter object declared first.
12280         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12281
12282 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12283
12284         PR python/21068
12285         * python/python-internal.h (PyMem_RawMalloc): Define for
12286         Python < 3.4.
12287         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12288         PyMem_RawMalloc instead of PyMem_Malloc.
12289
12290 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12291             Luis Machado  <lgustavo@codesourcery.com>
12292
12293         * NEWS (New commands): Mention flash-erase.
12294         (New MI commands): Mention target-flash-erase.
12295         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12296         command.
12297         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12298         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12299         * target.c (flash_erase_command): New function.
12300         (initialize_targets): Add new flash-erase command.
12301         * target.h (flash_erase_command): New declaration.
12302
12303 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12304
12305         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12306         HAVE_SYS_PROCFS_H is defined.
12307
12308 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12309
12310         * remote.c (struct cached_reg): Change data into a pointer.
12311         * (stop_reply_dtr): Free data pointers before deleting vector.
12312         (process_stop_reply): Likewise.
12313         (remote_parse_stop_reply): Allocate space for data
12314
12315 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12316
12317         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12318         MAX_REGISTER_SIZE.
12319         (amd64_pseudo_register_read_value): Likewise.
12320         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12321         (store_register_using_P): Likewise.
12322         * regcache.c (regcache_xfer_part): Likewise.
12323
12324 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12325
12326         Split real and pseudo registers.
12327         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12328         (sparc32_pseudo_regnum): New enum.
12329         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12330         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12331         (SPARC32_CP0_REGISTERS): New macro.
12332         (sparc32_pseudo_register_name): New function.
12333         (sparc32_register_name): Use sparc32_pseudo_register_name.
12334         (sparc32_pseudo_register_type): New function.
12335         (sparc32_register_type): Use sparc32_pseudo_register_type.
12336         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12337         pseudo register numbers.
12338         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12339         (SPARC64_CP0_REGISTERS): New macro.
12340         (sparc64_pseudo_register_name): New function.
12341         (sparc64_register_name): Use sparc64_pseudo_register_name.
12342         (sparc64_pseudo_register_type): New function.
12343         (sparc64_register_type): Use sparc64_pseudo_register_type.
12344         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12345         pseudo register numbers.
12346         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12347         sparc64_store_arguments): Handle pseudo register numbers.
12348
12349 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12350
12351         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12352         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12353         output.
12354         (getpkt_or_notif_sane_1): Likewise.
12355
12356 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12357
12358         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12359         of CC.  Pass "-x c++-header" instead of "-x c".
12360
12361 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12362
12363         * remote.c (remote_can_async_p): Update comment.
12364
12365 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12366
12367         * linux-nat.c (linux_nat_can_async_p): Update comment.
12368
12369 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12370
12371         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12372
12373 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12374
12375         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12376
12377 2017-01-10  Tom Tromey  <tom@tromey.com>
12378
12379         * python/py-type.c (typy_legacy_template_argument): Update.
12380         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12381         ~demangle_parse_info): Declare new members.
12382         (cp_demangled_name_to_comp): Return unique_ptr.
12383         (cp_demangled_name_parse_free)
12384         (make_cleanup_cp_demangled_name_parse_free)
12385         (cp_new_demangle_parse_info): Remove.
12386         * cp-support.c (do_demangled_name_parse_free_cleanup)
12387         (make_cleanup_cp_demangled_name_parse_free): Remove.
12388         (inspect_type, cp_canonicalize_string_full)
12389         (cp_canonicalize_string): Update.
12390         (mangled_name_to_comp): Change return type.
12391         (cp_class_name_from_physname, method_name_from_physname)
12392         (cp_func_name, cp_remove_params): Update.
12393         * cp-name-parser.y (demangle_parse_info): New constructor, from
12394         cp_new_demangle_parse_info.
12395         (~demangle_parse_info): New destructor, from
12396         cp_demangled_name_parse_free.
12397         (cp_merge_demangle_parse_infos): Update.
12398         (cp_demangled_name_to_comp): Change return type.
12399
12400 2017-01-10  Tom Tromey  <tom@tromey.com>
12401
12402         * top.c (prevent_dont_repeat): Change return type.
12403         * python/python.c (execute_gdb_command): Use std::string.
12404         Update.
12405         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12406         * command.h (prevent_dont_repeat): Change return type.
12407         * breakpoint.c (bpstat_do_actions_1): Update.
12408
12409 2017-01-10  Tom Tromey  <tom@tromey.com>
12410
12411         * value.h (scoped_value_mark::~scoped_value_mark): Call
12412         free_to_mark.
12413         (scoped_value_mark::free_to_mark): New method.
12414         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12415         scoped_value_mark.
12416
12417 2017-01-10  Tom Tromey  <tom@tromey.com>
12418
12419         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12420         (valpy_reference_value, valpy_const_value, valpy_get_address)
12421         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12422         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12423         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12424         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12425         scoped_value_mark.
12426         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12427         * value.h (scoped_value_mark): New class.
12428
12429 2017-01-10  Tom Tromey  <tom@tromey.com>
12430
12431         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12432         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12433         * psymtab.c (discard_psymtabs_upto): Remove.
12434         (make_cleanup_discard_psymtabs): Remove.
12435         (struct psymtab_state): Remove.
12436
12437 2017-01-10  Tom Tromey  <tom@tromey.com>
12438
12439         * record-full.c (record_full_save_cleanups): Remove.
12440         (record_full_save): Use gdb::unlinker.
12441         * gcore.c (do_bfd_delete_cleanup): Remove.
12442         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12443         cleanups.
12444         * dwarf2read.c (unlink_if_set): Remove.
12445         (write_psymtabs_to_index): Use gdb::unlinker.
12446         * common/gdb_unlinker.h: New file.
12447
12448 2017-01-10  Tom Tromey  <tom@tromey.com>
12449
12450         * windows-tdep.c (windows_xfer_shared_library): Update.
12451         * windows-nat.c (windows_make_so): Update.
12452         * utils.h (make_cleanup_bfd_unref): Remove.
12453         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12454         * symfile.h (symfile_bfd_open)
12455         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12456         * symfile.c (read_symbols, symbol_file_add)
12457         (separate_debug_file_exists): Update.
12458         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12459         (generic_load, reread_symbols): Update.
12460         * symfile-mem.c (symbol_file_add_from_memory): Update.
12461         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12462         (spu_symbol_file_add_from_memory): Update.
12463         * solist.h (struct target_so_ops) <bfd_open>: Return
12464         gdb_bfd_ref_ptr.
12465         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12466         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12467         gdb_bfd_ref_ptr.
12468         (solib_map_sections, reload_shared_libraries_1): Update.
12469         * solib-svr4.c (enable_break): Update.
12470         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12471         * solib-frv.c (enable_break2): Update.
12472         * solib-dsbt.c (enable_break): Update.
12473         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12474         gdb_bfd_ref_ptr.
12475         (darwin_solib_get_all_image_info_addr_at_init): Update.
12476         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12477         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12478         * record-full.c (record_full_save): Update.
12479         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12480         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12481         * minidebug.c (find_separate_debug_file_in_section): Return
12482         gdb_bfd_ref_ptr.
12483         * machoread.c (macho_add_oso_symfile): Change abfd to
12484         gdb_bfd_ref_ptr.
12485         (macho_symfile_read_all_oso): Update.
12486         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12487         (macho_symfile_read): Update.
12488         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12489         (jit_bfd_try_read_symtab): Update.
12490         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12491         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12492         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12493         gdb_bfd_ref_ptr.
12494         (gdb_bfd_ref_policy): New struct.
12495         (gdb_bfd_ref_ptr): New typedef.
12496         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12497         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12498         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12499         gdb_bfd_ref_ptr.
12500         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12501         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12502         (gcore_command): Update.
12503         * exec.c (exec_file_attach): Update.
12504         * elfread.c (elf_symfile_read): Update.
12505         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12506         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12507         (open_and_init_dwo_file): Update.
12508         (open_dwp_file): Return gdb_bfd_ref_ptr.
12509         (open_and_init_dwp_file): Update.
12510         * corelow.c (core_open): Update.
12511         * compile/compile-object-load.c (compile_object_load): Update.
12512         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12513         * coffread.c (coff_symfile_read): Update.
12514         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12515         gdb_bfd_ref_ptr.  Rename.
12516         (dump_bfd_file, restore_command): Update.
12517         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12518         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12519         (find_separate_debug_file_by_buildid): Update.
12520
12521 2017-01-10  Tom Tromey  <tom@tromey.com>
12522
12523         * common/gdb_ref_ptr.h: New file.
12524         * python/py-ref.h (struct gdbpy_ref_policy): New.
12525         (gdbpy_ref): Now a typedef.
12526
12527 2017-01-10  Tom Tromey  <tom@tromey.com>
12528
12529         * utils.h (make_cleanup_htab_delete): Don't declare.
12530         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12531         Remove.
12532         * linespec.c (decode_compound_collector): Add constructor,
12533         destructor.
12534         (lookup_prefix_sym): Remove cleanup.
12535         (symtab_collector): Add constructor, destructor.
12536         (collect_symtabs_from_filename): Remove cleanup.
12537         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12538         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12539         Use htab_up.
12540         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12541         * dwarf2read.c (dw2_expand_symtabs_matching)
12542         (dw2_map_symbol_filenames, dwarf_decode_macros)
12543         (write_psymtabs_to_index): Use htab_up.
12544         * dwarf2loc.c (func_verify_no_selftailcall)
12545         (call_site_find_chain_1, func_verify_no_selftailcall)
12546         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12547         std::vector, gdb::unique_xmalloc_ptr.
12548         (call_sitep): Remove typedef.
12549         (dwarf2_locexpr_baton_eval): Remove unused variable.
12550
12551 2017-01-10  Tom Tromey  <tom@tromey.com>
12552
12553         * python/python-internal.h (make_cleanup_py_decref)
12554         (make_cleanup_py_xdecref): Don't declare.
12555         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12556         (py_xdecref, make_cleanup_py_xdecref): Remove.
12557
12558 2017-01-10  Tom Tromey  <tom@tromey.com>
12559
12560         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12561         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12562
12563 2017-01-10  Tom Tromey  <tom@tromey.com>
12564
12565         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12566
12567 2017-01-10  Tom Tromey  <tom@tromey.com>
12568
12569         * python/py-utils.c (unicode_to_encoded_string)
12570         (python_string_to_target_string)
12571         (python_string_to_target_python_string)
12572         (python_string_to_host_string, gdbpy_obj_to_string)
12573         (get_addr_from_python): Use gdbpy_ref.
12574
12575 2017-01-10  Tom Tromey  <tom@tromey.com>
12576
12577         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12578         gdbpy_ref.
12579
12580 2017-01-10  Tom Tromey  <tom@tromey.com>
12581
12582         * python/python.c (eval_python_command, gdbpy_decode_line)
12583         (gdbpy_run_events, gdbpy_start_type_printers)
12584         (gdbpy_apply_type_printers): Use gdbpy_ref.
12585
12586 2017-01-10  Tom Tromey  <tom@tromey.com>
12587
12588         * python/py-param.c (get_doc_string, compute_enum_values): Use
12589         gdbpy_ref.
12590
12591 2017-01-10  Tom Tromey  <tom@tromey.com>
12592
12593         * python/py-inferior.c (find_thread_object, build_inferior_list):
12594         Use gdbpy_ref.
12595
12596 2017-01-10  Tom Tromey  <tom@tromey.com>
12597
12598         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12599
12600 2017-01-10  Tom Tromey  <tom@tromey.com>
12601
12602         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12603         gdbpy_ref.
12604
12605 2017-01-10  Tom Tromey  <tom@tromey.com>
12606
12607         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12608         extra incref.
12609         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12610         Use gdbpy_ref.
12611
12612 2017-01-10  Tom Tromey  <tom@tromey.com>
12613
12614         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12615         gdbpy_ref.
12616
12617 2017-01-10  Tom Tromey  <tom@tromey.com>
12618
12619         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12620         decref results of PyArg_ParseTupleAndKeywords.
12621
12622 2017-01-10  Tom Tromey  <tom@tromey.com>
12623
12624         * python/python.c (python_run_simple_file): Use
12625         unique_xmalloc_ptr, gdbpy_ref.
12626
12627 2017-01-10  Tom Tromey  <tom@tromey.com>
12628
12629         * python/py-prettyprint.c (print_stack_unless_memory_error)
12630         (print_string_repr, print_children): Use gdbpy_ref.
12631         (dummy_python_frame): New class.
12632         (dummy_python_frame::dummy_python_frame): Rename from
12633         push_dummy_python_frame.
12634         (py_restore_tstate): Remove.
12635
12636 2017-01-10  Tom Tromey  <tom@tromey.com>
12637
12638         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12639
12640 2017-01-10  Tom Tromey  <tom@tromey.com>
12641
12642         * python/python.c (ensure_python_env, restore_python_env):
12643         Remove.
12644         * python/python-internal.h (ensure_python_env): Don't declare.
12645         * varobj.h (varobj_ensure_python_env): Don't declare.
12646         * varobj.c (varobj_ensure_python_env): Remove.
12647
12648 2017-01-10  Tom Tromey  <tom@tromey.com>
12649
12650         * varobj.c (varobj_value_get_print_value): Use
12651         gdbpy_enter_varobj.
12652
12653 2017-01-10  Tom Tromey  <tom@tromey.com>
12654
12655         * python/py-prettyprint.c (print_string_repr, print_children):
12656         Update.
12657         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12658         of "encoding".
12659         * varobj.c (varobj_value_get_print_value): Update.
12660         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12661
12662 2017-01-10  Tom Tromey  <tom@tromey.com>
12663
12664         * varobj.c (varobj_get_display_hint)
12665         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12666         (varobj_set_visualizer, free_variable): Use
12667         gdbpy_enter_varobj.
12668
12669 2017-01-10  Tom Tromey  <tom@tromey.com>
12670
12671         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12672         (do_finish_initialization): New function.  Use gdbpy_ref.
12673         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12674         do_finish_initialization.
12675
12676 2017-01-10  Tom Tromey  <tom@tromey.com>
12677
12678         * python/py-param.c (get_set_value, get_show_value): Use
12679         gdbpy_enter, gdbpy_ref.
12680
12681 2017-01-10  Tom Tromey  <tom@tromey.com>
12682
12683         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12684
12685 2017-01-10  Tom Tromey  <tom@tromey.com>
12686
12687         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12688
12689 2017-01-10  Tom Tromey  <tom@tromey.com>
12690
12691         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12692         Use gdbpy_enter_varobj.
12693
12694 2017-01-10  Tom Tromey  <tom@tromey.com>
12695
12696         * varobj.c (gdbpy_enter_varobj): New constructor.
12697         * python/python-internal.h (gdbpy_enter_varobj): New class.
12698         * python/py-varobj.c (py_varobj_get_iterator): Use
12699         gdbpy_enter_varobj.
12700
12701 2017-01-10  Tom Tromey  <tom@tromey.com>
12702
12703         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12704         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12705         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12706         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12707         unique_xmalloc_ptr.
12708         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12709
12710 2017-01-10  Tom Tromey  <tom@tromey.com>
12711
12712         * python/py-xmethods.c (invoke_match_method): Use
12713         gdbpy_ref.
12714
12715 2017-01-10  Tom Tromey  <tom@tromey.com>
12716
12717         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12718         gdbpy_enter, gdbpy_ref.
12719
12720 2017-01-10  Tom Tromey  <tom@tromey.com>
12721
12722         * python/python.c (python_interactive_command): Use gdbpy_enter.
12723
12724 2017-01-10  Tom Tromey  <tom@tromey.com>
12725
12726         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12727         gdbpy_ref.
12728
12729 2017-01-10  Tom Tromey  <tom@tromey.com>
12730
12731         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12732         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12733
12734 2017-01-10  Tom Tromey  <tom@tromey.com>
12735
12736         * utils.h (htab_deleter): New struct.
12737         (htab_up): New typedef.
12738         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12739         gdbpy_enter, gdbpy_ref, htab_up.
12740
12741 2017-01-10  Tom Tromey  <tom@tromey.com>
12742
12743         * python/py-unwind.c (pending_frame_invalidate): Remove.
12744         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12745
12746 2017-01-10  Tom Tromey  <tom@tromey.com>
12747
12748         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12749         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12750
12751 2017-01-10  Tom Tromey  <tom@tromey.com>
12752
12753         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12754
12755 2017-01-10  Tom Tromey  <tom@tromey.com>
12756
12757         * python/python.c (gdbpy_eval_from_control_command)
12758         (gdbpy_source_script, gdbpy_run_events)
12759         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12760         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12761         gdbpy_enter.
12762
12763 2017-01-10  Tom Tromey  <tom@tromey.com>
12764
12765         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12766
12767 2017-01-10  Tom Tromey  <tom@tromey.com>
12768
12769         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12770
12771 2017-01-10  Tom Tromey  <tom@tromey.com>
12772
12773         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12774         (python_on_inferior_call_pre, python_on_inferior_call_post)
12775         (python_on_memory_change, python_on_register_change)
12776         (python_inferior_exit, python_new_objfile, add_thread_object)
12777         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12778
12779 2017-01-10  Tom Tromey  <tom@tromey.com>
12780
12781         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12782         (bpfinishpy_handle_exit): Use gdbpy_enter.
12783
12784 2017-01-10  Tom Tromey  <tom@tromey.com>
12785
12786         * python/py-cmd.c (cmdpy_destroyer)
12787         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12788         gdbpy_enter.
12789
12790 2017-01-10  Tom Tromey  <tom@tromey.com>
12791
12792         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12793         gdbpy_enter.
12794         (gdbpy_breakpoint_has_cond): Likewise.
12795
12796 2017-01-10  Tom Tromey  <tom@tromey.com>
12797
12798         * python/python.c (gdbpy_enter): New constructor.
12799         (~gdbpy_enter): New destructor.
12800         (restore_python_env, ensure_python_env): Rewrite.
12801         * python/python-internal.h (gdbpy_enter): New class.
12802
12803 2017-01-10  Tom Tromey  <tom@tromey.com>
12804
12805         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12806
12807 2017-01-10  Tom Tromey  <tom@tromey.com>
12808
12809         * python/py-value.c (value_has_field, get_field_flag)
12810         (get_field_type, valpy_getitem, convert_value_from_python): Use
12811         gdbpy_ref.
12812
12813 2017-01-10  Tom Tromey  <tom@tromey.com>
12814
12815         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12816         gdbpy_ref.
12817
12818 2017-01-10  Tom Tromey  <tom@tromey.com>
12819
12820         * python/py-prettyprint.c (search_pp_list)
12821         (find_pretty_printer_from_objfiles)
12822         (find_pretty_printer_from_progspace)
12823         (find_pretty_printer_from_gdb, find_pretty_printer)
12824         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12825         gdbpy_ref.
12826
12827 2017-01-10  Tom Tromey  <tom@tromey.com>
12828
12829         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12830
12831 2017-01-10  Tom Tromey  <tom@tromey.com>
12832
12833         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12834         (ltpy_get_all_source_lines): Use gdbpy_ref.
12835
12836 2017-01-10  Tom Tromey  <tom@tromey.com>
12837
12838         * python/py-framefilter.c (extract_sym, extract_value)
12839         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12840         gdbpy_ref.
12841
12842 2017-01-10  Tom Tromey  <tom@tromey.com>
12843
12844         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12845
12846 2017-01-10  Tom Tromey  <tom@tromey.com>
12847
12848         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12849
12850 2017-01-10  Tom Tromey  <tom@tromey.com>
12851
12852         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12853         gdbpy_ref.
12854
12855 2017-01-10  Tom Tromey  <tom@tromey.com>
12856
12857         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12858
12859 2017-01-10  Tom Tromey  <tom@tromey.com>
12860
12861         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12862         (typy_range): Use gdbpy_ref.
12863
12864 2017-01-10  Tom Tromey  <tom@tromey.com>
12865
12866         * python/py-threadevent.c (create_thread_event_object): Use
12867         gdbpy_ref.
12868         * python/py-stopevent.c (create_stop_event_object): Simplify.
12869         (emit_stop_event): Use gdbpy_ref.
12870         * python/py-signalevent.c (create_signal_event_object): Use
12871         gdbpy_ref.
12872         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12873         (emit_new_objfile_event, create_clear_objfiles_event_object)
12874         (emit_clear_objfiles_event): Use gdbpy_ref.
12875         * python/py-infevents.c (create_inferior_call_event_object)
12876         (create_register_changed_event_object)
12877         (create_memory_changed_event_object, emit_inferior_call_event)
12878         (emit_memory_changed_event, emit_register_changed_event): Use
12879         gdbpy_ref.
12880         * python/py-exitedevent.c (create_exited_event_object)
12881         (emit_exited_event): Use gdbpy_ref.
12882         * python/py-event.h (evpy_emit_event): Remove
12883         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12884         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12885         * python/py-continueevent.c (emit_continue_event): Use
12886         gdbpy_ref.
12887         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12888         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12889         gdbpy_ref.
12890         * python/py-bpevent.c (create_breakpoint_event_object): Use
12891         gdbpy_ref.
12892
12893 2017-01-10  Tom Tromey  <tom@tromey.com>
12894
12895         * python/py-ref.h: New file.
12896
12897 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12898
12899         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12900         void.
12901         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12902         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12903         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12904         * ui-out.c (ui_out::redirect): Likewise.
12905         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12906         * cli/cli-logging.c (set_logging_redirect): Update call site of
12907         ui_out::redirect.
12908         (handle_redirections): Likewise.
12909         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12910         * top.c (execute_command_to_string): Likewise.
12911         * utils.c (do_ui_out_redirect_pop): Likewise.
12912
12913 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12914
12915         * stack.c (_initialize_stack): Update "frame" command help message.
12916
12917 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12918
12919         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12920
12921 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12922
12923         * x86-linux-nat.h: Include gdb_proc_service.h.
12924
12925 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12926
12927         * ser-base.h: Include serial.h.
12928
12929 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12930
12931         * ppc-linux-tdep.h: Include ppc-tdep.h.
12932
12933 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12934
12935         * nat/amd64-linux-siginfo.h: Include signal.h.
12936
12937 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12938
12939         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12940
12941 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12942
12943         * mi/mi-parse.h: Include mi-cmds.h.
12944
12945 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12946
12947         * inf-loop.c: Don't include "target.h".
12948         * inf-loop.h: Include it here.
12949
12950 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12951
12952         * dfp.h: Include "dboulest.h" and "expression.h".
12953
12954 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12955
12956         * ax-gdb.h: Include "ax.h".
12957
12958 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12959
12960         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12961         with nat/gdb_ptrace.h.
12962
12963 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12964
12965         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12966         new line.
12967         (mips64_fbsd_sigframe_init): Likewise.
12968
12969 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12970
12971         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12972         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12973
12974 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12975
12976         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12977         * NEWS: Mention new FreeBSD/mips native configuration.
12978         * config/mips/fbsd.mh: New file.
12979         * configure.host: Add mips*-*-freebsd*.
12980         * mips-fbsd-nat.c: New file.
12981
12982 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12983
12984         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12985         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12986         * NEWS: Mention new FreeBSD/mips target.
12987         * configure.tgt: Add mips*-*-freebsd*.
12988         * mips-fbsd-tdep.c: New file.
12989         * mips-fbsd-tdep.h: New file.
12990
12991 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12992
12993         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12994         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12995
12996 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12997
12998         Update copyright year range in all GDB files.
12999
13000 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13001
13002         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13003
13004 For older changes see ChangeLog-2016.
13005 \f
13006 Local Variables:
13007 mode: change-log
13008 left-margin: 8
13009 fill-column: 74
13010 version-control: never
13011 coding: utf-8
13012 End: