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