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