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