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