Use i386_target_description to get tdesc_i386
[external/binutils.git] / gdb / ChangeLog
1 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2
3         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4         i386_target_description.
5         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6         i386_target_description.
7         * i386-tdep.c (i386_gdbarch_init): Likewise.
8
9 2017-09-04  Yao Qi  <yao.qi@linaro.org>
10
11         * amd64-darwin-tdep.c: Include "x86-xstate.h".
12         (x86_darwin_init_abi_64): Call amd64_target_description.
13         * amd64-dicos-tdep.c: Likewise.
14         * amd64-fbsd-nat.c: Likewise.
15         * amd64-fbsd-tdep.c: Likewise.
16         * amd64-nbsd-tdep.c: Likewise.
17         * amd64-obsd-tdep.c: Likewise.
18         * amd64-sol2-tdep.c: Likewise.
19         * amd64-windows-tdep.c: Likewise.
20         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
21
22 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
23
24         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
25         (btrace_function) <insn>: Change type to use std::vector.
26         * btrace.c (ftrace_debug, ftrace_call_num_insn,
27         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
28         ftrace_update_insns, ftrace_compute_global_level_offset,
29         btrace_stitch_bts, btrace_clear, btrace_insn_get,
30         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
31         change to std::vector.
32         (ftrace_update_insns): Adjust to change to std::vector, change
33         type of INSN parameter.
34         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
35         * record-btrace.c (btrace_call_history_insn_range,
36         btrace_compute_src_line_range,
37         record_btrace_frame_prev_register): Adjust to change to
38         std::vector.
39         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
40         to change to std::vector.
41
42 2017-09-03  Tom Tromey  <tom@tromey.com>
43
44         * corefile.c (reopen_exec_file): Use std::string.
45
46 2017-09-03  Tom Tromey  <tom@tromey.com>
47
48         * compile/compile.c (compile_register_name_mangled): Return
49         std::string.
50         * compile/compile-loc2c.c (pushf_register_address): Update.
51         (pushf_register): Update.
52         * compile/compile-c-types.c (convert_array): Update.
53         * compile/compile-c-symbols.c (generate_vla_size): Update.
54         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
55         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
56         (convert_one_symbol): Update.
57         (generate_c_for_for_one_variable): Update.
58         * compile/compile-c-support.c (c_get_range_decl_name): Return a
59         std::string.
60         (generate_register_struct): Update.
61         * compile/compile-internal.h (c_get_range_decl_name): Return a
62         std::string.
63         (compile_register_name_mangled): Return std::string.
64
65 2017-09-03  Tom Tromey  <tom@tromey.com>
66
67         * utils.c (perror_string): Return a std::string.
68         (throw_perror_with_name, perror_warning_with_name): Update.
69
70 2017-09-03  Tom Tromey  <tom@tromey.com>
71
72         * demangle.c (demangle_command): Use std::string,
73         unique_xmalloc_ptr.
74
75 2017-09-03  Tom Tromey  <tom@tromey.com>
76
77         * cli/cli-setshow.c (do_set_command): Use std::string.
78
79 2017-09-03  Tom Tromey  <tom@tromey.com>
80
81         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
82
83 2017-09-03  Tom Tromey  <tom@tromey.com>
84
85         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
86
87 2017-09-03  Tom Tromey  <tom@tromey.com>
88
89         * mi/mi-cmd-env.c (env_execute_cli_command): Use
90         gdb::unique_xmalloc_ptr.
91
92 2017-09-03  Tom Tromey  <tom@tromey.com>
93
94         * thread.c (print_thread_info_1): Use string_printf.
95         (thread_apply_command, thread_apply_all_command): Use
96         std::string.
97
98 2017-09-03  Tom Tromey  <tom@tromey.com>
99
100         * valprint.c (val_print_string): Update.
101         * gdbcore.h (memory_error_message): Return std::string.
102         * corefile.c (memory_error_message): Return std::string.
103         (memory_error): Update.
104         * breakpoint.c (insert_bp_location): Update.
105
106 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
107
108         * target/waitstatus.h (target_waitstatus_to_string): Change
109         return type to std::string.
110         * target/waitstatus.c (target_waitstatus_to_string): Return
111         std::string.
112         * target.h (target_waitstatus_to_string): Remove declaration.
113         * infrun.c (resume, clear_proceed_status_thread,
114         print_target_wait_results, do_target_wait, save_waitstatus,
115         stop_all_threads): Adjust.
116         * record-btrace.c (record_btrace_wait): Adjust.
117         * target-debug.h
118         (target_debug_print_struct_target_waitstatus_p): Adjust.
119
120 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
121
122         PR gdb/22046
123         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
124         detection.
125
126 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
127
128         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
129         for setting/unsetting environment variables on the remote target.
130         (New remote packets): Add entries for QEnvironmentHexEncoded,
131         QEnvironmentUnset and QEnvironmentReset.
132         * common/environ.c (gdb_environ::operator=): Extend method to
133         handle m_user_set_env_list and m_user_unset_env_list.
134         (gdb_environ::clear): Likewise.
135         (match_var_in_string): Change type of first parameter from 'char
136         *' to 'const char *'.
137         (gdb_environ::set): Extend method to handle
138         m_user_set_env_list and m_user_unset_env_list.
139         (gdb_environ::unset): Likewise.
140         (gdb_environ::clear_user_set_env): New method.
141         (gdb_environ::user_set_envp): Likewise.
142         (gdb_environ::user_unset_envp): Likewise.
143         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
144         m_user_unset_env_list on move constructor/assignment.
145         (unset): Add new default parameter 'update_unset_list = true'.
146         (clear_user_set_env): New method.
147         (user_set_envp): Likewise.
148         (user_unset_envp): Likewise.
149         (m_user_set_env_list): New std::set.
150         (m_user_unset_env_list): Likewise.
151         * common/rsp-low.c (hex2str): New function.
152         (bin2hex): New overload for bin2hex function.
153         * common/rsp-low.c (hex2str): New prototype.
154         (str2hex): New overload prototype.
155         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
156         QEnvironmentUnset and QEnvironmentReset.
157         (remote_protocol_features): Add QEnvironmentHexEncoded,
158         QEnvironmentUnset and QEnvironmentReset packets.
159         (send_environment_packet): New function.
160         (extended_remote_environment_support): Likewise.
161         (extended_remote_create_inferior): Call
162         extended_remote_environment_support.
163         (_initialize_remote): Add QEnvironmentHexEncoded,
164         QEnvironmentUnset and QEnvironmentReset packet configs.
165         * unittests/environ-selftests.c (gdb_selftest_env_var):
166         New variable.
167         (test_vector_initialization): New function.
168         (test_init_from_host_environ): Likewise.
169         (test_reinit_from_host_environ): Likewise.
170         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
171         Likewise.
172         (test_unset_set_empty_vector): Likewise.
173         (test_vector_clear): Likewise.
174         (test_std_move): Likewise.
175         (test_move_constructor):
176         (test_self_move): Likewise.
177         (test_set_unset_reset): Likewise.
178         (run_tests): Rewrite in terms of the functions above.
179
180 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
181
182         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
183         (adi_available): Use a temp variable of type CORE_ADDR as argument
184         3 when calling target_auxv_search.
185         (adi_normalize_address): Use masks and xor operators to calculate
186         normalized address.
187         (adi_read_versions, adi_write_versions, adi_print_versions)
188         (do_examine, do_assign): Use paddress.
189
190 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
191
192         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
193         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
194         out of loop and add supply of FIR.
195         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
196         add collect of FIR.
197
198 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
199
200         PR gdb/21827
201         * cli/cli-script.c (define_command): Don't convert command name
202         to lower case.
203
204 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
205
206         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
207         Update all callers accordingly. Remove all code blocks handling
208         the case where DISPP is not NULL.
209
210 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
211
212         PR symtab/22003
213         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
214         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
215         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
216
217 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
218
219         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
220         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
221         (read_comp_units_from_section): New parameter abbrev_section, use
222         read_and_check_comp_unit_head, allocate signatured_type if needed.
223         (create_all_comp_units): Update read_comp_units_from_section caller.
224
225 2017-08-23  Pedro Alves  <palves@redhat.com>
226
227         PR remote/21852
228         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
229         to null_ptid and switch to thread without reading the registers
230         after adding the inferior.
231
232 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
233
234         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
235         compile-gcc.
236         * compile/compile.c (compile_gcc, show_compile_gcc): New.
237         (compile_to_object): Implement compile_gcc.
238         (_initialize_compile): Install "set compile-gcc".  Initialize
239         compile_gcc.
240
241 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
242
243         * compile/compile.c (compile_to_object): Conditionally call
244         set_verbose.  Conditionally call compile or compile_v0.
245
246 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
247
248         * sparc64-tdep.h: (adi_normalize_address): New export.
249         * sparc-nat.h: (open_adi_tag_fd): New export.
250         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
251         * sparc64-linux-tdep.c:
252         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
253         (sparc64_linux_handle_segmentation_fault): New function.
254         (sparc64_linux_init_abi): Register
255         sparc64_linux_handle_segmentation_fault
256         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
257         (sparc64_addr_bits_remove): New function.
258         (sparc64_init_abi): Register sparc64_addr_bits_remove.
259         (MAX_PROC_NAME_SIZE): New macro.
260         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
261         (sparc64adilist): New variable.
262         (adi_proc_list): New variable.
263         (find_adi_info): New function.
264         (add_adi_info): New function.
265         (get_adi_info_proc): New function.
266         (get_adi_info): New function.
267         (info_adi_command): New function.
268         (read_maps_entry): New function.
269         (adi_available): New function.
270         (adi_normalize_address): New function.
271         (adi_align_address): New function.
272         (adi_convert_byte_count): New function.
273         (adi_tag_fd): New function.
274         (adi_is_addr_mapped): New function.
275         (adi_read_versions): New function.
276         (adi_write_versions): New function.
277         (adi_print_versions): New function.
278         (do_examine): New function.
279         (do_assign): New function.
280         (adi_examine_command): New function.
281         (adi_assign_command): New function.
282         (_initialize_sparc64_adi_tdep): New function.
283
284 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
285
286         * breakpoint.c (breakpoints_info): Rename to ...
287         (info_breakpoints_command): ... this.
288         (watchpoints_info): Rename to ...
289         (info_watchpoints_command): ... this.
290         (tracepoints_info): Rename to ...
291         (info_tracepoints_command): ... this.
292         (_initialize_breakpoint): Adjust.
293         * dcache.c (dcache_info): Rename to ...
294         (info_display_command): ... this.
295         (_initialize_dcache): Adjust.
296         * frame.h (args_info): Rename to ...
297         (info_args_command): ... this.
298         (locals_info): Rename to ...
299         (info_locals_command): ... this.
300         * infcmd.c (nofp_registers_info): Rename to ...
301         (info_registers_command): ... this.
302         (float_info): Rename to ...
303         (info_float_command): ... this.
304         (program_info): Rename to ...
305         (info_program_command): ... this.
306         (all_registers_info): Rename to ...
307         (info_all_registers_command): ... this.
308         (vector_info): Rename to ...
309         (info_vector_command): ... this.
310         (float_info): Rename to ...
311         (info_float_command): ... this.
312         (_initialize_infcmd): Adjust.
313         * inferior.h (term_info): Rename to ...
314         (info_terminal_command): ... this.
315         * inflow.c (term_info): Rename to ...
316         (info_terminal_command): ... this.
317         (_initialize_inflow): Adjust.
318         * infrun.c (signals_info): Rename to ...
319         (info_signals_command): ... this.
320         (_initialize_infrun): Adjust.
321         * objc-lang.c (classes_info): Rename to ...
322         (info_classes_command): ... this.
323         (selectors_info): Rename to ...
324         (info_selectors_command): ... this.
325         (_initialize_objc_language): Adjust.
326         * printcmd.c (sym_info): Rename to ...
327         (info_symbol_command): ... this.
328         (address_info): Rename to ...
329         (info_address_command): ... this.
330         (display_info): Rename to ...
331         (info_display_command): ... this.
332         (_initialize_printcmd): Adjust.
333         * reverse.c (bookmarks_info): Rename to ...
334         (info_breakpoints_command): ... this.
335         (_initialize_reverse): Adjust.
336         * ser-go32.c (dos_info): Rename to ...
337         (info_serial_command): ... this.
338         (_initialize_ser_dos): Adjust.
339         * skip.c (skip_info): Rename to ...
340         (info_skip_command): ... this.
341         (_initialize_step_skip): Adjust.
342         * source.c (line_info): Rename to ...
343         (info_line_command): ... this.
344         (source_info): Rename to ...
345         (info_source_command)
346         * stack.c (frame_info): Rename to ...
347         (info_frame_command): ... this.
348         (locals_info): Rename to ...
349         (info_locals_command): ... this.
350         (args_info): Rename to ...
351         (info_args_command): ... this.
352         (_initialize_stack): Adjust.
353         * symtab.c (sources_info): Rename to ...
354         (info_sources_command): ... this.
355         (variables_info): Rename to ...
356         (info_variables_command): ... this.
357         (functions_info): Rename to ...
358         (info_functions_command): ... this.
359         (types_info): Rename to ...
360         (info_types_command): ... this.
361         (_initialize_symtab): Adjust.
362         * target.c (target_info): Rename to ...
363         (info_target_command): ... this.
364         (initialize_targets): Adjust.
365         * tracepoint.c (tvariables_info): Rename to ...
366         (info_tvariables_command): ... this.
367         (scope_info): Rename to ...
368         (info_scope_command): ... this.
369         (trace_dump_actions): Adjust.
370         (_initialize_tracepoint): Adjust.
371
372 2017-08-22  Tom Tromey  <tom@tromey.com>
373
374         * breakpoint.h (install_breakpoint): Update.
375         * breakpoint.c (add_solib_catchpoint): Update.
376         (install_breakpoint): Change argument to a std::unique_ptr.
377         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
378         (create_breakpoint_sal, create_breakpoint): Update.
379         (watch_command_1, catch_exec_command_1)
380         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
381         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
382         Return the breakpoint.
383         (set_raw_breakpoint_without_location, set_raw_breakpoint)
384         (new_single_step_breakpoint): Update.
385         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
386         std::unique_ptr.
387         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
388         std::unique_ptr.
389         * break-catch-sig.c (create_signal_catchpoint): Use
390         std::unique_ptr.
391         * ada-lang.c (create_ada_exception_catchpoint): Use
392         std::unique_ptr.
393
394 2017-08-22  Tom Tromey  <tom@tromey.com>
395
396         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
397
398 2017-08-22  Tom Tromey  <tom@tromey.com>
399
400         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
401         (lookup_partial_symbol): Update.
402
403 2017-08-22  Tom Tromey  <tom@tromey.com>
404
405         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
406         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
407         (find_and_open_source, symtab_to_fullname): Update.
408         * psymtab.c (psymtab_to_fullname): Update.
409
410 2017-08-22  Tom Tromey  <tom@tromey.com>
411
412         * exec.c (exec_file_attach): Update.
413         * linux-thread-db.c (try_thread_db_load): Update.
414         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
415         * utils.c (gdb_realpath): Change return type.
416         (gdb_realpath_keepfile): Update.
417         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
418         (_initialize_utils): Register the new self test.
419         * source.c (openp): Update.
420         (find_and_open_source): Update.
421         * nto-tdep.c (nto_find_and_open_solib): Update.
422         * main.c (set_gdb_data_directory): Update.
423         (captured_main_1): Update.
424         * dwarf2read.c (dwarf2_get_dwz_file): Update
425         (dw2_map_symbol_filenames): Update.
426         * auto-load.c (auto_load_safe_path_vec_update): Update.
427         (filename_is_in_auto_load_safe_path_vec): Change type of
428         "filename_realp".
429         (auto_load_objfile_script): Update.
430         (file_is_auto_load_safe): Update.  Use std::string.
431         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
432
433 2017-08-22  Tom Tromey  <tom@tromey.com>
434
435         * utils.c (gdb_realpath_keepfile): Return a
436         gdb::unique_xmalloc_ptr.
437         * exec.c (exec_file_attach): Update.
438         * utils.h (gdb_realpath_keepfile): Return a
439         gdb::unique_xmalloc_ptr.
440
441 2017-08-22  Tom Tromey  <tom@tromey.com>
442
443         * compile/compile.c (compile_file_command): Use
444         gdb::unique_xmalloc_ptr, std::string.
445         * utils.c (gdb_abspath): Change return type.
446         * source.c (openp): Update.
447         * objfiles.c (allocate_objfile): Update.
448         * main.c (set_gdb_data_directory): Update.
449         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
450
451 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
452
453         * cli-cmds.c (list_commands): List actual code around more than
454         one location.
455
456 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
457
458         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
459
460 2017-08-21  Pedro Alves  <palves@redhat.com>
461
462         PR gdb/19487
463         * c-exp.y (variable production): Handle function aliases.
464         * minsyms.c (msymbol_is_text): New function.
465         * minsyms.h (msymbol_is_text): Declare.
466         * symtab.c (find_function_alias_target): New function.
467         * symtab.h (find_function_alias_target): Declare.
468
469 2017-08-21  Pedro Alves  <palves@redhat.com>
470
471         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
472         typedefs.
473         * typeprint.c (whatis_exp): If handling "whatis", and expression
474         is OP_TYPE, strip one typedef level.  Otherwise don't strip
475         typedefs here.
476         * valops.c (value_cast): Save "to" type before resolving
477         stubs/typedefs.  Use that type as resulting value's type.
478
479 2017-08-18  Tom Tromey  <tom@tromey.com>
480             Pedro Alves  <palves@redhat.com>
481
482         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
483         * sol-thread.c (sol_thread_resume, sol_thread_wait)
484         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
485         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
486         * proc-service.c (ps_xfer_memory): Use scoped_restore.
487         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
488         (linux_get_siginfo_data): Add "thread" argument.  Use
489         scoped_restore.
490         * linux-nat.c (linux_child_follow_fork)
491         (check_stopped_by_watchpoint): Use scoped_restore.
492         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
493         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
494         (restore_inferior_ptid, save_inferior_ptid): Remove.
495         * btrace.c (btrace_fetch): Use scoped_restore.
496         * bsd-uthread.c (bsd_uthread_fetch_registers)
497         (bsd_uthread_store_registers): Use scoped_restore.
498         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
499         scoped_restore.
500         * aix-thread.c (aix_thread_resume, aix_thread_wait)
501         (aix_thread_xfer_partial): Use scoped_restore.
502         * inferior.h (save_inferior_ptid): Remove.
503
504 2017-08-18  Yao Qi  <yao.qi@linaro.org>
505
506         PR tdep/21818
507         * arm-tdep.c (gdb_print_insn_arm): Mark
508         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
509
510 2017-08-18  Yao Qi  <yao.qi@linaro.org>
511
512         * NEWS: Mention GDBserver's new option "--selftest".
513         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
514         * selftest.c: Move it to common/selftest.c.
515         * selftest.h: Move it to common/selftest.h.
516         * selftest-arch.c (reset): New function.
517         (tests_with_arch): Call reset.
518
519 2017-08-18  Yao Qi  <yao.qi@linaro.org>
520
521         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
522         instead of exception_fprintf and printf_filtered.
523
524 2017-08-18  Yao Qi  <yao.qi@linaro.org>
525
526         * selftest.c (register_self_test): Rename it to
527         selftests::register_test.
528         (run_self_tests): selftest::run_tests.
529         * selftest.h: Update declarations.
530         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
531         selftests::register_test_foreach_arch.
532         * selftest-arch.h: Update declaration.
533         * aarch64-tdep.c: Update.
534         * arm-tdep.c: Likewise.
535         * disasm-selftests.c: Likewise.
536         * dwarf2loc.c: Likewise.
537         * dwarf2-frame.c: Likewise.
538         * findvar.c: Likewise.
539         * gdbarch-selftests.c: Likewise.
540         * maint.c (maintenance_selftest): Likewise.
541         * regcache.c: Likewise.
542         * rust-exp.y: Likewise.
543         * selftest-arch.c: Likewise.
544         * unittests/environ-selftests.c: Likewise.
545         * unittests/function-view-selftests.c: Likewise.
546         * unittests/offset-type-selftests.c: Likewise.
547         * unittests/optional-selftests.c: Likewise.
548         * unittests/scoped_restore-selftests.c: Likewise.
549         * utils-selftests.c: Likewise.
550
551 2017-08-17  Pedro Alves  <palves@redhat.com>
552
553         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
554         local.
555
556 2017-08-17  Pedro Alves  <palves@redhat.com>
557
558         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
559         field.
560         (reset_die_in_process): Delete, replaced by ...
561         (process_die_scope): ... this new class.  Make it responsible for
562         freeing cu->line_header too.
563         (process_die): Use process_die_scope.
564         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
565         cu->line_header_die_owner.  Don't release the line header if it's
566         owned by the CU.
567         (setup_type_unit_groups): Make the CU/DIE own the line header.
568         Don't release the line header here.
569
570 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
571
572         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
573
574 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
575
576         * NEWS: Mention new shortcuts for nexti and stepi in TUI
577         Single-Key mode
578
579 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
580
581         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
582         mode command list.
583
584 2017-08-15  Stafford Horne  <shorne@gmail.com>
585
586         * MAINTAINERS (Write After Approval): Add Stafford Horne.
587
588 2017-08-15  Stafford Horne  <shorne@gmail.com>
589
590         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
591
592 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
593
594         PR gdb/21954
595         * infcmd.c (unset_environment_command): Use the 'clear' method on
596         the environment instead of resetting it.
597
598 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
599
600         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
601         platforms.
602
603 2017-08-14  Tom Tromey  <tom@tromey.com>
604
605         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
606         (print_binary_chars): Likewise.
607         (BITS_IN_BYTES): Remove.
608
609 2017-08-14  Tom Tromey  <tom@tromey.com>
610
611         PR gdb/21675
612         * valprint.c (LOW_ZERO): Change value to 034.
613         (print_octal_chars): Add static_asserts for octal constants.
614         * printcmd.c (print_scalar_formatted): Add 'd' case.
615
616 2017-08-11  Tom Tromey  <tom@tromey.com>
617
618         * symfile.c (add_symbol_file_command): Use std::vector.
619
620 2017-08-14  Tom Tromey  <tom@tromey.com>
621
622         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
623         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
624         std::move.
625         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
626
627 2017-08-11  Pedro Alves  <palves@redhat.com>
628
629         * infrun.c (process_event_stop_test): Adjust
630         function_name_is_marked_for_skip call.
631         * skip.c: Include <list>.
632         (skiplist_entry): Make it a class with private fields, and
633         getters/setters.
634         (skiplist_entry_chain): Delete.
635         (skiplist_entries): New.
636         (skiplist_entry_count): Delete.
637         (highest_skiplist_entry_num): New.
638         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
639         (add_skiplist_entry): Delete.
640         (skiplist_entry::skiplist_entry): New.
641         (skiplist_entry::add_entry): New.
642         (skip_file_command, skip_function): Adjust.
643         (compile_skip_regexp): Delete.
644         (skip_command): Don't compile regexp here.  Adjust to use
645         skiplist_entry::add_entry.
646         (skip_info): Adjust to use range-for and getters.
647         (skip_enable_command, skip_disable_command): Adjust to use
648         range-for and setters.
649         (skip_delete_command): Adjust to use std::list.
650         (add_skiplist_entry): Delete.
651         (skip_file_p): Delete, refactored as ...
652         (skiplist_entry::do_skip_file_p): ... this new method.
653         (skip_gfile_p): Delete, refactored as ...
654         (skiplist_entry::do_gskip_file_p): ... this new method.
655         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
656         (skiplist_entry::skip_function_p): ... this new method.
657         (function_name_is_marked_for_skip): Now returns bool, and takes
658         the function sal by const reference.  Adjust to use range-for and
659         skiplist_entry methods.
660         (_initialize_step_skip): Remove references to
661         skiplist_entry_chain, skiplist_entry_count.
662         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
663         takes the function sal by const reference.
664
665 2017-08-11  Yao Qi  <yao.qi@linaro.org>
666
667         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
668         (dwarf2_frame_cache): Remove reset_cache_cleanup.
669         (dwarf2_frame_cache):
670         * frame-unwind.c (frame_unwind_try_unwinder): Catch
671         RETURN_MASK_ALL and set *this_case to NULL.
672         * frame-unwind.h: Update comments.
673
674 2017-08-11  Yao Qi  <yao.qi@linaro.org>
675
676         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
677         (dwarf2_frame_state_copy_regs): Remove.
678         (dwarf2_frame_state_free_regs): Remove.
679         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
680         (dwarf2_restore_rule): Call method .alloc_regs instead of
681         dwarf2_frame_state_alloc_regs.
682         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
683         constructor.  Call std::move.
684         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
685         (dwarf2_frame_cache): Likewise.
686
687         [GDB_SELF_TEST]: Include selftest.h and
688         selftest-arch.h.
689         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
690         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
691         execute_cfa_program_test.
692
693         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
694         copy ctor, assignment operator, move assignment.
695         <alloc_regs>: New method.
696         <swap>: New method.
697         (struct dwarf2_frame_state): Delete dtor.
698         (dwarf2_frame_state_alloc_regs): Remove declaration.
699         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
700         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
701
702 2017-08-11  Yao Qi  <yao.qi@linaro.org>
703
704         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
705         (dwarf2_frame_state::dwarf2_frame_state): New.
706         (dwarf2_frame_state::~dwarf2_frame_state): New.
707         (dwarf2_fetch_cfa_info): Update.
708         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
709         rather than a pointer.  Update code.
710         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
711         dtor.
712         <data_align, code_align, retaddr_column>: Change them to const.
713         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
714         to bool.
715
716 2017-08-11  Yao Qi  <yao.qi@linaro.org>
717
718         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
719         <loc.exp>: New field.
720         * dwarf2-frame.c (execute_cfa_program): Update.
721         (dwarf2_frame_prev_register): Update.
722
723 2017-08-10  Pedro Alves  <palves@redhat.com>
724
725         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
726
727 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
728
729         * fbsd-nat.c (struct fbsd_fork_info): Remove.
730         (fbsd_pending_children): Use std::list.
731         (fbsd_remember_child): Likewise.
732         (fbsd_is_child_pending): Likewise.
733         (fbsd_pending_vfork_done): Use std::forward_list.
734         (fbsd_add_vfork_done): Likewise.
735         (fbsd_is_vfork_done_pending): Likewise.
736         (fbsd_next_vfork_done): Likewise.
737
738 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
739
740         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
741         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
742         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
743         for `mapfilename'.
744         (fbsd_xfer_partial): Use gdb::byte_vector.
745         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
746
747 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
748
749         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
750         "filestuff.h".
751         (fbsd_find_memory_regions): Fix `mapfile' initialization.
752
753 2017-08-09  Tom Tromey  <tom@tromey.com>
754
755         * skip.c (skiplist_entry): New constructor.
756         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
757         (skiplist_entry::file_is_glob): Now bool.
758         (skiplist_entry::file, skiplist_entry::function): Now
759         std::string.
760         (make_skip_entry): Return a unique_ptr.  Use new.
761         (free_skiplist_entry, free_skiplist_entry_cleanup)
762         (make_free_skiplist_entry_cleanup): Remove.
763         (skip_command, skip_disable_command, add_skiplist_entry)
764         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
765         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
766         (function_name_is_marked_for_skip): Update.
767         (skip_delete_command): Update.  Use delete.
768
769 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
770
771         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
772         (aarch64_linux_core_read_description): New function.
773         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
774
775 2017-08-09  Pedro Alves  <palves@redhat.com>
776
777         * cp-name-parser.y (cp_comp_to_string): Return a
778         gdb::unique_xmalloc_ptr<char>.
779         * cp-support.c (replace_typedefs_qualified_name)
780         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
781         (cp_canonicalize_string_full): Use op= instead of explicit
782         convertion.
783         (cp_class_name_from_physname, method_name_from_physname)
784         (cp_func_name, cp_remove_params): Adjust to use
785         gdb::unique_xmalloc_ptr<char>.
786         * cp-support.h (cp_comp_to_string): Return a
787         gdb::unique_xmalloc_ptr<char>.
788         * python/py-type.c (typy_lookup_type): Adjust to use
789         gdb::unique_xmalloc_ptr<char>.
790
791 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
792
793         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
794
795 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
796             Yao Qi  <yao.qi@linaro.org>
797
798         * cp-support.c (cp_canonicalize_string_full): Use
799         gdb::unique_xmalloc_ptr<char>.
800         (cp_canonicalize_string): Likewise.
801
802 2017-08-09  Yao Qi  <yao.qi@linaro.org>
803
804         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
805         * regformats/i386/amd64-avx-avx512.dat: Remove.
806         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
807         * regformats/i386/amd64-avx-mpx.dat:Remove.
808         * regformats/i386/amd64-avx.dat: Remove.
809         * regformats/i386/amd64-mpx.dat: Remove.
810         * regformats/i386/i386-avx-avx512.dat: Remove.
811         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
812         * regformats/i386/i386-avx-mpx.dat: Remove.
813         * regformats/i386/i386-mmx.dat: Remove.
814         * regformats/i386/i386-mpx.dat: Remove.
815
816 2017-08-09  Yao Qi  <yao.qi@linaro.org>
817
818         * amd64-tdep.h (tdesc_x32): Remove the declaration.
819         * amd64-tdep.c: Don't include features/i386/x32*.c.
820         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
821         functions.
822         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
823         and i386/x32-avx-avx512.
824         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
825         and i386/x32.xml.
826         * features/i386/x32-avx-avx512.c: Removed.
827         * features/i386/x32-avx-avx512.xml: Removed.
828         * features/i386/x32-avx.c: Removed.
829         * features/i386/x32-avx.xml: Removed.
830         * features/i386/x32.c: Removed.
831         * features/i386/x32.xml: Removed.
832         * regformats/i386/x32-avx-avx512.dat: Removed.
833         * regformats/i386/x32-avx.dat: Removed.
834         * regformats/i386/x32.dat: Removed.
835
836 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
837
838         PR breakpoints/21886
839         * mem-break.c (default_memory_insert_breakpoint): Use
840         `->placed_address' rather than `->reqstd_address' for the
841         breakpoint location.
842
843 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
844
845         * arch-utils.c (default_print_insn): Remove arch/mach/endian
846         assertions.
847
848 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
849
850         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
851         a union of `tdep_info', `tdesc_data' and `id'.
852         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
853         rather than `info.tdep_info'.
854         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
855         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
856         * i386-tdep.c (i386_gdbarch_init): Likewise.
857         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
858         * mips-tdep.c (mips_gdbarch_init): Likewise.
859         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
860         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
861         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
862         `info.tdep_info'.
863         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
864         `info.tdep_info'.
865         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
866         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
867         `info.tdep_info'.
868         * spu-tdep.c (spu_gdbarch_init): Likewise.
869         * gdbarch.h: Regenerate.
870
871 2017-08-07  Leszek Swirski  <leszeks@google.com>
872
873         PR symtab/20899
874         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
875
876 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
877
878         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
879         (gdbsim_open): Rename gdb_argv args object to argv.
880
881 2017-08-05  Tom Tromey  <tom@tromey.com>
882
883         * compile/compile-object-load.c (compile_object_load): Use
884         gdb::unique_xmalloc_ptr.
885         * cli/cli-dump.c (scan_filename): Rename from
886         scan_filename_with_cleanup.  Change return type.
887         (scan_expression): Rename from scan_expression_with_cleanup.
888         Change return type.
889         (dump_memory_to_file, dump_value_to_file, restore_command):
890         Use gdb::unique_xmalloc_ptr.  Update.
891         * cli/cli-cmds.c (find_and_open_script): Use
892         gdb::unique_xmalloc_ptr.
893         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
894         * symmisc.c (maintenance_print_symbols)
895         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
896         * symfile.c (symfile_bfd_open, generic_load)
897         (add_symbol_file_command, remove_symbol_file_command): Use
898         gdb::unique_xmalloc_ptr.
899         * source.c (openp): Use gdb::unique_xmalloc_ptr.
900         * psymtab.c (maintenance_print_psymbols): Use
901         gdb::unique_xmalloc_ptr.
902         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
903         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
904         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
905         (reload_shared_libraries_1): Likewise.
906
907 2017-08-05  Tom Tromey  <tom@tromey.com>
908
909         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
910         (rust_op_vector, rust_set_vector): New typedefs.
911         (current_parser): New global.
912         (work_obstack): Change to pointer type.  Update all users.
913         (rust_ast, pstate): Remove globals.
914         (struct rust_parser): New.
915         (%union) <params, field_inits>: Change type.
916         (start, tuple_expr, unit_expr, struct_expr_list, literal)
917         (field_expr, expr_list, maybe_expr_list, type_list): Update.
918         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
919         (convert_params_to_types, convert_params_to_expression): Change
920         type of "params".
921         (ast_string): Change type of "fields".
922         (rust_parse): Make a rust_parser.  Remove cleanups.
923         (rust_lex_tests): Make and install an auto_obstack.
924
925 2017-08-04  Yao Qi  <yao.qi@linaro.org>
926
927         * configure.srv (ipa_x32_linux_regobj): New.
928         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
929         instead of X86_TDESC_AVX512.
930         (initialize_low_tracepoint): Call
931         init_registers_x32_avx_avx512_linux.
932
933 2017-08-04  Yao Qi  <yao.qi@linaro.org>
934
935         * utils.h (gdb_argv): Add namespace std for nullptr_t.
936
937 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
938
939         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
940
941 2017-08-03  Tom Tromey  <tom@tromey.com>
942
943         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
944         Remove.
945         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
946
947 2017-08-03  Tom Tromey  <tom@tromey.com>
948
949         * python/py-param.c (compute_enum_values): Use gdb_argv.
950
951 2017-08-03  Tom Tromey  <tom@tromey.com>
952
953         * utils.h (struct gdb_argv_deleter): New.
954         (gdb_argv): New class.
955         * utils.c (gdb_argv::reset): New method.
956         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
957         * tracefile.c (tsave_command): Use gdb_argv.
958         * top.c (new_ui_command): Use gdb_argv.
959         * symmisc.c (maintenance_print_symbols)
960         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
961         * symfile.c (symbol_file_command, generic_load)
962         (remove_symbol_file_command): Use gdb_argv.
963         * stack.c (backtrace_command): Use gdb_argv.
964         * source.c (add_path, show_substitute_path_command)
965         (unset_substitute_path_command, set_substitute_path_command):
966         Use gdb_argv.
967         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
968         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
969         * remote.c (extended_remote_run, remote_put_command)
970         (remote_get_command, remote_delete_command): Use gdb_argv.
971         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
972         (gdbsim_open): Use gdb_argv.
973         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
974         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
975         * procfs.c (procfs_info_proc): Use gdb_argv.
976         * interps.c (interpreter_exec_cmd): Use gdb_argv.
977         * infrun.c (handle_command): Use gdb_argv.
978         * inferior.c (add_inferior_command, clone_inferior_command):
979         Use gdb_argv.
980         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
981         * exec.c (exec_file_command): Use gdb_argv.
982         * cli/cli-cmds.c (alias_command): Use gdb_argv.
983         * compile/compile.c (build_argc_argv): Use gdb_argv.
984
985 2017-08-03  Tom Tromey  <tom@tromey.com>
986
987         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
988
989 2017-08-03  Tom Tromey  <tom@tromey.com>
990
991         * python/python.c (compute_python_string): Return std::string.
992         (gdbpy_eval_from_control_command): Update.
993         (do_start_initialization): Use std::string.
994         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
995         xstrprintf.
996         * python/py-breakpoint.c (local_setattro): Use string_printf, not
997         xstrprintf.
998
999 2017-08-03  Tom Tromey  <tom@tromey.com>
1000
1001         * top.h (do_restore_instream_cleanup): Remove.
1002         * top.c (do_restore_instream_cleanup): Remove.
1003         (read_command_file): Use scoped_restore.
1004         * cli/cli-script.c (execute_user_command): Use scoped_restore.
1005
1006 2017-08-03  Tom Tromey  <tom@tromey.com>
1007
1008         * cli/cli-script.c (execute_user_command)
1009         (execute_control_command): Use scoped_restore.
1010
1011 2017-08-03  Tom Tromey  <tom@tromey.com>
1012
1013         * cli/cli-script.c (do_restore_user_call_depth): Remove.
1014         (execute_user_command): Remove user_call_depth; use
1015         user_args_stack's size instead.
1016
1017 2017-08-03  Tom Tromey  <tom@tromey.com>
1018
1019         * top.h (in_user_command): Remove.
1020         * top.c (in_user_command): Remove.
1021         * cli/cli-script.c (do_restore_user_call_depth)
1022         (execute_user_command): Update.
1023
1024 2017-08-03  Tom Tromey  <tom@tromey.com>
1025
1026         * valops.c (search_struct_method): Use gdb::byte_vector.
1027         * valarith.c (value_concat): Use std::vector.
1028         * target.c (memory_xfer_partial): Use gdb::byte_vector.
1029         (simple_search_memory): Likewise.
1030         * printcmd.c (find_string_backward): Use gdb::byte_vector.
1031         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1032         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1033         * elfread.c (elf_rel_plt_read): Use std::string.
1034         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1035         * cli/cli-dump.c (restore_section_callback): Use
1036         gdb::byte_vector.
1037
1038 2017-08-03  Tom Tromey  <tom@tromey.com>
1039
1040         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1041
1042 2017-08-03  Tom Tromey  <tom@tromey.com>
1043
1044         * tui/tui-regs.c (tui_restore_gdbout): Remove.
1045         (tui_register_format): Use scoped_restore.
1046
1047 2017-08-03  Tom Tromey  <tom@tromey.com>
1048
1049         * reverse.c (exec_direction_default): Remove.
1050         (exec_reverse_once): Use scoped_restore.
1051         * remote.c (restore_remote_timeout): Remove.
1052         (remote_flash_erase, remote_flash_write, remote_flash_done)
1053         (readchar, remote_serial_write): Use scoped_restore.
1054         * cli/cli-script.c (struct source_cleanup_lines_args)
1055         (source_cleanup_lines): Remove.
1056         (script_from_file): Use scoped_restore.
1057         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1058         (source_command): Use scoped_restore.
1059
1060 2017-08-03  Tom Tromey  <tom@tromey.com>
1061
1062         * utils.h (make_cleanup_free_so): Remove.
1063         * utils.c (do_free_so, make_cleanup_free_so): Remove.
1064         * solist.h (struct so_deleter): New.
1065         (so_list_up): New typedef.
1066         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1067
1068 2017-08-03  Tom Tromey  <tom@tromey.com>
1069
1070         * utils.h (make_cleanup_restore_current_language): Remove.
1071         * utils.c (do_restore_current_language)
1072         (make_cleanup_restore_current_language): Remove.
1073         * parse.c (parse_exp_in_context_1)
1074         (parse_expression_with_language): Use
1075         scoped_restore_current_language.
1076         * mi/mi-main.c (mi_cmd_execute): Use
1077         scoped_restore_current_language.
1078         * language.h (scoped_restore_current_language): New class.
1079
1080 2017-08-03  Tom Tromey  <tom@tromey.com>
1081
1082         * compile/compile.c (cleanup_unlink_file): Remove.
1083         (compile_to_object): Use gdb::unlinker.
1084         (eval_compile_command): Likewise.
1085
1086 2017-08-03  Tom Tromey  <tom@tromey.com>
1087
1088         * utils.h (make_cleanup_fclose): Remove.
1089         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1090
1091 2017-08-03  Tom Tromey  <tom@tromey.com>
1092
1093         * top.c (open_terminal_stream): Return gdb_file_up.
1094         (new_ui_command): Update.
1095
1096 2017-08-03  Tom Tromey  <tom@tromey.com>
1097
1098         * source.c (print_source_lines_base, forward_search_command)
1099         (reverse_search_command): Use gdb_file_up.
1100
1101 2017-08-03  Tom Tromey  <tom@tromey.com>
1102
1103         * fbsd-nat.c (fbsd_find_memory_regions): Update.
1104
1105 2017-08-03  Tom Tromey  <tom@tromey.com>
1106
1107         * cli/cli-cmds.c (find_and_open_script): Change return type.
1108         Remove "streamp" and "full_path" parameters.
1109         (source_script_with_search): Update.
1110         * auto-load.c (source_script_file): Update.
1111         * cli/cli-cmds.h (find_and_open_script): Change type.
1112         (open_script): New struct.
1113
1114 2017-08-03  Tom Tromey  <tom@tromey.com>
1115
1116         * xml-support.c (xml_fetch_content_from_file): Update.
1117         * ui-file.c (stdio_file::open): Update.
1118         * tracefile-tfile.c (tfile_start): Update.
1119         * remote.c (remote_file_put, remote_file_get): Update.
1120         * nat/linux-procfs.c (linux_proc_get_int)
1121         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1122         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1123         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1124         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1125         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1126         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1127         * linux-nat.c (linux_proc_pending_signals): Update.
1128         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1129         (file_closer): Remove.
1130         * compile/compile.c (compile_to_object): Update.
1131         * common/filestuff.h (struct gdb_file_deleter): New.
1132         (gdb_file_up): New typedef.
1133         (gdb_fopen_cloexec): Change return type.
1134         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1135         * cli/cli-dump.c (fopen_with_cleanup): Remove.
1136         (dump_binary_file, restore_binary_file): Update.
1137         * auto-load.c (auto_load_objfile_script_1): Update.
1138
1139 2017-08-03  Tom Tromey  <tom@tromey.com>
1140
1141         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1142         (info_static_tracepoint_markers_command): Likewise.
1143         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1144         * skip.c (skip_info): Use ui_out_emit_table.
1145         * progspace.c (print_program_space): Use ui_out_emit_table.
1146         * osdata.c (info_osdata): Use ui_out_emit_table.
1147         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1148         ui_out_emit_table.
1149         * linux-thread-db.c (info_auto_load_libthread_db): Use
1150         ui_out_emit_table.
1151         * inferior.c (print_inferior): Use ui_out_emit_table.
1152         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1153         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1154         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1155         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1156         * ui-out.h (class ui_out_emit_table): New.
1157
1158 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
1159
1160         * mips-tdep.c (mips_fpu_type_str): New function.
1161         (mips_dump_tdep): Call it.
1162
1163 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
1164
1165         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1166         `->mips_fpu_type'.
1167
1168 2017-07-31  Xavier Roirand  <roirand@adacore.com>
1169
1170         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1171
1172 2017-07-27  Xavier Roirand  <roirand@adacore.com>
1173
1174         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1175
1176 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1177
1178         * cli/cli-cmds.c (maintenancechecklist): New variable.
1179         * gdbcmd.h (maintenancechecklist): Declare it.
1180         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1181         Call i386_linux_read_description with different masks.
1182         * maint.c (maintenance_check_command): New function.
1183         (_initialize_maint_cmds): Call add_prefix_cmd.
1184         * target-descriptions.c (tdesc_reg): override operator != and ==.
1185         (tdesc_type): Likewise.
1186         (tdesc_feature): Likewise.
1187         (target_desc): Likewise.
1188         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1189         (maintenance_check_xml_descriptions): New function.
1190         (_initialize_target_descriptions) Add command "xml-descriptions".
1191         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1192
1193 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1194
1195         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1196         Include features/i386/32bit-*.c.
1197         (i386_linux_read_description): Generate target description if it
1198         doesn't exist.
1199         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1200         functions.
1201         * features/i386/32bit-linux.c: Re-generated.
1202         * features/i386/32bit-sse.c: Likewise.
1203         * target-descriptions.c (print_c_feature::visit): Print code to
1204         set register number if needed.
1205         (print_c_feature) <m_next_regnum>: New field.
1206
1207 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1208
1209         * features/Makefile (CFILES): Rename with TDESC_CFILES.
1210         (FEATURE_XMLFILES): New.
1211         (FEATURE_CFILES): New.
1212         New rules.
1213         (clean-cfiles): Remove generated c files.
1214         * features/i386/32bit-avx.c: Generated.
1215         * features/i386/32bit-avx512.c: Generated.
1216         * features/i386/32bit-core.c: Generated.
1217         * features/i386/32bit-linux.c: Generated.
1218         * features/i386/32bit-mpx.c: Generated.
1219         * features/i386/32bit-pkeys.c: Generated.
1220         * features/i386/32bit-sse.c: Generated.
1221         * target-descriptions.c: Include algorithm.
1222         (tdesc_element_visitor): Add method visit_end.
1223         (print_c_tdesc): Implement visit_end.
1224         (print_c_tdesc:: m_filename_after_features): Move it to
1225         protected.
1226         (print_c_feature): New class.
1227         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1228         name starts with "i386/32bit-".
1229
1230 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1231
1232         * target-descriptions.c (tdesc_element_visitor): New class.
1233         (tdesc_element): New class.
1234         (tdesc_reg): Inherit from tdesc_element.
1235         (tdesc_reg::accept): New function.
1236         (tdesc_type): Inherit from tdesc_element.
1237         (tdesc_type::accept): New function.
1238         (tdesc_feature): Inherit from tdesc_element.
1239         (tdesc_feature::accept): New function.
1240         (target_desc): Inherit from tdesc_element.
1241         (target_desc::target_desc): New.
1242         (target_desc::~target_desc): New.
1243         (target_desc::accept): New.
1244         (allocate_target_description): Use new.
1245         (free_target_description): Use delete.
1246         (print_c_tdesc): New class.
1247         (maint_print_c_tdesc_cmd): Adjust.
1248
1249         * features/aarch64.c: Re-generated.
1250         * features/arc-arcompact.c: Re-generated.
1251         * features/arc-v2.c: Re-generated.
1252         * features/arm/arm-with-iwmmxt.c: Re-generated.
1253         * features/arm/arm-with-m.c: Re-generated.
1254         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1255         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1256         * features/arm/arm-with-neon.c: Re-generated.
1257         * features/arm/arm-with-vfpv2.c: Re-generated.
1258         * features/arm/arm-with-vfpv3.c: Re-generated.
1259         * features/i386/amd64-avx-avx512.c: Re-generated.
1260         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1261         * features/i386/amd64-avx.c: Re-generated.
1262         * features/i386/amd64-avx-linux.c: Re-generated.
1263         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1264         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1265         * features/i386/amd64-avx-mpx.c: Re-generated.
1266         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1267         * features/i386/amd64.c: Re-generated.
1268         * features/i386/amd64-linux.c: Re-generated.
1269         * features/i386/amd64-mpx.c: Re-generated.
1270         * features/i386/amd64-mpx-linux.c: Re-generated.
1271         * features/i386/i386-avx-avx512.c: Re-generated.
1272         * features/i386/i386-avx-avx512-linux.c: Re-generated.
1273         * features/i386/i386-avx.c: Re-generated.
1274         * features/i386/i386-avx-linux.c: Re-generated.
1275         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1276         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1277         * features/i386/i386-avx-mpx.c: Re-generated.
1278         * features/i386/i386-avx-mpx-linux.c: Re-generated.
1279         * features/i386/i386.c: Re-generated.
1280         * features/i386/i386-linux.c: Re-generated.
1281         * features/i386/i386-mmx.c: Re-generated.
1282         * features/i386/i386-mmx-linux.c: Re-generated.
1283         * features/i386/i386-mpx.c: Re-generated.
1284         * features/i386/i386-mpx-linux.c: Re-generated.
1285         * features/i386/x32-avx-avx512.c: Re-generated.
1286         * features/i386/x32-avx-avx512-linux.c: Re-generated.
1287         * features/i386/x32-avx.c: Re-generated.
1288         * features/i386/x32-avx-linux.c: Re-generated.
1289         * features/i386/x32.c: Re-generated.
1290         * features/i386/x32-linux.c: Re-generated.
1291         * features/microblaze.c: Re-generated.
1292         * features/microblaze-with-stack-protect.c: Re-generated.
1293         * features/mips64-dsp-linux.c: Re-generated.
1294         * features/mips64-linux.c: Re-generated.
1295         * features/mips-dsp-linux.c: Re-generated.
1296         * features/mips-linux.c: Re-generated.
1297         * features/nds32.c: Re-generated.
1298         * features/nios2.c: Re-generated.
1299         * features/nios2-linux.c: Re-generated.
1300         * features/rs6000/powerpc-32.c: Re-generated.
1301         * features/rs6000/powerpc-32l.c: Re-generated.
1302         * features/rs6000/powerpc-403.c: Re-generated.
1303         * features/rs6000/powerpc-403gc.c : Re-generated.
1304         * features/rs6000/powerpc-405.c: Re-generated.
1305         * features/rs6000/powerpc-505.c: Re-generated.
1306         * features/rs6000/powerpc-601.c: Re-generated.
1307         * features/rs6000/powerpc-602.c: Re-generated.
1308         * features/rs6000/powerpc-603.c: Re-generated.
1309         * features/rs6000/powerpc-604.c: Re-generated.
1310         * features/rs6000/powerpc-64.c: Re-generated.
1311         * features/rs6000/powerpc-64l.c: Re-generated.
1312         * features/rs6000/powerpc-7400.c: Re-generated.
1313         * features/rs6000/powerpc-750.c: Re-generated.
1314         * features/rs6000/powerpc-860.c: Re-generated.
1315         * features/rs6000/powerpc-altivec32.c: Re-generated.
1316         * features/rs6000/powerpc-altivec32l.c: Re-generated.
1317         * features/rs6000/powerpc-altivec64.c: Re-generated.
1318         * features/rs6000/powerpc-altivec64l.c: Re-generated.
1319         * features/rs6000/powerpc-cell32l.c: Re-generated.
1320         * features/rs6000/powerpc-cell64l.c: Re-generated.
1321         * features/rs6000/powerpc-e500.c: Re-generated.
1322         * features/rs6000/powerpc-e500l.c: Re-generated.
1323         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1324         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1325         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1326         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1327         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1328         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1329         * features/rs6000/powerpc-vsx32.c: Re-generated.
1330         * features/rs6000/powerpc-vsx32l.c: Re-generated.
1331         * features/rs6000/powerpc-vsx64.c: Re-generated.
1332         * features/rs6000/powerpc-vsx64l.c: Re-generated.
1333         * features/rs6000/rs6000.c: Re-generated.
1334         * features/s390-linux32.c: Re-generated.
1335         * features/s390-linux32v1.c: Re-generated.
1336         * features/s390-linux32v2.c: Re-generated.
1337         * features/s390-linux64.c: Re-generated.
1338         * features/s390-linux64v1.c: Re-generated.
1339         * features/s390-linux64v2.c: Re-generated.
1340         * features/s390-te-linux64.c: Re-generated.
1341         * features/s390-tevx-linux64.c: Re-generated.
1342         * features/s390-vx-linux64.c: Re-generated.
1343         * features/s390x-linux64.c: Re-generated.
1344         * features/s390x-linux64v1.c: Re-generated.
1345         * features/s390x-linux64v2.c: Re-generated.
1346         * features/s390x-te-linux64.c: Re-generated.
1347         * features/s390x-tevx-linux64.c: Re-generated.
1348         * features/s390x-vx-linux64.c: Re-generated.
1349         * features/sparc/sparc32-solaris.c: Re-generated.
1350         * features/sparc/sparc64-solaris.c: Re-generated.
1351         * features/tic6x-c62x.c: Re-generated.
1352         * features/tic6x-c62x-linux.c: Re-generated.
1353         * features/tic6x-c64x.c: Re-generated.
1354         * features/tic6x-c64x-linux.c: Re-generated.
1355         * features/tic6x-c64xp.c: Re-generated.
1356         * features/tic6x-c64xp-linux.c: Re-generated.
1357
1358 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1359
1360         * i386-linux-tdep.c (i386_linux_read_description): New function.
1361         (i386_linux_core_read_description): Call
1362         i386_linux_read_description.
1363         * i386-linux-tdep.h (i386_linux_read_description): Declare.
1364         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1365         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1366         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1367         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1368         * x86-linux-nat.c (x86_linux_read_description): Call
1369         i386_linux_read_description.
1370
1371 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1372
1373         * NEWS: Mention it.
1374         * features/Makefile (%.c: %.xml): Pass the xml file name to
1375         command "maint print c-tdesc".
1376         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1377         name from 'arg'.
1378
1379 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1380
1381         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
1382         in-class initialization.
1383         (tdesc_create_feature): Call new instead of XCNEW.
1384         (free_target_description): Ue delete.
1385
1386 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
1387
1388         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1389
1390 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1391
1392         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1393         constant.
1394         (amd64_x32_init_abi): Likewise.
1395         * amd64-tdep.h (amd64_init_abi): Update declaration.
1396         (amd64_x32_init_abi): Likewise.
1397
1398 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1399
1400         PR tdep/21717
1401         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1402         condition for FPSCR.
1403         (arm_linux_store_inferior_registers): Likewise.
1404
1405 2017-07-22  Tom Tromey  <tom@tromey.com>
1406
1407         * break-catch-syscall.c (struct catch_syscall_inferior_data)
1408         <syscalls_counts>: Now a std::vector.
1409         (get_catch_syscall_inferior_data): Use "new".
1410         (catch_syscall_inferior_data_cleanup): Use "delete".
1411         (insert_catch_syscall, remove_catch_syscall)
1412         (clear_syscall_counts): Update.
1413
1414 2017-07-22  Tom Tromey  <tom@tromey.com>
1415
1416         * break-catch-syscall.c (syscall_catchpoint)
1417         <syscalls_to_be_caught>: Now a std::vector<int>
1418         (~syscall_catchpoint): Remove.
1419         (insert_catch_syscall, remove_catch_syscall)
1420         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1421         (print_mention_catch_syscall, print_recreate_catch_syscall):
1422         Update.
1423         (create_syscall_event_catchpoint): Change type of "filter"
1424         parameter.
1425         (catch_syscall_split_args): Return a std::vector.
1426         (catch_syscall_command_1, catching_syscall_number_1): Update.
1427
1428 2017-07-22  Tom Tromey  <tom@tromey.com>
1429
1430         * break-catch-throw.c (struct exception_catchpoint)
1431         <exception_rx>: Now a std::string.
1432         (~exception_catchpoint): Remove.
1433         (print_one_detail_exception_catchpoint): Update.
1434         (handle_gnu_v3_exceptions): Change type of except_rx.
1435         (extract_exception_regexp): Return a std::string.
1436         (catch_exception_command_1): Update.
1437
1438 2017-07-22  Tom Tromey  <tom@tromey.com>
1439
1440         * break-catch-sig.c (gdb_signal_type): Remove typedef.
1441         (struct signal_catchpoint) <signals_to_be_caught>: Now a
1442         std::vector.
1443         <catch_all>: Now a bool.
1444         (~signal_catchpoint): Remove.
1445         (signal_catchpoint_insert_location)
1446         (signal_catchpoint_remove_location)
1447         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1448         (signal_catchpoint_print_mention)
1449         (signal_catchpoint_print_recreate)
1450         (signal_catchpoint_explains_signal): Update.
1451         (create_signal_catchpoint): Change type of "filter" and
1452         "catch_all".
1453         (catch_signal_split_args): Return a std::vector.  Change type of
1454         "catch_all".
1455         (catch_signal_command): Update.
1456
1457 2017-07-20  Pedro Alves  <palves@redhat.com>
1458
1459         * ada-lang.c (ada_language_defn): Make extern.
1460         (_initialize_ada_language): Remove add_language call.
1461         * c-lang.c (c_language_defn, cplus_language_defn)
1462         (asm_language_defn, minimal_language_defn): Make extern.
1463         (_initialize_c_language): Delete.
1464         * completer.c (compare_cstrings): Delete, moved to utils.h.
1465         * d-lang.c (d_language_defn): Make extern.
1466         (_initialize_d_language): Remove add_language calls.
1467         * defs.h (enum language): Add comment.
1468         * f-lang.c (f_language_defn): Make extern.
1469         (_initialize_f_language): Remove add_language call.
1470         * go-lang.c (go_language_defn): Make extern.
1471         (_initialize_go_language): Remove add_language call.
1472         * language.c: Include <algorithm>.
1473         (languages): Redefine as const array.
1474         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
1475         (set_language_command): Handle "local".  Use for-range loop.
1476         (set_language): Remove loop.
1477         (language_enum): Rewrite.
1478         (language_def, language_str): Remove loops.
1479         (add_language): Delete.
1480         (add_set_language_command): New, based on add_languages.
1481         (skip_language_trampoline): Adjust.
1482         (local_language_defn): Delete.
1483         (language_gdbarch_post_init): Adjust.
1484         (_initialize_language): Remove add_language calls.  Call
1485         add_set_language_command.
1486         * language.h (add_language): Delete.
1487         (auto_language_defn)
1488         (unknown_language_defn, minimal_language_defn, ada_language_defn)
1489         (asm_language_defn, c_language_defn, cplus_language_defn)
1490         (d_language_defn, f_language_defn, go_language_defn)
1491         (m2_language_defn, objc_language_defn, opencl_language_defn)
1492         (pascal_language_defn, rust_language_defn): Declare.
1493         * m2-lang.c (m2_language_defn): Make extern.
1494         (_initialize_m2_language): Remove add_language call.
1495         * objc-lang.c (objc_language_defn): Make extern.
1496         (_initialize_objc_language): Remove add_language call.
1497         * opencl-lang.c (opencl_language_defn): Make extern.
1498         (_initialize_opencl_language): Remove add_language call.
1499         * p-lang.c (pascal_language_defn): Make extern.
1500         (_initialize_pascal_language): Delete.
1501         * rust-lang.c (rust_language_defn): Make extern.
1502         (_initialize_rust_language): Delete.
1503         * utils.h (compare_cstrings): New static inline function.
1504
1505 2017-07-20  Pedro Alves  <palves@redhat.com>
1506
1507         * ada-lang.c (ada_to_fixed_type_1): Adjust.
1508         (get_var_value): Constify parameters.
1509         (get_int_var_value): Change prototype.
1510         (to_fixed_range_type): Adjust.
1511         * ada-lang.h (get_int_var_value): Change prototype.
1512
1513 2017-07-20  Pedro Alves  <palves@redhat.com>
1514
1515         * dwarf2read.c (dw2_lookup_symbol): Use
1516         SYMBOL_MATCHES_SEARCH_NAME.
1517         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
1518
1519 2017-07-20  Pedro Alves  <palves@redhat.com>
1520
1521         * block.c (block_iter_name_step, block_iter_name_first)
1522         (block_iter_name_next): Delete.
1523         (block_lookup_symbol_primary): Adjust to use
1524         dict_iter_match_first/dict_iter_match_next.
1525         * block.h (block_iter_name_first, block_iter_name_next): Delete
1526         declarations.
1527         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
1528         dict_iter_match_first/dict_iter_match_next.
1529
1530 2017-07-20  Pedro Alves  <palves@redhat.com>
1531
1532         * cp-support.c (cp_find_first_component_aux): Add missing case for
1533         end of string.
1534
1535 2017-07-18  David Blaikie  <dblaikie@gmail.com>
1536
1537         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
1538         of dwo_cu's dwo_file.
1539
1540 2017-07-18  Yao Qi  <yao.qi@linaro.org>
1541
1542         * remote.c (store_registers_using_G): Remove one line comment.
1543
1544 2017-07-18  Yao Qi  <yao.qi@linaro.org>
1545
1546         * regcache.c (regcache_cpy): Simplify it.
1547         (regcache::cpy_no_passthrough): Remove it.
1548         * regcache.h (cpy_no_passthrough): Remove it.
1549         (regcache_dup, regcache_cpy): Update comments.
1550
1551 2017-07-18  Pedro Alves  <palves@redhat.com>
1552
1553         * remote-sim.c (sim_command_completer): Adjust to work with a
1554         completion_tracker instead of a VEC.
1555
1556 2017-07-17  Pedro Alves  <palves@redhat.com>
1557
1558         * completer.c (complete_source_filenames): New function.
1559         (complete_address_and_linespec_locations): New function.
1560         (location_completer): Use complete_address_and_linespec_locations.
1561         (completion_tracker::build_completion_result): Honor the tracker's
1562         request to suppress append.
1563         * completer.h (completion_tracker::suppress_append_ws)
1564         (completion_tracker::set_suppress_append_ws): New methods.
1565         (completion_tracker::m_suppress_append_ws): New field.
1566         (complete_source_filenames): New declaration.
1567         * linespec.c (linespec_complete_what): New.
1568         (struct ls_parser) <complete_what, completion_word,
1569         completion_quote_char, completion_quote_end, completion_tracker>:
1570         New fields.
1571         (string_find_incomplete_keyword_at_end): New.
1572         (linespec_lexer_lex_string): Record quote char.  If in completion
1573         mode, don't throw.
1574         (linespec_lexer_consume_token): Advance the completion word point.
1575         (linespec_lexer_peek_token): Save/restore completion info.
1576         (save_stream_and_consume_token): New.
1577         (set_completion_after_number): New.
1578         (linespec_parse_basic): Set what to complete next depending on
1579         token.  Handle function and label completions specially.
1580         (parse_linespec): Disable objc shortcut in completion mode.  Set
1581         what to complete next depending on token type.  Skip keyword if in
1582         completion mode.
1583         (complete_linespec_component, linespec_complete): New.
1584         * linespec.h (linespec_complete): Declare.
1585
1586 2017-07-17  Pedro Alves  <palves@redhat.com>
1587
1588         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
1589         Handle 'operator<' / 'operator<<'.
1590
1591 2017-07-17  Pedro Alves  <palves@redhat.com>
1592
1593         * completer.c (collect_explicit_location_matches): Handle
1594         MATCH_LABEL.
1595         (convert_explicit_location_to_linespec): New, factored out from
1596         ...
1597         (convert_explicit_location_to_sals): ... this.
1598         (complete_label): New.
1599         (linespec_complete_label, find_label_symbols_in_block): New.
1600         (find_label_symbols): Add completion_mode parameter and adjust to
1601         call find_label_symbols_in_block.
1602         * linespec.h (linespec_complete_label): Declare.
1603
1604 2017-07-17  Pedro Alves  <palves@redhat.com>
1605
1606         * ada-lang.c (ada_collect_symbol_completion_matches): Add
1607         complete_symbol_mode parameter.
1608         * cli/cli-cmds.c (complete_command): Get the completion result out
1609         of the handle_brkchars tracker if used a custom word point.
1610         * completer.c: Include "linespec.h".
1611         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
1612         (advance_to_expression_complete_word_point): New.
1613         (completion_tracker::completes_to_completion_word): New.
1614         (complete_files_symbols): Pass down
1615         complete_symbol_mode::EXPRESSION.
1616         (explicit_options, probe_options): New.
1617         (collect_explicit_location_matches): Complete on the
1618         explictit_loc->foo instead of word.  Use
1619         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
1620         keyword and options completions.
1621         (backup_text_ptr): Delete.
1622         (skip_keyword): New.
1623         (complete_explicit_location): Remove 'word' parameter.  Add
1624         language, quoted_arg_start and quoted_arg_end parameters.
1625         Rewrite, parsing left to right.
1626         (location_completer): Rewrite.
1627         (location_completer_handle_brkchars): New function.
1628         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
1629         (enum complete_line_internal_reason): Adjust comments.
1630         (completion_tracker::discard_completions): New.
1631         (completer_handle_brkchars_func_for_completer): Handle
1632         location_completer.
1633         (gdb_custom_word_point_brkchars)
1634         (gdb_org_rl_basic_quote_characters): New.
1635         (gdb_completion_word_break_characters_throw)
1636         (completion_find_completion_word): Handle trackers that use a
1637         custom word point.
1638         (completion_tracker::advance_custom_word_point_by): New.
1639         (completion_tracker::build_completion_result): Don't rely on
1640         readline appending the quote char.
1641         (gdb_rl_attempted_completion_function_throw): Handle trackers that
1642         use a custom word point.
1643         (gdb_rl_attempted_completion_function): Restore
1644         rl_basic_quote_characters.
1645         * completer.h (class completion_tracker): Extend intro comment.
1646         (completion_tracker::set_quote_char)
1647         (completion_tracker::quote_char)
1648         (completion_tracker::set_use_custom_word_point)
1649         (completion_tracker::use_custom_word_point)
1650         (completion_tracker::custom_word_point)
1651         (completion_tracker::set_custom_word_point)
1652         (completion_tracker::advance_custom_word_point_by)
1653         (completion_tracker::completes_to_completion_word)
1654         (completion_tracker::discard_completions): New methods.
1655         (completion_tracker::m_quote_char)
1656         (completion_tracker::m_use_custom_word_point)
1657         (completion_tracker::m_custom_word_point): New fields.
1658         (advance_to_expression_complete_word_point): Declare.
1659         * f-lang.c (f_collect_symbol_completion_matches): Add
1660         complete_symbol_mode parameter.
1661         * language.h (struct language_defn)
1662         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
1663         parameter.
1664         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
1665         (linespec_complete_function): New function.
1666         (linespec_lexer_lex_keyword): Adjust.
1667         * linespec.h (linespec_keywords, linespec_complete_function): New
1668         declarations.
1669         * location.c (find_end_quote): New function.
1670         (explicit_location_lex_one): Add explicit_completion_info
1671         parameter.  Save quoting info.  Don't throw if being called for
1672         completion.  Don't handle Ada operators here.
1673         (is_cp_operator, skip_op_false_positives, first_of)
1674         (explicit_location_lex_one_function): New function.
1675         (string_to_explicit_location): Replace 'dont_throw' parameter with
1676         an explicit_completion_info pointer parameter.  Handle it.  Don't
1677         use explicit_location_lex_one to lex function names.  Use
1678         explicit_location_lex_one_function instead.
1679         * location.h (struct explicit_completion_info): New.
1680         (string_to_explicit_location): Replace 'dont_throw' parameter with
1681         an explicit_completion_info pointer parameter.
1682         * symtab.c (default_collect_symbol_completion_matches_break_on):
1683         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
1684         (default_collect_symbol_completion_matches)
1685         (collect_symbol_completion_matches): Add complete_symbol_mode
1686         parameter.
1687         (collect_symbol_completion_matches_type): Pass down
1688         complete_symbol_mode::EXPRESSION.
1689         (collect_file_symbol_completion_matches): Add complete_symbol_mode
1690         parameter.  Handle LINESPEC mode.
1691         * symtab.h (complete_symbol_mode): New.
1692         (default_collect_symbol_completion_matches_break_on)
1693         (default_collect_symbol_completion_matches)
1694         (collect_symbol_completion_matches)
1695         (collect_file_symbol_completion_matches): Add complete_symbol_mode
1696         parameter.
1697
1698 2017-07-17  Pedro Alves  <palves@redhat.com>
1699
1700         * utils.c (enum class strncmp_iw_mode): New.
1701         (strcmp_iw): Rename to ...
1702         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
1703         parameters.  Handle them.
1704         (strncmp_iw): New.
1705         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
1706         * utils.h (strncmp_iw): Declare.
1707         (strcmp_iw): Move describing comments here.
1708
1709 2017-07-17  Pedro Alves  <palves@redhat.com>
1710
1711         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
1712         CP_OPERATOR_STR.
1713         * c-typeprint.c (is_type_conversion_operator): Use
1714         CP_OPERATOR_STR.
1715         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
1716         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
1717         CP_OPERATOR_LEN.
1718         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
1719         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
1720         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
1721         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
1722         CP_OPERATOR_STR.
1723         * location.c: Include "cp-support.h".
1724         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
1725         CP_OPERATOR_STR.
1726         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
1727         CP_OPERATOR_LEN.
1728
1729 2017-07-17  Pedro Alves  <palves@redhat.com>
1730
1731         * cli/cli-cmds.c (complete_command): Use a completion tracker
1732         along with completion_find_completion_word for handle_brkchars
1733         phase.
1734         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
1735         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
1736         (struct gdb_rl_completion_word_info): New.
1737         (gdb_rl_find_completion_word): New.
1738         (completion_find_completion_word): New.
1739         * completer.h (completion_find_completion_word): Declare.
1740
1741 2017-07-17  Pedro Alves  <palves@redhat.com>
1742
1743         * ada-lang.c (symbol_completion_match): Adjust comments.
1744         (symbol_completion_add): Replace vector parameter with
1745         completion_tracker parameter.  Use it.
1746         (ada_make_symbol_completion_list): Rename to...
1747         (ada_collect_symbol_completion_matches): ... this.  Add
1748         completion_tracker parameter and use it.
1749         (ada_language_defn): Adjust.
1750         * break-catch-syscall.c (catch_syscall_completer): Adjust
1751         prototype and work with completion_tracker instead of VEC.
1752         * breakpoint.c (condition_completer): Adjust prototype and work
1753         with completion_tracker instead of VEC.
1754         * c-lang.c (c_language_defn, cplus_language_defn)
1755         (asm_language_defn, minimal_language_defn): Adjust to renames.
1756         * cli/cli-cmds.c (complete_command): Rework using
1757         completion_tracker.  Catch exceptions when completing.
1758         * cli/cli-decode.c (integer_unlimited_completer)
1759         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
1760         with completion_tracker instead of VEC.
1761         * command.h (struct completion_tracker): Forward declare.
1762         (completer_ftype, completer_handle_brkchars_ftype): Change
1763         types.
1764         (complete_on_cmdlist, complete_on_enum): Adjust.
1765         * completer.c: Include <algorithm>.
1766         (struct gdb_completer_state): New.
1767         (current_completion): New global.
1768         (readline_line_completion_function): Delete.
1769         (noop_completer, filename_completer)
1770         (filename_completer_handle_brkchars, complete_files_symbols)
1771         (linespec_location_completer): Adjust to work with a
1772         completion_tracker instead of a VEC.
1773         (string_or_empty): New.
1774         (collect_explicit_location_matches): Adjust to work with a
1775         completion_tracker instead of a VEC.
1776         (explicit_location_completer): Rename to ...
1777         (complete_explicit_location): ... this and adjust to work with a
1778         completion_tracker instead of a VEC.
1779         (location_completer): Adjust to work with a completion_tracker
1780         instead of a VEC.
1781         (add_struct_fields): Adjust to work with a completion_list instead
1782         of VEC.
1783         (expression_completer): Rename to ...
1784         (complete_expression): ... this and adjust to work with a
1785         completion_tracker instead of a VEC.  Use complete_files_symbols.
1786         (expression_completer): Reimplement on top of complete_expression.
1787         (symbol_completer): Adjust to work with a completion_tracker
1788         instead of a VEC.
1789         (enum complete_line_internal_reason): Add describing comments.
1790         (complete_line_internal_normal_command): Adjust to work with a
1791         completion_tracker instead of a VEC.
1792         (complete_line_internal): Rename to ...
1793         (complete_line_internal_1): ... this and adjust to work with a
1794         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
1795         handle_brkchars phase.
1796         (new_completion_tracker): Delete.
1797         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
1798         complete_line_internal_1.
1799         (free_completion_tracker): Delete.
1800         (INITIAL_COMPLETION_HTAB_SIZE): New.
1801         (completion_tracker::completion_tracker)
1802         (completion_tracker::~completion_tracker): New.
1803         (maybe_add_completion): Delete.
1804         (completion_tracker::maybe_add_completion)
1805         (completion_tracker::add_completion)
1806         (completion_tracker::add_completions): New.
1807         (throw_max_completions_reached_error): Delete.
1808         (complete_line): Adjust to work with a completion_tracker instead
1809         of a VEC.  Don't create a completion_tracker_t or check for max
1810         completions here.
1811         (command_completer, command_completer_handle_brkchars)
1812         (signal_completer, reg_or_group_completer_1)
1813         (reg_or_group_completer, default_completer_handle_brkchars):
1814         Adjust to work with a completion_tracker.
1815         (gdb_completion_word_break_characters_throw): New.
1816         (gdb_completion_word_break_characters): Reimplement.
1817         (line_completion_function): Delete.
1818         (completion_tracker::recompute_lowest_common_denominator)
1819         (expand_preserving_ws)
1820         (completion_tracker::build_completion_result)
1821         (completion_result::completion_result)
1822         (completion_result::completion_result)
1823         (completion_result::~completion_result)
1824         (completion_result::completion_result)
1825         (completion_result::release_match_list, compare_cstrings)
1826         (completion_result::sort_match_list)
1827         (completion_result::reset_match_list)
1828         (gdb_rl_attempted_completion_function_throw)
1829         (gdb_rl_attempted_completion_function): New.
1830         * completer.h (completion_list, struct completion_result)
1831         (class completion_tracker): New.
1832         (complete_line): Add completion_tracker parameter.
1833         (readline_line_completion_function): Delete.
1834         (gdb_rl_attempted_completion_function): New.
1835         (noop_completer, filename_completer, expression_completer)
1836         (location_completer, symbol_completer, command_completer)
1837         (signal_completer, reg_or_group_completer): Update prototypes.
1838         (completion_tracker_t, new_completion_tracker)
1839         (make_cleanup_free_completion_tracker): Delete.
1840         (enum maybe_add_completion_enum): Delete.
1841         (maybe_add_completion): Delete.
1842         (throw_max_completions_reached_error): Delete.
1843         * corefile.c (complete_set_gnutarget): Adjust to work with a
1844         completion_tracker instead of a VEC.
1845         * cp-abi.c (cp_abi_completer): Adjust to work with a
1846         completion_tracker instead of a VEC.
1847         * d-lang.c (d_language_defn): Adjust.
1848         * disasm.c (disassembler_options_completer): Adjust to work with a
1849         completion_tracker instead of a VEC.
1850         * f-lang.c (f_make_symbol_completion_list): Rename to ...
1851         (f_collect_symbol_completion_matches): ... this.  Adjust to work
1852         with a completion_tracker instead of a VEC.
1853         (f_language_defn): Adjust.
1854         * go-lang.c (go_language_defn): Adjust.
1855         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
1856         Adjust to work with a completion_tracker instead of a VEC.
1857         * infrun.c (handle_completer): Likewise.
1858         * interps.c (interpreter_completer): Likewise.
1859         * interps.h (interpreter_completer): Likewise.
1860         * language.c (unknown_language_defn, auto_language_defn)
1861         (local_language_defn): Adjust.
1862         * language.h (language_defn::la_make_symbol_completion_list):
1863         Rename to ...
1864         (language_defn::la_collect_symbol_completion_matches): ... this
1865         and adjust to work with a completion_tracker instead of a VEC.
1866         * m2-lang.c (m2_language_defn): Adjust.
1867         * objc-lang.c (objc_language_defn): Adjust.
1868         * opencl-lang.c (opencl_language_defn): Adjust.
1869         * p-lang.c (pascal_language_defn): Adjust.
1870         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
1871         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
1872         with a completion_tracker.
1873         * rust-lang.c (rust_language_defn): Adjust.
1874         * symtab.c (free_completion_list, do_free_completion_list)
1875         (return_val, completion_tracker): Delete.
1876         (completion_list_add_name, completion_list_add_symbol)
1877         (completion_list_add_msymbol, completion_list_objc_symbol)
1878         (completion_list_add_fields, add_symtab_completions): Add
1879         completion_tracker parameter and use it.
1880         (default_make_symbol_completion_list_break_on_1): Rename to...
1881         (default_collect_symbol_completion_matches_break_on): ... this.
1882         Add completion_tracker parameter and use it instead of allocating
1883         a completion tracker here.
1884         (default_make_symbol_completion_list_break_on): Delete old
1885         implementation.
1886         (default_make_symbol_completion_list): Delete.
1887         (default_collect_symbol_completion_matches): New.
1888         (make_symbol_completion_list): Delete.
1889         (collect_symbol_completion_matches): New.
1890         (make_symbol_completion_type): Rename to ...
1891         (collect_symbol_completion_matches_type): ... this.  Add
1892         completion_tracker parameter and use it instead of VEC.
1893         (make_file_symbol_completion_list_1): Rename to...
1894         (collect_file_symbol_completion_matches): ... this.  Add
1895         completion_tracker parameter and use it instead of VEC.
1896         (make_file_symbol_completion_list): Delete.
1897         (add_filename_to_list): Use completion_list instead of a VEC.
1898         (add_partial_filename_data::list): Now a completion_list.
1899         (make_source_files_completion_list): Work with a completion_list
1900         instead of a VEC.
1901         * symtab.h: Include "completer.h".
1902         (default_make_symbol_completion_list_break_on)
1903         (default_make_symbol_completion_list, make_symbol_completion_list)
1904         (make_symbol_completion_type, make_file_symbol_completion_list)
1905         (make_source_files_completion_list): Delete.
1906         (default_collect_symbol_completion_matches_break_on)
1907         (default_collect_symbol_completion_matches)
1908         (collect_symbol_completion_matches)
1909         (collect_symbol_completion_matches_type)
1910         (collect_file_symbol_completion_matches)
1911         (make_source_files_completion_list): New.
1912         * top.c (init_main): Don't install a rl_completion_entry_function
1913         hook.  Install a rl_attempted_completion_function hook instead.
1914         * tui/tui-layout.c (layout_completer): Adjust to work with a
1915         completion_tracker.
1916         * tui/tui-regs.c (tui_reggroup_completer):
1917         * tui/tui-win.c (window_name_completer, focus_completer)
1918         (winheight_completer): Adjust to work with a completion_tracker.
1919         * value.c: Include "completer.h".
1920         (complete_internalvar): Adjust to work with a completion_tracker.
1921         * value.h (complete_internalvar): Likewise.
1922
1923 2017-07-17  Pedro Alves  <palves@redhat.com>
1924
1925         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
1926         renames.
1927         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
1928         comments to completer_ftype's declaration.
1929         <completer_handle_brkchars>: Change type to
1930         completer_handle_brkchars_ftype.
1931         * command.h (completer_ftype): Add describing comment and give
1932         names to parameters.
1933         (completer_ftype_void): Rename to ...
1934         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
1935         (set_cmd_completer_handle_brkchars): Adjust.
1936         * completer.c (filename_completer_handle_brkchars): New function.
1937         (complete_line_internal_normal_command): New function, factored
1938         out from ...
1939         (complete_line_internal): ... here.
1940         (command_completer_handle_brkchars)
1941         (default_completer_handle_brkchars)
1942         (completer_handle_brkchars_func_for_completer): New functions.
1943         * completer.h (set_gdb_completion_word_break_characters): Delete
1944         declaration.
1945         (completer_handle_brkchars_func_for_completer): New declaration.
1946         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
1947         completer_handle_brkchars_func_for_completer.
1948
1949 2017-07-17  Pedro Alves  <palves@redhat.com>
1950
1951         * completer.c (symbol_completer): New function, based on
1952         make_symbol_completion_list_fn.
1953         * completer.h (symbol_completer): New declaration.
1954         * guile/scm-cmd.c (cmdscm_completers): Adjust.
1955         * python/py-cmd.c (completers): Adjust.
1956         * symtab.c (make_symbol_completion_list_fn): Delete.
1957         * symtab.h (make_symbol_completion_list_fn): Delete.
1958         * cli/cli-decode.c (add_cmd): Adjust.
1959
1960 2017-07-17  Pedro Alves  <palves@redhat.com>
1961
1962         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
1963         * dwarf2read.c: Include "filename-seen-cache.h".
1964         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
1965         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
1966         * filename-seen-cache.c: New file.
1967         * filename-seen-cache.h: New file.
1968         * symtab.c: Include "filename-seen-cache.h".
1969         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
1970         (create_filename_seen_cache, clear_filename_seen_cache)
1971         (delete_filename_seen_cache, filename_seen): Delete, parts moved
1972         to filename-seen-cache.h/filename-seen-cache.c.
1973         (output_source_filename, sources_info)
1974         (maybe_add_partial_symtab_filename)
1975         (make_source_files_completion_list): Adjust to use
1976         filename_seen_cache.
1977
1978 2017-07-17  Pedro Alves  <palves@redhat.com>
1979
1980         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
1981         fields.
1982         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
1983         dwarf2_debug_sections*)): New.
1984         (dwarf2_per_objfile::dwarf2_per_objfile(const
1985         dwarf2_per_objfile&)): Declare as deleted.
1986         (dwarf2_per_objfile::operator=): Declare as deleted.
1987         (dwarf2_per_objfile::dwarf2_per_objfile)
1988         (dwarf2_per_objfile::~dwarf2_per_objfile)
1989         (dwarf2_per_objfile::free_cached_comp_units): New.
1990         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
1991         ctor.  Call dwarf2_per_objfile's ctor manually.
1992         (dwarf2_locate_sections): Deleted/refactored as ...
1993         (dwarf2_per_objfile::locate_sections): ... this new method.
1994         (free_cached_comp_units): Defer to
1995         dwarf2_per_objfile::free_cached_comp_units.
1996         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
1997
1998 2017-07-14  Tom Tromey  <tom@tromey.com>
1999
2000         PR rust/21764:
2001         * rust-exp.y (convert_ast_to_expression): Add "want_type"
2002         parameter.
2003         <UNOP_SIZEOF>: Split into separate case.
2004         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
2005
2006 2017-07-14  Tom Tromey  <tom@tromey.com>
2007
2008         PR rust/21763:
2009         * symtab.c (symbol_matches_domain): Add language_rust to special
2010         case.
2011         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2012         treat LOC_TYPEDEF symbols as variables.
2013
2014 2017-07-14  Pedro Alves  <palves@redhat.com>
2015
2016         * symtab.c (make_file_symbol_completion_list_1): Iterate over
2017         symtabs matching all symtabs with SRCFILE as file name instead of
2018         only considering the first hit, with lookup_symtab.
2019
2020 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2021
2022         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2023         operator_name parameters.
2024         (gen_expr): Update function call.
2025
2026 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2027
2028         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2029         parameter.
2030         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2031         Likewise.
2032         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2033         parameter, use agent_expr::gdbarch instead, update function
2034         calls.
2035         (locexpr_tracepoint_var_ref): Likewise.
2036         (loclist_tracepoint_var_ref): Likewise.
2037         * ax-gdb.c (gen_trace_static_fields): Likewise.
2038         (gen_traced_pop): Likewise.
2039         (gen_frame_args_address): Likewise.
2040         (gen_frame_locals_address): Likewise.
2041         (gen_var_ref): Likewise.
2042         (gen_struct_ref_recursive): Likewise.
2043         (gen_static_field): Likewise.
2044         (gen_maybe_namespace_elt): Likewise.
2045         (gen_expr): Likewise.
2046         (gen_trace_for_var): Likewise.
2047         (gen_trace_for_expr): Likewise.
2048         (gen_trace_for_return_address): Likewise.
2049
2050 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2051
2052         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2053         parameter.
2054         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2055
2056 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2057
2058         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2059         from ax, update calls.
2060         (gen_usual_arithmetic): Likewise.
2061         (gen_integral_promotions): Likewise.
2062         (gen_bitfield_ref): Likewise.
2063         (gen_primitive_field): Likewise.
2064         (gen_struct_ref_recursive): Likewise.
2065         (gen_struct_ref): Likewise.
2066         (gen_maybe_namespace_elt): Likewise.
2067         (gen_struct_elt_for_reference): Likewise.
2068         (gen_namespace_elt): Likewise.
2069         (gen_aggregate_elt_ref): Likewise.
2070         (gen_expr): Get gdbarch from ax, update calls.
2071         (gen_expr_binop_rest): Likewise.
2072
2073 2017-07-13  Pedro Alves  <palves@redhat.com>
2074
2075         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2076         as default tdesc.
2077         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2078         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2079         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2080         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
2081         tdep.
2082         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2083         Get final tdesc from the tdep.
2084         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2085         default tdesc.
2086         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2087         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2088         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2089         Use it as default tdesc.
2090         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2091         down to amd_init_abi.  No longer handle fallback tdesc here.
2092         * amd64-tdep.h (tdesc_x32): Declare.
2093         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2094         parameter.
2095         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2096         as default tdesc.
2097
2098 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2099
2100         * s390-linux-tdep.c (s390_process_record): Add support for
2101         instructions new in arch12.
2102
2103 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2104
2105         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2106         PT_GETFSBASE and PT_GETGSBASE.
2107         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2108         PT_SETGSBASE.
2109
2110 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2111
2112         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2113         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2114         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2115         those rules.
2116         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2117         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2118         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2119         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2120         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2121         * features/i386/amd64.xml: Add 64bit-segments.xml.
2122         * features/i386/amd64-avx-avx512.c: Regenerated.
2123         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2124         * features/i386/amd64-avx-mpx.c: Regenerated.
2125         * features/i386/amd64-avx.c: Regenerated.
2126         * features/i386/amd64-mpx.c: Regenerated.
2127         * features/i386/amd64.c: Regenerated.
2128         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2129         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2130         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2131         * regformats/i386/amd64-avx.dat: Regenerated.
2132         * regformats/i386/amd64-mpx.dat: Regenerated.
2133         * regformats/i386/amd64.dat: Regenerated.
2134
2135 2017-07-10  Yao Qi  <yao.qi@linaro.org>
2136
2137         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2138         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2139
2140 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2141
2142         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2143         unsetenv.
2144         * gnulib/aclocal.m4: Regenerate.
2145         * gnulib/config.in: Regenerate.
2146         * gnulib/configure: Regenerate.
2147         * gnulib/import/Makefile.am: Regenerate.
2148         * gnulib/import/Makefile.in: Regenerate.
2149         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2150         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2151         * gnulib/import/m4/environ.m4: New file.
2152         * gnulib/import/m4/setenv.m4: New file.
2153         * gnulib/import/setenv.c: New file.
2154         * gnulib/import/unsetenv.c: New file.
2155
2156 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
2157
2158         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2159         address when op is DW_OP_addr.
2160
2161 2017-07-09  Tom Tromey  <tom@tromey.com>
2162
2163         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2164         check and apply to outer type.
2165
2166 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2167
2168         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2169         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2170         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2171         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2172
2173 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2174
2175         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2176
2177 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2178
2179         * corelow.c (get_core_siginfo): Remove.
2180         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2181         instead of get_core_siginfo.
2182         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2183         * gdbarch.h: Re-generate.
2184         * gdbarch.c: Re-generate.
2185         * linux-tdep.c (linux_core_xfer_siginfo): New.
2186         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2187
2188 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2189
2190         * corelow.c (thread_section_name): Move to ...
2191         * gdbcore.h (thread_section_name): ... here.
2192
2193 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2194
2195         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2196         (struct siginfo32): New.
2197         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2198         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2199         via ptrace(PT_LWPINFO).
2200
2201 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2202
2203         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2204         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2205         (fbsd_get_siginfo_type): New.
2206         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2207         (_initialize_fbsd_tdep): New.
2208
2209 2017-07-06  David Blaikie  <dblaikie@gmail.com>
2210
2211         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2212         a singular dwo_unit*) to support multiple CUs in the same way that
2213         multiple TUs are supported.
2214         (create_cus_hash_table): Replace create_dwo_cu with a function for
2215         parsing multiple CUs from a DWO file.
2216         (open_and_init_dwo_file): Use create_cus_hash_table rather than
2217         create_dwo_cu.
2218         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2219         htab_find, rather than comparing the signature to a singleton CU in
2220         the dwo_file.
2221
2222 2017-07-06  Pedro Alves  <palves@redhat.com>
2223
2224         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2225
2226 2017-07-04  Pedro Alves  <palves@redhat.com>
2227
2228         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2229         * gdbtypes.h (TYPE_STATIC): Delete.
2230         (struct fn_field) <is_public, is_abstract, is_static, is_final,
2231         is_synchronized, is_native>: Delete.
2232         <dummy>: Bump.
2233         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2234         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2235         (TYPE_FN_FIELD_ABSTRACT): Delete.
2236
2237 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
2238
2239         * buffer.h (buffer_finish): Fix spelling mistakes.
2240
2241 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
2242
2243         * .dir-locals.el: Automatically switch to C-style comments in
2244         versions of Emacs that support the feature.
2245
2246 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2247             Pedro Alves  <palves@redhat.com>
2248
2249         PR cli/21688
2250         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2251         (process_next_line): New variable 'inline_cmd'.
2252         Adjust 'if' clauses for "python", "compile" and "guile" to use
2253         'command_name_equals' and check for '!inline_cmd'.
2254
2255 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2256
2257         PR cli/21688
2258         * cli/cli-script.c (command_name_equals_not_inline): New function.
2259         (process_next_line): Adjust 'if' clauses for "python", "compile"
2260         and "guile" to use command_name_equals_not_inline.
2261
2262 2017-06-29  Pedro Alves  <palves@redhat.com>
2263
2264         * completer.c (expression_completer): Call
2265         linespec_location_completer instead of location_completer.
2266
2267 2017-06-29  Pedro Alves  <palves@redhat.com>
2268
2269         * completer.c (expression_completer): Remove code that recomputes
2270         'text' from 'word'.
2271
2272 2017-06-29  Yao Qi  <yao.qi@linaro.org>
2273
2274         * regformats/regdat.sh: Generate code with
2275         "ifndef IN_PROCESS_AGENT".
2276
2277 2017-06-28  Pedro Alves  <palves@redhat.com>
2278
2279         * command.h: Include "common/scoped_restore.h".
2280
2281 2017-06-28  Yao Qi  <yao.qi@linaro.org>
2282
2283         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2284         instead of obstack_grow.
2285
2286 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
2287
2288         PR gdb/21337
2289         * symfile.c (reread_symbols): Call objfiles_changed just before
2290         read_symbols.
2291
2292 2017-06-27  Pedro Alves  <palves@redhat.com>
2293
2294         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2295         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2296         (completion_list_add_symbol, completion_list_add_msymbol):
2297         ... these new functions.
2298         (add_symtab_completions)
2299         (default_make_symbol_completion_list_break_on_1): Adjust.
2300
2301 2017-06-27  Pedro Alves  <palves@redhat.com>
2302
2303         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2304         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
2305         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2306         dtor.
2307         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
2308         'storage_obstack' field an auto_obstack.  In-class initialize all
2309         non-bitfield fields.  Make minsyms_read bool.
2310         * symfile.c (read_symbols): Adjust.
2311
2312 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
2313
2314         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2315         (gdbsim_store_register): Likewise.
2316
2317 2017-06-27  Pedro Alves  <palves@redhat.com>
2318
2319         * c-exp.y (name_obstack): Now an auto_obstack.
2320         (yylex): Use auto_obstack::clear.
2321         (c_parse): Use auto_obstack::clear instead of reinitializing and
2322         freeing the obstack.
2323         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2324         * d-exp.y (name_obstack): Now an auto_obstack.
2325         (yylex): Use auto_obstack::clear.
2326         (d_parse): Use auto_obstack::clear instead of reinitializing and
2327         freeing the obstack.
2328         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2329         auto_obstack.
2330         * dwarf2read.c (create_addrmap_from_index)
2331         (dwarf2_build_psymtabs_hard)
2332         (update_enumeration_type_from_children): Likewise.
2333         * gdb_obstack.h (auto_obstack): New type.
2334         * go-exp.y (name_obstack): Now an auto_obstack.
2335         (build_packaged_name): Use auto_obstack::clear.
2336         (go_parse): Use auto_obstack::clear instead of reinitializing and
2337         freeing the obstack.
2338         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2339         auto_obstack.
2340         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2341         * rust-exp.y (work_obstack): Now an auto_obstack.
2342         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2343         reinitializing and freeing the obstack.
2344         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2345         (host_char_to_target): Use auto_obstack.
2346         * utils.h (make_cleanup_obstack_free): Delete declaration.
2347         * valprint.c (generic_emit_char, generic_printstr): Use
2348         auto_obstack.
2349
2350 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2351
2352         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2353         thread.
2354         (darwin_init_thread_list): Don't update dummy thread.
2355         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2356
2357 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2358
2359         * record-full.c (netorder16): Remove.
2360
2361 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2362
2363         * common/diagnostics.h: Define macros for GCC.
2364         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2365         * common/vec.h: Include diagnostics.h.
2366         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2367         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2368         warning.
2369
2370 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2371
2372         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2373         New macro.
2374         * ada-lex.l: Ignore deprecated register warnings.
2375
2376 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2377
2378         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2379         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2380
2381 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2382
2383         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2384         its own line.
2385
2386 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2387
2388         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2389
2390 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
2391
2392         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2393         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2394         (xtensa_register_read_masked): Likewise.
2395
2396 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2397
2398         * common/environ.c (gdb_environ::unset): Update comment.
2399
2400 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2401
2402         * python/py-unwind.c (pyuw_sniffer): Allocate space for
2403         registers.
2404
2405 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2406
2407         * record-full.c (record_full_exec_insn): Use byte_vector.
2408
2409 2017-06-22  Yao Qi  <yao.qi@linaro.org>
2410
2411         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2412         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2413
2414 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2415
2416         * remote.c (cached_reg): Move from here...
2417         * regcache.h (cached_reg): ...to here.
2418         * python/py-unwind.c (struct reg_info): Remove.
2419         (cached_frame_info): Use cached_reg_t.
2420         (pyuw_prev_register): Likewise.
2421         (pyuw_sniffer): Use cached_reg_t and allocate registers.
2422         (pyuw_dealloc_cache): Free all registers.
2423
2424 2017-06-22  Pedro Alves  <palves@redhat.com>
2425             Simon Marchi  <simon.marchi@ericsson.com>
2426
2427         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2428         warning.
2429         * common/diagnostics.h: New file.
2430
2431 2017-06-22  Pedro Alves  <palves@redhat.com>
2432
2433         * common/agent.h: Add include guards.
2434
2435 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
2436
2437         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2438         talk about addressable units instead of bytes.
2439
2440 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2441
2442         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2443         of '::const_iterator'.
2444
2445 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2446
2447         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2448         'unittests/environ-selftests.c'.
2449         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2450         * charset.c (find_charset_names): Declare object 'iconv_env'.
2451         Update code to use 'iconv_env' object.  Remove call to
2452         'free_environ'.
2453         * common/environ.c: Include <utility>.
2454         (make_environ): Delete function.
2455         (free_environ): Delete function.
2456         (gdb_environ::clear): New function.
2457         (gdb_environ::operator=): New function.
2458         (gdb_environ::get): Likewise.
2459         (environ_vector): Delete function.
2460         (set_in_environ): Delete function.
2461         (gdb_environ::set): New function.
2462         (unset_in_environ): Delete function.
2463         (gdb_environ::unset): New function.
2464         (gdb_environ::envp): Likewise.
2465         * common/environ.h: Include <vector>.
2466         (struct gdb_environ): Delete; transform into...
2467         (class gdb_environ): ... this class.
2468         (free_environ): Delete prototype.
2469         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
2470         environ_vector): Likewise.
2471         * infcmd.c (run_command_1): Update code to call
2472         'envp' from 'gdb_environ' class.
2473         (environment_info): Update code to call methods from 'gdb_environ'
2474         class.
2475         (unset_environment_command): Likewise.
2476         (path_info): Likewise.
2477         (path_command): Likewise.
2478         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
2479         (inferior::inferior): Initialize 'environment' using the host's
2480         information.
2481         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
2482         Include "environ.h".
2483         (class inferior) <environment>: Change type from 'struct
2484         gdb_environ' to 'gdb_environ'.
2485         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
2486         methods from 'gdb_environ' class.
2487         * solib.c (solib_find_1): Likewise
2488         * unittests/environ-selftests.c: New file.
2489
2490 2017-06-20  Yao Qi  <yao.qi@linaro.org>
2491
2492         * features/i386/i386-linux.xml: Exchange the order of including
2493         32bit-linux.xml and 32bit-sse.xml.
2494         * features/i386/i386-linux.c: Regenerated.
2495
2496 2017-06-20  Yao Qi  <yao.qi@linaro.org>
2497
2498         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
2499         Delete copy ctor and assignment operator.
2500         (tdesc_type): Likewise.
2501         (tdesc_feature): Likewise.
2502         (tdesc_free_reg): Remove.
2503         (tdesc_create_reg): Use new.
2504         (tdesc_free_type): Remove.
2505         (tdesc_create_vector): Use new.
2506         (tdesc_create_union): Likewise.
2507         (tdesc_create_flags): Likewise.
2508         (tdesc_create_enum): Likewise.
2509         (tdesc_free_feature): Delete.
2510         (free_target_description): Use delete.
2511
2512 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
2513
2514         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
2515         registers.
2516
2517 2017-06-19  Pedro Alves  <palves@redhat.com>
2518
2519         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
2520         after gdb::unlinker.
2521
2522 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2523
2524         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
2525         gdb_environ to access an environment variable.
2526
2527 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
2528
2529         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
2530         gdb_byte*.
2531
2532 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2533
2534         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
2535
2536 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2537
2538         * configure: Re-generate.
2539         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
2540
2541 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2542
2543         * configure: Re-generate.
2544         * warning.m4: Pass -Werror to compiler when checking for
2545         supported warning flags.
2546
2547 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2548
2549         * Makefile.in (COMPILE.pre): Add "-x c++".
2550
2551 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
2552             Pedro Alves  <palves@redhat.com>
2553             Yao Qi  <yao.qi@linaro.org>
2554
2555         * defs.h (RequireLongest): New.
2556         (extract_integer): Declare function template.
2557         (extract_signed_integer): Remove the declaration, but define it
2558         static inline.
2559         (extract_unsigned_integer): Likewise.
2560         (store_integer): Declare function template.
2561         (store_signed_integer): Remove the declaration, but define it
2562         static inline.
2563         (store_unsigned_integer): Likewise.
2564         * findvar.c (extract_integer): New function template.
2565         (extract_signed_integer): Remove.
2566         (extract_unsigned_integer): Remove.
2567         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
2568         instantiations.
2569         (store_integer): New function template.
2570         (store_signed_integer): Remove.
2571         (store_unsigned_integer): Remove.
2572         (store_integer): Explicit instantiations.
2573         * regcache.c (regcache_raw_read_signed): Update.
2574         (regcache::raw_read): New function.
2575         (regcache::raw_read_signed): Remove.
2576         (regcache::raw_read_unsigned): Remove.
2577         (regcache_raw_read_unsigned): Update.
2578         (regcache_raw_write_unsigned): Update.
2579         (regcache::raw_write_signed): Remove.
2580         (regcache::raw_write): New function.
2581         (regcache_cooked_read_signed): Update.
2582         (regcache::raw_write_unsigned): Remove.
2583         (regcache::cooked_read_signed): Remove.
2584         (regcache_cooked_read_unsigned): Update.
2585         (regcache::cooked_read_unsigned): Remove.
2586         (regcache_cooked_write_signed): Update.
2587         (regcache_cooked_write_unsigned): Update.
2588         * regcache.h (regcache) <raw_read_signed>: Remove.
2589         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
2590         <raw_read, raw_write>: New.
2591         <cooked_read_signed, cooked_write_signed>: Remove.
2592         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
2593         <cooked_read, cooked_write>: New.
2594         * sh64-tdep.c (sh64_pseudo_register_read): Update.
2595         (sh64_pseudo_register_write): Update.
2596
2597 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
2598
2599         * arc-tdep.c (arc_disassembler_options): New variable.
2600         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
2601         of default_print_insn.
2602         (arc_delayed_print_insn): Set info->section when needed,
2603         use default_print_insn to retrieve a disassembler.
2604
2605 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
2606
2607         PR gdb/21574
2608         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
2609         to mention $SHELL and startup-with-shell.
2610
2611 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
2612
2613         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
2614
2615 2017-06-14  Yao Qi  <yao.qi@linaro.org>
2616
2617         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
2618         default_print_insn instead of print_insn_aarch64.
2619         * arm-tdep.c (gdb_print_insn_arm): Call
2620         default_print_insn instead of print_insn_big_arm
2621         and print_insn_little_arm.
2622         * i386-tdep.c (i386_print_insn): Call default_print_insn
2623         instead of print_insn_i386.
2624         * ia64-tdep.c (ia64_print_insn): Call
2625         default_print_insn instead of print_insn_ia64.
2626         * mips-tdep.c (gdb_print_insn_mips): Call
2627         default_print_insn instead of print_insn_big_mips
2628         and print_insn_little_mips.
2629         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
2630         instead of print_insn_spu.
2631
2632 2017-06-14  Pedro Alves  <palves@redhat.com>
2633
2634         * ada-lang.c: Include "common/byte-vector.h".
2635         (ada_value_primitive_packed_val): Use gdb::byte_vector.
2636         * charset.c (wchar_iterator::iterate): Resize the vector instead
2637         of reserving it.
2638         * common/byte-vector.h: Include "common/def-vector.h".
2639         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
2640         * cli/cli-dump.c: Include "common/byte-vector.h".
2641         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
2642         * common/byte-vector.h: New file.
2643         * common/def-vector.h: New file.
2644         * common/default-init-alloc.h: New file.
2645         * dwarf2loc.c: Include "common/byte-vector.h".
2646         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
2647         instead of reserving it.
2648         * dwarf2read.c: Include "common/byte-vector.h".
2649         (data_buf::m_vec): Now a gdb::byte_vector.
2650         * gdb_regex.c: Include "common/def-vector.h".
2651         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
2652         * mi/mi-main.c: Include "common/byte-vector.h".
2653         (mi_cmd_data_read_memory): Use gdb::byte_vector.
2654         * printcmd.c: Include "common/byte-vector.h".
2655         (print_scalar_formatted): Use gdb::byte_vector.
2656         * valprint.c: Include "common/byte-vector.h".
2657         (maybe_negate_by_bytes, print_decimal_chars): Use
2658         gdb::byte_vector.
2659
2660 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2661
2662         * darwin-nat.c: Include "nat/fork-inferior.h".
2663
2664 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2665
2666         * configure.nat: Factor out Darwin bits that are not
2667         architecture-specific.  Add fork-inferior.o.
2668
2669 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2670
2671         * configure.nat: Factor out AIX bits that are not
2672         architecture-specific.  Add fork-inferior.o.
2673
2674 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2675
2676         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
2677         (read_pieced_value, write_pieced_value): ...here.  Reduce to
2678         wrappers that just call rw_pieced_value.
2679
2680 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2681
2682         * dwarf2loc.c (write_pieced_value): When writing the data for a
2683         memory piece, use write_memory_with_notification instead of
2684         write_memory.
2685
2686 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2687
2688         * valops.c (read_value_memory): Change embedded_offset to
2689         represent a bit offset instead of a byte offset.
2690         * value.h (read_value_memory): Adjust comment.
2691
2692 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2693
2694         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
2695         dest_offset_bits and source_offset_bits.
2696         (write_pieced_value): Likewise.
2697
2698 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2699
2700         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
2701         given by DW_OP_bit_piece.
2702         (write_pieced_value): Likewise.
2703
2704 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2705
2706         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
2707         some other preparations to the places where sufficient information
2708         is available.
2709         (write_pieced_value): Likewise.
2710
2711 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2712
2713         * dwarf2loc.c (bits_to_bytes): New function.
2714         (read_pieced_value): Fix offset calculations for register pieces
2715         on big-endian targets.
2716         (write_pieced_value): Likewise.
2717
2718 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2719
2720         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
2721         (write_pieced_value): Likewise.
2722
2723 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2724
2725         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
2726         transfer the source value's least significant bits, instead of its
2727         lowest-addressed ones.  Rename type_len to max_offset.
2728         (read_pieced_value): Mirror above changes to write_pieced_value as
2729         applicable.
2730
2731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2732
2733         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
2734         truncate full bytes from dest_offset_bits before using it as an
2735         offset into the buffer.
2736
2737 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2738
2739         * dwarf2loc.c (write_pieced_value): Include transfer size in
2740         byte-wise check.
2741
2742 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2743
2744         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
2745         calculation of this_size.
2746
2747 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2748
2749         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
2750         when targeting a bit-field.
2751         (write_pieced_value): Likewise.
2752
2753 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2754
2755         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
2756         (allocate_piece_closure): Drop addr_size parameter.
2757         (dwarf2_evaluate_loc_desc_full): Adjust call to
2758         allocate_piece_closure.
2759
2760 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2761
2762         PR gdb/21226
2763         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
2764         the LSB end, independent of endianness.
2765
2766 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2767
2768         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
2769         size capping.
2770
2771 2017-06-13  Yao Qi  <yao.qi@linaro.org>
2772
2773         * mips-linux-nat.c: Move include features/mips*-linux.c to
2774         mips-linux-tdep.c.
2775         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
2776         to mips-linux-tdep.c.
2777         * mips-linux-tdep.c: Include features/mips*-linux.c
2778         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
2779         functions.
2780         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
2781         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
2782         (tdesc_mips64_dsp_linux): Declare.
2783
2784 2017-06-12  Tom Tromey  <tom@tromey.com>
2785
2786         * valprint.h (val_print_type_code_int): Remove.
2787         * valprint.c (generic_val_print_int): Always call
2788         val_print_scalar_formatted.
2789         (val_print_type_code_int): Remove.
2790         * printcmd.c (print_scalar_formatted): Handle options->format==0.
2791         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
2792         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
2793         * ada-valprint.c (ada_val_print_num): Use
2794         val_print_scalar_formatted.
2795
2796 2017-06-12  Tom Tromey  <tom@tromey.com>
2797
2798         * printcmd.c (print_scalar_formatted): Unify the two switches.
2799         Don't convert scalars to LONGEST.
2800
2801 2017-06-12  Tom Tromey  <tom@tromey.com>
2802
2803         PR exp/16225:
2804         * valprint.h (print_decimal_chars): Update.
2805         * valprint.c (maybe_negate_by_bytes): New function.
2806         (print_decimal_chars): Add "is_signed" argument.
2807         * printcmd.c (print_scalar_formatted): Update.
2808
2809 2017-06-12  Tom Tromey  <tom@tromey.com>
2810
2811         PR exp/16225:
2812         * valprint.h (print_binary_chars, print_hex_chars): Update.
2813         * valprint.c (val_print_type_code_int): Update.
2814         (print_binary_chars): Add "zero_pad" argument.
2815         (emit_octal_digit): New function.
2816         (print_octal_chars): Don't zero-pad.
2817         (print_decimal_chars): Likewise.
2818         (print_hex_chars): Add "zero_pad" argument.
2819         * sh64-tdep.c (sh64_do_fp_register): Update.
2820         * regcache.c (regcache::dump): Update.
2821         * printcmd.c (print_scalar_formatted): Update.
2822         * infcmd.c (default_print_one_register_info): Update.
2823
2824 2017-06-12  Pedro Alves  <palves@redhat.com>
2825             Alan Hayward  <alan.hayward@arm.com>
2826
2827         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
2828         (mips_eabi_push_dummy_call): Rename local 'regsize' to
2829         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
2830         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
2831         Assert that abi_regsize bytes fit in 'ref_valbuf'.
2832
2833 2017-06-12  Pedro Alves  <palves@redhat.com>
2834
2835         * dwarf2read.c (mapped_symtab::data): Now a vector of
2836         symtab_index_entry instead of vector of
2837         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
2838         whether an element's name is NULL instead of checking whether the
2839         element itself is NULL.
2840         (find_slot): Change return type.  Adjust.
2841         (hash_expand, , add_index_entry, uniquify_cu_indices)
2842         (write_hash_table): Adjust.
2843
2844 2017-06-12  Pedro Alves  <palves@redhat.com>
2845
2846         * dwarf2read.c (recursively_count_psymbols): New function.
2847         (write_psymtabs_to_index): Call it to compute number of psyms and
2848         pass estimate size of psyms_seen to unordered_set's ctor.
2849
2850 2017-06-12  Pedro Alves  <palves@redhat.com>
2851
2852         * dwarf2read.c (write_hash_table): Check if key already exists
2853         before emplacing.
2854
2855 2017-06-12  Pedro Alves  <palves@redhat.com>
2856
2857         * dwarf2read.c (data_buf::append_space): Rename to...
2858         (data_buf::grow): ... this, and make private.  Adjust all callers.
2859         (data_buf::append_uint): New method.
2860         (add_address_entry, write_one_signatured_type)
2861         (write_psymtabs_to_index): Use it.
2862
2863 2017-06-12  Pedro Alves  <palves@redhat.com>
2864
2865         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
2866         (file_write (FILE *, const std::vector<Elem>&)): Delete.
2867         (data_buf::file_write): Call ::fwrite directly.
2868
2869 2017-06-12  Pedro Alves  <palves@redhat.com>
2870
2871         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
2872         std::vector::erase.
2873
2874 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
2875
2876         Code cleanup: C++ify .gdb_index producer.
2877         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
2878         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
2879         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
2880         (create_strtab, add_string): Remove.
2881         (file_write, data_buf): New.
2882         (struct symtab_index_entry): Use std::vector for cu_indices.
2883         (struct mapped_symtab): Use std::vector for data.
2884         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
2885         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
2886         Remove.
2887         (find_slot): Change return type.  Update it to the new data structures.
2888         (hash_expand, add_index_entry): Update it to the new data structures.
2889         (offset_type_compare): Remove.
2890         (uniquify_cu_indices): Update it to the new data structures.
2891         (c_str_view, c_str_view_hasher, vector_hasher): New.
2892         (add_indices_to_cpool): Remove.
2893         (write_hash_table): Update it to the new data structures.
2894         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
2895         (eq_psymtab_cu_index): Remove.
2896         (psym_index_map): New typedef.
2897         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
2898         reference and std::unordered_map for cu_index_htab.
2899         (add_address_entry, add_address_entry_worker, write_address_map)
2900         (write_psymbols): Update it to the new data structures.
2901         (write_obstack): Remove.
2902         (struct signatured_type_index_data): Change types_list to a data_buf
2903         reference and psyms_seen to a std::unordered_set reference.
2904         (write_one_signatured_type, recursively_write_psymbols)
2905         (write_psymtabs_to_index): Update it to the new data structures.
2906
2907 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2908
2909         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
2910         separate-debug-file commands.
2911         * symfile.h (separate_debug_file_debug): New global.
2912         * symfile.c (separate_debug_file_debug): New global.
2913         (separate_debug_file_exists, find_separate_debug_file): Add
2914         debug output.
2915         (_initialize_symfile): Add "set debug separate-debug-file"
2916         command.
2917         * build-id.c (build_id_to_debug_bfd,
2918         find_separate_debug_file_by_buildid): Add debug output.
2919
2920 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2921
2922         * gdbarch.sh (displaced_step_free_closure): Remove.
2923         * gdbarch.h, gdbarch.c: Re-generate.
2924         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
2925         displaced_step_free_closure.
2926         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
2927         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
2928         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2929         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
2930         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2931         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2932         * arch-utils.h (simple_displaced_step_free_closure): Remove.
2933         * arch-utils.c (simple_displaced_step_free_closure): Remove.
2934         * infrun.c (displaced_step_clear): Call xfree instead of
2935         gdbarch_displaced_step_free_closure.
2936
2937 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
2938
2939         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
2940         NULL".
2941
2942 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
2943
2944         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
2945         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
2946         (mn10300_push_dummy_call): Likewise.
2947
2948 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
2949
2950         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
2951
2952 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
2953
2954         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
2955
2956 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2957
2958         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
2959         able to start inferiors using a shell.
2960         (New remote packets): Announce new packet "QStartupWithShell".
2961         * remote.c: Add PACKET_QStartupWithShell.
2962         (extended_remote_create_inferior): Handle new
2963         PACKET_QStartupWithShell.
2964         (remote_protocol_features) <QStartupWithShell>: New entry for
2965         PACKET_QStartupWithShell.
2966         (_initialize_remote): Call "add_packet_config_cmd" for
2967         QStartupShell.
2968
2969 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2970             Pedro Alves  <palves@redhat.com>
2971
2972         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
2973         and "nat/fork-inferior.h".
2974         * common/common-inferior.h: New file, with contents from
2975         "gdb/inferior.h".
2976         * commom/common-utils.c: Include "common-utils.h".
2977         (stringify_argv): New function.
2978         * common/common-utils.h (stringify_argv): New prototype.
2979         * configure.nat: Add "fork-inferior.o" as a dependency for
2980         "*linux*", "fbsd*" and "nbsd*" hosts.
2981         * corefile.c (get_exec_file): Update comment.
2982         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
2983         instead of "startup_inferior".
2984         (darwin_create_inferior): Call "add_thread_silent" after
2985         "fork_inferior".
2986         * fork-child.c: Cleanup unnecessary includes.
2987         (SHELL_FILE): Move to "common/common-fork-child.c".
2988         (environ): Likewise.
2989         (exec_wrapper): Initialize.
2990         (get_exec_wrapper): New function.
2991         (breakup_args): Move to "common/common-fork-child.c"; rename to
2992         "breakup_args_for_exec".
2993         (escape_bang_in_quoted_argument): Move to
2994         "common/common-fork-child.c".
2995         (saved_ui): New variable.
2996         (prefork_hook): New function.
2997         (postfork_hook): Likewise.
2998         (postfork_child_hook): Likewise.
2999         (gdb_startup_inferior): Likewise.
3000         (fork_inferior): Move to "common/common-fork-child.c".  Update
3001         function to support gdbserver.
3002         (startup_inferior): Likewise.
3003         * gdbcore.h (get_exec_file): Remove declaration.
3004         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3005         instead of "startup_inferior".  Call "add_thread_silent" after
3006         "fork_inferior".
3007         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3008         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3009         instead of "startup_inferior".  Call "add_thread_silent" after
3010         "fork_inferior".
3011         * inferior.h: Include "common-inferior.h".
3012         (trace_start_error): Move to "common/common-utils.h".
3013         (trace_start_error_with_name): Likewise.
3014         (fork_inferior): Move prototype to "nat/fork-inferior.h".
3015         (startup_inferior): Likewise.
3016         (gdb_startup_inferior): New prototype.
3017         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3018         * nat/fork-inferior.h: New file.
3019         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3020         instead of "startup_inferior".  Call "add_thread_silent" after
3021         "fork_inferior".
3022         * target.h (target_terminal_init): Move prototype to
3023         "target/target.h".
3024         (target_terminal_inferior): Likewise.
3025         (target_terminal_ours): Likewise.
3026         * target/target.h (target_terminal_init): New prototype, moved
3027         from "target.h".
3028         (target_terminal_inferior): Likewise.
3029         (target_terminal_ours): Likewise.
3030         * utils.c (gdb_flush_out_err): New function.
3031
3032 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3033
3034         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3035         * common/common-gdbthread.h: New file, with parts from
3036         "gdb/gdbthread.h".
3037         * gdbthread.h: Include "common-gdbthread.h".
3038         (switch_to_thread): Moved to "common/common-gdbthread.h".
3039
3040 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3041
3042         * Makefile.in (SFILES): Add "common/job-control.c".
3043         (HFILES_NO_SRCDIR): Add "common/job-control.h".
3044         (COMMON_OBS): Add "job-control.o".
3045         * common/job-control.c: New file, with contents from
3046         "gdb/inflow.c".
3047         * common/job-control.h: New file, with contents from "terminal.h".
3048         * fork-child.c: Include "job-control.h".
3049         * inflow.c: Include "job-control.h".
3050         (gdb_setpgid): Move to "common/common-inflow.c".
3051         (_initialize_inflow): Move setting of "job_control" to
3052         "handle_job_control".
3053         * terminal.h (job_control): Moved to "common/common-terminal.h".
3054         (gdb_setpgid): Likewise.
3055         * top.c: Include "job_control.h".
3056         * utils.c: Likewise.
3057         (job_control): Moved to "job-control.c".
3058
3059 2017-06-07  Pedro Alves  <palves@redhat.com>
3060
3061         * Makefile.in (SFILES): Add gdb_regex.c.
3062         (COMMON_OBS): Add gdb_regex.o.
3063         * ada-lang.c (ada_add_standard_exceptions)
3064         (ada_add_exceptions_from_frame, name_matches_regex)
3065         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3066         parameter type to compiled_regex.  Adjust.
3067         (ada_exceptions_list): Use compiled_regex.
3068         * break-catch-throw.c (exception_catchpoint::pattern): Now a
3069         std::unique_ptr<compiled_regex>.
3070         (exception_catchpoint::~exception_catchpoint): Remove regfree
3071         call.
3072         (check_status_exception_catchpoint): Adjust to use compiled_regex.
3073         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3074         * breakpoint.c (solib_catchpoint::compiled): Now a
3075         std::unique_ptr<compiled_regex>.
3076         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3077         (check_status_catch_solib): Adjust to use compiled_regex.
3078         (add_solib_catchpoint): Adjust to use compiled_regex.
3079         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3080         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3081         compiled_regex reference.  Adjust to use it.
3082         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3083         declaration.  Include "gdb_regex.h".
3084         (apropos_cmd): Change regex parameter to compiled_regex reference.
3085         * gdb_regex.c: New file.
3086         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3087         declarations.
3088         (class compiled_regex): New.
3089         * linux-tdep.c: Include "common/gdb_optional.h".
3090         (struct mapping_regexes): New, factored out from
3091         mapping_is_anonymous_p, and adjusted to use compiled_regex.
3092         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3093         gdb::optional and remove cleanups.  Adjust to compiled_regex.
3094         * probe.c: Include "common/gdb_optional.h".
3095         (collect_probes): Use compiled_regex and gdb::optional and remove
3096         cleanups.
3097         * skip.c: Include "common/gdb_optional.h".
3098         (skiplist_entry::compiled_function_regexp): Now a
3099         gdb::optional<compiled_regex>.
3100         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3101         (free_skiplist_entry): Remove regfree call.
3102         (compile_skip_regexp, skip_rfunction_p): Adjust to use
3103         compiled_regex and gdb::optional.
3104         * symtab.c: Include "common/gdb_optional.h".
3105         (search_symbols): Use compiled_regex and gdb::optional.
3106         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3107         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
3108         to gdb_regex.c.
3109
3110 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3111
3112         * regcache.c (regcache::save): Avoid buffer use.
3113         (regcache::dump): Likewise.
3114
3115 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3116
3117         * sh-tdep.c (sh_pseudo_register_read): Remove
3118         MAX_REGISTER_SIZE.
3119         (sh_pseudo_register_write): Likewise.
3120         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3121         (sh64_pseudo_register_write): Likewise
3122
3123 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3124
3125         * aarch64-tdep.c (aarch64_store_return_value): Use
3126         V_REGISTER_SIZE.
3127         (aarch64_pseudo_read_value): Likewise.
3128         (aarch64_pseudo_write): Likewise.
3129
3130 2017-06-06  Yao Qi  <yao.qi@linaro.org>
3131
3132         * regformats/regdef.h (set_register_cache): Remove the
3133         declaration.
3134
3135 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
3136
3137         * frame.c (frame_unwind_register_signed): Use
3138         frame_unwind_register_value.
3139
3140 2017-06-06  Pedro Alves  <palves@redhat.com>
3141
3142         PR breakpoints/21553
3143         * breakpoint.c (create_breakpoints_sal_default)
3144         (init_breakpoint_sal, create_breakpoint_sal): Use
3145         gdb::unique_xmalloc_ptr for string parameters.
3146         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3147         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
3148         (base_breakpoint_create_breakpoints_sal)
3149         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3150         (strace_marker_create_breakpoints_sal)
3151         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3152         string parameters.
3153         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3154         gdb::unique_xmalloc_ptr for string parameters.
3155         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3156         parameters.
3157
3158 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3159
3160         * alpha-tdep.c (alpha_register_to_value): Use
3161         get_frame_register_value.
3162         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3163
3164 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3165
3166         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3167         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3168         (ia64_value_to_register): Likewise.
3169         (ia64_extract_return_value): Likewise.
3170         (ia64_store_return_value): Likewise.
3171         (ia64_push_dummy_call): Likewise.
3172
3173 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
3174
3175         GDB 8.0 released.
3176
3177 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
3178
3179         * x86-linux-nat.c (struct arch_lwp_info): Remove.
3180
3181 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
3182
3183         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3184         parameter.
3185         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3186
3187 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3188
3189         * event-loop.c (poll_timers): Unallocate timer using delete
3190         instead of xfree.
3191
3192 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3193
3194         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3195         (struct breakpoint) <~breakpoint>: New.
3196         (struct watchpoint): Inherit from breakpoint.
3197         <~watchpoint>: New.
3198         <base>: Remove.
3199         (struct tracepoint): Inherit from breakpoint.
3200         <base>: Remove.
3201         * breakpoint.c (longjmp_breakpoint_ops): Remove.
3202         (struct longjmp_breakpoint): Inherit from breakpoint.
3203         <~longjmp_breakpoint>: New.
3204         <base>: Remove.
3205         (new_breakpoint_from_type): Remove casts.
3206         (watchpoint_in_thread_scope): Remove reference to base field.
3207         (watchpoint_del_at_next_stop): Likewise.
3208         (update_watchpoint): Likewise.
3209         (watchpoint_check): Likewise.
3210         (bpstat_check_watchpoint): Likewise.
3211         (set_longjmp_breakpoint): Likewise.
3212         (struct fork_catchpoint): Inherit from breakpoint.
3213         <base>: Remove.
3214         (struct solib_catchpoint): Inherit from breakpoint.
3215         <~solib_catchpoint>: New.
3216         <base>: Remove.
3217         (dtor_catch_solib): Change to ...
3218         (solib_catchpoint::~solib_catchpoint): ... this.
3219         (breakpoint_hit_catch_solib): Remove reference to base field.
3220         (add_solib_catchpoint): Likewise.
3221         (create_fork_vfork_event_catchpoint): Likewise.
3222         (struct exec_catchpoint): Inherit from breakpoint.
3223         <~exec_catchpoint>: New.
3224         <base>: Remove.
3225         (dtor_catch_exec): Change to ...
3226         (exec_catchpoint::~exec_catchpoint): ... this.
3227         (dtor_watchpoint): Change to ...
3228         (watchpoint::~watchpoint): ... this.
3229         (watch_command_1): Remove reference to base field.
3230         (catch_exec_command_1): Likewise.
3231         (base_breakpoint_dtor): Change to ...
3232         (breakpoint::~breakpoint): ... this.
3233         (base_breakpoint_ops): Remove dtor field value.
3234         (longjmp_bkpt_dtor): Change to ...
3235         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3236         (strace_marker_create_breakpoints_sal): Remove reference to base
3237         field.
3238         (delete_breakpoint): Don't manually call breakpoint destructor.
3239         (create_tracepoint_from_upload): Remove reference to base field.
3240         (trace_pass_set_count): Likewise.
3241         (initialize_breakpoint_ops): Don't initialize
3242         momentary_breakpoint_ops, don't set dtors.
3243         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3244         <~ada_catchpoint>: New.
3245         <base>: Remove.
3246         (create_excep_cond_exprs): Remove reference to base field.
3247         (dtor_exception): Change to ...
3248         (ada_catchpoint::~ada_catchpoint): ... this.
3249         (dtor_catch_exception): Remove.
3250         (dtor_catch_exception_unhandled): Remove.
3251         (dtor_catch_assert): Remove.
3252         (create_ada_exception_catchpoint): Remove reference to base
3253         field.
3254         (initialize_ada_catchpoint_ops): Don't set dtors.
3255         * break-catch-sig.c (struct signal_catchpoint): Inherit from
3256         breakpoint.
3257         <~signal_catchpoint>: New.
3258         <base>: Remove.
3259         (signal_catchpoint_dtor): Change to ...
3260         (signal_catchpoint::~signal_catchpoint): ... this.
3261         (create_signal_catchpoint): Remove reference to base field.
3262         (initialize_signal_catchpoint_ops): Don't set dtor.
3263         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3264         from breakpoint.
3265         <~syscall_catchpoint>: New.
3266         <base>: Remove.
3267         (dtor_catch_syscall): Change to ...
3268         (syscall_catchpoint::~syscall_catchpoint): ... this.
3269         (create_syscall_event_catchpoint): Remove reference to base
3270         field.
3271         (initialize_syscall_catchpoint_ops): Don't set dtor.
3272         * break-catch-throw.c (struct exception_catchpoint): Inherit
3273         from breakpoint.
3274         <~exception_catchpoint>: New.
3275         <base>: Remove.
3276         (dtor_exception_catchpoint): Change to ...
3277         (exception_catchpoint::~exception_catchpoint): ... this.
3278         (handle_gnu_v3_exceptions): Remove reference to base field.
3279         (initialize_throw_catchpoint_ops): Don't set dtor.
3280         * ctf.c (ctf_get_traceframe_address): Remove reference to base
3281         field.
3282         * remote.c (remote_get_tracepoint_status): Likewise.
3283         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3284         * tracefile.c (tracefile_fetch_registers): Likewise.
3285         * tracepoint.c (actions_command): Likewise.
3286         (validate_actionline): Likewise.
3287         (tfind_1): Likewise.
3288         (get_traceframe_location): Likewise.
3289         (find_matching_tracepoint_location): Likewise.
3290         (parse_tracepoint_status): Likewise.
3291         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3292
3293 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3294
3295         * breakpoint.c (struct longjmp_breakpoint): New struct.
3296         (is_tracepoint_type): Change return type to bool.
3297         (is_longjmp_type): New function.
3298         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3299         (set_raw_breakpoint_without_location): Use
3300         new_breakpoint_from_type.
3301         (set_raw_breakpoint): Likewise.
3302
3303 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3304
3305         * breakpoint.c (new_breakpoint_from_type): New function.
3306         (create_breakpoint_sal): Use new_breakpoint_from_type and
3307         unique_ptr.
3308         (create_breakpoint): Likewise.
3309
3310 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
3311
3312         * memattr.c (mem_info_command): Rename to ...
3313         (info_mem_command): ... this.
3314         (mem_enable_command): Rename to ...
3315         (enable_mem_command): ... this.
3316         (mem_disable_command): Rename to ...
3317         (disable_mem_command): ... this.
3318         (mem_delete_command): Rename to ...
3319         (delete_mem_command): ... this.
3320         (_initialize_mem): Adjust function names.
3321
3322 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3323
3324         * btrace.c (handle_pt_insn_events): New.
3325         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
3326         STATUS.  Split into this and ...
3327         (handle_pt_insn_event_flags): ... this.
3328
3329 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3330
3331         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3332         and struct pt_insn.resynced.
3333         * configure: Regenerated.
3334         * config.in: Regenerated.
3335
3336 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3337
3338         * btrace.c (ftrace_find_call_by_number): New function.
3339         (ftrace_new_function): Store objects, not pointers.
3340         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3341         ftrace_new_gap, ftrace_update_function,
3342         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3343         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3344         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3345         btrace_ends_with_single_insn, btrace_call_get): Account for
3346         btrace_thread_info::functions now storing objects.
3347         * btrace.h (struct btrace_thread_info): Add constructor.
3348         (struct btrace_thread_info) <functions>: Make std::vector.
3349         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3350         Initialize with default values.
3351         * record-btrace.c (record_btrace_frame_sniffer): Account for
3352         btrace_thread_info::functions now storing objects.
3353
3354 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3355
3356         * btrace.c: Remove typedef bfun_s.
3357         (ftrace_new_gap): Directly add gaps to the list of gaps.
3358         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3359         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3360         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3361         instead of gdb VEC.
3362
3363 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3364
3365         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3366         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3367         with btrace_thread_info::next_segment and
3368         btrace_thread_info::prev_segment.
3369         * btrace.h: Remove struct btrace_func_link.
3370         (struct btrace_function): Replace pair of function segment pointers
3371         with pair of indices.
3372         * python/py-record-btrace.c (btpy_call_prev_sibling,
3373         btpy_call_next_sibling): Replace references to
3374         btrace_thread_info::segment with btrace_thread_info::next_segment and
3375         btrace_thread_info::prev_segment.
3376         * record-btrace.c (record_btrace_frame_this_id): Use
3377         btrace_find_call_by_number.
3378
3379 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3380
3381         * btrace.c (ftrace_new_function, ftrace_fixup_level,
3382         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3383         btrace_insn_next, btrace_insn_prev): Remove references to
3384         btrace_thread_info::flow.
3385         * btrace.h (struct btrace_function): Remove FLOW.
3386
3387 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3388
3389         * btrace.c (ftrace_find_call_by_number): New function.
3390         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3391         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3392         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3393         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3394         index.
3395         * btrace.h (struct btrace_function): Turn UP into an index.
3396         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3397         as an index.
3398         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3399         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3400         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3401
3402 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3403
3404         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3405         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3406         ftrace_update_function, ftrace_compute_global_level_offset,
3407         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3408         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3409         btrace_insn_end, btrace_is_empty): Remove references to
3410         btrace_thread_info::begin and btrace_thread_info::end.
3411         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3412         (struct btrace_thread_info) <functions>: Adjust comment.
3413         * record-btrace.c (record_btrace_start_replaying): Remove reference to
3414         btrace_thread_info::begin.
3415
3416 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3417
3418         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3419         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3420         ftrace_update_function): Remove arguments that implicitly were always
3421         BTINFO->END.
3422         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3423         Don't pass BTINFO->END.
3424
3425 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3426
3427         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3428         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3429         btrace_find_insn_by_number): Replace function segment pointer with
3430         index.
3431         (btrace_insn_cmp): Simplify.
3432         * btrace.h: (struct btrace_insn_iterator) Rename index to
3433         insn_index.  Replace function segment pointer with index into function
3434         segment vector.
3435         * record-btrace.c (record_btrace_call_history): Replace function
3436         segment pointer use with index.
3437         (record_btrace_frame_sniffer): Retrieve function call segment through
3438         vector.
3439         (record_btrace_set_replay): Remove defunc't safety check.
3440
3441 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3442
3443         * btrace.c (btrace_ends_with_single_insn): New function.
3444         (btrace_call_get, btrace_call_number, btrace_call_begin,
3445         btrace_call_end, btrace_call_next, btrace_call_prev,
3446         btrace_find_call_by_number): Use index into call segment vector
3447         instead of pointer.
3448         (btrace_call_cmp): Simplify.
3449         * btrace.h (struct btrace_call_iterator): Replace function call segment
3450         pointer with index into vector.
3451         * record-btrace.c (record_btrace_call_history): Use index instead of
3452         pointer.
3453
3454 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3455
3456         * btrace.c (btrace_insn_begin, btrace_insn_end,
3457         btrace_find_insn_by_number): Add btinfo to iterator.
3458         * btrace.h (struct btrace_insn_iterator): Add btinfo.
3459
3460 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3461
3462         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
3463         and save pointers directly.
3464         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
3465         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
3466         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
3467         changed signature of functions.
3468         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
3469         (btrace_fetch): Remove code that adds btrace_function pointers to
3470         vector of btrace_functions.
3471         (btrace_clear): Simplify freeing vector of btrace_functions.
3472
3473 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3474
3475         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
3476         Replace VEC_* with std::vector functions.
3477         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
3478         (struct btrace_thread_info)<functions>: Change type to std::vector.
3479
3480 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3481
3482         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
3483         "Removed targets and native configurations" up.  Merge duplicate
3484         "New commands" sub-sections.  Add "New options" sub-sections.
3485
3486 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
3487
3488         * defs.h (copy_integer_to_size): New declaration.
3489         * findvar.c (copy_integer_to_size): New function.
3490         (do_cint_test): New selftest function.
3491         (copy_integer_to_size_test): Likewise.
3492         (_initialize_findvar): Likewise.
3493         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
3494         (mips_fbsd_collect_reg): Use raw_collect_integer.
3495         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
3496         (mips64_fill_gregset): Use raw_collect_integer
3497         (mips64_fill_fpregset): Use raw_supply_integer.
3498         * regcache.c (regcache::raw_supply_integer): New function.
3499         (regcache::raw_collect_integer): Likewise.
3500         * regcache.h: (regcache::raw_supply_integer): New declaration.
3501         (regcache::raw_collect_integer): Likewise.
3502
3503 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3504
3505         * Makefile.in (SFILES): Add gdbarch-selftests.c.
3506         (COMMON_OBS): Add gdbarch-selftests.o.
3507         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
3508         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
3509         * gdbarch-selftests.c: New file.
3510         * regcache.h (regcache) <~regcache>: Mark it virtual if
3511         GDB_SELF_TEST.
3512         <raw_write>: Likewise.
3513
3514 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3515
3516         * regcache.c (current_regcache): Change it to
3517         regcache::current_regcache.
3518         (regcache_observer_target_changed): Update.
3519         (regcache_thread_ptid_changed): Make it a regcache static
3520         method.
3521         (regcache_thread_ptid_changed): Update.
3522         (class regcache_access): New.
3523         (current_regcache_test): Update.
3524         (_initialize_regcache): Update.
3525         * regcache.h: Include forward_list.
3526         (regcache): Declare regcache_thread_ptid_changed and declare
3527         registers_changed_ptid as friend.
3528
3529 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3530
3531         * i387-tdep.c (i387_register_to_value): Use register_size
3532         instead of TYPE_LENGTH.
3533         * m68k-tdep.c (m68k_register_to_value): Likewise.
3534
3535 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3536
3537         * i387-tdep.c (i387_convert_register_p): Return false if type
3538         code isn't TYPE_CODE_FLT.
3539
3540 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3541
3542         * alpha-tdep.c (alpha_convert_register_p): Return true if type
3543         length is 4.
3544         (alpha_register_to_value): Remove type length check.
3545         (alpha_value_to_register): Likewise.
3546
3547 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3548
3549         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
3550         TYPE_CODE_FLT.
3551
3552 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3553
3554         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
3555         TYPE_CODE_FLT or not.
3556
3557 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3558
3559         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
3560         * avr-tdep.c (avr_gdbarch_init): Likewise.
3561         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3562         * cris-tdep.c (cris_gdbarch_init): Likewise.
3563         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3564         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3565         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3566         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
3567         * mep-tdep.c (mep_gdbarch_init): Likewise.
3568         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3569         * mips-tdep.c (mips_gdbarch_init): Likewise.
3570         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3571         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3572         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3573         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3574         * v850-tdep.c (v850_gdbarch_init): Likewise.
3575
3576 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3577
3578         * selftest-arch.c (tests_with_arch): Call registers_changed
3579         and reinit_frame_cache.
3580         * selftest.c (run_self_tests): Likewise.
3581
3582 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3583
3584         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
3585         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
3586
3587 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3588
3589         * rl78-tdep.c (rl78_gdbarch_init): Don't call
3590         set_gdbarch_print_insn.
3591
3592 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3593
3594         * h8300-tdep.c (h8300_gdbarch_init): Don't call
3595         set_gdbarch_print_insn.
3596
3597 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3598
3599         * alpha-tdep.c (alpha_gdbarch_init): Don't call
3600         set_gdbarch_print_insn.
3601         * arc-tdep.c (arc_gdbarch_init): Likewise.
3602         * arch-utils.c: include dis-asm.h.
3603         (default_print_insn): New function.
3604         * arch-utils.h (default_print_insn): Declare.
3605         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
3606         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3607         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
3608         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
3609         * frv-tdep.c (frv_gdbarch_init): Likewise.
3610         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3611         * gdbarch.sh (print_insn): Use default_print_insn.
3612         * gdbarch.c: Regenerated.
3613         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
3614         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
3615         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3616         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
3617         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3618         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
3619         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
3620         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
3621         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
3622         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3623         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3624         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3625         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3626         * mt-tdep.c (mt_gdbarch_init): Likewise.
3627         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3628         * nios2-tdep.c (nios2_print_insn): Remove.
3629         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
3630         * rx-tdep.c (rx_gdbarch_init): Likewise.
3631         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3632         * score-tdep.c (score_print_insn): Remove.
3633         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
3634         * sh-tdep.c (sh_gdbarch_init): Likewise.
3635         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3636         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3637         * tic6x-tdep.c (tic6x_print_insn): Remove.
3638         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
3639         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
3640         * v850-tdep.c (v850_gdbarch_init): Likewise.
3641         * vax-tdep.c (vax_gdbarch_init): Likewise.
3642         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3643         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
3644
3645 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
3646
3647         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
3648         (MIPS_FP0_REGNUM): Remove.
3649         (MIPS_FSR_REGNUM): Remove.
3650         (mips_fbsd_supply_fpregs): Use mips_regnum.
3651         (mips_fbsd_supply_gregs): Likewise.
3652         (mips_fbsd_collect_fpregs): Likewise.
3653         (mips_fbsd_collect_gregs): Likewise.
3654
3655 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
3656
3657         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
3658         (getpfpregs_supplies): New function.
3659         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
3660         getfpregs_supplies.
3661         (mips_fbsd_store_inferior_registers): Likewise.
3662
3663 2017-05-22  Pedro Alves <palves@redhat.com>
3664
3665         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
3666         maintainer.
3667
3668 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
3669
3670         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
3671         (store_register): Likewise.
3672         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
3673         (get_decimal_float_return_value): Likewise.
3674         (do_ppc_sysv_return_value): Likewise.
3675         (ppc64_sysv_abi_push_integer): Likewise.
3676         (ppc64_sysv_abi_push_freg): Likewise.
3677         (ppc64_sysv_abi_return_value_base): Likewise.
3678         (ppc64_sysv_abi_return_value): Likewise.
3679         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
3680         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
3681         * rs6000-nat.c: Likewise.
3682         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
3683         (rs6000_value_to_register): Likewise.
3684         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
3685
3686 2017-05-21  Tom Tromey  <tom@tromey.com>
3687
3688         PR rust/21466:
3689         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
3690         arrays as "[T]", not "[T; ]".
3691
3692 2017-05-19  Tom Tromey  <tom@tromey.com>
3693
3694         PR rust/21484:
3695         * rust-lang.c (exp_descriptor_rust): New function.
3696         (rust_language_defn): Use it.
3697         * p-lang.c (pascal_language_defn): Update.
3698         * opencl-lang.c (opencl_language_defn): Update.
3699         * objc-lang.c (objc_language_defn): Update.
3700         * m2-lang.c (m2_language_defn): Update.
3701         * language.h (struct language_defn)
3702         <la_watch_location_expression>: New member.
3703         * language.c (unknown_language_defn, auto_language_defn)
3704         (local_language_defn): Update.
3705         * go-lang.c (go_language_defn): Update.
3706         * f-lang.c (f_language_defn): Update.
3707         * d-lang.c (d_language_defn): Update.
3708         * c-lang.h (c_watch_location_expression): Declare.
3709         * c-lang.c (c_watch_location_expression): New function.
3710         (c_language_defn, cplus_language_defn, asm_language_defn)
3711         (minimal_language_defn): Use it.
3712         * breakpoint.c (watch_command_1): Call
3713         la_watch_location_expression.
3714         * ada-lang.c (ada_language_defn): Update.
3715
3716 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3717
3718         PR tui/21482
3719         * gdb_curses.h (NOMACROS): Define.
3720         (NCURSES_NOMACROS): Define.
3721
3722 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3723
3724         PR tui/21482
3725         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
3726         arg to char *.
3727         * tui/tui-wingeneral.c (box_win): Likewise.
3728         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
3729         (tui_show_source_line): Likewise.
3730         (tui_show_exec_info_content): Likewise.
3731
3732 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
3733
3734         * sparc-tdep.c (sparc_structure_return_p)
3735         (sparc_arg_on_registers_p): New functions.
3736         (sparc32_store_arguments): Use them.
3737         * sparc64-tdep.c (sparc64_16_byte_align_p)
3738         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
3739         Handle TYPE_CODE_ARRAY.
3740
3741 2017-05-17  Yao Qi  <yao.qi@linaro.org>
3742
3743         * cli/cli-decode.c (add_alias_cmd): New function.
3744         * command.h (add_alias_cmd): Declare.
3745         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
3746         instead call add_alias_cmd.
3747
3748 2017-05-17  Pedro Alves  <palves@redhat.com>
3749
3750         * Makefile.in (nat_extra_makefile_frag): Rename to ...
3751         (nat_makefile_frag): ... this.  All references updated.
3752         * configure.ac: Likewise.
3753         * configure.nat: Likewise.  Enhance comments.
3754         * configure: Regenerate.
3755
3756 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3757
3758         * procfs.c (procfs_create_inferior): Change prototype to match
3759         definition.
3760
3761 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
3762
3763         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
3764         C++ compiler warning.
3765
3766 2017-05-12  Tom Tromey  <tom@tromey.com>
3767
3768         PR rust/21483:
3769         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
3770         recurse, just call value_struct_elt directly.
3771
3772 2017-05-12  Tom Tromey  <tom@tromey.com>
3773
3774         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
3775         OP_RUST_ARRAY>: Fix.
3776
3777 2017-05-12  Tom Tromey  <tom@tromey.com>
3778
3779         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
3780
3781 2017-05-09  Yao Qi  <yao.qi@linaro.org>
3782
3783         * regcache.c: Include <forward_list>.
3784         (struct regcache_list): Remove.
3785         (current_regcache): Update.
3786         (get_thread_arch_aspace_regcache): Update for std::forward_list.
3787         (regcache_thread_ptid_changed): Likewise.
3788         (registers_changed_ptid): Likewise.
3789         (current_regcache_size): Likewise.
3790
3791 2017-05-09  Yao Qi  <yao.qi@linaro.org>
3792
3793         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
3794         (current_regcache_size): New function.
3795         (current_regcache_test): New function.
3796         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
3797
3798 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
3799
3800         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
3801         (print_gp_register_row): Use get_frame_register_value.
3802
3803 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
3804
3805         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
3806         (mips_supply_fpregset): Likewise.
3807         (mips64_supply_gregset): Likewise.
3808
3809 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
3810
3811         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
3812         regcache->raw_supply_zeroed.
3813
3814 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3815
3816         * configure.nat: Rearrange 'case' statements to match
3817         host before cpu.
3818
3819 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3820
3821         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
3822         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
3823         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
3824         "@nat_extra_makefile_frag@".
3825         (Makefile): Remove dependency on "@frags@".
3826         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
3827         (data-directory/Makefile): Likewise.
3828         * config/aarch64/linux.mh: Deleted; moved contents to
3829         "gdb/configure.nat".
3830         * config/alpha/alpha-linux.mh: Likewise.
3831         * config/alpha/nbsd.mh: Likewise.
3832         * config/arm/linux.mh: Likewise.
3833         * config/arm/nbsdelf.mh: Likewise.
3834         * config/i386/cygwin.mh: Likewise.
3835         * config/i386/cygwin64.mh: Likewise.
3836         * config/i386/darwin.mh: Likewise.
3837         * config/i386/fbsd.mh: Likewise.
3838         * config/i386/fbsd64.mh: Likewise.
3839         * config/i386/go32.mh: Likewise.
3840         * config/i386/i386gnu.mh: Likewise.
3841         * config/i386/i386sol2.mh: Likewise.
3842         * config/i386/linux.mh: Likewise.
3843         * config/i386/linux64.mh: Likewise.
3844         * config/i386/mingw.mh: Likewise.
3845         * config/i386/mingw64.mh: Likewise.
3846         * config/i386/nbsd64.mh: Likewise.
3847         * config/i386/nbsdelf.mh: Likewise.
3848         * config/i386/nto.mh: Likewise.
3849         * config/i386/obsd.mh: Likewise.
3850         * config/i386/obsd64.mh: Likewise.
3851         * config/i386/sol2-64.mh: Likewise.
3852         * config/ia64/linux.mh: Likewise.
3853         * config/m32r/linux.mh: Likewise.
3854         * config/m68k/linux.mh: Likewise.
3855         * config/m68k/nbsdelf.mh: Likewise.
3856         * config/m68k/obsd.mh: Likewise.
3857         * config/m88k/obsd.mh: Likewise.
3858         * config/mips/fbsd.mh: Likewise.
3859         * config/mips/linux.mh: Likewise.
3860         * config/mips/nbsd.mh: Likewise.
3861         * config/mips/obsd64.mh: Likewise.
3862         * config/pa/linux.mh: Likewise.
3863         * config/pa/nbsd.mh: Likewise.
3864         * config/pa/obsd.mh: Likewise.
3865         * config/powerpc/aix.mh: Likewise.
3866         * config/powerpc/fbsd.mh: Likewise.
3867         * config/powerpc/linux.mh: Likewise.
3868         * config/powerpc/nbsd.mh: Likewise.
3869         * config/powerpc/obsd.mh: Likewise.
3870         * config/powerpc/ppc64-linux.mh: Likewise.
3871         * config/powerpc/spu-linux.mh: Likewise.
3872         * config/s390/linux.mh: Likewise.
3873         * config/sh/nbsd.mh: Likewise.
3874         * config/sparc/fbsd.mh: Likewise.
3875         * config/sparc/linux.mh: Likewise.
3876         * config/sparc/linux64.mh: Likewise.
3877         * config/sparc/nbsd64.mh: Likewise.
3878         * config/sparc/nbsdelf.mh: Likewise.
3879         * config/sparc/obsd64.mh: Likewise.
3880         * config/sparc/sol2.mh: Likewise.
3881         * config/tilegx/linux.mh: Likewise.
3882         * config/vax/nbsdelf.mh: Likewise.
3883         * config/vax/obsd.mh: Likewise.
3884         * config/xtensa/linux.mh: Likewise.
3885         * config/i386/i386gnu.mn: New file, with excerpts from
3886         "config/i386/i386gnu.mh".
3887         * configure: Regenerate.
3888         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
3889         *.mh files under "gdb/config".
3890         * configure.nat: New file, with contents from the
3891         "gdb/config/*/*.mh" files.
3892
3893 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
3894
3895         * btrace.c (btrace_clear): Free insn vector.
3896
3897 2017-05-05  Pedro Alves  <palves@redhat.com>
3898
3899         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
3900         * configure: Regenerate.
3901
3902 2017-05-04  Pedro Alves  <palves@redhat.com>
3903
3904         * Makefile.in (SFILES): Add progspace-and-thread.c.
3905         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
3906         (COMMON_OBS): Add progspace-and-thread.o.
3907         * breakpoint.c: Include "progspace-and-thread.h".
3908         (update_inserted_breakpoint_locations)
3909         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
3910         Use scoped_restore_current_pspace_and_thread.
3911         (create_std_terminate_master_breakpoint): Use
3912         scoped_restore_current_program_space.
3913         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
3914         (print_breakpoint_location): Use
3915         scoped_restore_current_program_space.
3916         (bp_loc_is_permanent): Use
3917         scoped_restore_current_pspace_and_thread.
3918         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
3919         (download_tracepoint_locations): Use
3920         scoped_restore_current_pspace_and_thread.
3921         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
3922         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
3923         (enum step_over_calls_kind): Moved from inferior.h.
3924         (class scoped_restore_current_thread): New class.
3925         * gdbthread.h (make_cleanup_restore_current_thread): Delete
3926         declaration.
3927         (scoped_restore_current_thread): New class.
3928         * infcmd.c: Include "common/gdb_optional.h".
3929         (continue_1, proceed_after_attach): Use
3930         scoped_restore_current_thread.
3931         (notice_new_inferior): Use scoped_restore_current_thread.
3932         * inferior.c: Include "progspace-and-thread.h".
3933         (restore_inferior, save_current_inferior): Delete.
3934         (add_inferior_command, clone_inferior_command): Use
3935         scoped_restore_current_pspace_and_thread.
3936         * inferior.h (scoped_restore_current_inferior): New class.
3937         * infrun.c: Include "progspace-and-thread.h" and
3938         "common/gdb_optional.h".
3939         (follow_fork_inferior): Use
3940         scoped_restore_current_pspace_and_thread.
3941         (scoped_restore_exited_inferior): New class.
3942         (handle_vfork_child_exec_or_exit): Use
3943         scoped_restore_exited_inferior,
3944         scoped_restore_current_pspace_and_thread,
3945         scoped_restore_current_thread and scoped_restore.
3946         (fetch_inferior_event): Use scoped_restore_current_thread.
3947         * linespec.c (decode_line_full, decode_line_1): Use
3948         scoped_restore_current_program_space.
3949         * mi/mi-main.c: Include "progspace-and-thread.h".
3950         (exec_continue): Use scoped_restore_current_thread.
3951         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
3952         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
3953         * proc-service.c (ps_pglobal_lookup): Use
3954         scoped_restore_current_program_space.
3955         * progspace-and-thread.c: New file.
3956         * progspace-and-thread.h: New file.
3957         * progspace.c (release_program_space, clone_program_space): Use
3958         scoped_restore_current_program_space.
3959         (restore_program_space, save_current_program_space)
3960         (save_current_space_and_thread): Delete.
3961         (switch_to_program_space_and_thread): Moved to
3962         progspace-and-thread.c.
3963         * progspace.h (save_current_program_space)
3964         (save_current_space_and_thread): Delete declarations.
3965         (scoped_restore_current_program_space): New class.
3966         * remote.c (remote_btrace_maybe_reopen): Use
3967         scoped_restore_current_thread.
3968         * symtab.c: Include "progspace-and-thread.h".
3969         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
3970         * thread.c (print_thread_info_1): Use
3971         scoped_restore_current_thread.
3972         (struct current_thread_cleanup): Delete.
3973         (do_restore_current_thread_cleanup)
3974         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
3975         (scoped_restore_current_thread::~scoped_restore_current_thread):
3976         ... this new dtor.
3977         (make_cleanup_restore_current_thread): Rename/convert to ...
3978         (scoped_restore_current_thread::scoped_restore_current_thread):
3979         ... this new ctor.
3980         (thread_apply_all_command): Use scoped_restore_current_thread.
3981         (thread_apply_command): Use scoped_restore_current_thread.
3982         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
3983         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
3984
3985 2017-05-04  Pedro Alves  <palves@redhat.com>
3986
3987         * thread.c (make_cleanup_restore_current_thread): Move
3988         find_thread_ptid call before the is_stopped call.  Assert that the
3989         thread is found.  Replace is_stopped call by checking the thread's
3990         state directly.  Remove unnecessary NULL-thread check.
3991
3992 2017-05-04  Pedro Alves  <palves@redhat.com>
3993
3994         * corelow.c (thread_section_name): New class.
3995         (get_core_register_section, get_core_siginfo): Use it.
3996
3997 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3998
3999         * corelow.c (sniff_core_bfd): Remove extra semicolon.
4000         (get_core_register_section): Remove xfree of NULL pointer.
4001
4002 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
4003
4004         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4005         * regcache.c (regcache::raw_supply_zeroed): New function.
4006         * regcache.h (regcache::raw_supply_zeroed): New declaration.
4007
4008 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4009
4010         * gdbarch.sh: Remove commented out definition of
4011         TARGET_CHAR_BIT.
4012         * gdbarch.h: Re-generate.
4013
4014 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4015
4016         * configure: Regenerate.
4017
4018 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
4019
4020         * solib-target.c (solib_target_relocate_section_addresses):
4021         Remove num_section_bases, num_bases, segment_bases variables.
4022
4023 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4024
4025         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4026
4027 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4028
4029         * solib-target.c: Include <vector>
4030         (struct lm_info_target) <~lm_info_target>: Remove.
4031         <segment_bases, section_bases>: Change type to
4032         std::vector<CORE_ADDR>.
4033         (library_list_start_segment, library_list_start_section,
4034         library_list_end_library,
4035         solib_target_relocate_section_addresses): Adjust.
4036
4037 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4038
4039         * gdbarch.sh (software_single_step): Change return type to
4040         std::vector<CORE_ADDR>.
4041         * gdbarch.c, gdbarch.h: Re-generate.
4042         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4043         Adjust.
4044         (arm_deal_with_atomic_sequence_raw): Adjust.
4045         (thumb_get_next_pcs_raw): Adjust.
4046         (arm_get_next_pcs_raw): Adjust.
4047         (arm_get_next_pcs): Adjust.
4048         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4049         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4050         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4051         (alpha_software_single_step): Adjust.
4052         * alpha-tdep.h (alpha_software_single_step): Adjust.
4053         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4054         * arm-tdep.c (arm_software_single_step): Adjust.
4055         (arm_breakpoint_kind_from_current_state): Adjust.
4056         * arm-tdep.h (arm_software_single_step): Adjust.
4057         * breakpoint.c (insert_single_step_breakpoint): Adjust.
4058         * cris-tdep.c (cris_software_single_step): Adjust.
4059         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4060         (micromips_deal_with_atomic_sequence): Adjust.
4061         (deal_with_atomic_sequence): Adjust.
4062         (mips_software_single_step): Adjust.
4063         * mips-tdep.h (mips_software_single_step): Adjust.
4064         * moxie-tdep.c (moxie_software_single_step): Adjust.
4065         * nios2-tdep.c (nios2_software_single_step): Adjust.
4066         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4067         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4068         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4069         * s390-linux-tdep.c (s390_software_single_step): Adjust.
4070         * sparc-tdep.c (sparc_software_single_step): Adjust.
4071         * spu-tdep.c (spu_software_single_step): Adjust.
4072         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4073
4074 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4075
4076         * gdbarch.sh: Use semi-colon as field separator instead of colon.
4077         * gdbarch.h: Re-generate.
4078
4079 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4080
4081         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4082         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4083         * python/py-instruction.c, python/py-instruction.h: New file.
4084         * python/py-record.c: Add py-instruction.h include.
4085         (gdbpy_initialize_record): Make gdb.Instruction a super class of
4086         gdb.RecordInstruction.
4087         * python/python-internal.h: Add gdbpy_initialize_instruction
4088         declaration.
4089         * python/python.c (do_start_initialization): Add
4090         gdbpy_initialize_instruction.
4091
4092 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4093
4094         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4095         Remove.
4096         (btrace_func_from_recpy_func): New function.
4097         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4098         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4099         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4100         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4101         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4102         Also, use new helper functions.
4103         (btpy_list_item): Use new helper functions.
4104         (recpy_bt_function_call_history): Use new type name.
4105         (btpy_call_getset): Remove.
4106         (gdbpy_initialize_btrace): Remove code to initialize
4107         gdb.BtraceFunctionCall.
4108         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4109         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4110         recpy_bt_func_prev, recpy_bt_func_next): New export.
4111         * python/py-record.c (recpy_func_type): New static object.
4112         (recpy_func_new, recpy_func_level, recpy_func_symbol,
4113         recpy_func_instructions, recpy_func_up, recpy_func_prev,
4114         recpy_func_next): New function.
4115         (recpy_element_hash, recpy_element_richcompare): Updated comment.
4116         (recpy_func_getset): New static object.
4117         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4118         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4119
4120 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4121
4122         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4123         (btpy_object, btpy_insn_type, btpy_new): Remove.
4124         (btpy_list_object): Use gdb.RecordInstruction type instead of
4125         gdb.BtraceInstruction type.
4126         (btrace_insn_from_recpy_insn): New function.
4127         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4128         btpy_new.
4129         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4130         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4131         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4132         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4133         instead of btpy_object.
4134         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4135         btpy_insn_data, btpy_insn_decode): Rename to ...
4136         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4137         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4138         recpy_bt_insn_decode): This.  Also, use new helper functions.
4139         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4140         recpy_insn_type.
4141         (btpy_insn_getset): Remove.
4142         (gdbpy_initialize_btrace): Remove code to initialize
4143         gdb.BtraceInstruction.  Use recpy_element_object.
4144         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4145         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4146         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4147         * python/py-record.c (recpy_insn_type): New static object.
4148         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4149         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4150         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4151         New function.
4152         (recpy_insn_getset): New static object.
4153         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4154         * python/py-record.h (recpy_element_object): New typedef.
4155         (recpy_insn_type, recpy_insn_new): New export.
4156
4157 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4158
4159         * py-record-btrace.c (btpy_insn_new): Removed.
4160         (btpy_insn_or_gap_new): New function.
4161         (btpy_insn_error): Removed.
4162         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4163         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4164         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4165         btpy_insn_or_gap_new instead of btpy_insn_new.
4166         (btpy_insn_getset): Remove btpy_insn_error.
4167         * py-record.c (recpy_gap_type): New static object.
4168         (recpy_gap_object): New typedef.
4169         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4170         recpy_gap_reason_string): New function.
4171         (recpy_gap_getset): New static object.
4172         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4173         * py-record.h (recpy_gap_new): New export.
4174
4175 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4176
4177         * python/py-record.c (recpy_ptid): Remove.
4178         (recpy_record_getset): Remove recpy_ptid.
4179
4180 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4181
4182         * btrace.c (btrace_fetch): Set inferior_ptid.
4183         * python/py-record-btrace.c: Add "py-record.h" include.
4184         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4185         recpy_bt_end, recpy_bt_instruction_history,
4186         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4187         in gdb.Record object instead of current ptid.
4188         * python/py-record.c: Include new "py-record.h" file.
4189         (recpy_record_object): Moved to py-record.h.
4190         * python/py-record.h: New file.
4191
4192 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4193
4194         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4195         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4196         indentation.
4197
4198 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
4199
4200         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4201         the past maintainers section.
4202
4203 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4204
4205         * infcmd.c (get_return_value): Use regcache ctor, and remove
4206         cleanup.
4207
4208 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4209             Pedro Alves  <palves@redhat.com>
4210
4211         * regcache.c (regcache::regcache): New tag dispatch ctor.
4212         (do_cooked_read): Moved above.
4213         (regcache_dup): Use the tag dispatch ctor..
4214         * regcache.h (regcache): Declare ctor, delete copy ctor and
4215         assignment operator, remove friend regcache_dup.
4216
4217 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4218
4219         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4220         call method save instead of regcache_cpy.
4221         * regcache.h (struct regcache): Make regcache_dup a friend.
4222
4223 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4224
4225         * regcache.c (struct regcache): Move to regcache.h
4226         (regcache::arch): New method.
4227         (regcache_get_ptid): Update.
4228         (get_regcache_arch): Call arch method.
4229         (get_regcache_aspace): Call method aspace.
4230         (register_buffer): Change it to method.
4231         (regcache_save): Change it to regcache::save.
4232         (regcache_restore): Likewise.
4233         (regcache_cpy_no_passthrough): Remove the declaration.
4234         (regcache_cpy): Call methods restore and cpy_no_passthrough.
4235         (regcache_cpy_no_passthrough): Change it to method
4236         cpy_no_passthrough.
4237         (regcache_register_status): Change it to method
4238         get_register_status.
4239         (regcache_invalidate): Change it to method invalidate.
4240         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4241         (regcache_raw_update): Change it to method raw_update.
4242         (regcache_raw_read): Likewise.
4243         (regcache_raw_read_signed): Likewise.
4244         (regcache_raw_read_unsigned): Likewise.
4245         (regcache_raw_write_signed): Likewise.
4246         (regcache_raw_write_unsigned): Likewise.
4247         (regcache_cooked_read): Likewise.
4248         (regcache_cooked_read_value): Likewise.
4249         (regcache_cooked_read_signed): Likewise.
4250         (regcache_cooked_read_unsigned): Likewise.
4251         (regcache_cooked_write_signed): Likewise.
4252         (regcache_cooked_write_unsigned): Likewise.
4253         (regcache_raw_set_cached_value): Likewise.
4254         (regcache_raw_write): Likewise.
4255         (regcache_cooked_write): Likewise.
4256         (regcache_xfer_part): Likewise.
4257         (regcache_raw_read_part): Likewise.
4258         (regcache_raw_write_part): Likewise.
4259         (regcache_cooked_read_part): Likewise.
4260         (regcache_cooked_write_part): Likewise.
4261         (regcache_raw_supply): Likewise.
4262         (regcache_raw_collect): Likewise.
4263         (regcache_transfer_regset): Likewise.
4264         (regcache_supply_regset): Likewise.
4265         (regcache_collect_regset): Likewise.
4266         (regcache_debug_print_register): Likewise.
4267         (enum regcache_dump_what): Move it to regcache.h.
4268         (regcache_dump): Change it to method dump.
4269         * regcache.h (enum regcache_dump_what): New.
4270         (class regcache): New.
4271         * target.c (target_fetch_registers): Call method
4272         debug_print_register.
4273         (target_store_registers): Likewise.
4274
4275 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4276
4277         * windows-nat.c (struct lm_info_windows): Initialize field.
4278         (windows_make_so): Allocate lm_info_windows with new.
4279         (windows_free_so): Free lm_info_windows with delete.
4280
4281 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4282
4283         * solib-darwin.c (struct lm_info_darwin): Initialize field.
4284         (darwin_current_sos): Allocate lm_info_darwin with new, remove
4285         cleanup.
4286         (darwin_free_so): Free lm_info_darwin with delete.
4287
4288 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4291         <l_addr_p>: Change type to bool.
4292         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4293         (svr4_free_so): Free lm_info_svr4 with delete.
4294         (svr4_copy_library_list): Replace memcpy with call to copy
4295         constructor.
4296         (library_list_start_library, svr4_default_sos): Allocate
4297         lm_info_svr4 with new.
4298
4299 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4300
4301         * solib-target.c (struct lm_info_target): Add destructor,
4302         initialize fields.
4303         <name>: Change type to std::string.
4304         (library_list_start_library): Allocate lm_info_target with new.
4305         (solib_target_free_library_list): Free lm_info_target with
4306         delete.
4307         (solib_target_current_sos): Adapt to std::string.
4308         (solib_target_free_so): Free lm_info_target with delete.
4309
4310 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4311
4312         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4313         fields.
4314         (frv_current_sos): Allocate lm_info_frv with new.
4315         (frv_relocate_main_executable): Free lm_info_frv with delete,
4316         allocate with new.
4317         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4318
4319 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4320
4321         * solib-frv.c (struct lm_info_frv): Fix indentation.
4322
4323 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4324
4325         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4326         map field.
4327         (dsbt_current_sos): Allocate lm_info_dsbt with new.
4328         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4329         and allocate with new.
4330         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4331
4332 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4333
4334         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4335         <filename, member_name>: Change type to std::string.
4336         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4337         (library_list_start_library): Allocate lm_info_aix with new.
4338         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4339         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4340         with copy constructor.
4341
4342 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4343
4344         * solist.h (struct lm_info): Remove.
4345         (struct lm_info_base): New class.
4346         (struct so_list) <lm_info>: Change type to lm_info_base *.
4347         * nto-tdep.c (struct lm_info): Remove.
4348         (lm_addr): Adjust.
4349         * solib-aix.c (struct lm_info): Rename to ...
4350         (struct lm_info_aix): ... this.  Extend lm_info_base.
4351         (lm_info_p): Rename to ...
4352         (lm_info_aix_p): ... this, and adjust.
4353         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4354         solib_aix_parse_libraries, library_list_start_library,
4355         solib_aix_free_library_list, solib_aix_parse_libraries,
4356         solib_aix_get_library_list,
4357         solib_aix_relocate_section_addresses, solib_aix_free_so,
4358         solib_aix_get_section_offsets,
4359         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4360         Adjust.
4361         (struct solib_aix_inferior_data) <library_list>: Adjust.
4362         * solib-darwin.c (struct lm_info): Rename to ...
4363         (struct lm_info_darwin): ... this.  Extend lm_info_base.
4364         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4365         * solib-dsbt.c (struct lm_info): Rename to ...
4366         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
4367         (struct dsbt_info) <main_executable_lm_info): Adjust.
4368         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4369         dsbt_relocate_section_addresses): Adjust.
4370         * solib-frv.c (struct lm_info): Rename to ...
4371         (struct lm_info_frv): ... this.  Extend lm_info_base.
4372         (main_executable_lm_info): Adjust.
4373         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4374         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4375         find_canonical_descriptor_in_load_object,
4376         frv_fdpic_find_canonical_descriptor): Adjust.
4377         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4378         to lm_info_svr4.
4379         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4380         svr4_clear_so, svr4_copy_library_list,
4381         library_list_start_library, svr4_default_sos, svr4_read_so_list,
4382         svr4_current_sos, svr4_fetch_objfile_link_map,
4383         solist_update_incremental): Adjust.
4384         * solib-svr4.h (struct lm_info_svr4): Move here from
4385         solib-svr4.c.
4386         * solib-target.c (struct lm_info): Rename to ...
4387         (struct lm_info_target): ... this.  Extend lm_info_base.
4388         (lm_info_p): Rename to ...
4389         (lm_info_target_p): ... this.
4390         (solib_target_parse_libraries, library_list_start_segment,
4391         library_list_start_section, library_list_start_library,
4392         library_list_end_library, solib_target_free_library_list,
4393         solib_target_current_sos, solib_target_free_so,
4394         solib_target_relocate_section_addresses): Adjust.
4395         * windows-nat.c (struct lm_info): Rename to ...
4396         (struct lm_info_windows): ... this.  Extend lm_info_base.
4397         (windows_make_so, handle_load_dll, handle_unload_dll,
4398         windows_xfer_shared_libraries): Adjust.
4399
4400 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4401
4402         * solib-darwin.c (struct darwin_so_list): Remove.
4403         (darwin_current_sos): Allocate an so_list object instead of a
4404         darwin_so_list, separately allocate an lm_info object.
4405         (darwin_free_so): Free lm_info.
4406
4407 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
4408
4409         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4410         with fprintf_filtered.
4411
4412 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4413
4414         * regcache.c (regcache::regcache): New function.
4415         (regcache::~regcache): New function.
4416         (regcache_xmalloc_1): Remove.
4417         (regcache_xmalloc): Call new regcache.
4418         (regcache_xfree): Call delete regcache.
4419         (get_thread_arch_aspace_regcache): Call new regcache.
4420
4421 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4422
4423         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4424         lwp instead of ptid_get_lwp.
4425
4426 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4427
4428         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4429         lwp_info instead of getting from inferior_ptid.
4430
4431 2017-04-27  Keith Seitz  <keiths@redhat.com>
4432
4433         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4434         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4435         (CV_CONVERSION_BADNESS): Define.
4436         (rank_one_type): Remove overly restrictive rvalue reference
4437         rank checks.
4438         Add cv-qualifier checks and subranks for type equality.
4439         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4440         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4441         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4442
4443 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
4444
4445         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4446         count when creating the object.
4447
4448 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
4449             Ulrich Weigand  <uweigand@de.ibm.com>
4450
4451         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4452         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4453         is used in AIX.
4454         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4455         (process_xcoff_symbol): Likewise.
4456         (scan_xcoff_symtab): Likewise.
4457
4458 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4459
4460         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
4461         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
4462         (ia64_access_reg): Use get_frame_register_unsigned.
4463         (ia64_access_rse_reg): Likewise.
4464         (ia64_libunwind_frame_prev_register): Likewise.
4465
4466 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
4467
4468         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
4469         * gdbarch.c: Regenerated.
4470         * gdbarch.h: Regenerated.
4471         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
4472         visibility external.
4473         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
4474         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
4475         (enum cfa_how_kind): Move to ...
4476         (struct dwarf2_frame_state_reg_info): Likewise.
4477         (struct dwarf2_frame_state): Likewise.
4478         * dwarf2-frame.h: ... here.
4479         (dwarf2_frame_state_alloc_regs): New declaration.
4480         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
4481         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
4482
4483 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4484
4485         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
4486         regcache_raw_read_unsigned.
4487         (xtensa_pseudo_register_write): Likewise.
4488
4489 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4490
4491         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
4492         (nds32_pseudo_register_write): Likewise.
4493
4494 2017-04-25  Yao Qi  <yao.qi@linaro.org>
4495
4496         * regcache.c (struct regcache) <readonly_p>: Change its type
4497         to bool.
4498         (regcache_xmalloc_1): Update parameter type and callers update.
4499
4500 2017-04-25  Yao Qi  <yao.qi@linaro.org>
4501
4502         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
4503         set_gdbarch_wchar_bit.
4504         * arm-tdep.c (arm_gdbarch_init): Likewise.
4505
4506 2017-04-25  Pedro Alves  <palves@redhat.com>
4507
4508         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
4509         (BothAreRelocatable, memcopy, memmove): Don't define.
4510         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
4511         macros.
4512
4513 2017-04-25  Pedro Alves  <palves@redhat.com>
4514
4515         * common/common-defs.h: Include "common/poison.h".
4516         * common/function-view.h: (Not, Or, Requires): Move to traits.h
4517         and adjust.
4518         * common/poison.h: New file.
4519         * common/traits.h: Include <type_traits>.
4520         (Not, Or, Requires): New, moved from common/function-view.h.
4521
4522 2017-04-25  Pedro Alves  <palves@redhat.com>
4523
4524         * breakpoint.h (struct breakpoint): In-class initialize all
4525         fields.  Make boolean fields "bool".
4526         * breakpoint.c (init_raw_breakpoint_without_location): Remove
4527         memset call and initializations no longer necessary.
4528
4529 2017-04-25  Pedro Alves  <palves@redhat.com>
4530
4531         * btrace.c (pt_btrace_insn_flags): Change parameter type to
4532         reference.
4533         (pt_btrace_insn): New function.
4534         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
4535
4536 2017-04-25  Pedro Alves  <palves@redhat.com>
4537
4538         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
4539         "base" field and inherit from "bp_location" instead.  Add
4540         non-default ctor.
4541         (allocate_location_exception): Use new non-default ctor.
4542         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
4543         (init_bp_location): Convert to ...
4544         (bp_location::bp_location): ... this new ctor, and remove memset
4545         call.
4546         (base_breakpoint_allocate_location): Use the new non-default ctor.
4547         * breakpoint.h (bp_location): Now a class.  Declare default and
4548         non-default ctors.  In-class initialize all members.
4549         (init_bp_location): Remove declaration.
4550
4551 2017-04-25  Pedro Alves  <palves@redhat.com>
4552
4553         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
4554         assignment operator.
4555
4556 2017-04-24  Yao Qi  <yao.qi@linaro.org>
4557
4558         * doublest.c (convert_doublest_to_floatformat): Call
4559         floatformat_totalsize_bytes.
4560
4561 2017-04-22  Tom Tromey  <tom@tromey.com>
4562
4563         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4564         ui_out_emit_list.
4565         * stack.c (print_frame): Use ui_out_emit_list.
4566         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4567         ui_out_emit_list.
4568         * mi/mi-main.c (print_one_inferior)
4569         (mi_cmd_data_list_register_names)
4570         (mi_cmd_data_list_register_values, mi_cmd_list_features)
4571         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
4572         ui_out_emit_list.
4573         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
4574         (mi_output_solib_attribs): Use ui_out_emit_list,
4575         ui_out_emit_tuple.
4576         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
4577         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
4578         (mi_cmd_stack_list_args, list_args_or_locals): Use
4579         ui_out_emit_list.
4580         * disasm.c (do_assembly_only): Use ui_out_emit_list.
4581         * breakpoint.c (print_solib_event, output_thread_groups): Use
4582         ui_out_emit_list.
4583
4584 2017-04-22  Tom Tromey  <tom@tromey.com>
4585
4586         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
4587         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
4588         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
4589
4590 2017-04-22  Tom Tromey  <tom@tromey.com>
4591
4592         * tracepoint.c (tvariables_info_1)
4593         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
4594
4595 2017-04-22  Tom Tromey  <tom@tromey.com>
4596
4597         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
4598         annotate_arg_emitter.
4599         * breakpoint.c (print_mention_watchpoint)
4600         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
4601         * annotate.h (struct annotate_arg_emitter): New.
4602
4603 2017-04-22  Tom Tromey  <tom@tromey.com>
4604
4605         * record-btrace.c (record_btrace_insn_history)
4606         (record_btrace_insn_history_range, record_btrace_call_history)
4607         (record_btrace_call_history_range): Use ui_out_emit_tuple.
4608         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
4609         ui_out_emit_tuple.
4610         * stack.c (print_frame_info): Use ui_out_emit_tuple.
4611         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
4612         * skip.c (skip_info): Use ui_out_emit_tuple.
4613         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
4614         * progspace.c (print_program_space): Use ui_out_emit_tuple.
4615         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
4616         * osdata.c (info_osdata): Use ui_out_emit_tuple.
4617         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4618         ui_out_emit_tuple.
4619         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
4620         (output_register, mi_cmd_data_read_memory)
4621         (mi_cmd_data_read_memory_bytes, mi_load_progress)
4622         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
4623         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
4624         Use ui_out_emit_tuple.
4625         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
4626         ui_out_emit_tuple.
4627         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4628         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
4629         * linux-thread-db.c (info_auto_load_libthread_db): Use
4630         ui_out_emit_tuple.
4631         * inferior.c (print_inferior): Use ui_out_emit_tuple.
4632         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
4633         * disasm.c (do_mixed_source_and_assembly_deprecated)
4634         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
4635         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
4636         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
4637         * breakpoint.c (print_one_breakpoint_location)
4638         (print_one_breakpoint): Use ui_out_emit_tuple.
4639         * auto-load.c (print_script, info_auto_load_cmd): Use
4640         ui_out_emit_tuple.
4641         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
4642
4643 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
4644
4645         * thread.c (print_thread_info_1): Remove dead code.
4646
4647 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4648
4649         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
4650         GDB_SELF_TEST.
4651         * arm-tdep.c (selftests::arm_record_test): Likewise.
4652
4653 2017-04-21  Yao Qi  <yao.qi@linaro.org>
4654
4655         * regcache.c (regcache_restore): Remove argument 2.  Replace
4656         argument 3 with regcache.  Get register status from
4657         src->register_status and get register contents from
4658         register_buffer (src, regnum).
4659         (regcache_cpy): Update.
4660
4661 2017-04-19  Pedro Alves  <palves@redhat.com>
4662
4663         * gdbthread.h (thread): Add missing closing parenthesis in
4664         comment.
4665
4666 2017-04-19  Pedro Alves  <palves@redhat.com>
4667
4668         * common/refcounted-object.h: New file.
4669         * gdbthread.h: Include "common/refcounted-object.h".
4670         (thread_info): Inherit from refcounted_object and add comments.
4671         (thread_info::incref, thread_info::decref)
4672         (thread_info::m_refcount): Delete.
4673         (thread_info::deletable): Use the refcounted_object::refcount()
4674         method.
4675         * inferior.c (current_inferior_): Add comment.
4676         (set_current_inferior): Increment/decrement refcounts.
4677         (prune_inferiors, remove_inferior_command): Skip inferiors marked
4678         not-deletable instead of comparing with the current inferior.
4679         (initialize_inferiors): Increment the initial inferior's refcount.
4680         * inferior.h (struct inferior): Forward declare.
4681         Include "common/refcounted-object.h".
4682         (current_inferior, set_current_inferior): Move declaration to
4683         before struct inferior's definition, and fix comment.
4684         (inferior): Inherit from refcounted_object.  Add comments.
4685         * thread.c (switch_to_thread_no_regs): Reference the thread's
4686         inferior pointer directly instead of doing a ptid lookup.
4687         (switch_to_no_thread): New function.
4688         (switch_to_thread(thread_info *)): New function, factored out
4689         from ...
4690         (switch_to_thread(ptid_t)): ... this.
4691         (restore_current_thread): Delete.
4692         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
4693         fields, and add 'inf' field.
4694         (do_restore_current_thread_cleanup): Check whether old->inf is
4695         alive instead of looking up an inferior by ptid.  Use
4696         switch_to_thread and switch_to_no_thread.
4697         (restore_current_thread_cleanup_dtor): Use old->inf directly
4698         instead of lookup up an inferior by id.  Decref the inferior.
4699         Don't restore 'removable'.
4700         (make_cleanup_restore_current_thread): Same the inferior pointer
4701         in old, instead of the inferior number.  Incref the inferior.
4702         Don't save/clear 'removable'.
4703
4704 2017-04-19  Pedro Alves  <palves@redhat.com>
4705
4706         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4707         unittests/scoped_restore-selftests.c.
4708         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
4709         * common/scoped_restore.h (scoped_restore_base): Make "class".
4710         (scoped_restore_base::release): New public method.
4711         (scoped_restore_base::scoped_restore_base): New protected ctor.
4712         (scoped_restore_base::m_saved_var): New protected field.
4713         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
4714         scoped_restore_base base class instead of m_saved_var directly.
4715         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
4716         (scoped_restore_tmpl::scoped_restore_tmpl(const
4717         scoped_restore_tmpl<T>&)): Likewise.
4718         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
4719         method.
4720         (scoped_restore_tmpl::saved_var): New method.
4721         (scoped_restore_tmpl::m_saved_var): Delete.
4722         * inferior.h (inferior::detaching): Now a bool.
4723         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
4724         cleanup.
4725         * unittests/scoped_restore-selftests.c: New file.
4726
4727 2017-04-19  Pedro Alves  <palves@redhat.com>
4728
4729         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
4730         Re-sort in alphabetic order.
4731
4732 2017-04-18  Pedro Alves  <palves@redhat.com>
4733
4734         * xml-support.c (obstack_xml_printf): Delete.
4735         * xml-support.h (obstack_xml_printf): Delete.
4736
4737 2017-04-18  Pedro Alves  <palves@redhat.com>
4738
4739         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
4740         vdebug, verror, body_text, start_element, end_element, name,
4741         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
4742         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
4743         is_xinclude>: Make private and add m_ prefix.
4744         (gdb_xml_parser::body_text): New method, based on ...
4745         (gdb_xml_body_text): ... this.  Adjust.
4746         (gdb_xml_parser::vdebug): New method, based on ...
4747         (gdb_xml_debug): ... this.  Adjust.
4748         (gdb_xml_parser::verror): New method, based on ...
4749         (gdb_xml_error): ... this.  Adjust.
4750         (gdb_xml_parser::start_element): New method, based on ...
4751         (gdb_xml_start_element): ... this.  Adjust.
4752         (gdb_xml_start_element_wrapper): Defer to
4753         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
4754         (gdb_xml_parser::end_element): New method, based on ...
4755         (gdb_xml_end_element_wrapper): ... this.  Adjust.
4756         (gdb_xml_parser::~gdb_xml_parser): Adjust.
4757         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
4758         (gdb_xml_parser::use_dtd): New method, based on ...
4759         (gdb_xml_use_dtd): ... this.  Adjust.
4760         (gdb_xml_parser::parse): New method, based on ...
4761         (gdb_xml_parse): ... this.  Adjust.
4762         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
4763         (xinclude_start_include): Adjust to call the parser's name method.
4764         (xml_xinclude_default, xml_xinclude_start_doctype)
4765         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
4766         method.
4767         (xml_process_xincludes): Adjust to call parser methods.
4768         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
4769         declarations.
4770
4771 2017-04-18  Pedro Alves  <palves@redhat.com>
4772
4773         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
4774         gdb::optional<std::string>.
4775         * xml-support.c: Include <string>.
4776         (scope_level::scope_level(scope_level &&))
4777         (scope_level::~scope_level): Delete.
4778         (scope_level::body): Now a std::string.
4779         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
4780         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
4781         parameter.
4782         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
4783         (xinclude_parsing_data::output): Now a std::string reference.
4784         (xinclude_start_include): Adjust.
4785         (xml_xinclude_default): Adjust.
4786         (xml_process_xincludes): Add 'output' parameter, and return bool.
4787         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
4788         and return bool.
4789         * xml-tdesc.c: Include <unordered_map> and <string>.
4790         (tdesc_xml_cache): Delete.
4791         (tdesc_xml_cache_s): Delete.
4792         (xml_cache): Now an std::unordered_map.
4793         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
4794         (target_fetch_description_xml): Change return type to
4795         gdb::optional<std::string>, and adjust.
4796         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
4797         (target_fetch_description_xml): Change return type to
4798         gdb::optional<std::string>.
4799
4800 2017-04-18  Pedro Alves  <palves@redhat.com>
4801
4802         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4803         unittests/optional-selftests.c.
4804         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
4805         * unittests/optional-selftests.c: New file.
4806         * unittests/optional/assignment/1.cc: New file.
4807         * unittests/optional/assignment/2.cc: New file.
4808         * unittests/optional/assignment/3.cc: New file.
4809         * unittests/optional/assignment/4.cc: New file.
4810         * unittests/optional/assignment/5.cc: New file.
4811         * unittests/optional/assignment/6.cc: New file.
4812         * unittests/optional/assignment/7.cc: New file.
4813         * unittests/optional/cons/copy.cc: New file.
4814         * unittests/optional/cons/default.cc: New file.
4815         * unittests/optional/cons/move.cc: New file.
4816         * unittests/optional/cons/value.cc: New file.
4817         * unittests/optional/in_place.cc: New file.
4818         * unittests/optional/observers/1.cc: New file.
4819         * unittests/optional/observers/2.cc: New file.
4820
4821 2017-04-18  Pedro Alves  <palves@redhat.com>
4822
4823         * common/gdb_optional.h: Include common/traits.h.
4824         (in_place_t): New type.
4825         (in_place): New constexpr variable.
4826         (optional::optional): Remove member initialization of
4827         m_instantiated.
4828         (optional::optional(in_place_t...)): New constructor.
4829         (optional::~optional): Use reset.
4830         (optional::optional(const optional&)): New.
4831         (optional::optional(const optional&&)): New.
4832         (optional::optional(T &)): New.
4833         (optional::optional(T &&)): New.
4834         (operator::operator=(const optional &)): New.
4835         (operator::operator=(optional &&)): New.
4836         (operator::operator= (const T &))
4837         (operator::operator= (T &&))
4838         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
4839         (operator::reset): New.
4840         (operator::m_instantiated):: Add in-class initializer.
4841         * common/traits.h: Include <type_traits>.
4842         (struct And): New types.
4843
4844 2017-04-18  Pedro Alves  <palves@redhat.com>
4845
4846         * xml-support.c: Include <vector>.
4847         (scope_level::scope_level(const gdb_xml_element *))
4848         (scope_level::scope_level(scope_level&&)): New.
4849         (scope_level::~scope_level): New.
4850         (scope_level_s): Delete.
4851         (gdb_xml_parser::scopes): Now a std::vector.
4852         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
4853         Use std::vector.
4854         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
4855         scope cleanup code.
4856         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
4857         of the scopes member.  Use std::vector::emplace_back.
4858
4859 2017-04-18  Pedro Alves  <palves@redhat.com>
4860
4861         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
4862         a bool.
4863         (gdb_xml_end_element): Change type of first parameter.
4864         (gdb_xml_cleanup): Rename to ...
4865         (gdb_xml_parser::~gdb_xml_parser): ... this.
4866         (gdb_xml_create_parser_and_cleanup): Delete with ...
4867         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
4868         to this new ctor.
4869         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
4870         using gdb_xml_create_parser_and_cleanup.
4871         (xinclude_parsing_data): Add ctor/dtor.
4872         (xml_xinclude_cleanup): Delete.
4873         (xml_process_xincludes): Create a local xinclude_parsing_data
4874         instead of heap-allocating one.  Create a local gdb_xml_parser
4875         instead of heap-allocating one with
4876         gdb_xml_create_parser_and_cleanup.
4877
4878 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
4879
4880         PR threads/20743
4881         * fbsd-nat.c (resume_one_thread_cb): Remove.
4882         (resume_all_threads_cb): Remove.
4883         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
4884         iterate_over_threads.
4885
4886 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
4887
4888         * NEWS: Create a new section for the next release branch.
4889         Rename the section of the current branch, now that it has
4890         been cut.
4891
4892 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
4893
4894         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
4895         * version.in: Bump version to 8.0.50.DATE-git.
4896
4897 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
4898
4899         PR gdb/21385
4900         * windows-nat.c (windows_create_inferior): Declare 'allargs'
4901         independently of the host, and fix build breakage on Cygwin.
4902
4903 2017-04-13  Pedro Alves  <palves@redhat.com>
4904
4905         * inferior.c (free_inferior): Convert to ...
4906         (inferior::~inferior): ... this dtor.
4907         (inferior::inferior): New ctor, factored out from ...
4908         (add_inferior_silent): ... here.  Allocate the inferior with a new
4909         expression.
4910         (delete_inferior): Call delete instead of free_inferior.
4911         * inferior.h (gdb_environ, continuation): Forward declare.
4912         (inferior): Now a class.  Add in-class initialization to all
4913         members.  Make boolean fields bool, except 'detaching'.
4914         (inferior::inferior): New explicit ctor.
4915         (inferior::~inferior): New.
4916
4917 2017-04-13  Pedro Alves  <palves@redhat.com>
4918
4919         * inferior.c (init_inferior_list): Delete.
4920         * inferior.h (init_inferior_list): Delete.
4921
4922 2017-04-13  Pedro Alves  <palves@redhat.com>
4923
4924         PR threads/13217
4925         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
4926         (top level): Call it twice, with different thread sets.
4927
4928 2017-04-13  Pedro Alves  <palves@redhat.com>
4929
4930         * thread.c: Include <algorithm>.
4931         (thread_array_cleanup): Delete.
4932         (scoped_inc_dec_ref): New class.
4933         (live_threads_count): New function.
4934         (set_thread_refcount): Delete.
4935         (tp_array_compar_ascending): Now a bool.
4936         (tp_array_compar): Convert to a std::sort comparison function.
4937         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
4938         and live_threads_count.
4939
4940 2017-04-13  Pedro Alves  <palves@redhat.com>
4941
4942         * infrun.c (follow_fork_inferior): Also switch the current
4943         inferior.
4944
4945 2017-04-13  Pedro Alves  <palves@redhat.com>
4946
4947         * breakpoint.c (watch_command_1): Save watchpoint-frame info
4948         before calling create_internal_breakpoint.
4949
4950 2017-04-13  Pedro Alves  <palves@redhat.com>
4951
4952         * fork-child.c (execv_argv): New class.
4953         (breakup_args): Refactored as ...
4954         (execv_argv::init_for_no_shell): .. this method of execv_argv.
4955         Copy arguments to storage and replace separators with NULL
4956         terminators in place.
4957         (escape_bang_in_quoted_argument): Adjust to return bool.
4958         (execv_argv::execv_argv): New ctor.
4959         (execv_argv::init_for_shell): New method, factored out from
4960         fork_inferior.  Don't strdup strings into the vector.
4961         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
4962         Remove free_vector_argv call.
4963
4964 2017-04-13  Yao Qi  <yao.qi@linaro.org>
4965
4966         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
4967         tdep->rx_psw_type.
4968
4969 2017-04-13  Yao Qi  <yao.qi@linaro.org>
4970
4971         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
4972         * rx-tdep.c (rx_gdbarch_init): Likewise.
4973
4974 2017-04-13  Pedro Alves  <palves@redhat.com>
4975
4976         * breakpoint.h (struct breakpoint): Reindent.
4977
4978 2017-04-13  Pedro Alves  <palves@redhat.com>
4979
4980         * breakpoint.c (bp_location): Rename to ...
4981         (bp_locations): ... this.  All references updated.
4982         (bp_location_count): Rename to ...
4983         (bp_locations_count): ... this.  All references updated.
4984         (bp_location_placed_address_before_address_max): Rename to ...
4985         (bp_locations_placed_address_before_address_max): ... this.  All
4986         references updated.
4987         (bp_location_shadow_len_after_address_max): Rename to ...
4988         (bp_locations_shadow_len_after_address_max): ... this.  All
4989         references updated.
4990         (bp_location_compare_addrs): Rename to ...
4991         (bp_locations_compare_addrs): ... this.  All references updated.
4992         (bp_location_compare):Rename to ...
4993         (bp_locations_compare): ... this.  All references updated.
4994         (bp_location_target_extensions_update): Rename to ...
4995         (bp_locations_target_extensions_update): ... this.  All references
4996         updated.
4997
4998 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4999
5000         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5001         * common/common.m4: Check headers 'termios.h', 'termio.h' and
5002         'sgtty.h'.
5003         * common/gdb_termios.h: New file, with parts of "terminal.h".
5004         * inflow.c: Include "gdb_termios.h".
5005         * ser-unix.c: Include "gdb_termios.h".
5006         * terminal.h: Move terminal-related defines to
5007         "common/gdb_termios.h".
5008
5009 2017-04-12  Tom Tromey  <tom@tromey.com>
5010
5011         * probe.c (parse_probes): Update.
5012         * location.h (delete_event_location): Don't declare.
5013         (event_location_deleter::operator()): Update.
5014         * location.c (event_location_deleter::operator()): Rename from
5015         delete_event_location.
5016         * linespec.h (linespec_result) <location>: Change type to
5017         event_location_up.
5018         * linespec.c (canonicalize_linespec, event_location_to_sals)
5019         (decode_objc): Update.
5020         (linespec_result): Don't call delete_event_location.
5021         * breakpoint.c (create_breakpoints_sal)
5022         (bkpt_probe_create_sals_from_location)
5023         (strace_marker_create_sals_from_location): Update.
5024
5025 2017-04-12  Tom Tromey  <tom@tromey.com>
5026
5027         * linespec.h (struct linespec_result): Add constructor and
5028         destructor.
5029         (init_linespec_result, destroy_linespec_result)
5030         (make_cleanup_destroy_linespec_result): Don't declare.
5031         * linespec.c (init_linespec_result): Remove.
5032         (linespec_result::~linespec_result): Rename from
5033         destroy_linespec_result.  Update.
5034         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5035         Remove.
5036         * breakpoint.c (create_breakpoint, break_range_command)
5037         (decode_location_default): Update.
5038         * ax-gdb.c (agent_command_1): Update.
5039
5040 2017-04-12  Tom Tromey  <tom@tromey.com>
5041
5042         * remote.c (remote_download_tracepoint): Update.
5043         * python/py-breakpoint.c (bppy_get_location): Update.
5044         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5045         (gdbscm_breakpoint_location): Update.
5046         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5047         * breakpoint.h (struct breakpoint) <location, location_range_end>:
5048         Change type to event_location_up.
5049         * breakpoint.c (create_overlay_event_breakpoint)
5050         (create_longjmp_master_breakpoint)
5051         (create_std_terminate_master_breakpoint)
5052         (create_exception_master_breakpoint)
5053         (breakpoint_event_location_empty_p, print_breakpoint_location)
5054         (print_one_breakpoint_location, create_thread_event_breakpoint)
5055         (init_breakpoint_sal, create_breakpoint)
5056         (print_recreate_ranged_breakpoint, break_range_command)
5057         (init_ada_exception_breakpoint, say_where): Update.
5058         (base_breakpoint_dtor): Don't call delete_event_location.
5059         (bkpt_print_recreate, tracepoint_print_recreate)
5060         (dprintf_print_recreate, update_static_tracepoint)
5061         (breakpoint_re_set_default): Update.
5062
5063 2017-04-12  Tom Tromey  <tom@tromey.com>
5064
5065         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5066         type of "to_do".  Update.
5067         (compute_stack_depth): Use std::vector.
5068
5069 2017-04-12  Tom Tromey  <tom@tromey.com>
5070
5071         * printcmd.c (find_instruction_backward): Use std::vector.
5072
5073 2017-04-12  Tom Tromey  <tom@tromey.com>
5074
5075         * symfile.c (objfilep): Remove typedef.
5076         (reread_symbols): Use a std::vector.
5077
5078 2017-04-12  Tom Tromey  <tom@tromey.com>
5079
5080         * mi/mi-main.c (exec_direction_forward): Remove.
5081         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5082         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5083         scoped_restore.
5084         * guile/guile.c (guile_repl_command, guile_command)
5085         (gdbscm_execute_gdb_command): Use scoped_restore.
5086         * go-exp.y (go_parse): Use scoped_restore.
5087         * d-exp.y (d_parse): Use scoped_restore.
5088         * cli/cli-decode.c (cmd_func): Use scoped_restore.
5089         * c-exp.y (c_parse): Use scoped_restore.
5090
5091 2017-04-12  Tom Tromey  <tom@tromey.com>
5092
5093         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5094         (mi_parse): Update return type.
5095         (mi_parse_free): Remove.
5096         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5097         (mi_parse::~mi_parse): Rename from mi_parse_free.
5098         (mi_parse_cleanup): Remove.
5099         (mi_parse): Return a unique_ptr.  Use new.
5100         * mi/mi-main.c (mi_execute_command): Update.
5101
5102 2017-04-12  Tom Tromey  <tom@tromey.com>
5103
5104         * location.c (explicit_location_lex_one): Return a
5105         unique_xmalloc_ptr.
5106         (string_to_explicit_location): Update.  Remove cleanups.
5107
5108 2017-04-12  Tom Tromey  <tom@tromey.com>
5109
5110         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5111         (compare_value_and_voffset): Change type.  Update.
5112         (compute_vtable_size): Change type of "offset_vec".
5113         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
5114         (gnuv3_get_typeid): Remove extraneous declaration.
5115
5116 2017-04-12  Tom Tromey  <tom@tromey.com>
5117
5118         * charset.h (wchar_iterator): Fix comment.
5119
5120 2017-04-12  Tom Tromey  <tom@tromey.com>
5121
5122         * charset.c (iconv_wrapper): New class.
5123         (cleanup_iconv): Remove.
5124         (convert_between_encodings): Use it.
5125
5126 2017-04-12  Tom Tromey  <tom@tromey.com>
5127
5128         * symfile.h (increment_reading_symtab): Update type.
5129         * symfile.c (decrement_reading_symtab): Remove.
5130         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5131         * psymtab.c (psymtab_to_symtab): Update.
5132         * dwarf2read.c (dw2_instantiate_symtab): Update.
5133
5134 2017-04-12  Tom Tromey  <tom@tromey.com>
5135
5136         * jit.c (struct jit_reader): Declare separately.  Add constructor
5137         and destructor.  Change type of "handle".
5138         (loaded_jit_reader): Define separately.
5139         (jit_reader_load): Update.  New "new".
5140         (jit_reader_unload_command): Use "delete".
5141         * gdb-dlfcn.h (struct dlclose_deleter): New.
5142         (gdb_dlhandle_up): New typedef.
5143         (gdb_dlopen, gdb_dlsym): Update types.
5144         (gdb_dlclose): Remove.
5145         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5146         (gdb_dlsym): Change type of "handle".
5147         (make_cleanup_dlclose): Remove.
5148         (dlclose_deleter::operator()): Rename from gdb_dlclose.
5149         * compile/compile-c-support.c (load_libcc): Update.
5150
5151 2017-04-12  Tom Tromey  <tom@tromey.com>
5152
5153         * symtab.h (find_pcs_for_symtab_line): Change return type.
5154         * symtab.c (find_pcs_for_symtab_line): Change return type.
5155         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5156         type of "vec".  Update.
5157         (ltpy_get_pcs_for_line): Update.
5158         * linespec.c (decode_digits_ordinary): Update.
5159
5160 2017-04-12  Tom Tromey  <tom@tromey.com>
5161
5162         * tracepoint.c (actions_command): Update.
5163         * python/python.c (python_command, python_interactive_command):
5164         Update.
5165         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5166         * guile/guile.c (guile_command): Update.
5167         * defs.h (read_command_lines, read_command_lines_1): Return
5168         command_line_up.
5169         (command_lines_deleter): New struct.
5170         (command_line_up): New typedef.
5171         * compile/compile.c (compile_code_command)
5172         (compile_print_command): Update.
5173         * cli/cli-script.h (get_command_line, copy_command_lines): Return
5174         command_line_up.
5175         (make_cleanup_free_command_lines): Remove.
5176         * cli/cli-script.c (get_command_line, read_command_lines_1)
5177         (copy_command_lines): Return command_line_up.
5178         (while_command, if_command, read_command_lines, define_command)
5179         (document_command): Update.
5180         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5181         Remove.
5182         * breakpoint.h (breakpoint_set_commands): Change type of
5183         "commands".
5184         * breakpoint.c (breakpoint_set_commands): Change type of
5185         "commands".  Update.
5186         (do_map_commands_command, update_dprintf_command_list)
5187         (create_tracepoint_from_upload): Update.
5188
5189 2017-04-12  Tom Tromey  <tom@tromey.com>
5190
5191         * tracepoint.c (scope_info): Update.
5192         * spu-tdep.c (spu_catch_start): Update.
5193         * python/python.c (gdbpy_decode_line): Update.
5194         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5195         * python/py-breakpoint.c (bppy_init): Update.
5196         * probe.c (parse_probes): Update.
5197         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5198         * location.h (event_location_deleter): New struct.
5199         (event_location_up): New typedef.
5200         (new_linespec_location, new_address_location, new_probe_location)
5201         (new_explicit_location, copy_event_location)
5202         (string_to_event_location, string_to_event_location_basic)
5203         (string_to_explicit_location): Update return type.
5204         (make_cleanup_delete_event_location): Remove.
5205         * location.c (new_linespec_location, new_address_location)
5206         (new_probe_location, new_explicit_location, copy_event_location):
5207         Return event_location_up.
5208         (delete_event_location_cleanup)
5209         (make_cleanup_delete_event_location): Remove.
5210         (string_to_explicit_location, string_to_event_location_basic)
5211         (string_to_event_location): Return event_location_up.
5212         * linespec.c (canonicalize_linespec, event_location_to_sals)
5213         (decode_line_with_current_source)
5214         (decode_line_with_last_displayed, decode_objc): Update.
5215         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5216         * completer.c (location_completer): Update.
5217         * cli/cli-cmds.c (edit_command, list_command): Update.
5218         * breakpoint.c (create_overlay_event_breakpoint)
5219         (create_longjmp_master_breakpoint)
5220         (create_std_terminate_master_breakpoint)
5221         (create_exception_master_breakpoint)
5222         (create_thread_event_breakpoint): Update.
5223         (init_breakpoint_sal): Update.  Remove some dead code.
5224         (create_breakpoint_sal): Change type of "location".  Update.
5225         (create_breakpoints_sal, create_breakpoint, break_command_1)
5226         (dprintf_command, break_range_command, until_break_command)
5227         (init_ada_exception_breakpoint)
5228         (strace_marker_create_sals_from_location)
5229         (update_static_tracepoint, trace_command, ftrace_command)
5230         (strace_command, create_tracepoint_from_upload): Update.
5231         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5232         * ax-gdb.c (agent_command_1): Update.
5233
5234 2017-04-12  Pedro Alves  <palves@redhat.com>
5235
5236         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5237         * configure.tgt: Handle i[34567]86-*-go32* and
5238         i[34567]86-*-msdosdjgpp*.
5239         * i386-tdep.c (i386_svr4_reg_to_regnum):
5240         Make extern.
5241         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5242         i386-go32-tdep.c.
5243         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5244         * i386-go32-tdep.c: New file.
5245         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5246         declarations.
5247
5248 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
5249
5250         * aix-thread.c (pd_status2str): Change return type to const char *.
5251
5252 2017-04-12  Pedro Alves  <palves@redhat.com>
5253
5254         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5255         calls to set_gdbarch_gnu_triplet_regexp.
5256
5257 2017-04-12  Pedro Alves  <palves@redhat.com>
5258
5259         PR gdb/21323
5260         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5261         New enum value.
5262         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5263         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5264         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5265         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5266         * gdbarch.h, gdbarch.c: Regenerate.
5267         * aarch64-tdep.c (aarch64_gdbarch_init): Override
5268         gdbarch_wchar_bit and gdbarch_wchar_signed.
5269         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5270         * arm-tdep.c (arm_gdbarch_init): Likewise.
5271         * avr-tdep.c (avr_gdbarch_init): Likewise.
5272         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5273         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5274         * i386-tdep.c (i386_go32_init_abi): Likewise.
5275         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5276         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5277         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5278         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5279         * sh-tdep.c (sh_gdbarch_init): Likewise.
5280         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5281         * sparc64-tdep.c (sparc64_init_abi): Likewise.
5282         * windows-tdep.c (windows_init_abi): Likewise.
5283         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5284
5285 2017-04-12  Pedro Alves  <palves@redhat.com>
5286
5287         PR c++/21323
5288         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5289         cplus_primitive_type_char32_t>: New enum values.
5290         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5291         and cplus_primitive_type_char32_t.
5292         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5293         32, use the archtecture's built-in type for char16_t and char32_t,
5294         respectively.  Otherwise, fallback to init_integer_type as before,
5295         but make the type unsigned, and issue a complaint.
5296         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5297
5298 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
5299
5300         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5301         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5302
5303 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5304
5305         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5306         'const char *'.
5307
5308 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5309
5310         * common/common-utils.c (free_vector_argv): New function.
5311         * common/common-utils.h: Include <vector>.
5312         (free_vector_argv): New prototype.
5313         * darwin-nat.c (darwin_create_inferior): Rewrite function
5314         prototype in order to constify "exec_file" and accept a
5315         "std::string" for "allargs".
5316         * fork-child.c: Include <vector>.
5317         (breakup_args): Rewrite function, using C++.
5318         (fork_inferior): Rewrite function header, constify "exec_file_arg"
5319         and accept "std::string" for "allargs".  Update the code to
5320         calculate "argv" based on "allargs".  Update calls to "exec_fun"
5321         and "execvp".
5322         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5323         order to constify "exec_file" and accept a "std::string" for
5324         "allargs".
5325         * go32-nat.c (go32_create_inferior): Likewise.
5326         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5327         * infcmd.c (run_command_1): Constify "exec_file".  Use
5328         "std::string" for inferior arguments.
5329         * inferior.h (fork_inferior): Update prototype.
5330         * linux-nat.c (linux_nat_create_inferior): Rewrite function
5331         prototype in order to constify "exec_file" and accept a
5332         "std::string" for "allargs".
5333         * nto-procfs.c (procfs_create_inferior): Likewise.
5334         * procfs.c (procfs_create_inferior): Likewise.
5335         * remote-sim.c (gdbsim_create_inferior): Likewise.
5336         * remote.c (extended_remote_run): Update code to accept
5337         "std::string" as argument.
5338         (extended_remote_create_inferior): Rewrite function prototype in
5339         order to constify "exec_file" and accept a "std::string" for
5340         "allargs".
5341         * rs6000-nat.c (super_create_inferior): Likewise.
5342         (rs6000_create_inferior): Likewise.
5343         * target.h (struct target_ops) <to_create_inferior>: Likewise.
5344         * windows-nat.c (windows_create_inferior): Likewise.
5345
5346 2017-04-11  Pedro Alves  <palves@redhat.com>
5347
5348         * thread.c: Fix whitespace throughout.
5349
5350 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5351
5352         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5353
5354 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
5355
5356         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5357
5358 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
5359
5360         PR gdb/21364
5361         * osdata.c (info_osdata): Check if 'type' is an empty string
5362         instead of NULL.
5363
5364 2017-04-10  Pedro Alves  <palves@redhat.com>
5365
5366         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5367         (ptid_to_global_thread_id, in_thread_list)
5368         (do_captured_list_thread_ids, set_resumed, set_running)
5369         (set_executing, set_stop_requested, finish_thread_state)
5370         (validate_registers_access, can_access_registers_ptid)
5371         (print_thread_info_1, switch_to_thread)
5372         (do_restore_current_thread_cleanup)
5373         (make_cleanup_restore_current_thread, thread_command)
5374         (thread_name_command): Use operator== instead of ptid_equal.
5375
5376 2017-04-10  Pedro Alves  <palves@redhat.com>
5377
5378         * thread.c (struct current_thread_cleanup) <next>: Delete field.
5379         (current_thread_cleanup_chain): Delete.
5380         (restore_current_thread_cleanup_dtor)
5381         (make_cleanup_restore_current_thread): Remove references to
5382         current_thread_cleanup_chain.
5383
5384 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
5385
5386         * msp430-tdep.c (msp430_pseudo_register_read): Never return
5387         REG_UNKNOWN.
5388
5389 2017-04-10  Yao Qi  <yao.qi@linaro.org>
5390
5391         PR gdb/19942
5392         * gdbthread.h (thread_info::deletable): New method.
5393         (thread_info::incref): New method.
5394         (thread_info::decref): New method.
5395         (thread_info::refcount): Move it to private.
5396         * infrun.c (save_stop_context): Call inc_refcount.
5397         (release_stop_context_cleanup): Likewise.
5398         * thread.c (set_thread_exited): New function.
5399         (init_thread_list): Delete "tp" only it is deletable, otherwise
5400         call set_thread_exited.
5401         (delete_thread_1): Call set_thread_exited.
5402         (current_thread_cleanup) <inferior_pid>: Remove.
5403         <thread>: New field.
5404         (restore_current_thread_ptid_changed): Removed.
5405         (do_restore_current_thread_cleanup): Adjust.
5406         (restore_current_thread_cleanup_dtor): Don't call
5407         find_thread_ptid.
5408         (set_thread_refcount): Use dec_refcount.
5409         (make_cleanup_restore_current_thread): Adjust.
5410         (thread_apply_all_command): Call inc_refcount.
5411         (_initialize_thread): Don't call
5412         observer_attach_thread_ptid_changed.
5413
5414 2017-04-10  Yao Qi  <yao.qi@linaro.org>
5415
5416         * thread.c (delete_thread_1): Hoist code on marking thread as
5417         exited.
5418
5419 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5420
5421         * windows-nat.c (windows_detach): Initialize ptid with
5422         minus_one_ptid.
5423
5424 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5425
5426         * unittests/ptid-selftests.c: Fix erroneous assert messages.
5427
5428 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
5429
5430         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5431         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5432         (bfin_pseudo_register_write): Likewise
5433
5434 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
5435
5436         * common/ptid.h (struct ptid): Change to...
5437         (class ptid_t): ... this.
5438         <ptid_t>: New constructors.
5439         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5440         matches>: New methods.
5441         <make_null, make_minus_one>: New static methods.
5442         <pid>: Rename to...
5443         <m_pid>: ...this.
5444         <lwp>: Rename to...
5445         <m_lwp>: ...this.
5446         <tid>: Rename to...
5447         <m_tid>: ...this.
5448         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5449         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5450         as references, move comment to class ptid_t.
5451         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5452         ptid_t static methods.
5453         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5454         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5455         Take ptid arguments as references, implement using ptid_t methods.
5456         * unittests/ptid-selftests.c: New file.
5457         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5458         unittests/ptid-selftests.c.
5459         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
5460
5461 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5462
5463         * python/python.c (python_run_simple_file): Cast mode literal to
5464         non-const char pointer as expected by PyFile_FromString.
5465
5466 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
5467
5468         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
5469         minus_one_ptid and null_ptid.
5470
5471 2017-04-05  Pedro Alves  <palves@redhat.com>
5472
5473         * warning.m4 (build_warnings): Remove -Wno-write-strings.
5474         * configure: Regenerate.
5475
5476 2017-04-05  Pedro Alves  <palves@redhat.com>
5477
5478         * ada-exp.y (yyerror): Constify.
5479         * ada-lang.c (bound_name, get_selections)
5480         (ada_variant_discrim_type)
5481         (ada_variant_discrim_name, ada_value_struct_elt)
5482         (ada_lookup_struct_elt_type, is_unchecked_variant)
5483         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
5484         (catch_ada_exception_command_split)
5485         (catch_ada_assert_command_split, catch_assert_command)
5486         (ada_op_name): Constify.
5487         * ada-lang.h (ada_yyerror, get_selections)
5488         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
5489         * arc-tdep.c (arc_print_frame_cache): Constify.
5490         * arm-tdep.c (arm_skip_stub): Constify.
5491         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
5492         (gen_aggregate_elt_ref): Constify.
5493         * bcache.c (print_bcache_statistics): Constify.
5494         * bcache.h (print_bcache_statistics): Constify.
5495         * break-catch-throw.c (catch_exception_command_1):
5496         * breakpoint.c (struct ep_type_description::description):
5497         Constify.
5498         (add_solib_catchpoint): Constify.
5499         (catch_fork_command_1): Add cast.
5500         (add_catch_command): Constify.
5501         * breakpoint.h (add_catch_command, add_solib_catchpoint):
5502         Constify.
5503         * bsd-uthread.c (bsd_uthread_state): Constify.
5504         * buildsym.c (patch_subfile_names): Constify.
5505         * buildsym.h (next_symbol_text_func, patch_subfile_names):
5506         Constify.
5507         * c-exp.y (yyerror): Constify.
5508         (token::oper): Constify.
5509         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
5510         * c-varobj.c (cplus_describe_child): Constify.
5511         * charset.c (find_charset_names): Add cast.
5512         (find_charset_names): Constify array and add const_cast.
5513         * cli/cli-cmds.c (complete_command, cd_command): Constify.
5514         (edit_command): Constify.
5515         * cli/cli-decode.c (lookup_cmd): Constify.
5516         * cli/cli-dump.c (dump_memory_command, dump_value_command):
5517         Constify.
5518         (struct dump_context): Constify.
5519         (add_dump_command, restore_command): Constify.
5520         * cli/cli-script.c (get_command_line): Constify.
5521         * cli/cli-script.h (get_command_line): Constify.
5522         * cli/cli-utils.c (check_for_argument): Constify.
5523         * cli/cli-utils.h (check_for_argument): Constify.
5524         * coff-pe-read.c (struct read_pe_section_data): Constify.
5525         * command.h (lookup_cmd): Constify.
5526         * common/print-utils.c (decimal2str): Constify.
5527         * completer.c (gdb_print_filename): Constify.
5528         * corefile.c (set_gnutarget): Constify.
5529         * cp-name-parser.y (yyerror): Constify.
5530         * cp-valprint.c (cp_print_class_member): Constify.
5531         * cris-tdep.c (cris_register_name, crisv32_register_name):
5532         Constify.
5533         * d-exp.y (yyerror): Constify.
5534         (struct token::oper): Constify.
5535         * d-lang.h (d_yyerror): Constify.
5536         * dbxread.c (struct header_file_location::name): Constify.
5537         (add_old_header_file, add_new_header_file, last_function_name)
5538         (dbx_next_symbol_text, add_bincl_to_list)
5539         (find_corresponding_bincl_psymtab, set_namestring)
5540         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
5541         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
5542         * defs.h (command_line_input, print_address_symbolic)
5543         (deprecated_readline_begin_hook): Constify.
5544         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
5545         Constify.
5546         * event-top.c (handle_line_of_input): Constify and add cast.
5547         * exceptions.c (catch_errors): Constify.
5548         * exceptions.h (catch_errors): Constify.
5549         * expprint.c (print_subexp_standard, op_string, op_name)
5550         (op_name_standard, dump_raw_expression, dump_raw_expression):
5551         * expression.h (op_name, op_string, dump_raw_expression):
5552         Constify.
5553         * f-exp.y (yyerror): Constify.
5554         (struct token::oper): Constify.
5555         (struct f77_boolean_val::name): Constify.
5556         * f-lang.c (f_word_break_characters): Constify.
5557         * f-lang.h (f_yyerror): Constify.
5558         * fork-child.c (fork_inferior): Add cast.
5559         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
5560         (new_variant): Constify.
5561         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
5562         * gdbarch.c: Regenerate.
5563         * gdbcore.h (set_gnutarget): Constify.
5564         * go-exp.y (yyerror): Constify.
5565         (token::oper): Constify.
5566         * go-lang.h (go_yyerror): Constify.
5567         * go32-nat.c (go32_sysinfo): Constify.
5568         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
5569         * guile/scm-cmd.c (cmdscm_function): Constify.
5570         * guile/scm-param.c (pascm_param_value): Constify.
5571         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
5572         (h8300sx_register_name): Constify.
5573         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
5574         Constify.
5575         * ia64-tdep.c (ia64_register_names): Constify.
5576         * infcmd.c (construct_inferior_arguments): Constify.
5577         (path_command, attach_post_wait): Constify.
5578         * language.c (show_range_command, show_case_command)
5579         (unk_lang_error): Constify.
5580         * language.h (language_defn::la_error)
5581         (language_defn::la_name_of_this): Constify.
5582         * linespec.c (decode_line_2): Constify.
5583         * linux-thread-db.c (thread_db_err_str): Constify.
5584         * lm32-tdep.c (lm32_register_name): Constify.
5585         * m2-exp.y (yyerror): Constify.
5586         * m2-lang.h (m2_yyerror): Constify.
5587         * m32r-tdep.c (m32r_register_names): Constify and make static.
5588         * m68hc11-tdep.c (m68hc11_register_names): Constify.
5589         * m88k-tdep.c (m88k_register_name): Constify.
5590         * macroexp.c (appendmem): Constify.
5591         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
5592         (upgrade_type, parse_external, parse_partial_symbols)
5593         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
5594         (new_symbol): Constify.
5595         * memattr.c (mem_info_command): Constify.
5596         * mep-tdep.c (register_name_from_keyword): Constify.
5597         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
5598         Constify.
5599         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
5600         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
5601         * mi/mi-main.c (captured_mi_execute_command): Constify and add
5602         cast.
5603         (mi_execute_async_cli_command): Constify.
5604         * mips-tdep.c (mips_register_name): Constify.
5605         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
5606         (am33_register_name, am33_2_register_name)
5607         * moxie-tdep.c (moxie_register_names): Constify.
5608         * nat/linux-osdata.c (osdata_type): Constify fields.
5609         * nto-tdep.c (nto_parse_redirection): Constify.
5610         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
5611         (lookup_child_selector): Constify.
5612         (objc_methcall::name): Constify.
5613         * objc-lang.h (lookup_objc_class, lookup_child_selector)
5614         (lookup_struct_typedef): Constify.
5615         * objfiles.c (pc_in_section): Constify.
5616         * objfiles.h (pc_in_section): Constify.
5617         * p-exp.y (struct token::oper): Constify.
5618         (yyerror): Constify.
5619         * p-lang.h (pascal_yyerror): Constify.
5620         * parser-defs.h (op_name_standard): Constify.
5621         (op_print::string): Constify.
5622         (exp_descriptor::op_name): Constify.
5623         * printcmd.c (print_address_symbolic): Constify.
5624         * psymtab.c (print_partial_symbols): Constify.
5625         * python/py-breakpoint.c (stop_func): Constify.
5626         (bppy_get_expression): Constify.
5627         * python/py-cmd.c (cmdpy_completer::name): Constify.
5628         (cmdpy_function): Constify.
5629         * python/py-event.c (evpy_add_attribute)
5630         (gdbpy_initialize_event_generic): Constify.
5631         * python/py-event.h (evpy_add_attribute)
5632         (gdbpy_initialize_event_generic): Constify.
5633         * python/py-evts.c (add_new_registry): Constify.
5634         * python/py-finishbreakpoint.c (outofscope_func): Constify.
5635         * python/py-framefilter.c (get_py_iter_from_func): Constify.
5636         * python/py-inferior.c (get_buffer): Add cast.
5637         * python/py-param.c (parm_constant::name): Constify.
5638         * python/py-unwind.c (fprint_frame_id): Constify.
5639         * python/python.c (gdbpy_parameter_value): Constify.
5640         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
5641         * remote.c (memory_packet_config::name): Constify.
5642         (show_packet_config_cmd, remote_write_bytes)
5643         (remote_buffer_add_string):
5644         * reverse.c (exec_reverse_once): Constify.
5645         * rs6000-tdep.c (variant::name, variant::description): Constify.
5646         * rust-exp.y (rustyyerror): Constify.
5647         * rust-lang.c (rust_op_name): Constify.
5648         * rust-lang.h (rustyyerror): Constify.
5649         * serial.h (serial_ops::name): Constify.
5650         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
5651         (sh_sh3e_register_name, sh_sh2e_register_name)
5652         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
5653         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
5654         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
5655         (sh_sh4al_dsp_register_name): Constify.
5656         * sh64-tdep.c (sh64_register_name): Constify.
5657         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
5658         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
5659         * stabsread.c (patch_block_stabs, read_type_number)
5660         (ref_map::stabs, ref_add, process_reference)
5661         (symbol_reference_defined, define_symbol, define_symbol)
5662         (error_type, read_type, read_member_functions, read_cpp_abbrev)
5663         (read_one_struct_field, read_struct_fields, read_baseclasses)
5664         (read_tilde_fields, read_struct_type, read_array_type)
5665         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
5666         (read_huge_number, read_range_type, read_args, common_block_start)
5667         (find_name_end): Constify.
5668         * stabsread.h (common_block_start, define_symbol)
5669         (process_one_symbol, symbol_reference_defined, ref_add):
5670         * symfile.c (get_section_index, add_symbol_file_command):
5671         * symfile.h (get_section_index): Constify.
5672         * target-descriptions.c (tdesc_type::name): Constify.
5673         (tdesc_free_type): Add cast.
5674         * target.c (find_default_run_target):
5675         (add_deprecated_target_alias, find_default_run_target)
5676         (target_announce_detach): Constify.
5677         (do_option): Constify.
5678         * target.h (add_deprecated_target_alias): Constify.
5679         * thread.c (print_thread_info_1): Constify.
5680         * top.c (deprecated_readline_begin_hook, command_line_input):
5681         Constify.
5682         (init_main): Add casts.
5683         * top.h (handle_line_of_input): Constify.
5684         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
5685         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
5686         (tfind_command): Rename to ...
5687         (tfind_command_1): ... this and constify.
5688         (tfind_command): New function.
5689         (tfind_end_command, tfind_start_command): Adjust.
5690         (encode_source_string): Constify.
5691         * tracepoint.h (encode_source_string): Constify.
5692         * tui/tui-data.c (tui_partial_win_by_name): Constify.
5693         * tui/tui-data.h (tui_partial_win_by_name): Constify.
5694         * tui/tui-source.c (tui_set_source_content_nil): Constify.
5695         * tui/tui-source.h (tui_set_source_content_nil): Constify.
5696         * tui/tui-win.c (parse_scrolling_args): Constify.
5697         * tui/tui-windata.c (tui_erase_data_content): Constify.
5698         * tui/tui-windata.h (tui_erase_data_content): Constify.
5699         * tui/tui-winsource.c (tui_erase_source_content): Constify.
5700         * tui/tui.c (tui_enable): Add cast.
5701         * utils.c (defaulted_query): Constify.
5702         (init_page_info): Add cast.
5703         (puts_debug, subset_compare): Constify.
5704         * utils.h (subset_compare): Constify.
5705         * varobj.c (varobj_format_string): Constify.
5706         * varobj.h (varobj_format_string): Constify.
5707         * vax-tdep.c (vax_register_name): Constify.
5708         * windows-nat.c (windows_detach): Constify.
5709         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
5710         * xml-support.c (gdb_xml_end_element): Constify.
5711         * xml-tdesc.c (tdesc_start_reg): Constify.
5712         * xstormy16-tdep.c (xstormy16_register_name): Constify.
5713         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
5714         * xtensa-tdep.h (xtensa_register_t::name): Constify.
5715
5716 2017-04-05  Pedro Alves  <palves@redhat.com>
5717
5718         * proc-api.c (struct trans): Constify.
5719         (procfs_note): Constify.
5720         * proc-events.c (struct trans, syscall_table):
5721         * proc-flags.c (struct trans): Constify.
5722         * proc-utils.h (procfs_note): Constify.
5723         * proc-why.c (struct trans): Constify.
5724         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
5725         (procfs_detach): Constify.
5726         * sol-thread.c (struct string_map): Constify.
5727         (td_err_string, td_state_string): Constify.
5728
5729 2017-04-05  Pedro Alves  <palves@redhat.com>
5730
5731         * proc-api.c (procfs_filename): Don't initialize
5732         procfs_filename.
5733         (prepare_to_trace): Assume procfs_filename is non-NULL.
5734         (_initialize_proc_api): Give procfs_filename a default value here.
5735
5736 2017-04-05  Pedro Alves  <palves@redhat.com>
5737
5738         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
5739         'cond_string' parameter.
5740         (extract_exception_regexp): Constify 'string' parameter.
5741         (catch_exception_command_1): Constify.
5742         * breakpoint.c (init_catchpoint)
5743         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
5744         parameter.
5745         (ep_parse_optional_if_clause, catch_fork_command_1)
5746         (catch_exec_command_1): Constify.
5747         * breakpoint.h (init_catchpoint): Constify 'cond_string'
5748         parameter.
5749         (ep_parse_optional_if_clause): Constify.
5750         * cli/cli-utils.c (remove_trailing_whitespace)
5751         (check_for_argument): Constify.
5752         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
5753         non-const overload.
5754         (check_for_argument): Likewise.
5755
5756 2017-04-05  Pedro Alves  <palves@redhat.com>
5757
5758         * event-top.c (command_line_handler): Add cast to execute_command
5759         call.
5760         * record-btrace.c (cmd_record_btrace_bts_start)
5761         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
5762         (cmd_record_btrace_start): Add cast to execute_command call.
5763         * record-full.c (record_full_goto_insn):
5764         * record.c (record_start, record_stop): Add cast to
5765         execute_command_to_string calls.
5766         (cmd_record_start): Add cast to execute_command calls.
5767
5768 2017-04-05  Pedro Alves  <palves@redhat.com>
5769
5770         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
5771         static inline function.
5772         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
5773         array and use gdb_PyArg_ParseTupleAndKeywords.
5774         * python/py-cmd.c (cmdpy_init): Likewise.
5775         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
5776         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
5777         (infpy_search_memory): Likewise.
5778         * python/py-objfile.c (objfpy_add_separate_debug_file)
5779         (gdbpy_lookup_objfile): Likewise.
5780         * python/py-symbol.c (gdbpy_lookup_symbol)
5781         (gdbpy_lookup_global_symbol): Likewise.
5782         * python/py-type.c (gdbpy_lookup_type): Likewise.
5783         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
5784         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
5785         Likewise.
5786
5787 2017-04-05  Pedro Alves  <palves@redhat.com>
5788
5789         * python/python-internal.h (gdb_PyGetSetDef): New type.
5790         * python/py-block.c (block_object_getset)
5791         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
5792         * python/py-event.c (event_object_getset)
5793         (finish_breakpoint_object_getset): Likewise.
5794         * python/py-inferior.c (inferior_object_getset): Likewise.
5795         * python/py-infthread.c (thread_object_getset): Likewise.
5796         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
5797         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
5798         * python/py-objfile.c (objfile_getset): Likewise.
5799         * python/py-progspace.c (pspace_getset): Likewise.
5800         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
5801         Likewise.
5802         * python/py-record.c (recpy_record_getset): Likewise.
5803         * python/py-symbol.c (symbol_object_getset): Likewise.
5804         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
5805         Likewise.
5806         * python/py-type.c (type_object_getset, field_object_getset):
5807         Likewise.
5808         * python/py-value.c (value_object_getset): Likewise.
5809
5810 2017-04-05  Pedro Alves  <palves@redhat.com>
5811
5812         * python/python-internal.h (gdb_PyObject_CallMethod)
5813         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
5814         New functions.
5815         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
5816         (PySys_GetObject, PySys_SetPath): New macros.
5817
5818 2017-04-05  Pedro Alves  <palves@redhat.com>
5819
5820         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
5821         info_osdata_command.
5822         * osdata.c (info_osdata_command): Rename to ...
5823         (info_osdata): ... this.  Constify 'type' parameter, and remove
5824         the 'from_tty' parameter.  Accept NULL TYPE.
5825         (info_osdata_command): New function.
5826         * osdata.h (info_osdata_command): Remove declaration.
5827         (info_osdata): New declaration.
5828
5829 2017-04-05  Pedro Alves  <palves@redhat.com>
5830
5831         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
5832         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
5833         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
5834         parameter.
5835         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
5836         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
5837         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
5838         parameter.
5839         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
5840         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
5841         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
5842         (mi_cmd_file_list_exec_source_files)
5843         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
5844         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5845         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
5846         parameter.
5847         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
5848         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
5849         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
5850         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
5851         (mi_cmd_stack_info_frame): Constify 'command' parameter.
5852         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
5853         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
5854         'command' parameter.
5855         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
5856         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
5857         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
5858         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
5859         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
5860         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
5861         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
5862         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
5863         (mi_cmd_var_set_update_range): Constify 'command' parameter.
5864         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
5865         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
5866         parameter.
5867         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
5868         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
5869         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
5870         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
5871         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
5872         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
5873         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
5874         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
5875         (mi_cmd_data_list_changed_registers)
5876         (mi_cmd_data_write_register_values)
5877         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
5878         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
5879         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
5880         (mi_cmd_list_features, mi_cmd_list_target_features)
5881         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
5882         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
5883         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
5884         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
5885         (mi_cmd_trace_frame_collected): Constify 'command'
5886         parameter.
5887         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
5888         'command' parameter.
5889
5890 2017-04-05  Pedro Alves  <palves@redhat.com>
5891
5892         * ada-lang.c (ada_completer_word_break_characters): Now a const
5893         array.
5894         (ada_get_gdb_completer_word_break_characters): Constify.
5895         * completer.c (gdb_completer_command_word_break_characters)
5896         (gdb_completer_file_name_break_characters)
5897         (gdb_completer_quote_characters): Now const arrays.
5898         (get_gdb_completer_quote_characters): Constify.
5899         (set_rl_completer_word_break_characters): New function.
5900         (set_gdb_completion_word_break_characters)
5901         (complete_line_internal): Use it.
5902         * completer.h (get_gdb_completer_quote_characters): Constify.
5903         (set_rl_completer_word_break_characters): Declare.
5904         * f-lang.c (f_word_break_characters): Constify.
5905         * language.c (default_word_break_characters): Constify.
5906         * language.h (language_defn::la_word_break_characters): Constify.
5907         (default_word_break_characters): Constify.
5908         * top.c (init_main): Use set_rl_completer_word_break_characters.
5909
5910 2017-04-05  Pedro Alves  <palves@redhat.com>
5911
5912         * aix-thread.c (aix_thread_pid_to_str)
5913         (aix_thread_extra_thread_info): Constify.
5914         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
5915         * bsd-uthread.c (bsd_uthread_extra_thread_info)
5916         (bsd_uthread_pid_to_str): Constify.
5917         * corelow.c (core_pid_to_str): Constify.
5918         * darwin-nat.c (darwin_pid_to_str): Constify.
5919         * fbsd-nat.c (fbsd_pid_to_str): Constify.
5920         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
5921         Constify.
5922         * gnu-nat.c (gnu_pid_to_str): Constify.
5923         * go32-nat.c (go32_pid_to_str): Constify.
5924         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
5925         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
5926         * inferior.c (inferior_pid_to_str): Constify.
5927         * linux-nat.c (linux_nat_pid_to_str): Constify.
5928         * linux-tdep.c (linux_core_pid_to_str): Constify.
5929         * linux-thread-db.c (thread_db_pid_to_str)
5930         (thread_db_extra_thread_info): Constify.
5931         * nto-tdep.c (nto_extra_thread_info): Constify.
5932         * nto-tdep.h (nto_extra_thread_info): Constify.
5933         * obsd-nat.c (obsd_pid_to_str): Constify.
5934         * procfs.c (procfs_pid_to_str): Constify.
5935         * ravenscar-thread.c (ravenscar_extra_thread_info)
5936         (ravenscar_pid_to_str): Constify.
5937         * remote-sim.c (gdbsim_pid_to_str): Constify.
5938         * remote.c (remote_threads_extra_info, remote_pid_to_str):
5939         Constify.
5940         * sol-thread.c (solaris_pid_to_str): Constify.
5941         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
5942         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
5943         * target.c (default_pid_to_str, target_pid_to_str)
5944         (normal_pid_to_str, default_pid_to_str): Constify.
5945         * target.h (target_ops::to_pid_to_str)
5946         (target_ops::to_extra_thread_info): Constify.
5947         (target_pid_to_str, normal_pid_to_str): Constify.
5948         * windows-nat.c (windows_pid_to_str): Constify.
5949         * gdbarch.sh (core_pid_to_str): Constify.
5950         * target-delegates.c: Regenerate.
5951         * gdbarch.h, gdbarch.c: Regenerate.
5952
5953 2017-04-05  Pedro Alves  <palves@redhat.com>
5954
5955         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
5956         the memory of the temporary warning_pre_print override.
5957         * utils.c (warning_pre_print): Constify.
5958         * utils.h (warning_pre_print): Constify.
5959
5960 2017-04-05  Pedro Alves  <palves@redhat.com>
5961
5962         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
5963         (shell_command): New function.
5964         (make_command): Use std::string.
5965         (init_cli_cmds): Register shell_command instead of shell_escape.
5966
5967 2017-04-05  Pedro Alves  <palves@redhat.com>
5968
5969         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
5970         * tracepoint.c (default_collect): Don't initialize.
5971
5972 2017-04-05  Pedro Alves  <palves@redhat.com>
5973
5974         * macroexp.c (macro_buffer::shared): Now a bool.
5975         (init_buffer): Update.
5976         (init_shared_buffer): Constify 'addr' parameter.
5977         (substitute_args, expand, macro_expand, macro_expand_next): Remove
5978         casts.
5979
5980 2017-04-05  Pedro Alves  <palves@redhat.com>
5981
5982         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
5983         * disasm.c (set_disassembler_options): Constify local.
5984         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
5985
5986 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
5987
5988         PR gdb/21352
5989         * tracefile.c (tsave_command): Fix argument parsing for '-r'
5990         option.
5991
5992 2017-04-05  Yao Qi  <yao.qi@linaro.org>
5993
5994         * frame.c (frame_unwind_register_unsigned): Call
5995         frame_unwind_register_value.
5996
5997 2017-04-05  Yao Qi  <yao.qi@linaro.org>
5998
5999         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6000         Use gdb_test_multiple, and don't match anchor.
6001
6002 2017-04-05  Pedro Alves  <palves@redhat.com>
6003
6004         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6005         (Write After Approval): Remove Simon Marchi.
6006
6007 2017-04-05  Pedro Alves  <palves@redhat.com>
6008
6009         * common/gdb_optional.h (optional::optional): Make constexpr and
6010         initialize m_dummy.
6011
6012 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6013
6014         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6015         (amd64fbsd_jmp_buf_reg_offset): Remove.
6016         (amd64fbsd_supply_uthread): Remove function.
6017         (amd64fbsd_collect_uthread): Remove function.
6018         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6019         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6020         (x86_64-*-freebsd*): Remove bsd-uthread.o.
6021         (fbsd-nat.c): Update comment.
6022         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6023         (i386fbsd_jmp_buf_reg_offset): Remove.
6024         (i386fbsd_supply_uthread): Remove function.
6025         (i386fbsd_collect_uthread): Remove function.
6026         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6027
6028 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6029
6030         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6031         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6032         * NEWS: Mention that support for FreeBSD/alpha was removed.
6033         * alpha-fbsd-tdep.c: Delete file.
6034         * config/alpha/fbsd.mh: Delete file.
6035         * configure.host: Delete alpha*-*-freebsd* and
6036         alpha*-*-kfreebsd*-gnu.
6037         * configure.tgt: Delete alpha*-*-freebsd* and
6038         alpha*-*-kfreebsd*-gnu.
6039
6040 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6041
6042         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6043         amd64bsd_store_inferior_registers): Use ptid from regcache.
6044
6045 2017-04-04  Pedro Alves  <palves@redhat.com>
6046
6047         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
6048         data fields, make them private and add "m_" prefixes.
6049         (lnp_state_machine::lnp_state_machine): New ctor.
6050         (record_line, check_line_address, handle_set_discriminator)
6051         (handle_set_address, handle_advance_pc, handle_special_opcode)
6052         (handle_advance_line, handle_set_file, handle_negate_stmt)
6053         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6054         (end_sequence, advance_line): New methods.
6055         (m_gdbarch, m_record_lines_p): New fields.
6056         (lnp_reader_state): Delete.
6057         (dwarf_record_line): Rename to ...
6058         (lnp_state_machine::record_line): ... adjust.
6059         (init_lnp_state_machine): Delete.
6060         (lnp_state_machine::lnp_state_machine): New.
6061         (check_line_address): Rename to ...
6062         (lnp_state_machine::check_line_address): This.
6063         (dwarf_decode_lines_1): Remove reference to "reader_state".
6064         Adjust lnp_state_machine having a non-default ctor.  Use bool.
6065         State machine internal state manipulation moved to
6066         lnp_state_machine methods.
6067
6068 2017-04-04  Pedro Alves  <palves@redhat.com>
6069
6070         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6071         unittests/offset-type-selftests.c.
6072         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6073         * common/offset-type.h: New file.
6074         * common/preprocessor.h: New file.
6075         * common/traits.h: New file.
6076         * common/valid-expr.h: New file.
6077         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
6078         sect_offset and cu_offset strong typedefs throughout.
6079         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6080         typedefs throughout.
6081         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
6082         sect_offset and cu_offset strong typedefs throughout.
6083         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6084         typedefs throughout.
6085         * gdbtypes.h: Include "common/offset-type.h".
6086         (cu_offset): Now an offset type (strong typedef) instead of a
6087         struct.
6088         (sect_offset): Likewise.
6089         (union call_site_parameter_u): Rename "param_offset" field to
6090         "param_cu_off".
6091         * unittests/offset-type-selftests.c: New file.
6092
6093 2017-04-04  Pedro Alves  <palves@redhat.com>
6094
6095         * common/underlying.h: New file.
6096         * dwarf2read.c: Include "common/gdb_optional.h" and
6097         "common/underlying.h".
6098         (dir_index, file_name_index): New types.
6099         (file_entry): Use them.
6100         (file_entry::include): Use to_underlying.
6101         (line_header::add_file_name): Use dir_index.
6102         (read_formatted_entries): Use gdb::optional.  Read form before
6103         writting to file_entry.
6104         (dwarf_decode_line_header): Use dir_index.
6105         (lnp_state_machine::current_file): Use to_underlying.
6106         (lnp_state_machine::file): Change type to file_name_index.
6107         (dwarf_record_line): Use to_underlying.
6108         (init_lnp_state_machine): Use file_name_index.
6109         (dwarf_decode_lines_1): Use dir_index and file_name_index.
6110
6111 2017-04-04  Pedro Alves  <palves@redhat.com>
6112
6113         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6114         operator bool, has_value and get methods.
6115
6116 2017-04-04  Pedro Alves  <palves@redhat.com>
6117
6118         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6119         fields.
6120         (line_header): Initialize all data fields.  Change type of
6121         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6122         Change type of include_dirs to std::vector<const char *>.  Remove
6123         num_include_dirs, include_dirs_size.  Change type of file_names to
6124         std::vector<file_entry>.  Remove num_file_names, file_names_size.
6125         (line_header::line_header): New.
6126         (line_header::add_include_dir, line_header::add_file_name): New
6127         methods.
6128         (line_header::include_dir_at): Remove NULL check.
6129         (line_header::file_name_at): Add const overload.
6130         (line_header_up): New unique_ptr typedef.
6131         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
6132         std::vector.  Remove free_line_header call.
6133         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
6134         free_line_header call.
6135         (free_cu_line_header): Delete.
6136         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6137         (setup_type_unit_groups): Use line_header_up instead of cleanups.
6138         Adjust to use std::vector.
6139         (free_line_header): Delete.
6140         (free_line_header_voidp): Use delete.
6141         (add_include_dir): Replace with ...
6142         (line_header::add_include_dir): ... this method.  Use std::vector.
6143         (add_file_name): Replace with ...
6144         (line_header::add_file_name): ... this method.  Use std::vector.
6145         (add_include_dir_stub): Delete.
6146         (read_formatted_entries): Remove memset.
6147         (dwarf_decode_line_header): Return a line_header_up instead of a
6148         raw pointer.  Remove cleanup handling.  Pass lambdas to
6149         read_formatted_entries.  Adjust to use line_header methods.
6150         (dwarf_decode_lines_1): Adjust to use line_header methods.
6151         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6152         use std::vector.
6153
6154 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
6155
6156         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6157         instead of struct ptid.
6158
6159 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
6160
6161         * frame.c (get_frame_register_bytes): Unwind using value.
6162         (put_frame_register_bytes): Likewise.
6163
6164 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
6165
6166         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6167         aggregate-like.
6168
6169 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
6170
6171         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6172
6173 2017-03-29  Yao Qi  <yao.qi@linaro.org>
6174
6175         * gdbthread.h (struct thread_info): Declare constructor and
6176         destructor.  Add some in-class member initializers.
6177         * thread.c (free_thread): Remove.
6178         (init_thread_list): Call delete instead of free_thread.
6179         (new_thread): Call thread_info constructor.
6180         (thread_info::thread_info): New function.
6181         (thread_info::~thread_info): New function.
6182         (delete_thread_1): Call delete instead of free_thread.
6183         (make_cleanup_restore_current_thread): Move tp and frame to
6184         inner block.
6185
6186 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6187
6188         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6189         (arc_skip_prologue): Likewise.
6190         (arc_make_frame_cache): Likewise.
6191         (arc_pv_get_operand): New function.
6192         (arc_is_in_prologue): Likewise.
6193         (arc_analyze_prologue): Likewise.
6194         (arc_print_frame_cache): Likewise.
6195         (MAX_PROLOGUE_LENGTH): New constant.
6196
6197 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6198
6199         * configure.tgt: Add arc-insn.o.
6200         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6201         (dump_arc_instruction_command): New function.
6202         (arc_fprintf_disasm): Likewise.
6203         (arc_disassemble_info): Likewise.
6204         (arc_insn_get_operand_value): Likewise.
6205         (arc_insn_get_operand_value_signed): Likewise.
6206         (arc_insn_get_memory_base_reg): Likewise.
6207         (arc_insn_get_memory_offset): Likewise.
6208         (arc_insn_get_branch_target): Likewise.
6209         (arc_insn_dump): Likewise.
6210         (arc_insn_get_linear_next_pc): Likewise.
6211         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6212         (arc_disassemble_info): Likewise.
6213         (arc_insn_get_branch_target): Likewise.
6214         (arc_insn_get_linear_next_pc): Likewise.
6215         * NEWS: Mention new "maint print arc arc-instruction".
6216
6217 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6218
6219         * arc-tdep (maintenance_print_arc_list): New variable.
6220         (maintenance_print_arc_command): New function.
6221
6222 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6223
6224         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6225         Add "limm" and "reserved".
6226         (arc_cannot_fetch_register, arc_cannot_store_register): Add
6227         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6228         * arc-tdep.h (arc_regnum): Likewise.
6229
6230 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6231
6232         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6233         for THREADPTR register.
6234         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6235         register.
6236         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6237         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6238         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6239
6240 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6241
6242         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6243         registers above gdbarch_num_regs (gdbarch) as privileged in
6244         call0 ABI.
6245
6246 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6247
6248         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6249         for a single specified register or for all registers in
6250         a0_base..a0_base + C0_NREGS range.
6251         (supply_gregset_reg): Call regcache_raw_supply for a single
6252         specified register or for all registers in a0_base..a0_base +
6253         C0_NREGS range.
6254
6255 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6256
6257         * arch/xtensa.h (C0_NREGS): Add definition.
6258         * xtensa-tdep.c (C0_NREGS): Remove definition.
6259
6260 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6261
6262         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6263         Drop xtensa_default_isa initialization.
6264         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6265
6266 2017-03-27  Pedro Alves  <palves@redhat.com>
6267
6268         * dwarf2read.c (file_entry) <dir_index>: Add comment.
6269         (file_entry::include_dir): New method.
6270         (line_header::include_dir_at, line_header::file_name_at): New
6271         methods.
6272         (setup_type_unit_groups, setup_type_unit_groups)
6273         (psymtab_include_file_name): Simplify using the new methods.
6274         (lnp_state_machine) <the_line_header>: New field.
6275         <file>: Add comment.
6276         (lnp_state_machine::current_file): New method.
6277         (dwarf_record_line): Simplify using the new methods.
6278         (init_lnp_state_machine): Initialize the "the_line_header" field.
6279         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6280         Simplify using the new methods.
6281
6282 2017-03-27  Pedro Alves  <palves@redhat.com>
6283
6284         * cp-name-parser.y (make_empty): Delete.
6285         (demangler_special, nested_name, ptr_operator, array_indicator)
6286         (direct_declarator, declarator_1): Use fill_comp instead of
6287         make_empty.
6288
6289 2017-03-27  Pedro Alves  <palves@redhat.com>
6290
6291         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6292         to ATTRIBUTE_PRINTF.
6293         * solib-target.c (library_list_start_list): Print "string" not
6294         "version".
6295         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6296         gdb_xml_error call.
6297
6298 2017-03-27  Pedro Alves  <palves@redhat.com>
6299
6300         * dwarf2read.c (struct file_and_directory): New.
6301         (dwarf2_get_dwz_file): Adjust to use std::string.
6302         (dw2_get_file_names_reader): Adjust to use file_and_directory.
6303         (find_file_and_directory): Adjust to return a file_and_directory
6304         object.
6305         (read_file_scope): Adjust to use file_and_directory.  Remove
6306         make_cleanup/do_cleanups calls.
6307         (open_and_init_dwp_file): Adjust to use std::string.  Remove
6308         make_cleanup/do_cleanups calls.
6309         * python/python.c (do_start_initialization): Adjust to ldirname
6310         returning a std::string.
6311         * utils.c (ldirname): Now returns a std::string.
6312         * utils.h (ldirname): Change return type to std::string.
6313         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6314         returning a std::string.
6315         * xml-tdesc.c (file_read_description_xml): Likewise.
6316
6317 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
6318
6319         * regcache.c (regcache_debug_print_register): New function.
6320         * regcache.h (regcache_debug_print_register): New declaration.
6321         * target.c (debug_print_register): Remove.
6322         (target_fetch_registers): Call regcache_debug_print_register.
6323         (target_store_registers): Likewise.
6324
6325 2017-03-24  Pádraig Brady  <pbrady@fb.com>
6326
6327         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6328         reference beyond the 'lh->include_dirs' array before accessing to
6329         it.
6330         (psymtab_include_file_name): Likewise.
6331         (dwarf_decode_lines_1): Likewise.
6332         (dwarf_decode_lines): Likewise.
6333         (file_file_name): Likewise.
6334
6335 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
6336
6337         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6338         inferior_ptid.
6339         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6340         ps_lsetfpregs): Likewise.
6341         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6342         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6343         ps_lsetfpregs): Likewise.
6344         * target.c (target_fetch_registers, target_store_registers):
6345         Remove asserts.
6346
6347 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
6348
6349         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6350
6351 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6352
6353         * aarch64-tdep.c (aarch64_process_record_test): Declare.
6354         (_initialize_aarch64_tdep): Register it.
6355         (aarch64_record_load_store): Handle PRFM instruction.
6356         (aarch64_process_record_test): New function.
6357
6358 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6359
6360         * aarch64-tdep.c (aarch64_record_load_store): Fix code
6361         indentation.
6362
6363 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6364
6365         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6366
6367 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6368
6369         python/python.c (do_start_initialization): Fix memory leak.
6370
6371 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
6372
6373         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6374         using get_ptrace_pid.
6375         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6376         inferior_ptid.
6377         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6378         inferior_ptid instead of pid.
6379
6380 2017-03-22  Yao Qi  <yao.qi@linaro.org>
6381
6382         * aarch64-tdep.c: Wrap locally used classes in anonymous
6383         namespace.
6384         * arm-tdep.c: Likewise.
6385         * linespec.c: Likewise.
6386         * ui-out.c: Likewise.
6387
6388 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
6389
6390         PR gdb/19637
6391         * python/lib/gdb/printer/bound_registers.py: Import sys.
6392
6393 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6394
6395         * windows-nat.c (do_windows_fetch_inferior_registers): Add
6396         windows_thread_info parameter and use it instead of
6397         current_thread.
6398         (windows_fetch_inferior_registers): Don't set current_thread,
6399         pass the thread to do_windows_fetch_inferior_registers.  Use
6400         ptid from regcache instead of inferior_ptid.
6401         (do_windows_store_inferior_registers): Add windows_thread_info
6402         parameter and use it instead of current_thread.
6403         (windows_store_inferior_registers): Don't set current_thread,
6404         pass the thread to do_windows_store_inferior_registers.  Use
6405         ptid from regcache instead of inferior_ptid.
6406
6407 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6408
6409         * ser-mingw.c (ser_windows_raw): Remove reference to
6410         struct serial::current_timeout.
6411
6412 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
6413
6414         PR tdep/20928
6415         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6416         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6417         (sparc64_fsr_type): Fix %fsr decoding.
6418
6419 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
6420
6421         * python/py-record-btrace.c (btpy_insn_data): Change return type
6422         for Python 2.
6423
6424 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
6425
6426         * spu-linux-nat.c (spu_fetch_inferior_registers,
6427         spu_store_inferior_registers): Use ptid from regcache, set and
6428         restore inferior_ptid.
6429         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6430         Likewise.
6431
6432 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
6433
6434         * i386-linux-nat.c (fetch_register, store_register,
6435         i386_linux_fetch_inferior_registers,
6436         i386_linux_store_inferior_registers): Use ptid from regcache.
6437         * ia64-linux-nat.c (ia64_linux_fetch_register,
6438         ia64_linux_store_register): Likewise.
6439         * inf-ptrace.c (inf_ptrace_fetch_register,
6440         inf_ptrace_store_register): Likewise.
6441         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6442         m32r_linux_store_inferior_registers): Likewise.
6443         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6444         m68kbsd_store_inferior_registers): Likewise.
6445         * m68k-linux-nat.c (fetch_register, store_register,
6446         m68k_linux_fetch_inferior_registers,
6447         m68k_linux_store_inferior_registers): Likewise.
6448         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6449         m88kbsd_store_inferior_registers): Likewise.
6450         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6451         mips_fbsd_store_inferior_registers): Likewise.
6452         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6453         mips64_linux_regsets_store_registers): Likewise.
6454         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6455         mipsnbsd_store_inferior_registers): Likewise.
6456         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6457         mips64obsd_store_inferior_registers): Likewise.
6458         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
6459         Likewise.
6460         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
6461         ppcfbsd_store_inferior_registers): Likewise.
6462         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
6463         ppc_linux_store_inferior_registers): Likewise.
6464         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
6465         ppcnbsd_store_inferior_registers): Likewise.
6466         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
6467         ppcobsd_store_registers): Likewise.
6468         * procfs.c (procfs_fetch_registers, procfs_store_registers):
6469         Likewise.
6470         * ravenscar-thread.c (ravenscar_fetch_registers,
6471         ravenscar_store_registers, ravenscar_prepare_to_store):
6472         Likewise.
6473         * record-btrace.c (record_btrace_fetch_registers,
6474         record_btrace_store_registers, record_btrace_prepare_to_store):
6475         Likewise.
6476         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
6477         Lookup inferior using ptid from regcache, instead of
6478         current_inferior.
6479         * remote.c (remote_fetch_registers, remote_store_registers): Use
6480         ptid from regcache.
6481         * rs6000-nat.c (fetch_register, store_register): Likewise.
6482         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
6483         s390_linux_store_inferior_registers): Likewise.
6484         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
6485         shnbsd_store_inferior_registers): Likewise.
6486         * sol-thread.c (sol_thread_fetch_registers,
6487         sol_thread_store_registers): Likewise.
6488         * sparc-nat.c (sparc_fetch_inferior_registers,
6489         sparc_store_inferior_registers): Likewise.
6490         * tilegx-linux-nat.c (fetch_inferior_registers,
6491         store_inferior_registers): Likewise.
6492         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
6493         vaxbsd_store_inferior_registers): Likewise.
6494         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
6495         store_xtregs): Likewise.
6496
6497 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6498
6499         PR gdb/14441
6500         * NEWS: Mention support for rvalue references in GDB and python.
6501         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
6502         supports both lvalue and rvalue references.
6503
6504 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6505
6506         PR gdb/14441
6507         * gdbtypes.c (rank_one_type): Implement overloading
6508         resolution rules regarding rvalue references.
6509
6510 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6511
6512         PR gdb/14441
6513         * aarch64-tdep.c (aarch64_type_align)
6514         (aarch64_extract_return_value, aarch64_store_return_value): Change
6515         lvalue reference type checks to general reference type checks.
6516         * amd64-tdep.c (amd64_classify): Likewise.
6517         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
6518         Likewise.
6519         * arm-tdep.c (arm_type_align, arm_extract_return_value)
6520         (arm_store_return_value): Likewise.
6521         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
6522         * c-typeprint.c (c_print_type): Likewise.
6523         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
6524         (cplus_number_of_children, cplus_describe_child): Likewise.
6525         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
6526         * completer.c (expression_completer): Likewise.
6527         * cp-support.c (make_symbol_overload_list_adl_namespace):
6528         Likewise.
6529         * darwin-nat-info.c (info_mach_region_command): Likewise.
6530         * dwarf2loc.c (entry_data_value_coerce_ref)
6531         (value_of_dwarf_reg_entry): Likewise.
6532         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
6533         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
6534         Likewise.
6535         * findvar.c (extract_typed_address, store_typed_address):
6536         Likewise.
6537         * gdbtypes.c (rank_one_type): Likewise.
6538         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
6539         * infcall.c (value_arg_coerce): Likewise.
6540         * language.c (pointer_type): Likewise.
6541         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
6542         Likewise.
6543         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
6544         * mn10300-tdep.c (mn10300_type_align): Likewise.
6545         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
6546         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
6547         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
6548         Likewise.
6549         * printcmd.c (print_formatted, x_command): Likewise.
6550         * python/py-type.c (typy_get_composite, typy_template_argument):
6551         Likewise.
6552         * python/py-value.c (valpy_referenced_value)
6553         (valpy_get_dynamic_type, value_has_field): Likewise.
6554         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
6555         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
6556         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
6557         * spu-tdep.c (spu_scalar_value_p): Likewise.
6558         * symtab.c (lookup_symbol_aux): Likewise.
6559         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
6560         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
6561         Likewise.
6562         * valops.c (value_cast_pointers, value_cast)
6563         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
6564         (value_struct_elt, value_struct_elt_bitpos)
6565         (value_find_oload_method_list, find_overload_match)
6566         (value_rtti_indirect_type): Likewise.
6567         * valprint.c (val_print_scalar_type_p, generic_val_print):
6568         Likewise.
6569         * value.c (value_actual_type, value_as_address, unpack_long)
6570         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
6571         (coerce_ref): Likewise.
6572         * varobj.c (varobj_get_value_type): Likewise.
6573
6574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6575
6576         PR gdb/14441
6577         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
6578         table of constants.
6579         * python/lib/gdb/command/explore.py: Support exploring values
6580         of rvalue reference types.
6581         * python/lib/gdb/types.py: Implement get_basic_type() for
6582         rvalue reference types.
6583         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
6584         constant.
6585         * python/py-value.c (valpy_getitem): Add an rvalue reference
6586         check.
6587         (valpy_reference_value): Add new parameter "refcode".
6588         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
6589         New wrappers for valpy_reference_value().
6590         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6591         (gdbpy_invoke_xmethod): Likewise.
6592
6593 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6594
6595         PR gdb/14441
6596         * dwarf2read.c (process_die, read_type_die_1): Handle the
6597         DW_TAG_rvalue_reference_type DIE.
6598         (read_tag_reference_type): Add new parameter "refcode".
6599
6600 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6601
6602         PR gdb/14441
6603         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
6604         (c_type_print_modifier, c_type_print_varspec_suffix)
6605         (c_type_print_base): Support printing rvalue reference types.
6606         * c-valprint.c (c_val_print, c_value_print): Support printing
6607         rvalue reference values.
6608
6609 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6610
6611         PR gdb/14441
6612         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
6613         typename.
6614         * cp-support.c (replace_typedefs): Handle
6615         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
6616         * python/py-type.c (typy_lookup_type): Likewise.
6617
6618 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6619
6620         PR gdb/14441
6621         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
6622         * parse.c (insert_type): Change assert statement.
6623         (follow_types): Handle rvalue reference types.
6624         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
6625         constant.
6626
6627 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6628
6629         PR gdb/14441
6630         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
6631         value_ref() interface.
6632         * c-valprint.c (c_value_print): Likewise.
6633         * infcall.c (value_arg_coerce): Likewise.
6634         * python/py-value.c (valpy_reference_value): Likewise.
6635         * valops.c (value_cast, value_reinterpret_cast)
6636         (value_dynamic_cast, typecmp): Likewise.
6637         (value_ref): Parameterize by kind of return value reference type.
6638         * value.h (value_ref): Add new parameter "refcode".
6639
6640 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6641
6642         PR gdb/14441
6643         * dwarf2read.c (read_tag_reference_type): Use
6644         lookup_lvalue_reference_type() instead of lookup_reference_type().
6645         * eval.c (evaluate_subexp_standard): Likewise.
6646         * f-exp.y: Likewise.
6647         * gdbtypes.c (make_reference_type, lookup_reference_type):
6648         Generalize with rvalue reference types.
6649         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
6650         convenience wrappers for lookup_reference_type().
6651         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
6652         reference kind parameter.
6653         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
6654         wrappers for lookup_reference_type().
6655         * guile/scm-type.c (gdbscm_type_reference): Use
6656         lookup_lvalue_reference_type() instead of lookup_reference_type().
6657         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
6658         * parse.c (follow_types): Likewise.
6659         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
6660         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
6661         Likewise.
6662         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6663         (gdbpy_invoke_xmethod): Likewise.
6664         * stabsread.c: Provide extra argument to make_reference_type()
6665         call.
6666         * valops.c (value_ref, value_rtti_indirect_type): Use
6667         lookup_lvalue_reference_type() instead of lookup_reference_type().
6668
6669 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6670
6671         PR gdb/14441
6672         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
6673         (TYPE_IS_REFERENCE): New macro.
6674         (struct type): Add rvalue_reference_type field.
6675         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
6676
6677 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
6678
6679         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
6680         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
6681         New function definition.
6682         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
6683         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
6684         New function declaration.
6685         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
6686         * mi/mi-interp.h: New file.
6687         * solib.c (info_sharedlibrary_command): Replace for loop with
6688         ALL_SO_LIBS macro
6689         * solib.h (update_solib_list): New function declaration.
6690         (so_list_head): Move macro.
6691         * solist.h (ALL_SO_LIBS): New macro.
6692
6693 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
6694
6695         * infcmd.c (post_create_inferior): Remove unused argument in
6696         call to solib_add.
6697         * remote.c (remote_start_remote): Likewise.
6698         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
6699         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
6700         (enable_break): Likewise.
6701         * solib.c (update_solib_list): Remove unused target argument
6702         and its documentation.
6703         (solib_add): Remove unused target argument.  Remove unused
6704         argument in call to update_solib_list.
6705         (info_sharedlibrary_command): Remove unused argument in call
6706         to update_solib_list.
6707         (sharedlibrary_command): Remove unused argument in call to
6708         solib_add.
6709         (handle_solib_event): Likewise.
6710         (reload_shared_libraries): Likewise.
6711         * solib.h (solib_add): Remove unused target argument.
6712
6713 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6714
6715         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
6716         (s390_displaced_step_fixup): Cover relative branches with the
6717         default fixup handling.  This fixes lack of support for some
6718         relative branch instructions.
6719
6720 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6721
6722         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
6723         ptid from regcache.
6724
6725 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6726
6727         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
6728         i386_darwin_store_inferior_registers): Use ptid from regcache.
6729
6730 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6731
6732         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
6733         i386bsd_store_inferior_registers): Use ptid from regcache.
6734
6735 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6736
6737         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
6738         hppaobsd_store_registers): Use ptid from regcache.
6739
6740 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6741
6742         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
6743         hppanbsd_store_registers): Use ptid from regcache.
6744
6745 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6746
6747         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
6748         from regcache.  Use get_ptrace_pid.
6749
6750 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6751
6752         * corelow.c (get_core_register_section): Use ptid from regcache,
6753         update doc.
6754
6755 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6756
6757         * bsd-uthread.c (bsd_uthread_fetch_registers,
6758         bsd_uthread_store_registers): Use ptid from regcache, set and
6759         restore inferior_ptid.
6760
6761 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6762
6763         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
6764         fetch_fp_regs, store_register, store_regs, store_fp_register,
6765         store_fp_regs): Use ptid from regcache.
6766
6767 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6768
6769         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
6770         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
6771         store_vfp_regs): Use ptid from regcache.
6772
6773 2017-03-17  Pedro Alves  <palves@redhat.com>
6774
6775         PR remote/21188
6776         * ser-base.c (ser_base_wait_for): Add comment.
6777         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
6778         version.
6779         * ser-unix.c (hardwire_raw): Remove reference to
6780         scb->current_timeout.
6781         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
6782         (hardwire_ops): Install ser_base_readchar instead of
6783         hardwire_readchar.
6784         * serial.h (struct serial) <current_timeout, timeout_remaining>:
6785         Remove fields.
6786
6787 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
6788
6789         PR gdb/19637
6790         * python/lib/gdb/printer/bound_registers.py: Add support for
6791         Python 3.
6792
6793 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6794
6795         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
6796         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
6797         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
6798         byte_offset to subobj_byte_offset.  Fix the handling of
6799         DWARF_VALUE_STACK on big-endian targets when coming via an
6800         implicit pointer.
6801         (dwarf2_evaluate_loc_desc): Adjust call to
6802         dwarf2_evaluate_loc_desc_full.
6803         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
6804         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
6805
6806 2017-03-16  Yao Qi  <yao.qi@linaro.org>
6807
6808         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
6809         and REVSH instructions.
6810
6811 2017-03-16  Yao Qi  <yao.qi@linaro.org>
6812
6813         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
6814         (arm_record_test): Declare.
6815         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
6816         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
6817         align with the manual.
6818         (thumb_record_misc): Adjust the code order to align with the
6819         manual.
6820         (thumb2_record_decode_insn_handler): Fix instruction matching.
6821         (instruction_reader_thumb): New class.
6822         (arm_record_test): New function.
6823
6824 2017-03-16  Yao Qi  <yao.qi@linaro.org>
6825
6826         * arm-tdep.c (abstract_memory_reader): New class.
6827         (instruction_reader): New class.
6828         (extract_arm_insn): Add argument 'reader'.  Callers updated.
6829         (decode_insn): Likewise.
6830
6831 2017-03-16  Doug Evans  <dje@google.com>
6832
6833         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
6834         member.  Change type of TYPE member to SCM.  All uses updated.
6835         (lsscm_make_lazy_string_smob): Add assert.
6836         (lsscm_make_lazy_string): Flag bad length values.
6837         (lsscm_elt_type): New function.
6838         (gdbscm_lazy_string_to_value): Rewrite to use
6839         lsscm_safe_lazy_string_to_value.
6840         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
6841         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
6842         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
6843         in incoming type.
6844         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6845         * guile/scm-type.c (tyscm_scm_to_type): New function.
6846
6847 2017-03-15  Doug Evans  <dje@google.com>
6848
6849         PR python/17728, python/18439, python/18779
6850         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
6851         member.  Change type of TYPE member to PyObject *.  All uses updated.
6852         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
6853         (gdbpy_create_lazy_string_object): Flag bad length values.
6854         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
6855         Handle typedefs in incoming type.
6856         (stpy_lazy_string_elt_type): New function.
6857         (gdbpy_extract_lazy_string): Call it.
6858         * python/py-value.c (valpy_lazy_string): Flag bad length values.
6859         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
6860         typedefs in incoming type.
6861
6862 2017-03-16  Doug Evans  <dje@google.com>
6863
6864         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6865         * guile/scm-type.c (tyscm_scm_to_type): New function.
6866
6867 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
6868
6869         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
6870         "ULONGEST" for "skip".
6871
6872 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6873
6874         PR gdb/21220
6875         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
6876         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
6877         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
6878         over ptrace peek/poke until end of buffer or error.
6879
6880 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
6881
6882         * parse.c (length_of_subexp): Make static.
6883         * parser-defs.h (length_of_subexp): Remove.
6884
6885 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6886
6887         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
6888         as well.
6889
6890 2017-03-14  Pedro Alves  <palves@redhat.com>
6891
6892         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
6893         (main): Use std::unique_ptr.  Remove calls to
6894         cp_demangled_name_parse_free.
6895
6896 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6897
6898         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
6899         alphabsd_store_inferior_registers): Use regcache->ptid instead
6900         of inferior_ptid.
6901
6902 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6903
6904         * aix-thread.c (aix_thread_fetch_registers,
6905         aix_thread_store_registers): Use regcache->ptid instead of
6906         inferior_ptid.
6907
6908 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6909
6910         * aarch64-linux-nat.c (fetch_gregs_from_thread,
6911         store_gregs_to_thread, fetch_fpregs_from_thread,
6912         store_fpregs_to_thread): Use regcache->ptid instead of
6913         inferior_ptid.
6914
6915 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6916
6917         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
6918         amd64_linux_fetch_inferior_registers): Use regcache->ptid
6919         instead of inferior_ptid.
6920
6921 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6922
6923         * target.c (target_fetch_registers, target_store_registers): Add
6924         assert.
6925
6926 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
6927
6928         * regcache.h (regcache_get_ptid): New function.
6929         * regcache.c (regcache_get_ptid): New function.
6930
6931 2017-03-13  Mark Wielaard  <mark@klomp.org>
6932
6933         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
6934
6935 2017-03-10  Keith Seitz  <keiths@redhat.com>
6936
6937         PR c++/8218
6938         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
6939
6940 2017-03-08  Pedro Alves  <palves@redhat.com>
6941
6942         PR gdb/18360
6943         * infrun.c (start_step_over, do_target_resume, resume)
6944         (restart_threads): Assert we're not resuming a thread that is
6945         meant to be stopped.
6946         (infrun_thread_stop_requested_callback): Delete.
6947         (infrun_thread_stop_requested): If the thread is internally
6948         stopped, queue a pending stop event and clear the thread's
6949         inline-frame state.
6950         (handle_stop_requested): New function.
6951         (handle_syscall_event, handle_inferior_event_1): Use
6952         handle_stop_requested.
6953         (handle_stop_requested): New function.
6954         (handle_signal_stop): Set the thread's stop_signal here instead of
6955         at caller.
6956         (finish_step_over): Clear step over info unconditionally.
6957         (handle_signal_stop): If the user had interrupted the event
6958         thread, consider the stop a random signal.
6959         (handle_signal_stop) <signal arrived while stepping over
6960         breakpoint>: Don't restart threads here.
6961         (stop_waiting): Don't clear step-over info here.
6962
6963 2017-03-08  Pedro Alves  <palves@redhat.com>
6964
6965         PR 21206
6966         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
6967         goes to argument 2, not 1.
6968
6969 2017-03-08  Pedro Alves  <palves@redhat.com>
6970
6971         PR cli/21218
6972         * top.c (gdb_readline_wrapper): Avoid passing NULL to
6973         display_gdb_prompt.
6974         (command_line_input): Add comment.
6975
6976 2017-03-08  Pedro Alves  <palves@redhat.com>
6977
6978         PR tui/21216
6979         * tui/tui-file.c (tui_file::write): New.
6980         * tui/tui-file.h (tui_file): Override "write".
6981         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
6982         factored out from ...
6983         (tui_puts): ... here.
6984         (tui_putc): Use them.
6985         (tui_write): New function.
6986         * tui/tui-io.h (tui_write): Declare.
6987
6988 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6989
6990         * Makefile.in (SFILES): Replace "environ.c" with
6991         "common/environ.c".
6992         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
6993         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
6994         to...
6995         * common/environ.c: ... here.
6996         * environ.h: Moved to...
6997         * common/environ.h: ... here.
6998
6999 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7000
7001         * gdbarch.sh (pstring_ptr): New static function.
7002         (gdbarch_disassembler_options): Use it.
7003         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7004         not valid_disassembler_option->name.
7005         * gdbarch.c: Regenerate.
7006
7007 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7008
7009         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7010
7011 2017-03-07  Pedro Alves  <palves@redhat.com>
7012
7013         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7014
7015 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7016
7017         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7018         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7019         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7020         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7021
7022 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
7023
7024         * xtensa-linux-nat.c (fetch_gregs): Remove const.
7025
7026 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
7027
7028         * remote.c (remote_add_target_side_commands): Use range-based
7029         for loop.
7030
7031 2017-03-03  Yao Qi  <yao.qi@linaro.org>
7032
7033         PR gdb/21165
7034         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7035         value is lazy.
7036         * valprint.c (common_val_print): Likewise.
7037
7038 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
7039
7040         * NEWS: Mention new set/show disassembler-options commands.
7041         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7042         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7043         (prospective_options): New static variable.
7044         (gdb_disassembler::gdb_disassembler): Initialize
7045         m_di.disassembler_options.
7046         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7047         (get_disassembler_options): New function.
7048         (set_disassembler_options): Likewise.
7049         (set_disassembler_options_sfunc): Likewise.
7050         (show_disassembler_options_sfunc): Likewise.
7051         (disassembler_options_completer): Likewise.
7052         (_initialize_disasm): Likewise.
7053         * disasm.h (get_disassembler_options): New prototype.
7054         (set_disassembler_options): Likewise.
7055         * gdbarch.sh (gdbarch_disassembler_options): New variable.
7056         (gdbarch_verify_disassembler_options): Likewise.
7057         * gdbarch.c: Regenerate.
7058         * gdbarch.h: Likewise.
7059         * arm-tdep.c (num_disassembly_options): Delete.
7060         (set_disassembly_style): Likewise.
7061         (arm_disassembler_options): New static variable.
7062         (set_disassembly_style_sfunc): Convert short style name into long
7063         option name.  Call set_disassembler_options.
7064         (show_disassembly_style_sfunc): New function.
7065         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7066         set_gdbarch_verify_disassembler_options.
7067         (_initialize_arm_tdep): Delete regnames variable and update callers.
7068         (arm_disassembler_options): Initialize.
7069         (disasm_options): New variable.
7070         (num_disassembly_options): Rename from this...
7071         (num_disassembly_styles): ...to this.  Compute by scanning through
7072         disasm_options.
7073         (valid_disassembly_styles): Initialize using disasm_options.
7074         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7075         set_arm_regname_option.
7076         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7077         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7078         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7079         set_gdbarch_verify_disassembler_options.
7080         * s390-tdep.c (s390_disassembler_options): New static variable.
7081         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7082         set_gdbarch_verify_disassembler_options.
7083
7084 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7085
7086         * remote.c (remote_add_target_side_condition): Remove "struct"
7087         keyword from range-based for loop.
7088
7089 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7090
7091         * remote.c (remote_add_target_side_condition): Use range-based
7092         for loop.  Update comment.
7093
7094 2017-02-27  Yao Qi  <yao.qi@linaro.org>
7095
7096         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7097
7098 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
7099
7100         * regcache.c (regcache_raw_update): New function.
7101         (regcache_raw_read): Move code to regcache_raw_update.
7102         * regcache.h (regcache_raw_update): New declaration.
7103         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7104
7105 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
7106
7107         * dwarf2read.c (create_debug_type_hash_table): Initialize
7108         header.signature and header.type_offset_in_tu.
7109
7110 2017-02-24  Pedro Alves  <palves@redhat.com>
7111
7112         * symtab.c (make_file_symbol_completion_list_1): Use
7113         add_symtab_completions.
7114
7115 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7116
7117         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7118
7119 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7120
7121         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7122         I386_MAX_REGISTER_SIZE.
7123         (i386_pseudo_register_write): Likewise.
7124         (i386_process_record): Likewise.
7125         * i387-tdep.c (i387_supply_xsave): Likewise.
7126         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7127         (store_register): Likewise.
7128
7129 2017-02-23  Pedro Alves  <palves@redhat.com>
7130
7131         * ada-lang.c: Include "common/function-view.h".
7132         (ada_iterate_over_symbols): Adjust to use function_view as
7133         callback type.
7134         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7135         (ada_make_symbol_completion_list): Use a lambda.
7136         (ada_exc_search_name_matches): Delete.
7137         (name_matches_regex): New.
7138         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7139         * compile/compile-c-support.c: Include "common/function-view.h".
7140         (print_one_macro): Change prototype to accept a ui_file pointer.
7141         (write_macro_definitions): Use a lambda.
7142         * dwarf2read.c: Include "common/function-view.h".
7143         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7144         (dw2_expand_symtabs_matching): Adjust to use function_view as
7145         callback type.
7146         * language.h: Include "common/function-view.h".
7147         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7148         function_view as callback type.
7149         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7150         * linespec.c: Include "common/function-view.h".
7151         (collect_info::add_symbol): New method.
7152         (struct symbol_and_data_callback, iterate_inline_only, struct
7153         symbol_matcher_data, iterate_name_matcher): Delete.
7154         (iterate_over_all_matching_symtabs): Adjust to use function_view
7155         as callback type and lambdas.
7156         (iterate_over_file_blocks): Adjust to use function_view as
7157         callback type.
7158         (decode_compound_collector): Now a class with private fields.
7159         (decode_compound_collector::release_symbols): New method.
7160         (collect_one_symbol): Rename to...
7161         (decode_compound_collector::operator()): ... this and adjust.
7162         (lookup_prefix_sym): decode_compound_collector construction bits
7163         move to decode_compound_collector ctor.  Pass the
7164         decode_compound_collector object directly as callback.  Remove
7165         cleanups and use decode_compound_collector::release_symbols
7166         instead.
7167         (symtab_collector): Now a class with private fields.
7168         (symtab_collector::release_symtabs): New method.
7169         (add_symtabs_to_list): Rename to...
7170         (symtab_collector::operator()): ... this and adjust.
7171         (collect_symtabs_from_filename): symtab_collector construction
7172         bits move to symtab_collector ctor.  Pass the symtab_collector
7173         object directly as callback.  Remove cleanups and use
7174         symtab_collector::release_symtabs instead.
7175         (collect_symbols): Delete.
7176         (add_matching_symbols_to_info): Use lambdas.
7177         * macrocmd.c (print_macro_callback): Delete.
7178         (info_macro_command): Use a lambda.
7179         (info_macros_command): Pass print_macro_definition as callable
7180         directly.
7181         (print_one_macro): Remove 'ignore' parameter.
7182         (macro_list_command): Adjust.
7183         * macrotab.c (macro_for_each_data::fn): Now a function_view.
7184         (macro_for_each_data::user_data): Delete field.
7185         (foreach_macro): Adjust to call the function_view.
7186         (macro_for_each): Adjust to use function_view as callback type.
7187         (foreach_macro_in_scope): Adjust to call the function_view.
7188         (macro_for_each_in_scope): Adjust to use function_view as callback
7189         type.
7190         * macrotab.h: Include "common/function-view.h".
7191         (macro_callback_fn): Declare a prototype instead of a pointer.
7192         Remove "user_data" parameter.
7193         (macro_for_each, macro_for_each_in_scope): Adjust to use
7194         function_view as callback type.
7195         * psymtab.c (partial_map_expand_apply)
7196         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7197         Adjust to use function_view as callback type and to return bool.
7198         (psym_expand_symtabs_matching): Adjust to use function_view as
7199         callback types.
7200         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7201         to use function_view as callback type and to return bool.
7202         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7203         callback types.
7204         * symfile.c (expand_symtabs_matching): Adjust to use function_view
7205         as callback types.
7206         * symfile.h: Include "common/function-view.h".
7207         (expand_symtabs_file_matcher_ftype)
7208         (expand_symtabs_symbol_matcher_ftype)
7209         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7210         return bool.
7211         (quick_symbol_functions::map_symtabs_matching_filename)
7212         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7213         function_view as callback type and return bool.
7214         (expand_symtabs_matching): Adjust to use function_view as callback
7215         type.
7216         (maintenance_expand_name_matcher)
7217         (maintenance_expand_file_matcher): Delete.
7218         (maintenance_expand_symtabs): Use lambdas.
7219         * symtab.c (iterate_over_some_symtabs): Adjust to use
7220         function_view as callback types and return bool.
7221         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
7222         of a cleanup.
7223         (lookup_symtab_callback): Delete.
7224         (lookup_symtab): Use a lambda.
7225         (iterate_over_symbols): Adjust to use function_view as callback
7226         type.
7227         (struct search_symbols_data, search_symbols_file_matches)
7228         (search_symbols_name_matches): Delete.
7229         (search_symbols): Use a pair of lambdas.
7230         (struct add_name_data, add_macro_name, symbol_completion_matcher)
7231         (symtab_expansion_callback): Delete.
7232         (default_make_symbol_completion_list_break_on_1): Use lambdas.
7233         * symtab.h: Include "common/function-view.h".
7234         (iterate_over_some_symtabs): Adjust to use function_view as
7235         callback type and return bool.
7236         (iterate_over_symtabs): Adjust to use function_view as callback
7237         type.
7238         (symbol_found_callback_ftype): Remove 'data' parameter and return
7239         bool.
7240         (iterate_over_symbols): Adjust to use function_view as callback
7241         type.
7242
7243 2017-02-23  Pedro Alves  <palves@redhat.com>
7244
7245         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7246         (%.o) <unittests/%.c>: New pattern.
7247         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7248         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7249         * common/function-view.h: New file.
7250         * unittests/function-view-selftests.c: New file.
7251         * configure: Regenerate.
7252
7253 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
7254
7255         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7256         inferior_ptid.
7257         * go32-nat.c (go32_thread_alive): Likewise.
7258
7259 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7260
7261         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7262         delete.
7263
7264 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7265
7266         * varobj.c (varobj_clear_saved_item): Use delete instead of
7267         xfree.
7268         (update_dynamic_varobj_children): Likewise.
7269
7270 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7271
7272         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7273
7274 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
7275
7276         * common/enum-flags.h (enum_flags::enum_flags): Initialize
7277         m_enum_value to 0 in default constructor.
7278
7279 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
7280
7281         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7282         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7283         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7284         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7285         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7286         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7287         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7288         IS_STORE_CONDITIONAL_INSN.
7289
7290 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7291
7292         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7293
7294 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7295
7296         * NEWS (Changes since GDB 7.12): Add DWARF-5.
7297
7298 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7299
7300         * dwarf2read.c (skip_one_die, read_attribute_value)
7301         (dwarf2_const_value_attr, dump_die_shallow)
7302         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7303         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7304
7305 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7306
7307         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7308         (dwarf_parse_macro_header): Accept DWARF version 5.
7309         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7310
7311 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7312
7313         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7314         DW_AT_GNU_*.
7315         * common/common-exceptions.h (enum errors): Likewise.
7316         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7317         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7318         (dwarf_expr_context::execute_stack_op): Likewise.
7319         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7320         Likewise.
7321         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7322         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7323         (show_entry_values_debug, call_site_to_target_addr)
7324         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7325         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7326         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7327         (value_of_dwarf_block_entry, indirect_pieced_value)
7328         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7329         (disassemble_dwarf_expression): Likewise.
7330         * dwarf2read.c (process_die, inherit_abstract_dies)
7331         (read_call_site_scope): Likewise.
7332         * gdbtypes.h (struct func_type, struct call_site_parameter)
7333         (struct call_site): Likewise.
7334         * stack.c (read_frame_arg): Likewise.
7335         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7336
7337 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7338
7339         * defs.h (read_unsigned_leb128): New declaration.
7340         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7341         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7342         (dwarf2_find_location_expression): Call also
7343         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
7344         * dwarf2loc.h (dwarf2_version): New declaration.
7345         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7346         rnglists.
7347         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7348         .debug_rnglists.
7349         (struct dwop_section_names): Add loclists_dwo.
7350         (dwop_section_names): Add .debug_loclists.dwo.
7351         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7352         (struct dwarf2_per_cu_data): Add dwarf_version.
7353         (struct dwo_sections): Add loclists.
7354         (struct attr_abbrev): Add implicit_const.
7355         (read_indirect_line_string): New declaration.
7356         (read_unsigned_leb128): Delete declaration.
7357         (rcuh_kind): New definition.
7358         (read_and_check_comp_unit_head): Change parameter
7359         is_debug_types_section to section_kind.
7360         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7361         (read_comp_unit_head): Change parameter abfd to section, add parameter
7362         section_kind.  Handle DWARF-5.
7363         (error_check_comp_unit_head): Accept also DWARF version 5.
7364         (read_and_check_comp_unit_head): Change parameter
7365         is_debug_types_section to section_kind.
7366         (read_and_check_type_unit_head): Delete function.
7367         (read_abbrev_offset): Handle DWARF-5.
7368         (create_debug_type_hash_table): Add parameter section_kind.  Process
7369         only DW_UT_type.  Use signature and type_offset_in_tu from struct
7370         comp_unit_head.
7371         (create_debug_types_hash_table): Update create_debug_type_hash_table
7372         caller.
7373         (create_all_type_units): Call create_debug_type_hash_table.
7374         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7375         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7376         caller.
7377         (skip_one_die): Handle DW_FORM_implicit_const.
7378         (dwarf2_rnglists_process): New function.
7379         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7380         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7381         (read_attribute_value): Handle DW_FORM_implicit_const,
7382         DW_FORM_line_strp.
7383         (read_attribute): Handle DW_FORM_implicit_const.
7384         (read_indirect_string_at_offset_from): New function from
7385         read_indirect_string_at_offset.
7386         (read_indirect_string_at_offset): Call
7387         read_indirect_string_at_offset_from.
7388         (read_indirect_line_string_at_offset): New function.
7389         (read_indirect_string): New function comment.
7390         (read_indirect_line_string): New function.
7391         (read_unsigned_leb128): Make it global.
7392         (dwarf2_string_attr): Handle DWARF-5.
7393         (add_include_dir_stub, read_formatted_entries): New functions.
7394         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7395         Handle DWARF-5.
7396         (per_cu_header_read_in): Update read_comp_unit_head caller.
7397         (dwarf2_version): New function.
7398         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7399         rnglists.
7400         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7401         fields.
7402
7403 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7404
7405         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7406
7407 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7408
7409         * dwarf2read.c (dwarf2_ranges_process): New function from
7410         dwarf2_ranges_read.
7411         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7412         dwarf2_ranges_process.
7413
7414 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7415
7416         * dwarf2read.c (create_debug_type_hash_table): New function from
7417         create_debug_types_hash_table.
7418         (create_debug_types_hash_table): Call create_debug_type_hash_table.
7419         (create_all_type_units, open_and_init_dwo_file): Update
7420         create_debug_types_hash_table callers.
7421
7422 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7423
7424         PR gdb/16188
7425         * fork-child.c (trace_start_error): Fix thinko.  va_end should
7426         refer to 'ap', not 'args'.
7427
7428 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7429             Pedro Alves  <palves@redhat.com>
7430
7431         PR gdb/16188
7432         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7433         calls succeeded.
7434         * fork-child.c (trace_start_error): New function.
7435         (trace_start_error_with_name): Likewise.
7436         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7437         * inf-ptrace.c (inf_ptrace_me): Likewise.
7438         * inferior.h (trace_start_error): New prototype.
7439         (trace_start_error_with_name): Likewise.
7440
7441 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7442
7443         PR gdb/21164
7444         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7445         NULL before using it.
7446         * symmisc.c (maintenance_print_symbols): Likewise.
7447         (maintenance_print_msymbols): Likewise.
7448
7449 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7450
7451         * NEWS: Add record Python bindings entry.
7452
7453 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7454
7455         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7456         py-record-full.o.
7457         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
7458         * python/py-record-btrace.c, python/py-record-btrace.h,
7459         python/py-record-full.c, python/py-record-full.h: New file.
7460         * python/py-record.c: Add include for py-record-btrace.h and
7461         py-record-full.h.
7462         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
7463         recpy_instruction_history, recpy_function_call_history, recpy_begin,
7464         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
7465         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
7466         New definition.
7467         (gdbpy_initialize_btrace): New export.
7468         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
7469
7470 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7471
7472         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
7473         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
7474         * python/py-record.c: New file.
7475         * python/python-internal.h (gdbpy_start_recording,
7476         gdbpy_current_recording, gdpy_stop_recording,
7477         gdbpy_initialize_record): New export.
7478         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
7479         (python_GdbMethods): Add gdbpy_start_recording,
7480         gdbpy_current_recording and gdbpy_stop_recording.
7481
7482 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7483
7484         * record-btrace.c (record_btrace_record_method): New function.
7485         (init_record_btrace_ops): Initialize to_record_method.
7486         * record-full.c (record_full_record_method): New function.
7487         (init_record_full_ops, init_record_full_core_ops): Add
7488         record_full_record_method.
7489         * record.h (enum record_method): New enum.
7490         * target-debug.h (target_debug_print_enum_record_method: New define.
7491         * target-delegates.c: Regenerate.
7492         * target.c (target_record_method): New function.
7493         * target.h: Include record.h.
7494         (struct target_ops) <to_record_method>: New field.
7495         (target_record_method): New export.
7496
7497 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7498
7499         * record.h (record_start, record_stop): New export.
7500         * record.c (record_start, record_stop): New function.
7501
7502 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7503
7504         * btrace.c (btrace_fetch): Copy function call segments pointer
7505         into a vector.
7506         (btrace_clear): Clear the vector.
7507         (btrace_find_insn_by_number): Use binary search to find the correct
7508         function call segment.
7509         * btrace.h (brace_fun_p): New typedef.
7510         (struct btrace_thread_info) <functions>: New field.
7511
7512 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7513
7514         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
7515         * btrace.c (btrace_decode_error): ... here.  New function.
7516         * btrace.h (btrace_decode_error): New export.
7517
7518 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7519
7520         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
7521         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
7522         btrace_find_insn_by_number): Remove special case for gaps.
7523         * btrace.h (btrace_insn_get_error): New export.
7524         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
7525         * record-btrace.c (btrace_insn_history): Print number for gaps.
7526         (record_btrace_info, record_btrace_goto): Handle gaps.
7527
7528 2017-02-14  Tom Tromey  <tom@tromey.com>
7529
7530         PR python/13598:
7531         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
7532         event.
7533         * python/py-evts.c (gdbpy_initialize_py_events): Add
7534         before_prompt registry.
7535         * python/py-events.h (events_object) <before_prompt>: New field.
7536
7537 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
7538
7539         * btrace.c (ftrace_new_switch): Preserve up link and flags.
7540
7541 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
7542
7543         * symfile (_initialize_symfile): Add usage text to the load command's
7544         help text.
7545
7546 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
7547
7548         * utils.c (defaulted_query): Don't query on secondary UIs.
7549
7550 2017-02-10  Tom Tromey  <tom@tromey.com>
7551
7552         * rust-lang.c (rust_get_disr_info): Remove unused variable.
7553
7554 2017-02-10  Tom Tromey  <tom@tromey.com>
7555
7556         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
7557         "cleanup" local.
7558         * python/py-type.c (typy_legacy_template_argument): Remove
7559         unnecessary "cleanup" local.
7560
7561 2017-02-10  Tom Tromey  <tom@tromey.com>
7562
7563         * python/python.c (do_start_initialization): New function, from
7564         _initialize_python.
7565         (_initialize_python): Call do_start_initialization.
7566         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
7567         goto.
7568
7569 2017-02-10  Tom Tromey  <tom@tromey.com>
7570
7571         * python/py-prettyprint.c (pretty_print_one_value): Use
7572         gdbpy_ref.
7573
7574 2017-02-10  Tom Tromey  <tom@tromey.com>
7575
7576         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
7577         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
7578         gdbpy_ref.
7579         * python/py-type.c (field_new): Use gdbpy_ref.
7580         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
7581         gdbpy_ref.
7582         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
7583         (py_free_pspace): Likewise.
7584         (pspace_to_pspace_object): Likewise.
7585         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
7586         (py_free_objfile): Likewise.
7587         (objfile_to_objfile_object): Likewise.
7588         * python/py-inferior.c (delete_thread_object): Use
7589         gdbpy_ref.
7590         (infpy_read_memory): Likewise.
7591         (py_free_inferior): Likewise.
7592         * python/py-evtregistry.c (create_eventregistry_object): Use
7593         gdbpy_ref.
7594         * python/py-event.c (create_event_object): Use gdbpy_ref.
7595
7596 2017-02-10  Tom Tromey  <tom@tromey.com>
7597
7598         * python/py-ref.h (gdbpy_ref_policy): Now a template.
7599         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
7600         used.
7601         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
7602         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
7603         python/py-exitedevent.c, python/py-finishbreakpoint.c,
7604         python/py-framefilter.c, python/py-function.c,
7605         python/py-inferior.c, python/py-infevents.c,
7606         python/py-linetable.c, python/py-newobjfileevent.c,
7607         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
7608         python/py-signalevent.c, python/py-stopevent.c,
7609         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
7610         python/py-unwind.c, python/py-utils.c, python/py-value.c,
7611         python/py-varobj.c, python/py-xmethods.c, python/python.c,
7612         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
7613
7614 2017-02-10  Tom Tromey  <tom@tromey.com>
7615
7616         * ui-out.h (ui_out_emit_type): New class.
7617         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
7618         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
7619         and ui_out_emit_tuple.
7620         (enumerate_locals): Likewise.
7621         (py_mi_print_variables, py_print_locals, py_print_args): Use
7622         ui_out_emit_list.
7623         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
7624         ui_out_emit_list.
7625         * common/gdb_optional.h: New file.
7626
7627 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
7628
7629         * MAINTAINERS (Write After Approval): Update my e-mail address.
7630
7631 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
7632
7633         PR gdb/21122
7634         * breakpoint.c (_initialize_breakpoint): Update the help description
7635         of the 'commands' command to indicate that it takes a list argument.
7636
7637 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
7638
7639         * interps.c (current_interp_set_logging): Remove "return".
7640
7641 2017-02-09  Gary Benson  <gbenson@redhat.com>
7642
7643         * symtab.c (add_symtab_completions): Prevent NULL pointer
7644         dereference.
7645
7646 2017-02-08  Pedro Alves  <palves@redhat.com>
7647
7648         * interps.c (interp::interp): Remove reference to quiet_p.
7649         (interp_set): Make static.  Remove dead "Switching to" output
7650         code.
7651         (interp_quiet_p, interp_set_quiet): Delete.
7652         (interpreter_exec_cmd): Don't set the interpreter quiet.
7653         * interps.h (interp_quiet_p): Make static.
7654         (class interp) <quiet_p>: Remove field
7655
7656 2017-02-08  Jerome Guitton  <guitton@adacore.com>
7657
7658         * cli/cli-decode.c (find_command_name_length): Make it extern.
7659         * cli/cli-decode.h (find_command_name_length): Declare.
7660         * cli/cli-script.c (command_name_equals, line_first_arg):
7661         New functions.
7662         (process_next_line): Use cli-decode to parse command names.
7663         (build_command_line): Make args a constant pointer.
7664
7665 2017-02-08  Jerome Guitton  <guitton@adacore.com>
7666
7667         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
7668         Remove case-insensitive search.
7669
7670 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
7671
7672         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
7673         at the end of the line.  Avoids an ARI warning.
7674
7675 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
7676
7677         * NEWS: Mention support for record/replay of Intel 64 rdrand and
7678         rdseed instructions.
7679         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
7680
7681 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
7682
7683         PR tdep/20936
7684         Provide and use sparc32 and sparc64 target description XML files.
7685         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
7686         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
7687         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
7688         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
7689         * features/sparc/sparc32-solaris.xml: New file.
7690         * features/sparc/sparc64-solaris.xml: New file.
7691         * features/sparc/sparc32-solaris.c: Generated.
7692         * features/sparc/sparc64-solaris.c: Generated.
7693         * sparc-tdep.h: Account for differences in target descriptions.
7694         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
7695         (sparc32_register_type): Use target provided registers.
7696         (validate_tdesc_registers): New function.
7697         (sparc32_gdbarch_init): Use tdesc_has_registers.
7698         Set pseudoregister functions.
7699         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
7700         (sparc64_register_type): Use target provided registers.
7701         (sparc64_init_abi): Set pseudoregister functions.
7702
7703 2017-02-03  Tom Tromey  <tom@tromey.com>
7704
7705         PR rust/21097:
7706         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
7707         with a single member.
7708
7709 2017-02-03  Pedro Alves  <palves@redhat.com>
7710
7711         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
7712         (cli_interp_base::~cli_interp_base): New.
7713         (cli_interp): New struct.
7714         (as_cli_interp): Cast the interp itself to cli_interp.
7715         (cli_interpreter_pre_command_loop): Rename to ...
7716         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
7717         parameter.
7718         (cli_interpreter_init): Rename to ...
7719         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
7720         boolean.  Make extern.
7721         (cli_interpreter_resume): Rename to ...
7722         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
7723         extern.
7724         (cli_interpreter_suspend): Rename to ...
7725         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
7726         extern.
7727         (cli_interpreter_exec): Rename to ...
7728         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
7729         extern.
7730         (cli_interpreter_supports_command_editing): Rename to ...
7731         (cli_interp_base::supports_command_editing): ... this.  Remove
7732         'interp' parameter.  Make extern.
7733         (cli_ui_out): Rename to ...
7734         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
7735         Make extern.
7736         (cli_set_logging): Rename to ...
7737         (cli_interp_base::set_logging): ... this.  Remove 'interp'
7738         parameter.  Make extern.
7739         (cli_interp_procs): Delete.
7740         (cli_interp_factory): Adjust to use "new".
7741         * cli/cli-interp.h: Include "interps.h".
7742         (struct cli_interp_base): New struct.
7743         * interps.c (struct interp): Delete.  Fields moved to interps.h.
7744         (interp_new): Delete.
7745         (interp::interp, interp::~interp): New.
7746         (interp_set): Use bool, and return void.  Assume the interpreter
7747         has suspend, init and resume methods, and that the all return
7748         void.
7749         (set_top_level_interpreter): interp_set returns void.
7750         (interp_ui_out): Adapt.
7751         (current_interp_set_logging): Adapt.
7752         (interp_data): Delete.
7753         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
7754         (interp_exec): Adapt.
7755         (top_level_interpreter_data): Delete.
7756         * interps.h (interp_init_ftype, interp_resume_ftype)
7757         (interp_suspend_ftype, interp_exec_ftype)
7758         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
7759         (class interp): New.
7760         (interp_new): Delete.
7761         (interp_set): Now returns void.  Use bool.
7762         (interp_data, top_level_interpreter_data): Delete.
7763         * mi/mi-common.h: Include interps.h.
7764         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
7765         init, resume, suspect, exec, interp_ui_out, set_logging and
7766         pre_command_loop methods.
7767         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
7768         (mi_interpreter_init): Rename to ...
7769         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
7770         bool, return void and make extern.  Adjust.
7771         (mi_interpreter_resume): ... Rename to ...
7772         (mi_interp::resume): ... this.  Remove the 'data' parameter,
7773         return void and make extern.  Adjust.
7774         (mi_interpreter_suspend): ... Rename to ...
7775         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
7776         return void and make extern.  Adjust.
7777         (mi_interpreter_exec): ... Rename to ...
7778         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
7779         extern.  Adjust.
7780         (mi_interpreter_pre_command_loop): ... Rename to ...
7781         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
7782         parameter and make extern.
7783         (mi_on_normal_stop_1): Adjust.
7784         (mi_ui_out): Rename to ...
7785         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
7786         parameter and make extern.  Adjust.
7787         (mi_set_logging): Rename to ...
7788         (mi_interp::set_logging): ... this.  Remove the 'interp'
7789         parameter and make extern.  Adjust.
7790         (mi_interp_procs): Delete.
7791         (mi_interp_factory): Adjust to use 'new'.
7792         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
7793         (mi_print_exception, mi_execute_command, mi_load_progress):
7794         Adjust.
7795         * tui/tui-interp.c (tui_interp): New class.
7796         (as_tui_interp): Return a tui_interp pointer.
7797         (tui_on_normal_stop, tui_on_signal_received)
7798         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
7799         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
7800         to use interp::interp_ui_out.
7801         (tui_init): Rename to ...
7802         (tui_interp::init): ... this.  Remove the 'self' parameter, use
7803         bool, return void and make extern.  Adjust.
7804         (tui_resume): Rename to ...
7805         (tui_interp::resume): ... this.  Remove the 'data' parameter,
7806         return void and make extern.  Adjust.
7807         (tui_suspend): Rename to ...
7808         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
7809         return void and make extern.  Adjust.
7810         (tui_ui_out): Rename to ...
7811         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
7812         parameter, and make extern.  Adjust.
7813         (tui_exec): Rename to ...
7814         (tui_interp::exec): ... this.  Remove the 'data' parameter and
7815         make extern.
7816         (tui_interp_procs): Delete.
7817         (tui_interp_factory): Use "new".
7818
7819 2017-02-02  Tom Tromey  <tom@tromey.com>
7820
7821         * rust-exp.y (ends_raw_string, space_then_number)
7822         (rust_identifier_start_p): Return bool.
7823         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
7824         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
7825         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
7826         (rust_chartype_p): Return bool.
7827         (val_print_struct, rust_print_struct_def, rust_print_type):
7828         Update.
7829         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
7830         Return bool.
7831
7832 2017-02-02  Tom Tromey  <tom@tromey.com>
7833
7834         * rust-lang.c: Reindent.
7835
7836 2017-02-02  Tom Tromey  <tom@tromey.com>
7837
7838         * rust-lang.h (rust_crate_for_block): Update.
7839         * rust-lang.c (rust_crate_for_block): Return std::string.
7840         (rust_get_disr_info): Use std:;string, not
7841         gdb::unique_xmalloc_ptr.
7842         * rust-exp.y (crate_name): Update.
7843
7844 2017-02-02  Pedro Alves  <palves@redhat.com>
7845
7846         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
7847         field out of gdb_disassembler_test and make it static.
7848
7849 2017-02-02  Pedro Alves  <palves@redhat.com>
7850
7851         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
7852         mi1_interp and mi_interp fields.
7853
7854 2017-02-02  Pedro Alves  <palves@redhat.com>
7855
7856         * cli/cli-interp.c (struct saved_output_files, saved_output):
7857         Moved from cli/cli-logging.c.
7858         (cli_set_logging): New function.
7859         (cli_interp_procs): Install cli_set_logging.
7860         * cli/cli-interp.h (make_logging_output, cli_set_logging):
7861         Declare.
7862         * cli/cli-logging.c (struct saved_output_files, saved_output):
7863         Moved to cli/cli-interp.c.
7864         (pop_output_files): Don't save outputs here.
7865         (make_logging_output): New function.
7866         (handle_redirections): Don't build tee nor save previous outputs
7867         here.
7868         * interps.c (current_interp_set_logging): Change prototype.
7869         Assume there's always a set_logging_proc method installed.
7870         * interps.h (interp_set_logging_ftype): Change prototype.
7871         (current_interp_set_logging): Change prototype and adjust comment.
7872         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
7873         use make_logging_output.
7874         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
7875 2017-02-02  Pedro Alves  <palves@redhat.com>
7876
7877         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
7878         from ...
7879         (set_logging_overwrite): ... here.
7880         (logging_no_redirect_file): Delete.
7881         (set_logging_redirect): Don't handle redirection on the fly.
7882         Instead warn that "logging off" / "logging on" is necessary.
7883         (pop_output_files): Delete references to logging_no_redirect_file.
7884         (show_logging_command): Always speak in terms of what will happen
7885         once logging is reenabled.
7886
7887 2017-02-02  Pedro Alves  <palves@redhat.com>
7888
7889         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
7890
7891 2017-02-02  Pedro Alves  <palves@redhat.com>
7892
7893         * disasm.c (gdb_pretty_print_insn): Rename to ...
7894         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
7895         Remove gdbarch parameter.  Adapt to clear the object's buffers
7896         instead of allocating new buffers, and to print using the object's
7897         gdb_disassembler instead of calling gdb_print_insn.
7898         (dump_insns): Use gdb_pretty_print_disassembler.
7899         * disasm.h (gdb_pretty_print_insn): Delete declaration.
7900         (gdb_pretty_print_disassembler): New class.
7901         * record-btrace.c (btrace_insn_history): Use
7902         gdb_pretty_print_disassembler.
7903
7904 2017-02-02  Pedro Alves  <palves@redhat.com>
7905
7906         * ada-lang.c (type_as_string): Use string_file.
7907         * ada-valprint.c (ada_print_floating): Use string_file.
7908         * ada-varobj.c (ada_varobj_scalar_image)
7909         (ada_varobj_get_value_image): Use string_file.
7910         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
7911         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
7912         * breakpoint.c (update_inserted_breakpoint_locations)
7913         (insert_breakpoint_locations, reattach_breakpoints)
7914         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
7915         (print_it_watchpoint): Use string_file.
7916         (save_breakpoints): Use stdio_file.
7917         * c-exp.y (oper): Use string_file.
7918         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
7919         tee_file.
7920         (pop_output_files): Use delete.
7921         (handle_redirections): Use stdio_file and tee_file.
7922         * cli/cli-setshow.c (do_show_command): Use string_file.
7923         * compile/compile-c-support.c (c_compute_program): Use
7924         string_file.
7925         * compile/compile-c-symbols.c (generate_vla_size): Take a
7926         'string_file &' instead of a 'ui_file *'.
7927         (generate_c_for_for_one_variable): Take a 'string_file &' instead
7928         of a 'ui_file *'.  Use string_file.
7929         (generate_c_for_variable_locations): Take a 'string_file &'
7930         instead of a 'ui_file *'.
7931         * compile/compile-internal.h (generate_c_for_for_one_variable):
7932         Take a 'string_file &' instead of a 'ui_file *'.
7933         * compile/compile-loc2c.c (push, pushf, unary, binary)
7934         (print_label, pushf_register_address, pushf_register)
7935         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
7936         'ui_file *'.  Adjust.
7937         * compile/compile.c (compile_to_object): Use string_file.
7938         * compile/compile.h (compile_dwarf_expr_to_c)
7939         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
7940         'ui_file *'.
7941         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
7942         (replace_typedefs_qualified_name): Use string_file and
7943         obstack_copy0.
7944         * disasm.c (gdb_pretty_print_insn): Use string_file.
7945         (gdb_disassembly): Adjust reference the null_stream global.
7946         (do_ui_file_delete): Delete.
7947         (gdb_insn_length): Use null_stream.
7948         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
7949         * dwarf2loc.c (dwarf2_compile_property_to_c)
7950         (locexpr_generate_c_location, loclist_generate_c_location): Take a
7951         'string_file &' instead of a 'ui_file *'.
7952         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
7953         * dwarf2read.c (do_ui_file_peek_last): Delete.
7954         (dwarf2_compute_name): Use string_file.
7955         * event-top.c (gdb_setup_readline): Use stdio_file.
7956         * gdbarch.sh (verify_gdbarch): Use string_file.
7957         * gdbtypes.c (safe_parse_type): Use null_stream.
7958         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
7959         string_file.
7960         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
7961         'string_file *' instead of a 'ui_file *'.
7962         (gdbscm_arch_disassemble): Use string_file.
7963         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
7964         * guile/scm-ports.c (class ioscm_file_port): Now a class that
7965         inherits from ui_file.
7966         (ioscm_file_port_delete, ioscm_file_port_rewind)
7967         (ioscm_file_port_put): Delete.
7968         (ioscm_file_port_write): Rename to ...
7969         (ioscm_file_port::write): ... this.  Remove file_port_magic
7970         checks.
7971         (ioscm_file_port_new): Delete.
7972         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
7973         ui_file_up.
7974         * guile/scm-type.c (tyscm_type_name): Use string_file.
7975         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
7976         Use string_file.
7977         * infcmd.c (print_return_value_1): Use string_file.
7978         * infrun.c (print_target_wait_results): Use string_file.
7979         * language.c (add_language): Use string_file.
7980         * location.c (explicit_to_string_internal): Use string_file.
7981         * main.c (captured_main_1): Use null_file.
7982         * maint.c (maintenance_print_architecture): Use stdio_file.
7983         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
7984         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
7985         event_channel>: Change type to mi_console_file pointer.
7986         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
7987         (mi_console_file_delete): Delete.
7988         (struct mi_console_file): Delete.
7989         (mi_console_file_magic): Delete.
7990         (mi_console_file_new): Delete.
7991         (mi_console_file::mi_console_file): New.
7992         (mi_console_file_delete): Delete.
7993         (mi_console_file_fputs): Delete.
7994         (mi_console_file::write): New.
7995         (mi_console_raw_packet): Delete.
7996         (mi_console_file::flush): New.
7997         (mi_console_file_flush): Delete.
7998         (mi_console_set_raw): Rename to ...
7999         (mi_console_file::set_raw): ... this.
8000         * mi/mi-console.h (class mi_console_file): New class.
8001         (mi_console_file_new, mi_console_set_raw): Delete.
8002         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8003         (mi_set_logging): Use delete and tee_file.  Adjust.
8004         * mi/mi-main.c (output_register): Use string_file.
8005         (mi_cmd_data_evaluate_expression): Use string_file.
8006         (mi_cmd_data_read_memory): Use string_file.
8007         (mi_cmd_execute, print_variable_or_computed): Use string_file.
8008         * mi/mi-out.c (mi_ui_out::main_stream): New.
8009         (mi_ui_out::rewind): Use main_stream and
8010         string_file.
8011         (mi_ui_out::put): Use main_stream and string_file.
8012         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8013         Allocate a 'string_file' instead.
8014         (mi_out_new): Don't allocate a mem_fileopen stream here.
8015         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8016         (mi_ui_out::main_stream): Declare method.
8017         * printcmd.c (eval_command): Use string_file.
8018         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8019         * python/py-arch.c (archpy_disassemble): Use string_file.
8020         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8021         * python/py-frame.c (frapy_str): Use string_file.
8022         * python/py-framefilter.c (py_print_type, py_print_single_arg):
8023         Use string_file.
8024         * python/py-type.c (typy_str): Use string_file.
8025         * python/py-unwind.c (unwind_infopy_str): Use string_file.
8026         * python/py-value.c (valpy_str): Use string_file.
8027         * record-btrace.c (btrace_insn_history): Use string_file.
8028         * regcache.c (regcache_print): Use stdio_file.
8029         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8030         * remote.c (escape_buffer): Use string_file.
8031         * rust-lang.c (rust_get_disr_info): Use string_file.
8032         * serial.c (serial_open_ops_1): Use stdio_file.
8033         (do_serial_close): Use delete.
8034         * stack.c (print_frame_arg): Use string_file.
8035         (print_frame_args): Remove local mem_fileopen stream, not used.
8036         (print_frame): Use string_file.
8037         * symmisc.c (maintenance_print_symbols): Use stdio_file.
8038         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8039         Take a 'string_file *' instead of a 'ui_file *'.
8040         * top.c (new_ui): Use stdio_file and stderr_file.
8041         (free_ui): Use delete.
8042         (execute_command_to_string): Use string_file.
8043         (quit_confirm): Use string_file.
8044         * tracepoint.c (collection_list::append_exp): Use string_file.
8045         * tui/tui-disasm.c (tui_disassemble): Use string_file.
8046         * tui/tui-file.c: Don't include "ui-file.h".
8047         (enum streamtype, struct tui_stream): Delete.
8048         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8049         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8050         (tui_file::tui_file): New method.
8051         (tui_file_fputs): Delete.
8052         (tui_file_get_strbuf): Delete.
8053         (tui_file::puts): New method.
8054         (tui_file_adjust_strbuf): Delete.
8055         (tui_file_flush): Delete.
8056         (tui_file::flush): New method.
8057         * tui/tui-file.h: Tweak intro comment.
8058         Include ui-file.h.
8059         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8060         (tui_file_adjust_strbuf): Delete declarations.
8061         (class tui_file): New class.
8062         * tui/tui-io.c (tui_initialize_io): Use tui_file.
8063         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8064         (tui_register_format): Use string_stream.
8065         * tui/tui-stack.c (tui_make_status_line): Use string_file.
8066         (tui_get_function_from_frame): Use string_file.
8067         * typeprint.c (type_to_string): Use string_file.
8068         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8069         (null_stream): New global.
8070         (ui_file_delete): Delete.
8071         (ui_file::ui_file): New.
8072         (null_file_isatty): Delete.
8073         (ui_file::~ui_file): New.
8074         (null_file_rewind): Delete.
8075         (ui_file::printf): New.
8076         (null_file_put): Delete.
8077         (null_file_flush): Delete.
8078         (ui_file::putstr): New.
8079         (null_file_write): Delete.
8080         (ui_file::putstrn): New.
8081         (null_file_read): Delete.
8082         (ui_file::putc): New.
8083         (null_file_fputs): Delete.
8084         (null_file_write_async_safe): Delete.
8085         (ui_file::vprintf): New.
8086         (null_file_delete): Delete.
8087         (null_file::write): New.
8088         (null_file_fseek): Delete.
8089         (null_file::puts): New.
8090         (ui_file_data): Delete.
8091         (null_file::write_async_safe): New.
8092         (gdb_flush, ui_file_isatty): Adjust.
8093         (ui_file_put, ui_file_rewind): Delete.
8094         (ui_file_write): Adjust.
8095         (ui_file_write_for_put): Delete.
8096         (ui_file_write_async_safe, ui_file_read): Adjust.
8097         (ui_file_fseek): Delete.
8098         (fputs_unfiltered): Adjust.
8099         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8100         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8101         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8102         (set_ui_file_data): Delete.
8103         (string_file::~string_file, string_file::write)
8104         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8105         (do_ui_file_as_string, ui_file_as_string): Delete.
8106         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8107         (struct mem_file): Delete.
8108         (mem_file_new): Delete.
8109         (stdio_file::stdio_file): New.
8110         (mem_file_delete): Delete.
8111         (stdio_file::stdio_file): New.
8112         (mem_fileopen): Delete.
8113         (stdio_file::~stdio_file): New.
8114         (mem_file_rewind): Delete.
8115         (stdio_file::set_stream): New.
8116         (mem_file_put): Delete.
8117         (stdio_file::open): New.
8118         (mem_file_write): Delete.
8119         (stdio_file_magic, struct stdio_file): Delete.
8120         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8121         (stdio_file::flush): New.
8122         (stdio_file_read): Rename to ...
8123         (stdio_file::read): ... this.  Adjust.
8124         (stdio_file_write): Rename to ...
8125         (stdio_file::write): ... this.  Adjust.
8126         (stdio_file_write_async_safe): Rename to ...
8127         (stdio_file::write_async_safe) ... this.  Adjust.
8128         (stdio_file_fputs): Rename to ...
8129         (stdio_file::puts) ... this.  Adjust.
8130         (stdio_file_isatty): Delete.
8131         (stdio_file_fseek): Delete.
8132         (stdio_file::isatty): New.
8133         (stderr_file_write): Rename to ...
8134         (stderr_file::write) ... this.  Adjust.
8135         (stderr_file_fputs): Rename to ...
8136         (stderr_file::puts) ... this.  Adjust.
8137         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8138         (stderr_file::stderr_file): New.
8139         (tee_file_magic): Delete.
8140         (struct tee_file): Delete.
8141         (tee_file::tee_file): New.
8142         (tee_file_new): Delete.
8143         (tee_file::~tee_file): New.
8144         (tee_file_delete): Delete.
8145         (tee_file_flush): Rename to ...
8146         (tee_file::flush): ... this.  Adjust.
8147         (tee_file_write): Rename to ...
8148         (tee_file::write): ... this.  Adjust.
8149         (tee_file::write_async_safe): New.
8150         (tee_file_fputs): Rename to ...
8151         (tee_file::puts): ... this.  Adjust.
8152         (tee_file_isatty): Rename to ...
8153         (tee_file::isatty): ... this.  Adjust.
8154         * ui-file.h (struct obstack, struct ui_file): Don't
8155         forward-declare.
8156         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8157         (ui_file_write_ftype)
8158         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8159         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8160         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8161         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8162         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8163         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8164         (set_ui_file_fseek): Delete.
8165         (ui_file_data, ui_file_delete, ui_file_rewind)
8166         (struct ui_file): New.
8167         (ui_file_up): New.
8168         (class null_file): New.
8169         (null_stream): Declare.
8170         (ui_file_write_for_put, ui_file_put): Delete.
8171         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8172         Delete.
8173         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8174         (gdb_fopen, tee_file_new): Delete.
8175         (struct string_file): New.
8176         (struct stdio_file): New.
8177         (stdio_file_up): New.
8178         (struct stderr_file): New.
8179         (class tee_file): New.
8180         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8181         of a 'ui_file *'.  Adjust.
8182         * ui-out.h (class ui_out) <field_stream>: Likewise.
8183         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8184         (null_stream): Delete.
8185         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8186         Adjust.
8187         * utils.h (struct ui_file): Delete forward declaration..
8188         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8189         (error_stream): Take a 'string_file &' instead of a
8190         'ui_file *'.
8191         * varobj.c (varobj_value_get_print_value): Use string_file.
8192         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8193         * gdbarch.c: Regenerate.
8194
8195 2017-02-02  Pedro Alves  <palves@redhat.com>
8196
8197         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8198         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
8199         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
8200         Adjust to call gdb_print_insn instead of
8201         gdb_disassembler::print_insn.
8202         (dump_insns, do_mixed_source_and_assembly_deprecated)
8203         (do_mixed_source_and_assembly, do_assembly_only): Add back a
8204         'gdbarch' parameter.  Remove gdb_disassembler parameter.
8205         (gdb_disassembly): Don't allocate a gdb_disassembler here.
8206         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8207         declaration.
8208         (gdb_pretty_print_insn): Re-add declaration.
8209         * record-btrace.c (btrace_insn_history): Don't allocate a
8210         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
8211
8212 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
8213
8214         * disasm.h (gdb_disassembly): Remove file_string parameter.
8215         * disasm.c (gdb_disassembly): Likewise.
8216         * cli/cli-cmds.c (print_disassembly): Adapt.
8217         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8218         * stack.c (do_gdb_disassembly): Likewise.
8219
8220 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8221
8222         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8223         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8224         targets.  And if the implicit value is longer than needed, extract
8225         the first bytes instead of the "least significant" ones.
8226
8227 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8228
8229         * btrace.c (btrace_enable): Do not call btrace_add_pc for
8230         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8231         (btrace_fetch): Assert can_access_registers_ptid.
8232         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8233         validate_registers_access.
8234
8235 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8236
8237         * gdbthread.h (can_access_registers_ptid): New.
8238         * thread.c (can_access_registers_ptid): New.
8239
8240 2017-02-01  Pedro Alves  <palves@redhat.com>
8241
8242         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8243
8244 2017-01-31  Pedro Alves  <palves@redhat.com>
8245
8246         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8247         Fix typos.
8248
8249 2017-01-31  Pedro Alves  <palves@redhat.com>
8250
8251         * stack.c (print_frame_args): Remove local mem_fileopen stream,
8252         not used.
8253
8254 2017-01-31  Pedro Alves  <palves@redhat.com>
8255
8256         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8257
8258 2017-01-31  Pedro Alves  <palves@redhat.com>
8259
8260         * common/scoped_restore.h
8261         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8262         change the value's parameter type to T2.
8263         (make_scoped_restore): Likewise.
8264
8265 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8266             Richard Henderson  <rth@redhat.com>
8267
8268         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8269         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8270         GS_BASE for older kernels.
8271         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8272         GS_BASE for older kernels.
8273         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8274         and GS_BASE to the offset table.
8275         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8276         system register group.
8277         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8278         for older kernels.
8279         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8280         amd64 ABI.
8281         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8282         AMD64_GSBASE_REGNUM.
8283         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8284         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8285         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8286         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8287         i386/64bit-segments.xml in those rules.
8288         * features/i386/64bit-segments.xml: New file.
8289         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8290         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8291         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8292         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8293         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8294         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8295         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8296         * features/i386/amd64-avx-linux.c: Regenerated.
8297         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8298         * features/i386/amd64-avx-mpx.c: Regenerated.
8299         * features/i386/amd64-avx512-linux.c: Regenerated.
8300         * features/i386/amd64-linux.c: Regenerated.
8301         * features/i386/amd64-mpx-linux.c: Regenerated.
8302         * features/i386/i386-avx-mpx-linux.c: Regenerated.
8303         * features/i386/i386-avx-mpx.c: Regenerated.
8304         * features/i386/x32-avx-linux.c: Regenerated.
8305         * features/i386/x32-avx512-linux.c: Regenerated.
8306         * regformats/i386/amd64-avx-linux.dat: Regenerated.
8307         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8308         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8309         * regformats/i386/amd64-linux.dat: Regenerated.
8310         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8311         * regformats/i386/x32-avx-linux.dat: Regenerated.
8312         * regformats/i386/x32-avx512-linux.dat: Regenerated.
8313         * regformats/i386/x32-linux.dat: Regenerated.
8314
8315 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8316
8317         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8318         Set to AMD64_NUM_REGS.
8319
8320 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8321
8322         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8323         that checks validity of a register number.
8324
8325 2017-01-27  Kees Cook  <keescook@google.com>
8326
8327         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8328         fetch_fpregs if target has fpa registers.
8329         (arm_linux_store_inferior_registers): Call store_fpregs if target
8330         has fpa registers.
8331
8332 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8333
8334         * cris-tdep.c (cris_gdbarch_init): Remove check for
8335         info.byte_order and force it to BFD_ENDIAN_LITTLE.
8336
8337 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
8338
8339         * corelow.c (get_core_register_section): Check for regset
8340         existence before checking for REGSET_VARIABLE_SIZE.
8341
8342 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8343             Pedro Alves  <palves@redhat.com>
8344
8345         PR gdb/20939
8346         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8347         call memory_error, save memaddr instead.
8348         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8349         negative, cal memory_error.
8350         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8351
8352 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8353
8354         * disasm-selftests.c (memory_error_test): New function.
8355         (_initialize_disasm_selftests): Register memory_error_test.
8356
8357 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8358
8359         * Makefile.in (SFILES): Add disasm-selftests.c and
8360         selftest-arch.c.
8361         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8362         * disasm-selftests.c: New file.
8363         * selftest-arch.c: New file.
8364         * selftest-arch.h: New file.
8365
8366 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8367
8368         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8369         to bfd_arch_mep.  Don't return 0 if section is not
8370         found.  Call print_insn_mep.
8371
8372 2017-01-26  Pedro Alves  <palves@redhat.com>
8373             Yao Qi  <yao.qi@linaro.org>
8374
8375         * arm-tdep.c: Include "disasm.h".
8376         (gdb_print_insn_arm): Update code to get gdbarch.
8377         * disasm.c (dis_asm_read_memory): Change it to
8378         gdb_disassembler::dis_asm_read_memory.
8379         (dis_asm_memory_error): Likewise.
8380         (dis_asm_print_address): Likewise.
8381         (gdb_pretty_print_insn): Change it to
8382         gdb_disassembler::pretty_print_insn.
8383         (dump_insns): Add one argument gdb_disassemlber.  All
8384         callers updated.
8385         (do_mixed_source_and_assembly_deprecated): Likewise.
8386         (do_mixed_source_and_assembly): Likewise.
8387         (do_assembly_only): Likewise.
8388         (gdb_disassembler::gdb_disassembler): New.
8389         (gdb_disassembler::print_insn): New.
8390         * disasm.h (class gdb_disassembler): New.
8391         (gdb_pretty_print_insn): Remove declaration.
8392         (gdb_disassemble_info): Likewise.
8393         * guile/scm-disasm.c (class gdbscm_disassembler): New.
8394         (gdbscm_disasm_read_memory_worker): Update.
8395         (gdbscm_disasm_read_memory): Update.
8396         (gdbscm_disasm_memory_error): Remove.
8397         (gdbscm_disasm_print_address): Remove.
8398         (gdbscm_disassembler::gdbscm_disassembler): New.
8399         (gdbscm_print_insn_from_port): Update.
8400         * mips-tdep.c: Include disasm.h.
8401         (gdb_print_insn_mips): Update code to get gdbarch.
8402         * record-btrace.c (btrace_insn_history): Update.
8403         * spu-tdep.c: Include disasm.h.
8404         (struct spu_dis_asm_data): Remove.
8405         (struct spu_dis_asm_info): New.
8406         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8407         SPU id.
8408         (gdb_print_insn_spu): Cast disassemble_info to
8409         spu_dis_asm_info.
8410
8411 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8412
8413         * disasm.c (do_ui_file_delete): Delete.
8414         (gdb_insn_length): Move code creating stream to ...
8415         * utils.c (null_stream): ... here.  New function.
8416         * utils.h (null_stream): Declare.
8417
8418 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
8419
8420         * python/py-inferior.c (find_thread_object): Return directly
8421         from the loop.  Remove "found" variable.
8422
8423 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
8424
8425         GDB 7.12.1 released.
8426
8427 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
8428
8429         * python/py-function.c (fnpy_call): Reorder declarations to have
8430         the gdbpy_enter object declared first.
8431         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8432
8433 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
8434
8435         PR python/21068
8436         * python/python-internal.h (PyMem_RawMalloc): Define for
8437         Python < 3.4.
8438         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8439         PyMem_RawMalloc instead of PyMem_Malloc.
8440
8441 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
8442             Luis Machado  <lgustavo@codesourcery.com>
8443
8444         * NEWS (New commands): Mention flash-erase.
8445         (New MI commands): Mention target-flash-erase.
8446         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8447         command.
8448         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8449         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8450         * target.c (flash_erase_command): New function.
8451         (initialize_targets): Add new flash-erase command.
8452         * target.h (flash_erase_command): New declaration.
8453
8454 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
8455
8456         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8457         HAVE_SYS_PROCFS_H is defined.
8458
8459 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
8460
8461         * remote.c (struct cached_reg): Change data into a pointer.
8462         * (stop_reply_dtr): Free data pointers before deleting vector.
8463         (process_stop_reply): Likewise.
8464         (remote_parse_stop_reply): Allocate space for data
8465
8466 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
8467
8468         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
8469         MAX_REGISTER_SIZE.
8470         (amd64_pseudo_register_read_value): Likewise.
8471         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
8472         (store_register_using_P): Likewise.
8473         * regcache.c (regcache_xfer_part): Likewise.
8474
8475 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
8476
8477         Split real and pseudo registers.
8478         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
8479         (sparc32_pseudo_regnum): New enum.
8480         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
8481         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
8482         (SPARC32_CP0_REGISTERS): New macro.
8483         (sparc32_pseudo_register_name): New function.
8484         (sparc32_register_name): Use sparc32_pseudo_register_name.
8485         (sparc32_pseudo_register_type): New function.
8486         (sparc32_register_type): Use sparc32_pseudo_register_type.
8487         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
8488         pseudo register numbers.
8489         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
8490         (SPARC64_CP0_REGISTERS): New macro.
8491         (sparc64_pseudo_register_name): New function.
8492         (sparc64_register_name): Use sparc64_pseudo_register_name.
8493         (sparc64_pseudo_register_type): New function.
8494         (sparc64_register_type): Use sparc64_pseudo_register_type.
8495         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
8496         pseudo register numbers.
8497         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
8498         sparc64_store_arguments): Handle pseudo register numbers.
8499
8500 2017-01-13  Yao Qi  <yao.qi@linaro.org>
8501
8502         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
8503         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
8504         output.
8505         (getpkt_or_notif_sane_1): Likewise.
8506
8507 2017-01-13  Yao Qi  <yao.qi@linaro.org>
8508
8509         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
8510         of CC.  Pass "-x c++-header" instead of "-x c".
8511
8512 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8513
8514         * remote.c (remote_can_async_p): Update comment.
8515
8516 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8517
8518         * linux-nat.c (linux_nat_can_async_p): Update comment.
8519
8520 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8521
8522         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
8523
8524 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
8525
8526         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
8527
8528 2017-01-10  Tom Tromey  <tom@tromey.com>
8529
8530         * python/py-type.c (typy_legacy_template_argument): Update.
8531         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
8532         ~demangle_parse_info): Declare new members.
8533         (cp_demangled_name_to_comp): Return unique_ptr.
8534         (cp_demangled_name_parse_free)
8535         (make_cleanup_cp_demangled_name_parse_free)
8536         (cp_new_demangle_parse_info): Remove.
8537         * cp-support.c (do_demangled_name_parse_free_cleanup)
8538         (make_cleanup_cp_demangled_name_parse_free): Remove.
8539         (inspect_type, cp_canonicalize_string_full)
8540         (cp_canonicalize_string): Update.
8541         (mangled_name_to_comp): Change return type.
8542         (cp_class_name_from_physname, method_name_from_physname)
8543         (cp_func_name, cp_remove_params): Update.
8544         * cp-name-parser.y (demangle_parse_info): New constructor, from
8545         cp_new_demangle_parse_info.
8546         (~demangle_parse_info): New destructor, from
8547         cp_demangled_name_parse_free.
8548         (cp_merge_demangle_parse_infos): Update.
8549         (cp_demangled_name_to_comp): Change return type.
8550
8551 2017-01-10  Tom Tromey  <tom@tromey.com>
8552
8553         * top.c (prevent_dont_repeat): Change return type.
8554         * python/python.c (execute_gdb_command): Use std::string.
8555         Update.
8556         * guile/guile.c (gdbscm_execute_gdb_command): Update.
8557         * command.h (prevent_dont_repeat): Change return type.
8558         * breakpoint.c (bpstat_do_actions_1): Update.
8559
8560 2017-01-10  Tom Tromey  <tom@tromey.com>
8561
8562         * value.h (scoped_value_mark::~scoped_value_mark): Call
8563         free_to_mark.
8564         (scoped_value_mark::free_to_mark): New method.
8565         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
8566         scoped_value_mark.
8567
8568 2017-01-10  Tom Tromey  <tom@tromey.com>
8569
8570         * python/py-value.c (valpy_dereference, valpy_referenced_value)
8571         (valpy_reference_value, valpy_const_value, valpy_get_address)
8572         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
8573         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
8574         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
8575         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
8576         scoped_value_mark.
8577         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
8578         * value.h (scoped_value_mark): New class.
8579
8580 2017-01-10  Tom Tromey  <tom@tromey.com>
8581
8582         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
8583         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
8584         * psymtab.c (discard_psymtabs_upto): Remove.
8585         (make_cleanup_discard_psymtabs): Remove.
8586         (struct psymtab_state): Remove.
8587
8588 2017-01-10  Tom Tromey  <tom@tromey.com>
8589
8590         * record-full.c (record_full_save_cleanups): Remove.
8591         (record_full_save): Use gdb::unlinker.
8592         * gcore.c (do_bfd_delete_cleanup): Remove.
8593         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
8594         cleanups.
8595         * dwarf2read.c (unlink_if_set): Remove.
8596         (write_psymtabs_to_index): Use gdb::unlinker.
8597         * common/gdb_unlinker.h: New file.
8598
8599 2017-01-10  Tom Tromey  <tom@tromey.com>
8600
8601         * windows-tdep.c (windows_xfer_shared_library): Update.
8602         * windows-nat.c (windows_make_so): Update.
8603         * utils.h (make_cleanup_bfd_unref): Remove.
8604         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
8605         * symfile.h (symfile_bfd_open)
8606         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
8607         * symfile.c (read_symbols, symbol_file_add)
8608         (separate_debug_file_exists): Update.
8609         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
8610         (generic_load, reread_symbols): Update.
8611         * symfile-mem.c (symbol_file_add_from_memory): Update.
8612         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
8613         (spu_symbol_file_add_from_memory): Update.
8614         * solist.h (struct target_so_ops) <bfd_open>: Return
8615         gdb_bfd_ref_ptr.
8616         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
8617         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
8618         gdb_bfd_ref_ptr.
8619         (solib_map_sections, reload_shared_libraries_1): Update.
8620         * solib-svr4.c (enable_break): Update.
8621         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
8622         * solib-frv.c (enable_break2): Update.
8623         * solib-dsbt.c (enable_break): Update.
8624         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
8625         gdb_bfd_ref_ptr.
8626         (darwin_solib_get_all_image_info_addr_at_init): Update.
8627         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
8628         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
8629         * record-full.c (record_full_save): Update.
8630         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
8631         * procfs.c (insert_dbx_link_bpt_in_file): Update.
8632         * minidebug.c (find_separate_debug_file_in_section): Return
8633         gdb_bfd_ref_ptr.
8634         * machoread.c (macho_add_oso_symfile): Change abfd to
8635         gdb_bfd_ref_ptr.
8636         (macho_symfile_read_all_oso): Update.
8637         (macho_check_dsym): Return gdb_bfd_ref_ptr.
8638         (macho_symfile_read): Update.
8639         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
8640         (jit_bfd_try_read_symtab): Update.
8641         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8642         (gdb_bfd_openw, gdb_bfd_openr_iovec)
8643         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8644         gdb_bfd_ref_ptr.
8645         (gdb_bfd_ref_policy): New struct.
8646         (gdb_bfd_ref_ptr): New typedef.
8647         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8648         (gdb_bfd_openw, gdb_bfd_openr_iovec)
8649         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8650         gdb_bfd_ref_ptr.
8651         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8652         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8653         (gcore_command): Update.
8654         * exec.c (exec_file_attach): Update.
8655         * elfread.c (elf_symfile_read): Update.
8656         * dwarf2read.c (dwarf2_get_dwz_file): Update.
8657         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
8658         (open_and_init_dwo_file): Update.
8659         (open_dwp_file): Return gdb_bfd_ref_ptr.
8660         (open_and_init_dwp_file): Update.
8661         * corelow.c (core_open): Update.
8662         * compile/compile-object-load.c (compile_object_load): Update.
8663         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
8664         * coffread.c (coff_symfile_read): Update.
8665         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
8666         gdb_bfd_ref_ptr.  Rename.
8667         (dump_bfd_file, restore_command): Update.
8668         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8669         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8670         (find_separate_debug_file_by_buildid): Update.
8671
8672 2017-01-10  Tom Tromey  <tom@tromey.com>
8673
8674         * common/gdb_ref_ptr.h: New file.
8675         * python/py-ref.h (struct gdbpy_ref_policy): New.
8676         (gdbpy_ref): Now a typedef.
8677
8678 2017-01-10  Tom Tromey  <tom@tromey.com>
8679
8680         * utils.h (make_cleanup_htab_delete): Don't declare.
8681         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
8682         Remove.
8683         * linespec.c (decode_compound_collector): Add constructor,
8684         destructor.
8685         (lookup_prefix_sym): Remove cleanup.
8686         (symtab_collector): Add constructor, destructor.
8687         (collect_symtabs_from_filename): Remove cleanup.
8688         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
8689         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
8690         Use htab_up.
8691         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
8692         * dwarf2read.c (dw2_expand_symtabs_matching)
8693         (dw2_map_symbol_filenames, dwarf_decode_macros)
8694         (write_psymtabs_to_index): Use htab_up.
8695         * dwarf2loc.c (func_verify_no_selftailcall)
8696         (call_site_find_chain_1, func_verify_no_selftailcall)
8697         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
8698         std::vector, gdb::unique_xmalloc_ptr.
8699         (call_sitep): Remove typedef.
8700         (dwarf2_locexpr_baton_eval): Remove unused variable.
8701
8702 2017-01-10  Tom Tromey  <tom@tromey.com>
8703
8704         * python/python-internal.h (make_cleanup_py_decref)
8705         (make_cleanup_py_xdecref): Don't declare.
8706         * python/py-utils.c (py_decref, make_cleanup_py_decref)
8707         (py_xdecref, make_cleanup_py_xdecref): Remove.
8708
8709 2017-01-10  Tom Tromey  <tom@tromey.com>
8710
8711         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
8712         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
8713
8714 2017-01-10  Tom Tromey  <tom@tromey.com>
8715
8716         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
8717
8718 2017-01-10  Tom Tromey  <tom@tromey.com>
8719
8720         * python/py-utils.c (unicode_to_encoded_string)
8721         (python_string_to_target_string)
8722         (python_string_to_target_python_string)
8723         (python_string_to_host_string, gdbpy_obj_to_string)
8724         (get_addr_from_python): Use gdbpy_ref.
8725
8726 2017-01-10  Tom Tromey  <tom@tromey.com>
8727
8728         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
8729         gdbpy_ref.
8730
8731 2017-01-10  Tom Tromey  <tom@tromey.com>
8732
8733         * python/python.c (eval_python_command, gdbpy_decode_line)
8734         (gdbpy_run_events, gdbpy_start_type_printers)
8735         (gdbpy_apply_type_printers): Use gdbpy_ref.
8736
8737 2017-01-10  Tom Tromey  <tom@tromey.com>
8738
8739         * python/py-param.c (get_doc_string, compute_enum_values): Use
8740         gdbpy_ref.
8741
8742 2017-01-10  Tom Tromey  <tom@tromey.com>
8743
8744         * python/py-inferior.c (find_thread_object, build_inferior_list):
8745         Use gdbpy_ref.
8746
8747 2017-01-10  Tom Tromey  <tom@tromey.com>
8748
8749         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8750
8751 2017-01-10  Tom Tromey  <tom@tromey.com>
8752
8753         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
8754         gdbpy_ref.
8755
8756 2017-01-10  Tom Tromey  <tom@tromey.com>
8757
8758         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
8759         extra incref.
8760         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
8761         Use gdbpy_ref.
8762
8763 2017-01-10  Tom Tromey  <tom@tromey.com>
8764
8765         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8766         gdbpy_ref.
8767
8768 2017-01-10  Tom Tromey  <tom@tromey.com>
8769
8770         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
8771         decref results of PyArg_ParseTupleAndKeywords.
8772
8773 2017-01-10  Tom Tromey  <tom@tromey.com>
8774
8775         * python/python.c (python_run_simple_file): Use
8776         unique_xmalloc_ptr, gdbpy_ref.
8777
8778 2017-01-10  Tom Tromey  <tom@tromey.com>
8779
8780         * python/py-prettyprint.c (print_stack_unless_memory_error)
8781         (print_string_repr, print_children): Use gdbpy_ref.
8782         (dummy_python_frame): New class.
8783         (dummy_python_frame::dummy_python_frame): Rename from
8784         push_dummy_python_frame.
8785         (py_restore_tstate): Remove.
8786
8787 2017-01-10  Tom Tromey  <tom@tromey.com>
8788
8789         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8790
8791 2017-01-10  Tom Tromey  <tom@tromey.com>
8792
8793         * python/python.c (ensure_python_env, restore_python_env):
8794         Remove.
8795         * python/python-internal.h (ensure_python_env): Don't declare.
8796         * varobj.h (varobj_ensure_python_env): Don't declare.
8797         * varobj.c (varobj_ensure_python_env): Remove.
8798
8799 2017-01-10  Tom Tromey  <tom@tromey.com>
8800
8801         * varobj.c (varobj_value_get_print_value): Use
8802         gdbpy_enter_varobj.
8803
8804 2017-01-10  Tom Tromey  <tom@tromey.com>
8805
8806         * python/py-prettyprint.c (print_string_repr, print_children):
8807         Update.
8808         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
8809         of "encoding".
8810         * varobj.c (varobj_value_get_print_value): Update.
8811         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
8812
8813 2017-01-10  Tom Tromey  <tom@tromey.com>
8814
8815         * varobj.c (varobj_get_display_hint)
8816         (dynamic_varobj_has_child_method, install_new_value_visualizer)
8817         (varobj_set_visualizer, free_variable): Use
8818         gdbpy_enter_varobj.
8819
8820 2017-01-10  Tom Tromey  <tom@tromey.com>
8821
8822         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
8823         (do_finish_initialization): New function.  Use gdbpy_ref.
8824         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
8825         do_finish_initialization.
8826
8827 2017-01-10  Tom Tromey  <tom@tromey.com>
8828
8829         * python/py-param.c (get_set_value, get_show_value): Use
8830         gdbpy_enter, gdbpy_ref.
8831
8832 2017-01-10  Tom Tromey  <tom@tromey.com>
8833
8834         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
8835
8836 2017-01-10  Tom Tromey  <tom@tromey.com>
8837
8838         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
8839
8840 2017-01-10  Tom Tromey  <tom@tromey.com>
8841
8842         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
8843         Use gdbpy_enter_varobj.
8844
8845 2017-01-10  Tom Tromey  <tom@tromey.com>
8846
8847         * varobj.c (gdbpy_enter_varobj): New constructor.
8848         * python/python-internal.h (gdbpy_enter_varobj): New class.
8849         * python/py-varobj.c (py_varobj_get_iterator): Use
8850         gdbpy_enter_varobj.
8851
8852 2017-01-10  Tom Tromey  <tom@tromey.com>
8853
8854         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
8855         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8856         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
8857         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
8858         unique_xmalloc_ptr.
8859         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
8860
8861 2017-01-10  Tom Tromey  <tom@tromey.com>
8862
8863         * python/py-xmethods.c (invoke_match_method): Use
8864         gdbpy_ref.
8865
8866 2017-01-10  Tom Tromey  <tom@tromey.com>
8867
8868         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
8869         gdbpy_enter, gdbpy_ref.
8870
8871 2017-01-10  Tom Tromey  <tom@tromey.com>
8872
8873         * python/python.c (python_interactive_command): Use gdbpy_enter.
8874
8875 2017-01-10  Tom Tromey  <tom@tromey.com>
8876
8877         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
8878         gdbpy_ref.
8879
8880 2017-01-10  Tom Tromey  <tom@tromey.com>
8881
8882         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
8883         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8884
8885 2017-01-10  Tom Tromey  <tom@tromey.com>
8886
8887         * utils.h (htab_deleter): New struct.
8888         (htab_up): New typedef.
8889         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
8890         gdbpy_enter, gdbpy_ref, htab_up.
8891
8892 2017-01-10  Tom Tromey  <tom@tromey.com>
8893
8894         * python/py-unwind.c (pending_frame_invalidate): Remove.
8895         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
8896
8897 2017-01-10  Tom Tromey  <tom@tromey.com>
8898
8899         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
8900         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
8901
8902 2017-01-10  Tom Tromey  <tom@tromey.com>
8903
8904         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
8905
8906 2017-01-10  Tom Tromey  <tom@tromey.com>
8907
8908         * python/python.c (gdbpy_eval_from_control_command)
8909         (gdbpy_source_script, gdbpy_run_events)
8910         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
8911         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
8912         gdbpy_enter.
8913
8914 2017-01-10  Tom Tromey  <tom@tromey.com>
8915
8916         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
8917
8918 2017-01-10  Tom Tromey  <tom@tromey.com>
8919
8920         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
8921
8922 2017-01-10  Tom Tromey  <tom@tromey.com>
8923
8924         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
8925         (python_on_inferior_call_pre, python_on_inferior_call_post)
8926         (python_on_memory_change, python_on_register_change)
8927         (python_inferior_exit, python_new_objfile, add_thread_object)
8928         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
8929
8930 2017-01-10  Tom Tromey  <tom@tromey.com>
8931
8932         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
8933         (bpfinishpy_handle_exit): Use gdbpy_enter.
8934
8935 2017-01-10  Tom Tromey  <tom@tromey.com>
8936
8937         * python/py-cmd.c (cmdpy_destroyer)
8938         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
8939         gdbpy_enter.
8940
8941 2017-01-10  Tom Tromey  <tom@tromey.com>
8942
8943         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8944         gdbpy_enter.
8945         (gdbpy_breakpoint_has_cond): Likewise.
8946
8947 2017-01-10  Tom Tromey  <tom@tromey.com>
8948
8949         * python/python.c (gdbpy_enter): New constructor.
8950         (~gdbpy_enter): New destructor.
8951         (restore_python_env, ensure_python_env): Rewrite.
8952         * python/python-internal.h (gdbpy_enter): New class.
8953
8954 2017-01-10  Tom Tromey  <tom@tromey.com>
8955
8956         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
8957
8958 2017-01-10  Tom Tromey  <tom@tromey.com>
8959
8960         * python/py-value.c (value_has_field, get_field_flag)
8961         (get_field_type, valpy_getitem, convert_value_from_python): Use
8962         gdbpy_ref.
8963
8964 2017-01-10  Tom Tromey  <tom@tromey.com>
8965
8966         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
8967         gdbpy_ref.
8968
8969 2017-01-10  Tom Tromey  <tom@tromey.com>
8970
8971         * python/py-prettyprint.c (search_pp_list)
8972         (find_pretty_printer_from_objfiles)
8973         (find_pretty_printer_from_progspace)
8974         (find_pretty_printer_from_gdb, find_pretty_printer)
8975         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
8976         gdbpy_ref.
8977
8978 2017-01-10  Tom Tromey  <tom@tromey.com>
8979
8980         * python/py-param.c (call_doc_function): Use gdbpy_ref.
8981
8982 2017-01-10  Tom Tromey  <tom@tromey.com>
8983
8984         * python/py-linetable.c (build_line_table_tuple_from_pcs)
8985         (ltpy_get_all_source_lines): Use gdbpy_ref.
8986
8987 2017-01-10  Tom Tromey  <tom@tromey.com>
8988
8989         * python/py-framefilter.c (extract_sym, extract_value)
8990         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
8991         gdbpy_ref.
8992
8993 2017-01-10  Tom Tromey  <tom@tromey.com>
8994
8995         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
8996
8997 2017-01-10  Tom Tromey  <tom@tromey.com>
8998
8999         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9000
9001 2017-01-10  Tom Tromey  <tom@tromey.com>
9002
9003         * python/py-function.c (convert_values_to_python, fnpy_init): Use
9004         gdbpy_ref.
9005
9006 2017-01-10  Tom Tromey  <tom@tromey.com>
9007
9008         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9009
9010 2017-01-10  Tom Tromey  <tom@tromey.com>
9011
9012         * python/py-type.c (convert_field, make_fielditem, typy_fields)
9013         (typy_range): Use gdbpy_ref.
9014
9015 2017-01-10  Tom Tromey  <tom@tromey.com>
9016
9017         * python/py-threadevent.c (create_thread_event_object): Use
9018         gdbpy_ref.
9019         * python/py-stopevent.c (create_stop_event_object): Simplify.
9020         (emit_stop_event): Use gdbpy_ref.
9021         * python/py-signalevent.c (create_signal_event_object): Use
9022         gdbpy_ref.
9023         * python/py-newobjfileevent.c (create_new_objfile_event_object)
9024         (emit_new_objfile_event, create_clear_objfiles_event_object)
9025         (emit_clear_objfiles_event): Use gdbpy_ref.
9026         * python/py-infevents.c (create_inferior_call_event_object)
9027         (create_register_changed_event_object)
9028         (create_memory_changed_event_object, emit_inferior_call_event)
9029         (emit_memory_changed_event, emit_register_changed_event): Use
9030         gdbpy_ref.
9031         * python/py-exitedevent.c (create_exited_event_object)
9032         (emit_exited_event): Use gdbpy_ref.
9033         * python/py-event.h (evpy_emit_event): Remove
9034         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9035         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9036         * python/py-continueevent.c (emit_continue_event): Use
9037         gdbpy_ref.
9038         * python/py-breakpoint.c (gdbpy_breakpoint_created)
9039         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9040         gdbpy_ref.
9041         * python/py-bpevent.c (create_breakpoint_event_object): Use
9042         gdbpy_ref.
9043
9044 2017-01-10  Tom Tromey  <tom@tromey.com>
9045
9046         * python/py-ref.h: New file.
9047
9048 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9049
9050         * cli-out.c (cli_ui_out::do_redirect): Change return type to
9051         void.
9052         * cli-out.h (cli_ui_out::do_redirect): Likewise.
9053         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9054         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9055         * ui-out.c (ui_out::redirect): Likewise.
9056         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9057         * cli/cli-logging.c (set_logging_redirect): Update call site of
9058         ui_out::redirect.
9059         (handle_redirections): Likewise.
9060         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9061         * top.c (execute_command_to_string): Likewise.
9062         * utils.c (do_ui_out_redirect_pop): Likewise.
9063
9064 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9065
9066         * stack.c (_initialize_stack): Update "frame" command help message.
9067
9068 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
9069
9070         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9071
9072 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9073
9074         * x86-linux-nat.h: Include gdb_proc_service.h.
9075
9076 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9077
9078         * ser-base.h: Include serial.h.
9079
9080 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9081
9082         * ppc-linux-tdep.h: Include ppc-tdep.h.
9083
9084 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9085
9086         * nat/amd64-linux-siginfo.h: Include signal.h.
9087
9088 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9089
9090         * nat/aarch64-linux-hw-point.h: Include break-common.h.
9091
9092 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9093
9094         * mi/mi-parse.h: Include mi-cmds.h.
9095
9096 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9097
9098         * inf-loop.c: Don't include "target.h".
9099         * inf-loop.h: Include it here.
9100
9101 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9102
9103         * dfp.h: Include "dboulest.h" and "expression.h".
9104
9105 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9106
9107         * ax-gdb.h: Include "ax.h".
9108
9109 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9110
9111         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9112         with nat/gdb_ptrace.h.
9113
9114 2017-01-05  Yao Qi  <yao.qi@linaro.org>
9115
9116         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9117         new line.
9118         (mips64_fbsd_sigframe_init): Likewise.
9119
9120 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9121
9122         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9123         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9124
9125 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9126
9127         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9128         * NEWS: Mention new FreeBSD/mips native configuration.
9129         * config/mips/fbsd.mh: New file.
9130         * configure.host: Add mips*-*-freebsd*.
9131         * mips-fbsd-nat.c: New file.
9132
9133 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9134
9135         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9136         (ALLDEPFILES): Add mips-fbsd-tdep.c.
9137         * NEWS: Mention new FreeBSD/mips target.
9138         * configure.tgt: Add mips*-*-freebsd*.
9139         * mips-fbsd-tdep.c: New file.
9140         * mips-fbsd-tdep.h: New file.
9141
9142 2017-01-04  Yao Qi  <yao.qi@linaro.org>
9143
9144         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9145         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9146
9147 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9148
9149         Update copyright year range in all GDB files.
9150
9151 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9152
9153         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9154
9155 For older changes see ChangeLog-2016.
9156 \f
9157 Local Variables:
9158 mode: change-log
9159 left-margin: 8
9160 fill-column: 74
9161 version-control: never
9162 coding: utf-8
9163 End: