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