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