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